Added: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/SendItemProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/SendItemProvider.java?rev=945188&view=auto
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/SendItemProvider.java
 (added)
+++ 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/SendItemProvider.java
 Mon May 17 14:46:55 2010
@@ -0,0 +1,488 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ *
+ * $Id$
+ */
+package org.apache.commons.scxml.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.scxml.ScxmlFactory;
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.Send;
+
+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;
+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;
+
+/**
+ * This is the item provider adapter for a {...@link 
org.apache.commons.scxml.Send} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class SendItemProvider
+       extends ExecutableContentItemProvider
+       implements
+               IEditingDomainItemProvider,
+               IStructuredItemContentProvider,
+               ITreeItemContentProvider,
+               IItemLabelProvider,
+               IItemPropertySource {
+       /**
+        * This constructs an instance from a factory and a notifier.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public SendItemProvider(AdapterFactory adapterFactory) {
+               super(adapterFactory);
+       }
+
+       /**
+        * This returns the property descriptors for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public List getPropertyDescriptors(Object object) {
+               if (itemPropertyDescriptors == null) {
+                       super.getPropertyDescriptors(object);
+
+                       addEventPropertyDescriptor(object);
+                       addEventexprPropertyDescriptor(object);
+                       addTargetPropertyDescriptor(object);
+                       addTargetexprPropertyDescriptor(object);
+                       addTypePropertyDescriptor(object);
+                       addTypeexprPropertyDescriptor(object);
+                       addIdPropertyDescriptor(object);
+                       addIdlocationPropertyDescriptor(object);
+                       addDelayPropertyDescriptor(object);
+                       addDelayexprPropertyDescriptor(object);
+                       addNamelistPropertyDescriptor(object);
+                       addHintsPropertyDescriptor(object);
+                       addHintsexprPropertyDescriptor(object);
+               }
+               return itemPropertyDescriptors;
+       }
+
+       /**
+        * This adds a property descriptor for the Event feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addEventPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_event_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_event_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__EVENT,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Eventexpr feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addEventexprPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_eventexpr_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_eventexpr_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__EVENTEXPR,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Target feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addTargetPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_target_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_target_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__TARGET,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Targetexpr feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addTargetexprPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_targetexpr_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_targetexpr_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__TARGETEXPR,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Type feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addTypePropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_type_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_type_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__TYPE,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Typeexpr feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addTypeexprPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_typeexpr_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_typeexpr_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__TYPEEXPR,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Id feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addIdPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_id_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_id_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__ID,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Idlocation feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addIdlocationPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_idlocation_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_idlocation_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__IDLOCATION,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Delay feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addDelayPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_delay_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_delay_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__DELAY,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Delayexpr feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addDelayexprPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_delayexpr_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_delayexpr_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__DELAYEXPR,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Namelist feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addNamelistPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_namelist_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_namelist_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__NAMELIST,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Hints feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addHintsPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_hints_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_hints_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__HINTS,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Hintsexpr feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addHintsexprPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Send_hintsexpr_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Send_hintsexpr_feature", 
"_UI_Send_type"),
+                                ScxmlPackage.Literals.SEND__HINTSEXPR,
+                                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}.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Collection getChildrenFeatures(Object object) {
+               if (childrenFeatures == null) {
+                       super.getChildrenFeatures(object);
+                       childrenFeatures.add(ScxmlPackage.Literals.SEND__PARAM);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SEND__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 Send.gif.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Object getImage(Object object) {
+               return overlayImage(object, 
getResourceLocator().getImage("full/obj16/Send"));
+       }
+
+       /**
+        * This returns the label text for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public String getText(Object object) {
+               String label = ((Send)object).getId();
+               return label == null || label.length() == 0 ?
+                       getString("_UI_Send_type") :
+                       getString("_UI_Send_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
+        */
+       public void notifyChanged(Notification notification) {
+               updateChildren(notification);
+
+               switch (notification.getFeatureID(Send.class)) {
+                       case ScxmlPackage.SEND__EVENT:
+                       case ScxmlPackage.SEND__EVENTEXPR:
+                       case ScxmlPackage.SEND__TARGET:
+                       case ScxmlPackage.SEND__TARGETEXPR:
+                       case ScxmlPackage.SEND__TYPE:
+                       case ScxmlPackage.SEND__TYPEEXPR:
+                       case ScxmlPackage.SEND__ID:
+                       case ScxmlPackage.SEND__IDLOCATION:
+                       case ScxmlPackage.SEND__DELAY:
+                       case ScxmlPackage.SEND__DELAYEXPR:
+                       case ScxmlPackage.SEND__NAMELIST:
+                       case ScxmlPackage.SEND__HINTS:
+                       case ScxmlPackage.SEND__HINTSEXPR:
+                               fireNotifyChanged(new 
ViewerNotification(notification, notification.getNotifier(), false, true));
+                               return;
+                       case ScxmlPackage.SEND__PARAM:
+                       case ScxmlPackage.SEND__CONTENT:
+                               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 -->
+        * @generated
+        */
+       protected void collectNewChildDescriptors(Collection 
newChildDescriptors, Object object) {
+               super.collectNewChildDescriptors(newChildDescriptors, object);
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.SEND__PARAM,
+                                ScxmlFactory.eINSTANCE.createParam()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.SEND__CONTENT,
+                                ScxmlFactory.eINSTANCE.createContent()));
+       }
+
+}

