Skip to content

Commit

Permalink
Fixed #419 Add support for Sequence and OrderedSet variables binding …
Browse files Browse the repository at this point in the history
…in generation configuration.
  • Loading branch information
ylussaud committed Sep 14, 2023
1 parent 3b6bde0 commit f8ee96c
Show file tree
Hide file tree
Showing 92 changed files with 7,814 additions and 251 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions plugins/org.obeonetwork.m2doc.genconf.edit/icons/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@ These followings icons are made available under the terms of the Eclipse Public

<icon file path> - <original eclipse plug-in> - <original file path>

icons/full/obj16/ModelDefinition.gif - org.eclipse.jdt.debug.ui - org.eclipse.jdt.debug.ui/icons/full/obj16/jmeth_obj.gif
icons/full/obj16/Generation.gif - org.eclipse.platform.doc.user - org.eclipse.platform.doc.user/images/help_icon_capabilities.png
icons/full/obj16/BooleanDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralBoolean.gif
icons/full/obj16/IntegerDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralInteger.gif
icons/full/obj16/RealDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralReal.gif
icons/full/obj16/StringDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralString.gif
icons/full/obj16/ModelDefinition.gif - org.eclipse.jdt.debug.ui - org.eclipse.jdt.debug.ui/icons/full/obj16/jmeth_obj.gif
icons/full/obj16/ModelSequenceDefinition.gif - org.eclipse.jdt.debug.ui - org.eclipse.jdt.debug.ui/icons/full/obj16/jmeth_obj.gif
icons/full/obj16/ModelOrderedSetDefinition.gif - org.eclipse.jdt.debug.ui - org.eclipse.jdt.debug.ui/icons/full/obj16/jmeth_obj.gif
icons/full/obj16/Generation.gif - org.eclipse.platform.doc.user - org.eclipse.platform.doc.user/images/help_icon_capabilities.png
icons/full/obj16/BooleanDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralBoolean.gif
icons/full/obj16/BooleanSequenceDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralBoolean.gif
icons/full/obj16/BooleanOrderedSetDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralBoolean.gif
icons/full/obj16/IntegerDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralInteger.gif
icons/full/obj16/IntegerSequenceDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralInteger.gif
icons/full/obj16/IntegerOrderedSetDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralInteger.gif
icons/full/obj16/RealDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralReal.gif
icons/full/obj16/RealSequenceDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralReal.gif
icons/full/obj16/RealOrderedSetDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralReal.gif
icons/full/obj16/StringDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralString.gif
icons/full/obj16/StringSequenceDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralString.gif
icons/full/obj16/StringOrderedSetDefinition.gif - org.eclipse.uml2 - plugins/org.eclipse.uml2.uml.edit/icons/full/obj16/LiteralString.gif
22 changes: 21 additions & 1 deletion plugins/org.obeonetwork.m2doc.genconf.edit/plugin.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2016, 2020 Obeo.
# Copyright (c) 2016, 2023 Obeo.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
Expand Down Expand Up @@ -57,3 +57,23 @@ _UI_IntegerDefinition_value_feature = Value
_UI_RealDefinition_value_feature = Value
_UI_BooleanDefinition_value_feature = Value
_UI_Generation_validationFileName_feature = Validation File Name
_UI_ModelSequenceDefinition_type = Model Sequence Definition
_UI_ModelOrderedSetDefinition_type = Model Ordered Set Definition
_UI_StringSequenceDefinition_type = String Sequence Definition
_UI_StringOrderedSetDefinition_type = String Ordered Set Definition
_UI_IntegerSequenceDefinition_type = Integer Sequence Definition
_UI_IntegerOrderedSetDefinition_type = Integer Ordered Set Definition
_UI_RealSequenceDefinition_type = Real Sequence Definition
_UI_RealOrderedSetDefinition_type = Real Ordered Set Definition
_UI_BooleanSequenceDefinition_type = Boolean Sequence Definition
_UI_BooleanOrderedSetDefinition_type = Boolean Ordered Set Definition
_UI_ModelSequenceDefinition_value_feature = Value
_UI_ModelOrderedSetDefinition_value_feature = Value
_UI_StringSequenceDefinition_value_feature = Value
_UI_StringOrderedSetDefinition_value_feature = Value
_UI_IntegerSequenceDefinition_value_feature = Value
_UI_IntegerOrderedSetDefinition_value_feature = Value
_UI_RealSequenceDefinition_value_feature = Value
_UI_RealOrderedSetDefinition_value_feature = Value
_UI_BooleanSequenceDefinition_value_feature = Value
_UI_BooleanOrderedSetDefinition_value_feature = Value
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/**
*/
package org.obeonetwork.m2doc.genconf.provider;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.obeonetwork.m2doc.genconf.BooleanOrderedSetDefinition;
import org.obeonetwork.m2doc.genconf.GenconfPackage;

/**
* This is the item provider adapter for a {@link org.obeonetwork.m2doc.genconf.BooleanOrderedSetDefinition} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public class BooleanOrderedSetDefinitionItemProvider extends DefinitionItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public BooleanOrderedSetDefinitionItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}

/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addValuePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Value feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_BooleanOrderedSetDefinition_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BooleanOrderedSetDefinition_value_feature",
"_UI_BooleanOrderedSetDefinition_type"),
GenconfPackage.Literals.BOOLEAN_ORDERED_SET_DEFINITION__VALUE, true, false, false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}

/**
* This returns BooleanOrderedSetDefinition.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanOrderedSetDefinition"));
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getText(Object object) {
String label = ((BooleanOrderedSetDefinition) object).getKey();
return label == null || label.length() == 0 ? getString("_UI_BooleanOrderedSetDefinition_type")
: getString("_UI_BooleanOrderedSetDefinition_type") + " " + label;
}

/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(BooleanOrderedSetDefinition.class)) {
case GenconfPackage.BOOLEAN_ORDERED_SET_DEFINITION__VALUE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}

/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/**
*/
package org.obeonetwork.m2doc.genconf.provider;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.obeonetwork.m2doc.genconf.BooleanSequenceDefinition;
import org.obeonetwork.m2doc.genconf.GenconfPackage;

/**
* This is the item provider adapter for a {@link org.obeonetwork.m2doc.genconf.BooleanSequenceDefinition} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public class BooleanSequenceDefinitionItemProvider extends DefinitionItemProvider {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public BooleanSequenceDefinitionItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}

/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addValuePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Value feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_BooleanSequenceDefinition_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_BooleanSequenceDefinition_value_feature",
"_UI_BooleanSequenceDefinition_type"),
GenconfPackage.Literals.BOOLEAN_SEQUENCE_DEFINITION__VALUE, true, false, false,
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
}

/**
* This returns BooleanSequenceDefinition.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanSequenceDefinition"));
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected boolean shouldComposeCreationImage() {
return true;
}

/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getText(Object object) {
String label = ((BooleanSequenceDefinition) object).getKey();
return label == null || label.length() == 0 ? getString("_UI_BooleanSequenceDefinition_type")
: getString("_UI_BooleanSequenceDefinition_type") + " " + label;
}

/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);

switch (notification.getFeatureID(BooleanSequenceDefinition.class)) {
case GenconfPackage.BOOLEAN_SEQUENCE_DEFINITION__VALUE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
}
super.notifyChanged(notification);
}

/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}

}
Loading

0 comments on commit f8ee96c

Please sign in to comment.