Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
added reactions to scope, removed declaration from Reaction #756
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasmuelder committed Jun 14, 2016
1 parent 1d3dba3 commit 8c7bb08
Show file tree
Hide file tree
Showing 40 changed files with 429 additions and 435 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package org.yakindu.base.expressions.expressions;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
package org.yakindu.base.expressions.expressions;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EObject;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,36 @@

import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;

import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;

import org.eclipse.emf.ecore.EObject;

import org.yakindu.base.expressions.expressions.*;
import org.yakindu.base.expressions.expressions.AssignmentExpression;
import org.yakindu.base.expressions.expressions.BitwiseAndExpression;
import org.yakindu.base.expressions.expressions.BitwiseOrExpression;
import org.yakindu.base.expressions.expressions.BitwiseXorExpression;
import org.yakindu.base.expressions.expressions.BoolLiteral;
import org.yakindu.base.expressions.expressions.ConditionalExpression;
import org.yakindu.base.expressions.expressions.DoubleLiteral;
import org.yakindu.base.expressions.expressions.ElementReferenceExpression;
import org.yakindu.base.expressions.expressions.Expression;
import org.yakindu.base.expressions.expressions.ExpressionsPackage;
import org.yakindu.base.expressions.expressions.FeatureCall;
import org.yakindu.base.expressions.expressions.FloatLiteral;
import org.yakindu.base.expressions.expressions.HexLiteral;
import org.yakindu.base.expressions.expressions.IntLiteral;
import org.yakindu.base.expressions.expressions.Literal;
import org.yakindu.base.expressions.expressions.LogicalAndExpression;
import org.yakindu.base.expressions.expressions.LogicalNotExpression;
import org.yakindu.base.expressions.expressions.LogicalOrExpression;
import org.yakindu.base.expressions.expressions.LogicalRelationExpression;
import org.yakindu.base.expressions.expressions.NullLiteral;
import org.yakindu.base.expressions.expressions.NumericalAddSubtractExpression;
import org.yakindu.base.expressions.expressions.NumericalMultiplyDivideExpression;
import org.yakindu.base.expressions.expressions.NumericalUnaryExpression;
import org.yakindu.base.expressions.expressions.ParenthesizedExpression;
import org.yakindu.base.expressions.expressions.PrimitiveValueExpression;
import org.yakindu.base.expressions.expressions.ShiftExpression;
import org.yakindu.base.expressions.expressions.StringLiteral;
import org.yakindu.base.expressions.expressions.TypeCastExpression;