Propchange: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/SendItemProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ServiceTemplateItemProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ServiceTemplateItemProvider.java?rev=945188&view=auto
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ServiceTemplateItemProvider.java
 (added)
+++ 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ServiceTemplateItemProvider.java
 Mon May 17 14:46:55 2010
@@ -0,0 +1,368 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ *
+ * $Id$
+ */
+package org.apache.commons.scxml.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.scxml.ScxmlFactory;
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.ServiceTemplate;
+
+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.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;
+
+/**
+ * This is the item provider adapter for a {...@link 
org.apache.commons.scxml.ServiceTemplate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ServiceTemplateItemProvider
+       extends ItemProviderAdapter
+       implements
+               IEditingDomainItemProvider,
+               IStructuredItemContentProvider,
+               ITreeItemContentProvider,
+               IItemLabelProvider,
+               IItemPropertySource {
+       /**
+        * This constructs an instance from a factory and a notifier.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public ServiceTemplateItemProvider(AdapterFactory adapterFactory) {
+               super(adapterFactory);
+       }
+
+       /**
+        * This returns the property descriptors for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public List getPropertyDescriptors(Object object) {
+               if (itemPropertyDescriptors == null) {
+                       super.getPropertyDescriptors(object);
+
+                       addInitialPropertyDescriptor(object);
+                       addNamePropertyDescriptor(object);
+                       addXmlnsPropertyDescriptor(object);
+                       addVersionPropertyDescriptor(object);
+                       addProfilePropertyDescriptor(object);
+                       addExmodePropertyDescriptor(object);
+               }
+               return itemPropertyDescriptors;
+       }
+
+       /**
+        * This adds a property descriptor for the Initial feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addInitialPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                
getString("_UI_ServiceTemplate_initial_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_ServiceTemplate_initial_feature", "_UI_ServiceTemplate_type"),
+                                
ScxmlPackage.Literals.SERVICE_TEMPLATE__INITIAL,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Name feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addNamePropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_ServiceTemplate_name_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_ServiceTemplate_name_feature", "_UI_ServiceTemplate_type"),
+                                ScxmlPackage.Literals.SERVICE_TEMPLATE__NAME,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Xmlns feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addXmlnsPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_ServiceTemplate_xmlns_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_ServiceTemplate_xmlns_feature", "_UI_ServiceTemplate_type"),
+                                ScxmlPackage.Literals.SERVICE_TEMPLATE__XMLNS,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Version feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addVersionPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                
getString("_UI_ServiceTemplate_version_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_ServiceTemplate_version_feature", "_UI_ServiceTemplate_type"),
+                                
ScxmlPackage.Literals.SERVICE_TEMPLATE__VERSION,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Profile feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addProfilePropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                
getString("_UI_ServiceTemplate_profile_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_ServiceTemplate_profile_feature", "_UI_ServiceTemplate_type"),
+                                
ScxmlPackage.Literals.SERVICE_TEMPLATE__PROFILE,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Exmode feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addExmodePropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                
getString("_UI_ServiceTemplate_exmode_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_ServiceTemplate_exmode_feature", "_UI_ServiceTemplate_type"),
+                                ScxmlPackage.Literals.SERVICE_TEMPLATE__EXMODE,
+                                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}.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Collection getChildrenFeatures(Object object) {
+               if (childrenFeatures == null) {
+                       super.getChildrenFeatures(object);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__TRANS_LIST);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__STATE_LIST);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__INITIAL_STATE);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__FINAL_STATE);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__PARALLEL);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__DATA_MODEL);
+                       
childrenFeatures.add(ScxmlPackage.Literals.SERVICE_TEMPLATE__SCRIPT);
+               }
+               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 ServiceTemplate.gif.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Object getImage(Object object) {
+               return overlayImage(object, 
getResourceLocator().getImage("full/obj16/ServiceTemplate"));
+       }
+
+       /**
+        * This returns the label text for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public String getText(Object object) {
+               String label = ((ServiceTemplate)object).getName();
+               return label == null || label.length() == 0 ?
+                       getString("_UI_ServiceTemplate_type") :
+                       getString("_UI_ServiceTemplate_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
+        */
+       public void notifyChanged(Notification notification) {
+               updateChildren(notification);
+
+               switch (notification.getFeatureID(ServiceTemplate.class)) {
+                       case ScxmlPackage.SERVICE_TEMPLATE__INITIAL:
+                       case ScxmlPackage.SERVICE_TEMPLATE__NAME:
+                       case ScxmlPackage.SERVICE_TEMPLATE__XMLNS:
+                       case ScxmlPackage.SERVICE_TEMPLATE__VERSION:
+                       case ScxmlPackage.SERVICE_TEMPLATE__PROFILE:
+                       case ScxmlPackage.SERVICE_TEMPLATE__EXMODE:
+                               fireNotifyChanged(new 
ViewerNotification(notification, notification.getNotifier(), false, true));
+                               return;
+                       case ScxmlPackage.SERVICE_TEMPLATE__TRANS_LIST:
+                       case ScxmlPackage.SERVICE_TEMPLATE__STATE_LIST:
+                       case ScxmlPackage.SERVICE_TEMPLATE__INITIAL_STATE:
+                       case ScxmlPackage.SERVICE_TEMPLATE__FINAL_STATE:
+                       case ScxmlPackage.SERVICE_TEMPLATE__PARALLEL:
+                       case ScxmlPackage.SERVICE_TEMPLATE__DATA_MODEL:
+                       case ScxmlPackage.SERVICE_TEMPLATE__SCRIPT:
+                               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 -->
+        * @generated
+        */
+       protected void collectNewChildDescriptors(Collection 
newChildDescriptors, Object object) {
+               super.collectNewChildDescriptors(newChildDescriptors, object);
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               
(ScxmlPackage.Literals.SERVICE_TEMPLATE__TRANS_LIST,
+                                ScxmlFactory.eINSTANCE.createTranslation()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               
(ScxmlPackage.Literals.SERVICE_TEMPLATE__STATE_LIST,
+                                ScxmlFactory.eINSTANCE.createState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               
(ScxmlPackage.Literals.SERVICE_TEMPLATE__INITIAL_STATE,
+                                ScxmlFactory.eINSTANCE.createInitialState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               
(ScxmlPackage.Literals.SERVICE_TEMPLATE__FINAL_STATE,
+                                ScxmlFactory.eINSTANCE.createFinalState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               
(ScxmlPackage.Literals.SERVICE_TEMPLATE__PARALLEL,
+                                ScxmlFactory.eINSTANCE.createParallel()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               
(ScxmlPackage.Literals.SERVICE_TEMPLATE__DATA_MODEL,
+                                ScxmlFactory.eINSTANCE.createDataModel()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.SERVICE_TEMPLATE__SCRIPT,
+                                ScxmlFactory.eINSTANCE.createScript()));
+       }
+
+       /**
+        * Return the resource locator for this item provider's resources.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public ResourceLocator getResourceLocator() {
+               return ScxmlEditPlugin.INSTANCE;
+       }
+
+}

Propchange: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ServiceTemplateItemProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/StateItemProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/StateItemProvider.java?rev=945188&view=auto
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/StateItemProvider.java
 (added)
+++ 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/StateItemProvider.java
 Mon May 17 14:46:55 2010
@@ -0,0 +1,295 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ *
+ * $Id$
+ */
+package org.apache.commons.scxml.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.scxml.ScxmlFactory;
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.State;
+
+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;
+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;
+
+/**
+ * This is the item provider adapter for a {...@link 
org.apache.commons.scxml.State} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StateItemProvider
+       extends NamedElementItemProvider
+       implements
+               IEditingDomainItemProvider,
+               IStructuredItemContentProvider,
+               ITreeItemContentProvider,
+               IItemLabelProvider,
+               IItemPropertySource {
+       /**
+        * This constructs an instance from a factory and a notifier.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public StateItemProvider(AdapterFactory adapterFactory) {
+               super(adapterFactory);
+       }
+
+       /**
+        * This returns the property descriptors for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public List getPropertyDescriptors(Object object) {
+               if (itemPropertyDescriptors == null) {
+                       super.getPropertyDescriptors(object);
+
+                       addIdPropertyDescriptor(object);
+                       addInitialPropertyDescriptor(object);
+               }
+               return itemPropertyDescriptors;
+       }
+
+       /**
+        * This adds a property descriptor for the Id feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addIdPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_State_id_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_State_id_feature", 
"_UI_State_type"),
+                                ScxmlPackage.Literals.STATE__ID,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Initial feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addInitialPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_State_initial_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_State_initial_feature", 
"_UI_State_type"),
+                                ScxmlPackage.Literals.STATE__INITIAL,
+                                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}.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Collection getChildrenFeatures(Object object) {
+               if (childrenFeatures == null) {
+                       super.getChildrenFeatures(object);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__ON_ENTRY);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__ON_EXIT);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__INIT_STATE);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__SUB_STATE);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__FINAL_STATE);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__SUB_PARALLEL);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__HISTORY_STATE);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__ANCHOR);
+                       
childrenFeatures.add(ScxmlPackage.Literals.STATE__INVOKE);
+               }
+               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 State.gif.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Object getImage(Object object) {
+               return overlayImage(object, 
getResourceLocator().getImage("full/obj16/State"));
+       }
+
+       /**
+        * This returns the label text for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public String getText(Object object) {
+               String label = ((State)object).getId();
+               return label == null || label.length() == 0 ?
+                       getString("_UI_State_type") :
+                       getString("_UI_State_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
+        */
+       public void notifyChanged(Notification notification) {
+               updateChildren(notification);
+
+               switch (notification.getFeatureID(State.class)) {
+                       case ScxmlPackage.STATE__ID:
+                       case ScxmlPackage.STATE__INITIAL:
+                               fireNotifyChanged(new 
ViewerNotification(notification, notification.getNotifier(), false, true));
+                               return;
+                       case ScxmlPackage.STATE__ON_ENTRY:
+                       case ScxmlPackage.STATE__ON_EXIT:
+                       case ScxmlPackage.STATE__INIT_STATE:
+                       case ScxmlPackage.STATE__SUB_STATE:
+                       case ScxmlPackage.STATE__FINAL_STATE:
+                       case ScxmlPackage.STATE__SUB_PARALLEL:
+                       case ScxmlPackage.STATE__HISTORY_STATE:
+                       case ScxmlPackage.STATE__ANCHOR:
+                       case ScxmlPackage.STATE__INVOKE:
+                               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 -->
+        * @generated
+        */
+       protected void collectNewChildDescriptors(Collection 
newChildDescriptors, Object object) {
+               super.collectNewChildDescriptors(newChildDescriptors, object);
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__ON_ENTRY,
+                                ScxmlFactory.eINSTANCE.createOnEntry()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__ON_EXIT,
+                                ScxmlFactory.eINSTANCE.createOnExit()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__INIT_STATE,
+                                ScxmlFactory.eINSTANCE.createInitialState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__SUB_STATE,
+                                ScxmlFactory.eINSTANCE.createState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__FINAL_STATE,
+                                ScxmlFactory.eINSTANCE.createFinalState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__SUB_PARALLEL,
+                                ScxmlFactory.eINSTANCE.createParallel()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__HISTORY_STATE,
+                                ScxmlFactory.eINSTANCE.createHistoryState()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__ANCHOR,
+                                ScxmlFactory.eINSTANCE.createAnchor()));
+
+               newChildDescriptors.add
+                       (createChildParameter
+                               (ScxmlPackage.Literals.STATE__INVOKE,
+                                ScxmlFactory.eINSTANCE.createInvoke()));
+       }
+
+       /**
+        * 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 == 
ScxmlPackage.Literals.NAMED_ELEMENT__SOURCE_CONNECTION ||
+                       childFeature == 
ScxmlPackage.Literals.NAMED_ELEMENT__TARGET_CONNECTION;
+
+               if (qualify) {
+                       return getString
+                               ("_UI_CreateChild_text2",
+                                new Object[] { getTypeText(childObject), 
getFeatureText(childFeature), getTypeText(owner) });
+               }
+               return super.getCreateChildText(owner, feature, child, 
selection);
+       }
+
+}

Propchange: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/StateItemProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/TranslationItemProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/TranslationItemProvider.java?rev=945188&view=auto
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/TranslationItemProvider.java
 (added)
+++ 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/TranslationItemProvider.java
 Mon May 17 14:46:55 2010
@@ -0,0 +1,285 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ *
+ * $Id$
+ */
+package org.apache.commons.scxml.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.Translation;
+
+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;
+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;
+
+/**
+ * This is the item provider adapter for a {...@link 
org.apache.commons.scxml.Translation} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class TranslationItemProvider
+       extends ItemProviderAdapter
+       implements
+               IEditingDomainItemProvider,
+               IStructuredItemContentProvider,
+               ITreeItemContentProvider,
+               IItemLabelProvider,
+               IItemPropertySource {
+       /**
+        * This constructs an instance from a factory and a notifier.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public TranslationItemProvider(AdapterFactory adapterFactory) {
+               super(adapterFactory);
+       }
+
+       /**
+        * This returns the property descriptors for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public List getPropertyDescriptors(Object object) {
+               if (itemPropertyDescriptors == null) {
+                       super.getPropertyDescriptors(object);
+
+                       addTargetStatusPropertyDescriptor(object);
+                       addSourceStatusPropertyDescriptor(object);
+                       addEventPropertyDescriptor(object);
+                       addCondPropertyDescriptor(object);
+                       addTargetPropertyDescriptor(object);
+                       addAnchorPropertyDescriptor(object);
+               }
+               return itemPropertyDescriptors;
+       }
+
+       /**
+        * This adds a property descriptor for the Target Status feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addTargetStatusPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                
getString("_UI_Translation_targetStatus_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_Translation_targetStatus_feature", "_UI_Translation_type"),
+                                
ScxmlPackage.Literals.TRANSLATION__TARGET_STATUS,
+                                true,
+                                false,
+                                true,
+                                null,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Source Status feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addSourceStatusPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                
getString("_UI_Translation_sourceStatus_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_Translation_sourceStatus_feature", "_UI_Translation_type"),
+                                
ScxmlPackage.Literals.TRANSLATION__SOURCE_STATUS,
+                                true,
+                                false,
+                                true,
+                                null,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Event feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addEventPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Translation_event_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_Translation_event_feature", "_UI_Translation_type"),
+                                ScxmlPackage.Literals.TRANSLATION__EVENT,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Cond feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addCondPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Translation_cond_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Translation_cond_feature", 
"_UI_Translation_type"),
+                                ScxmlPackage.Literals.TRANSLATION__COND,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Target feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addTargetPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Translation_target_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_Translation_target_feature", "_UI_Translation_type"),
+                                ScxmlPackage.Literals.TRANSLATION__TARGET,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Anchor feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addAnchorPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Translation_anchor_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_Translation_anchor_feature", "_UI_Translation_type"),
+                                ScxmlPackage.Literals.TRANSLATION__ANCHOR,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This returns Translation.gif.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Object getImage(Object object) {
+               return overlayImage(object, 
getResourceLocator().getImage("full/obj16/Translation"));
+       }
+
+       /**
+        * This returns the label text for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public String getText(Object object) {
+               String label = ((Translation)object).getEvent();
+               return label == null || label.length() == 0 ?
+                       getString("_UI_Translation_type") :
+                       getString("_UI_Translation_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
+        */
+       public void notifyChanged(Notification notification) {
+               updateChildren(notification);
+
+               switch (notification.getFeatureID(Translation.class)) {
+                       case ScxmlPackage.TRANSLATION__EVENT:
+                       case ScxmlPackage.TRANSLATION__COND:
+                       case ScxmlPackage.TRANSLATION__TARGET:
+                       case ScxmlPackage.TRANSLATION__ANCHOR:
+                               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
+        */
+       protected void collectNewChildDescriptors(Collection 
newChildDescriptors, Object object) {
+               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 ScxmlEditPlugin.INSTANCE;
+       }
+
+}

Propchange: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/TranslationItemProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ValidateItemProvider.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ValidateItemProvider.java?rev=945188&view=auto
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ValidateItemProvider.java
 (added)
+++ 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ValidateItemProvider.java
 Mon May 17 14:46:55 2010
@@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ *
+ * $Id$
+ */
+package org.apache.commons.scxml.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.scxml.ScxmlPackage;
+import org.apache.commons.scxml.Validate;
+
+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.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.ViewerNotification;
+
+/**
+ * This is the item provider adapter for a {...@link 
org.apache.commons.scxml.Validate} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ValidateItemProvider
+       extends ExecutableContentItemProvider
+       implements
+               IEditingDomainItemProvider,
+               IStructuredItemContentProvider,
+               ITreeItemContentProvider,
+               IItemLabelProvider,
+               IItemPropertySource {
+       /**
+        * This constructs an instance from a factory and a notifier.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public ValidateItemProvider(AdapterFactory adapterFactory) {
+               super(adapterFactory);
+       }
+
+       /**
+        * This returns the property descriptors for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public List getPropertyDescriptors(Object object) {
+               if (itemPropertyDescriptors == null) {
+                       super.getPropertyDescriptors(object);
+
+                       addLocationPropertyDescriptor(object);
+                       addSchemaPropertyDescriptor(object);
+               }
+               return itemPropertyDescriptors;
+       }
+
+       /**
+        * This adds a property descriptor for the Location feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addLocationPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Validate_location_feature"),
+                                
getString("_UI_PropertyDescriptor_description", 
"_UI_Validate_location_feature", "_UI_Validate_type"),
+                                ScxmlPackage.Literals.VALIDATE__LOCATION,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This adds a property descriptor for the Schema feature.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       protected void addSchemaPropertyDescriptor(Object object) {
+               itemPropertyDescriptors.add
+                       (createItemPropertyDescriptor
+                               
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+                                getResourceLocator(),
+                                getString("_UI_Validate_schema_feature"),
+                                
getString("_UI_PropertyDescriptor_description", "_UI_Validate_schema_feature", 
"_UI_Validate_type"),
+                                ScxmlPackage.Literals.VALIDATE__SCHEMA,
+                                true,
+                                false,
+                                false,
+                                ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+                                null,
+                                null));
+       }
+
+       /**
+        * This returns Validate.gif.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public Object getImage(Object object) {
+               return overlayImage(object, 
getResourceLocator().getImage("full/obj16/Validate"));
+       }
+
+       /**
+        * This returns the label text for the adapted class.
+        * <!-- begin-user-doc -->
+        * <!-- end-user-doc -->
+        * @generated
+        */
+       public String getText(Object object) {
+               String label = ((Validate)object).getLocation();
+               return label == null || label.length() == 0 ?
+                       getString("_UI_Validate_type") :
+                       getString("_UI_Validate_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
+        */
+       public void notifyChanged(Notification notification) {
+               updateChildren(notification);
+
+               switch (notification.getFeatureID(Validate.class)) {
+                       case ScxmlPackage.VALIDATE__LOCATION:
+                       case ScxmlPackage.VALIDATE__SCHEMA:
+                               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
+        */
+       protected void collectNewChildDescriptors(Collection 
newChildDescriptors, Object object) {
+               super.collectNewChildDescriptors(newChildDescriptors, object);
+       }
+
+}

Propchange: 
commons/sandbox/gsoc/2010/scxml-eclipse/trunk/src/main/java/org.apache.commons.scxml.edit/src/org/apache/commons/scxml/provider/ValidateItemProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to