Author: guixl
Date: Tue Jul 6 15:11:46 2010
New Revision: 960913
URL: http://svn.apache.org/viewvc?rev=960913&view=rev
Log:
fix data model problems, remove anchor element
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateFinalize_executableContent_Script.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnEntry_executableContext_Script.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnExit_executableContext_Script.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_finalize_Finalize.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_invoke_Invoke.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_content_Content.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_param_Param.gif
(with props)
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateState_finalize_Finalize.gif
(with props)
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/plugin.properties
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ContentItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/FinalizeItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnEntryItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnExitItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ParallelItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/RaiseItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ScriptItemProvider.java
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/StateItemProvider.java
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateFinalize_executableContent_Script.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateFinalize_executableContent_Script.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateFinalize_executableContent_Script.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnEntry_executableContext_Script.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnEntry_executableContext_Script.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnEntry_executableContext_Script.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnExit_executableContext_Script.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnExit_executableContext_Script.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateOnExit_executableContext_Script.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_finalize_Finalize.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_finalize_Finalize.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_finalize_Finalize.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_invoke_Invoke.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_invoke_Invoke.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateParallel_invoke_Invoke.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_content_Content.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_content_Content.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_content_Content.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_param_Param.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_param_Param.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateRaise_param_Param.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Added:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateState_finalize_Finalize.gif
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateState_finalize_Finalize.gif?rev=960913&view=auto
==============================================================================
Binary file - no diff available.
Propchange:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/icons/full/ctool16/CreateState_finalize_Finalize.gif
------------------------------------------------------------------------------
svn:mime-type = image/gif
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/plugin.properties
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/plugin.properties?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/plugin.properties
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/plugin.properties
Tue Jul 6 15:11:46 2010
@@ -164,3 +164,10 @@ _UI_Transition_event_feature = Event
_UI_Transition_cond_feature = Cond
_UI_Transition_target_feature = Target
_UI_Transition_anchor_feature = Anchor
+_UI_State_finalize_feature = Finalize
+_UI_Parallel_invoke_feature = Invoke
+_UI_Parallel_finalize_feature = Finalize
+_UI_Raise_param_feature = Param
+_UI_Raise_content_feature = Content
+_UI_Script_script_content_feature = Script content
+_UI_Content_text_content_feature = Text content
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ContentItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ContentItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ContentItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ContentItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -21,11 +21,13 @@ import org.eclipse.emf.common.util.Resou
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
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.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
@@ -63,11 +65,34 @@ public class ContentItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
+ addText_contentPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
+ * This adds a property descriptor for the Text content feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addText_contentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Content_text_content_feature"),
+
getString("_UI_PropertyDescriptor_description",
"_UI_Content_text_content_feature", "_UI_Content_type"),
+ ModelingPackage.Literals.CONTENT__TEXT_CONTENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_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
* {...@link org.eclipse.emf.edit.command.MoveCommand} in {...@link
#createCommand}.
@@ -112,7 +137,10 @@ public class ContentItemProvider
* @generated
*/
public String getText(Object object) {
- return getString("_UI_Content_type");
+ String label = ((Content)object).getText_content();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Content_type") :
+ getString("_UI_Content_type") + " " + label;
}
/**
@@ -126,6 +154,9 @@ public class ContentItemProvider
updateChildren(notification);
switch (notification.getFeatureID(Content.class)) {
+ case ModelingPackage.CONTENT__TEXT_CONTENT:
+ fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
case ModelingPackage.CONTENT__CONTENT:
fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), true, false));
return;
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/FinalizeItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/FinalizeItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/FinalizeItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/FinalizeItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -196,6 +196,11 @@ public class FinalizeItemProvider
newChildDescriptors.add
(createChildParameter
(ModelingPackage.Literals.FINALIZE__EXECUTABLE_CONTENT,
+ ModelingFactory.eINSTANCE.createScript()));
+
+ newChildDescriptors.add
+ (createChildParameter
+
(ModelingPackage.Literals.FINALIZE__EXECUTABLE_CONTENT,
ModelingFactory.eINSTANCE.createSend()));
newChildDescriptors.add
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnEntryItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnEntryItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnEntryItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnEntryItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -198,6 +198,11 @@ public class OnEntryItemProvider
newChildDescriptors.add
(createChildParameter
(ModelingPackage.Literals.ON_ENTRY__EXECUTABLE_CONTEXT,
+ ModelingFactory.eINSTANCE.createScript()));
+
+ newChildDescriptors.add
+ (createChildParameter
+
(ModelingPackage.Literals.ON_ENTRY__EXECUTABLE_CONTEXT,
ModelingFactory.eINSTANCE.createSend()));
newChildDescriptors.add
@@ -212,6 +217,28 @@ public class OnEntryItemProvider
}
/**
+ * This returns the label text for {...@link
org.eclipse.emf.edit.command.CreateChildCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCreateChildText(Object owner, Object feature, Object
child, Collection selection) {
+ Object childFeature = feature;
+ Object childObject = child;
+
+ boolean qualify =
+ childFeature ==
ModelingPackage.Literals.ON_ENTRY__EXECUTABLE_CONTEXT ||
+ childFeature ==
ModelingPackage.Literals.ON_ENTRY__SCRIPT;
+
+ if (qualify) {
+ return getString
+ ("_UI_CreateChild_text2",
+ new Object[] { getTypeText(childObject),
getFeatureText(childFeature), getTypeText(owner) });
+ }
+ return super.getCreateChildText(owner, feature, child,
selection);
+ }
+
+ /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnExitItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnExitItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnExitItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/OnExitItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -198,6 +198,11 @@ public class OnExitItemProvider
newChildDescriptors.add
(createChildParameter
(ModelingPackage.Literals.ON_EXIT__EXECUTABLE_CONTEXT,
+ ModelingFactory.eINSTANCE.createScript()));
+
+ newChildDescriptors.add
+ (createChildParameter
+
(ModelingPackage.Literals.ON_EXIT__EXECUTABLE_CONTEXT,
ModelingFactory.eINSTANCE.createSend()));
newChildDescriptors.add
@@ -212,6 +217,28 @@ public class OnExitItemProvider
}
/**
+ * This returns the label text for {...@link
org.eclipse.emf.edit.command.CreateChildCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getCreateChildText(Object owner, Object feature, Object
child, Collection selection) {
+ Object childFeature = feature;
+ Object childObject = child;
+
+ boolean qualify =
+ childFeature ==
ModelingPackage.Literals.ON_EXIT__EXECUTABLE_CONTEXT ||
+ childFeature ==
ModelingPackage.Literals.ON_EXIT__SCRIPT;
+
+ if (qualify) {
+ return getString
+ ("_UI_CreateChild_text2",
+ new Object[] { getTypeText(childObject),
getFeatureText(childFeature), getTypeText(owner) });
+ }
+ return super.getCreateChildText(owner, feature, child,
selection);
+ }
+
+ /**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ParallelItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ParallelItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ParallelItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ParallelItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -105,7 +105,8 @@ public class ParallelItemProvider
childrenFeatures.add(ModelingPackage.Literals.PARALLEL__PARALLEL);
childrenFeatures.add(ModelingPackage.Literals.PARALLEL__STATE);
childrenFeatures.add(ModelingPackage.Literals.PARALLEL__HISTORY_STATE);
-
childrenFeatures.add(ModelingPackage.Literals.PARALLEL__ANCHOR);
+
childrenFeatures.add(ModelingPackage.Literals.PARALLEL__INVOKE);
+
childrenFeatures.add(ModelingPackage.Literals.PARALLEL__FINALIZE);
}
return childrenFeatures;
}
@@ -164,7 +165,8 @@ public class ParallelItemProvider
case ModelingPackage.PARALLEL__PARALLEL:
case ModelingPackage.PARALLEL__STATE:
case ModelingPackage.PARALLEL__HISTORY_STATE:
- case ModelingPackage.PARALLEL__ANCHOR:
+ case ModelingPackage.PARALLEL__INVOKE:
+ case ModelingPackage.PARALLEL__FINALIZE:
fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -208,8 +210,13 @@ public class ParallelItemProvider
newChildDescriptors.add
(createChildParameter
- (ModelingPackage.Literals.PARALLEL__ANCHOR,
- ModelingFactory.eINSTANCE.createAnchor()));
+ (ModelingPackage.Literals.PARALLEL__INVOKE,
+ ModelingFactory.eINSTANCE.createInvoke()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ModelingPackage.Literals.PARALLEL__FINALIZE,
+ ModelingFactory.eINSTANCE.createFinalize()));
}
/**
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/RaiseItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/RaiseItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/RaiseItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/RaiseItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -10,12 +10,14 @@ package org.apache.commons.scxml.modelin
import java.util.Collection;
import java.util.List;
+import org.apache.commons.scxml.modeling.ModelingFactory;
import org.apache.commons.scxml.modeling.ModelingPackage;
import org.apache.commons.scxml.modeling.Raise;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -87,6 +89,35 @@ public class RaiseItemProvider
}
/**
+ * 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
+ */
+ public Collection getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+
childrenFeatures.add(ModelingPackage.Literals.RAISE__PARAM);
+
childrenFeatures.add(ModelingPackage.Literals.RAISE__CONTENT);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected EStructuralFeature getChildFeature(Object object, Object
child) {
+ // 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 Raise.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -123,6 +154,10 @@ public class RaiseItemProvider
case ModelingPackage.RAISE__EVENT:
fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), false, true));
return;
+ case ModelingPackage.RAISE__PARAM:
+ case ModelingPackage.RAISE__CONTENT:
+ fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -136,6 +171,16 @@ public class RaiseItemProvider
*/
protected void collectNewChildDescriptors(Collection
newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ModelingPackage.Literals.RAISE__PARAM,
+ ModelingFactory.eINSTANCE.createParam()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ModelingPackage.Literals.RAISE__CONTENT,
+ ModelingFactory.eINSTANCE.createContent()));
}
}
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ScriptItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ScriptItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ScriptItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/ScriptItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -10,9 +10,12 @@ package org.apache.commons.scxml.modelin
import java.util.Collection;
import java.util.List;
+import org.apache.commons.scxml.modeling.ModelingPackage;
+import org.apache.commons.scxml.modeling.Script;
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.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
@@ -20,6 +23,8 @@ import org.eclipse.emf.edit.provider.IIt
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.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
@@ -29,7 +34,7 @@ import org.eclipse.emf.edit.provider.Ite
* @generated
*/
public class ScriptItemProvider
- extends ItemProviderAdapter
+ extends ExecutableContentItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
@@ -56,11 +61,34 @@ public class ScriptItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
+ addScript_contentPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
+ * This adds a property descriptor for the Script content feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addScript_contentPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Script_script_content_feature"),
+
getString("_UI_PropertyDescriptor_description",
"_UI_Script_script_content_feature", "_UI_Script_type"),
+
ModelingPackage.Literals.SCRIPT__SCRIPT_CONTENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
* This returns Script.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -77,7 +105,10 @@ public class ScriptItemProvider
* @generated
*/
public String getText(Object object) {
- return getString("_UI_Script_type");
+ String label = ((Script)object).getScript_content();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Script_type") :
+ getString("_UI_Script_type") + " " + label;
}
/**
@@ -89,6 +120,12 @@ public class ScriptItemProvider
*/
public void notifyChanged(Notification notification) {
updateChildren(notification);
+
+ switch (notification.getFeatureID(Script.class)) {
+ case ModelingPackage.SCRIPT__SCRIPT_CONTENT:
+ fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
super.notifyChanged(notification);
}
@@ -103,14 +140,4 @@ public class ScriptItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
}
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ResourceLocator getResourceLocator() {
- return ModelingEditPlugin.INSTANCE;
- }
-
}
Modified:
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/StateItemProvider.java
URL:
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/StateItemProvider.java?rev=960913&r1=960912&r2=960913&view=diff
==============================================================================
---
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/StateItemProvider.java
(original)
+++
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.modeling.edit/src/org/apache/commons/scxml/modeling/provider/StateItemProvider.java
Tue Jul 6 15:11:46 2010
@@ -130,8 +130,8 @@ public class StateItemProvider
childrenFeatures.add(ModelingPackage.Literals.STATE__FINAL_STATE);
childrenFeatures.add(ModelingPackage.Literals.STATE__SUB_PARALLEL);
childrenFeatures.add(ModelingPackage.Literals.STATE__HISTORY_STATE);
-
childrenFeatures.add(ModelingPackage.Literals.STATE__ANCHOR);
childrenFeatures.add(ModelingPackage.Literals.STATE__INVOKE);
+
childrenFeatures.add(ModelingPackage.Literals.STATE__FINALIZE);
}
return childrenFeatures;
}
@@ -193,8 +193,8 @@ public class StateItemProvider
case ModelingPackage.STATE__FINAL_STATE:
case ModelingPackage.STATE__SUB_PARALLEL:
case ModelingPackage.STATE__HISTORY_STATE:
- case ModelingPackage.STATE__ANCHOR:
case ModelingPackage.STATE__INVOKE:
+ case ModelingPackage.STATE__FINALIZE:
fireNotifyChanged(new
ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -248,13 +248,13 @@ public class StateItemProvider
newChildDescriptors.add
(createChildParameter
- (ModelingPackage.Literals.STATE__ANCHOR,
- ModelingFactory.eINSTANCE.createAnchor()));
+ (ModelingPackage.Literals.STATE__INVOKE,
+ ModelingFactory.eINSTANCE.createInvoke()));
newChildDescriptors.add
(createChildParameter
- (ModelingPackage.Literals.STATE__INVOKE,
- ModelingFactory.eINSTANCE.createInvoke()));
+ (ModelingPackage.Literals.STATE__FINALIZE,
+ ModelingFactory.eINSTANCE.createFinalize()));
}
/**