/**
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,35 @@

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

import org.yakindu.base.expressions.expressions.*;
import org.yakindu.base.expressions.expressions.AssignmentExpression;
import org.yakindu.base.expressions.expressions.BitwiseAndExpression;
import org.yakindu.base.expressions.expressions.BitwiseOrExpression;
import org.yakindu.base.expressions.expressions.BitwiseXorExpression;
import org.yakindu.base.expressions.expressions.BoolLiteral;
import org.yakindu.base.expressions.expressions.ConditionalExpression;
import org.yakindu.base.expressions.expressions.DoubleLiteral;
import org.yakindu.base.expressions.expressions.ElementReferenceExpression;
import org.yakindu.base.expressions.expressions.Expression;
import org.yakindu.base.expressions.expressions.ExpressionsPackage;
import org.yakindu.base.expressions.expressions.FeatureCall;
import org.yakindu.base.expressions.expressions.FloatLiteral;
import org.yakindu.base.expressions.expressions.HexLiteral;
import org.yakindu.base.expressions.expressions.IntLiteral;
import org.yakindu.base.expressions.expressions.Literal;
import org.yakindu.base.expressions.expressions.LogicalAndExpression;
import org.yakindu.base.expressions.expressions.LogicalNotExpression;
import org.yakindu.base.expressions.expressions.LogicalOrExpression;
import org.yakindu.base.expressions.expressions.LogicalRelationExpression;
import org.yakindu.base.expressions.expressions.NullLiteral;
import org.yakindu.base.expressions.expressions.NumericalAddSubtractExpression;
import org.yakindu.base.expressions.expressions.NumericalMultiplyDivideExpression;
import org.yakindu.base.expressions.expressions.NumericalUnaryExpression;
import org.yakindu.base.expressions.expressions.ParenthesizedExpression;
import org.yakindu.base.expressions.expressions.PrimitiveValueExpression;
import org.yakindu.base.expressions.expressions.ShiftExpression;
import org.yakindu.base.expressions.expressions.StringLiteral;
import org.yakindu.base.expressions.expressions.TypeCastExpression;

/**
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
Expand All @@ -21,7 +19,6 @@
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;

import org.yakindu.base.base.BasePackage;
import org.yakindu.base.base.DomainElement;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
Expand All @@ -19,7 +17,6 @@
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;

import org.yakindu.base.types.TypesPackage;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
Expand All @@ -28,9 +26,7 @@
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;

import org.yakindu.base.base.BasePackage;

import org.yakindu.base.types.Declaration;
import org.yakindu.base.types.TypesPackage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.common.util.ResourceLocator;

import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
Expand All @@ -29,7 +27,6 @@
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;

import org.yakindu.base.types.Domain;
import org.yakindu.base.types.TypesPackage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
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.yakindu.base.base.provider.NamedElementItemProvider;
import org.yakindu.base.types.Enumerator;
import org.yakindu.base.types.TypesPackage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.yakindu.base.base.*;
import org.yakindu.base.base.BaseFactory;
import org.yakindu.base.base.BasePackage;
import org.yakindu.base.base.DocumentedElement;
import org.yakindu.base.base.DomainElement;
import org.yakindu.base.base.NamedElement;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
package org.yakindu.base.base.impl;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;

import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.EObjectImpl;

import org.yakindu.base.base.BasePackage;
import org.yakindu.base.base.DomainElement;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
import org.yakindu.base.base.*;
import org.yakindu.base.base.BasePackage;
import org.yakindu.base.base.DocumentedElement;
import org.yakindu.base.base.DomainElement;
import org.yakindu.base.base.NamedElement;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.yakindu.base.base.*;
import org.yakindu.base.base.BasePackage;
import org.yakindu.base.base.DocumentedElement;
import org.yakindu.base.base.DomainElement;
import org.yakindu.base.base.NamedElement;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,10 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addReactionsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Reactions feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addReactionsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ReactiveElement_reactions_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ReactiveElement_reactions_feature", "_UI_ReactiveElement_type"),
SGraphPackage.Literals.REACTIVE_ELEMENT__REACTIONS,
false,
false,
false,
null,
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object objec
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(SGraphPackage.Literals.SCOPE__DECLARATIONS);
childrenFeatures.add(SGraphPackage.Literals.SCOPE__REACTIONS);
}
return childrenFeatures;
}
Expand Down Expand Up @@ -189,6 +190,7 @@ public void notifyChanged(Notification notification) {

switch (notification.getFeatureID(Scope.class)) {
case SGraphPackage.SCOPE__DECLARATIONS:
case SGraphPackage.SCOPE__REACTIONS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
Expand Down Expand Up @@ -225,6 +227,16 @@ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors
(createChildParameter
(SGraphPackage.Literals.SCOPE__DECLARATIONS,
TypesFactory.eINSTANCE.createEvent()));

newChildDescriptors.add
(createChildParameter
(SGraphPackage.Literals.SCOPE__DECLARATIONS,
TypesFactory.eINSTANCE.createEnumerator()));

newChildDescriptors.add
(createChildParameter
(SGraphPackage.Literals.SCOPE__REACTIONS,
SGraphFactory.eINSTANCE.createTransition()));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addReactionsPropertyDescriptor(object);
addNamespacePropertyDescriptor(object);
addNamePropertyDescriptor(object);
addIncomingTransitionsPropertyDescriptor(object);
Expand All @@ -78,28 +77,6 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Reactions feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addReactionsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ReactiveElement_reactions_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ReactiveElement_reactions_feature", "_UI_ReactiveElement_type"),
SGraphPackage.Literals.REACTIVE_ELEMENT__REACTIONS,
false,
false,
false,
null,
null,
null));
}

/**
* This adds a property descriptor for the Namespace feature.
* <!-- begin-user-doc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);

addReactionsPropertyDescriptor(object);
addNamespacePropertyDescriptor(object);
addNamePropertyDescriptor(object);
addDocumentationPropertyDescriptor(object);
Expand All @@ -71,28 +70,6 @@ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
return itemPropertyDescriptors;
}

/**
* This adds a property descriptor for the Reactions feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addReactionsPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_ReactiveElement_reactions_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_ReactiveElement_reactions_feature", "_UI_ReactiveElement_type"),
SGraphPackage.Literals.REACTIVE_ELEMENT__REACTIONS,
false,
false,
false,
null,
null,
null));
}

/**
* This adds a property descriptor for the Namespace feature.
* <!-- begin-user-doc -->
Expand Down
4 changes: 2 additions & 2 deletions plugins/org.yakindu.sct.model.sgraph/model/emf/sgraph.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Exit" eSuperTypes="#//Pseudostate"/>
<eClassifiers xsi:type="ecore:EClass" name="ReactiveElement" abstract="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
eType="#//Reaction" changeable="false" volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="localReactions" upperBound="-1"
eType="#//Reaction" changeable="false" volatile="true" transient="true" derived="true"/>
</eClassifiers>
Expand Down Expand Up @@ -70,6 +68,8 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="variables" unique="false"
upperBound="-1" eType="ecore:EClass ../../../org.yakindu.base.types/model/types.ecore#//Property"
changeable="false" volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="reactions" upperBound="-1"
eType="#//Reaction" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ScopedElement" abstract="true">
<eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1"
Expand Down
Loading

0 comments on commit 8c7bb08

Please sign in to comment.