فهرست منبع

RESOLVED - issue YAKHMI-69: Refactor DebugModel

Andreas Mülder 14 سال پیش
والد
کامیت
8290a16aeb

+ 2 - 0
plugins/org.yakindu.sct.model.sgraph.edit/plugin.properties

@@ -134,3 +134,5 @@ _UI_State_submachine_feature = Submachine
 _UI_State_simple_feature = Simple
 _UI_State_composite_feature = Composite
 _UI_Statement_type = Statement
+_UI_State_isLeaf_feature = Is Leaf
+_UI_State_leaf_feature = Leaf

+ 0 - 3
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/FinalStateItemProvider.java

@@ -16,16 +16,13 @@ import java.util.List;
 
 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.IEditingDomainItemProvider;
 import org.eclipse.emf.edit.provider.IItemLabelProvider;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
 import org.eclipse.emf.edit.provider.IItemPropertySource;
 import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
 import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
 import org.yakindu.sct.model.sgraph.FinalState;
-import org.yakindu.sct.model.sgraph.SGraphPackage;
 
 /**
  * This is the item provider adapter for a {@link org.yakindu.sct.model.sgraph.FinalState} object.

+ 24 - 0
plugins/org.yakindu.sct.model.sgraph.edit/src/org/yakindu/sct/model/sgraph/provider/StateItemProvider.java

@@ -79,6 +79,7 @@ public class StateItemProvider
 			addSubmachinePropertyDescriptor(object);
 			addSimplePropertyDescriptor(object);
 			addCompositePropertyDescriptor(object);
+			addLeafPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -237,6 +238,28 @@ public class StateItemProvider
 				 null));
 	}
 
+	/**
+	 * This adds a property descriptor for the Leaf feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addLeafPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_State_leaf_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_State_leaf_feature", "_UI_State_type"),
+				 SGraphPackage.Literals.STATE__LEAF,
+				 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
@@ -311,6 +334,7 @@ public class StateItemProvider
 			case SGraphPackage.STATE__SUBMACHINE:
 			case SGraphPackage.STATE__SIMPLE:
 			case SGraphPackage.STATE__COMPOSITE:
+			case SGraphPackage.STATE__LEAF:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
 			case SGraphPackage.STATE__LOCAL_REACTIONS: