|
|
@@ -32,9 +32,10 @@ import org.yakindu.base.types.TypesFactory;
|
|
|
import org.yakindu.base.types.TypesPackage;
|
|
|
|
|
|
/**
|
|
|
- * This is the item provider adapter for a {@link org.yakindu.base.types.Operation} object.
|
|
|
- * <!-- begin-user-doc --> <!--
|
|
|
+ * This is the item provider adapter for a
|
|
|
+ * {@link org.yakindu.base.types.Operation} object. <!-- begin-user-doc --> <!--
|
|
|
* end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
@@ -65,32 +66,28 @@ public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * This adds a property descriptor for the Variadic feature.
|
|
|
- * <!-- begin-user-doc -->
|
|
|
- * <!-- end-user-doc -->
|
|
|
+ * This adds a property descriptor for the Variadic feature. <!-- begin-user-doc
|
|
|
+ * --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
protected void addVariadicPropertyDescriptor(Object object) {
|
|
|
- itemPropertyDescriptors.add
|
|
|
- (createItemPropertyDescriptor
|
|
|
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
|
|
|
- getResourceLocator(),
|
|
|
- getString("_UI_Operation_variadic_feature"),
|
|
|
- getString("_UI_PropertyDescriptor_description", "_UI_Operation_variadic_feature", "_UI_Operation_type"),
|
|
|
- TypesPackage.Literals.OPERATION__VARIADIC,
|
|
|
- false,
|
|
|
- false,
|
|
|
- false,
|
|
|
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
|
|
|
- null,
|
|
|
- null));
|
|
|
+ itemPropertyDescriptors
|
|
|
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
|
|
|
+ getResourceLocator(), getString("_UI_Operation_variadic_feature"),
|
|
|
+ getString("_UI_PropertyDescriptor_description", "_UI_Operation_variadic_feature",
|
|
|
+ "_UI_Operation_type"),
|
|
|
+ TypesPackage.Literals.OPERATION__VARIADIC, false, false, false,
|
|
|
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
|
|
|
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
|
|
|
+ * This specifies how to implement {@link #getChildren} and is used to deduce an
|
|
|
+ * appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand},
|
|
|
+ * {@link org.eclipse.emf.edit.command.RemoveCommand} or
|
|
|
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
|
|
|
* <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
@@ -105,19 +102,21 @@ public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
|
|
|
/**
|
|
|
* <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
protected EStructuralFeature getChildFeature(Object object, Object child) {
|
|
|
- // Check the type of the specified child object and return the proper feature to use for
|
|
|
+ // Check the type of the specified child object and return the proper feature to
|
|
|
+ // use for
|
|
|
// adding (see {@link AddCommand}) it as a child.
|
|
|
|
|
|
return super.getChildFeature(object, child);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * This returns Operation.gif.
|
|
|
- * <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ * This returns Operation.gif. <!-- begin-user-doc --> <!-- end-user-doc -->
|
|
|
+ *
|
|
|
* @generated
|
|
|
*/
|
|
|
@Override
|
|
|
@@ -142,14 +141,14 @@ public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
builder.append(sep);
|
|
|
builder.append(parameter.getName());
|
|
|
builder.append(" : ");
|
|
|
- String typeName = getTypeName(parameter.getTypeSpecifier());
|
|
|
+ String typeName = parameter.getType().getName();
|
|
|
builder.append(typeName);
|
|
|
sep = ", ";
|
|
|
}
|
|
|
builder.append(")");
|
|
|
if (operation.getType() != null) {
|
|
|
builder.append(" : ");
|
|
|
- String name = getTypeName(operation.getTypeSpecifier());
|
|
|
+ String name = operation.getType().getName();
|
|
|
builder.append(name == null ? "void" : name);
|
|
|
}
|
|
|
return builder.toString();
|
|
|
@@ -170,10 +169,10 @@ public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 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 -->
|
|
|
+ * 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
|
|
|
@@ -181,21 +180,21 @@ public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
updateChildren(notification);
|
|
|
|
|
|
switch (notification.getFeatureID(Operation.class)) {
|
|
|
- case TypesPackage.OPERATION__VARIADIC:
|
|
|
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
|
|
|
- return;
|
|
|
- case TypesPackage.OPERATION__TYPE_PARAMETERS:
|
|
|
- case TypesPackage.OPERATION__PARAMETERS:
|
|
|
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
|
|
|
- return;
|
|
|
+ case TypesPackage.OPERATION__VARIADIC:
|
|
|
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
|
|
|
+ return;
|
|
|
+ case TypesPackage.OPERATION__TYPE_PARAMETERS:
|
|
|
+ case TypesPackage.OPERATION__PARAMETERS:
|
|
|
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
|
|
|
+ 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 -->
|
|
|
+ * 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
|
|
|
*/
|
|
|
@@ -203,15 +202,11 @@ public class OperationItemProvider extends DeclarationItemProvider {
|
|
|
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
|
|
|
super.collectNewChildDescriptors(newChildDescriptors, object);
|
|
|
|
|
|
- newChildDescriptors.add
|
|
|
- (createChildParameter
|
|
|
- (TypesPackage.Literals.GENERIC_ELEMENT__TYPE_PARAMETERS,
|
|
|
- TypesFactory.eINSTANCE.createTypeParameter()));
|
|
|
+ newChildDescriptors.add(createChildParameter(TypesPackage.Literals.GENERIC_ELEMENT__TYPE_PARAMETERS,
|
|
|
+ TypesFactory.eINSTANCE.createTypeParameter()));
|
|
|
|
|
|
- newChildDescriptors.add
|
|
|
- (createChildParameter
|
|
|
- (TypesPackage.Literals.OPERATION__PARAMETERS,
|
|
|
- TypesFactory.eINSTANCE.createParameter()));
|
|
|
+ newChildDescriptors.add(createChildParameter(TypesPackage.Literals.OPERATION__PARAMETERS,
|
|
|
+ TypesFactory.eINSTANCE.createParameter()));
|
|
|
}
|
|
|
|
|
|
}
|