JBoss Tools SVN: r14703 - in trunk/smooks/plugins: org.jboss.tools.smooks.core/icons/full/ctool16 and 13 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-13 04:45:19 -0400 (Mon, 13 Apr 2009)
New Revision: 14703
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.core/icons/full/ctool16/ScriptType.gif
trunk/smooks/plugins/org.jboss.tools.smooks.core/icons/full/obj16/ScriptType.gif
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/ComponentUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DelimitersUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DescriptionUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EdiMapUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/FieldUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/MappingNodeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentsUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SubComponentUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/HighWaterMarkUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/OutputStreamUICreator.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
Log:
JBIDE-4172
Add new attribute GUI for edit "edi" and "filerouting" elements
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/icons/full/ctool16/ScriptType.gif
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/icons/full/ctool16/ScriptType.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/icons/full/obj16/ScriptType.gif
===================================================================
(Binary files differ)
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/icons/full/obj16/ScriptType.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-04-13 08:45:19 UTC (rev 14703)
@@ -29,7 +29,9 @@
_UI_Unknown_datatype= Value
_UI_Groovy_type = Groovy
+_UI_ScriptType_type = Script
_UI_DocumentRoot_groovy_feature = Groovy
+_UI_DocumentRoot_script_feature = Script
_UI_Groovy_imports_feature = Imports
_UI_Groovy_script_feature = Script
_UI_Groovy_param_feature = Param
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -14,8 +14,6 @@
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.FeatureMapUtil;
-import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -25,11 +23,8 @@
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.jboss.tools.smooks.model.groovy.GroovyFactory;
import org.jboss.tools.smooks.model.groovy.GroovyPackage;
import org.jboss.tools.smooks.model.groovy.ScriptType;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
/**
* This is the item provider adapter for a {@link groovy.ScriptType} object.
@@ -153,160 +148,160 @@
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
- "")));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
- "")));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
- XMLTypeFactory.eINSTANCE.createProcessingInstruction())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
- "")));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
- GroovyFactory.eINSTANCE.createGroovy())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT,
- GroovyFactory.eINSTANCE.createScriptType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
- SmooksFactory.eINSTANCE.createConditionType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
- SmooksFactory.eINSTANCE.createConditionsType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
- SmooksFactory.eINSTANCE.createFeaturesType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
- SmooksFactory.eINSTANCE.createHandlerType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
- SmooksFactory.eINSTANCE.createHandlersType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
- SmooksFactory.eINSTANCE.createImportType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
- SmooksFactory.eINSTANCE.createParamType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
- SmooksFactory.eINSTANCE.createParamsType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
- SmooksFactory.eINSTANCE.createProfileType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
- SmooksFactory.eINSTANCE.createProfilesType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
- SmooksFactory.eINSTANCE.createReaderType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
- SmooksFactory.eINSTANCE.createResourceType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
- SmooksFactory.eINSTANCE.createResourceConfigType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
- SmooksFactory.eINSTANCE.createSetOffType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
- SmooksFactory.eINSTANCE.createSetOnType())));
-
- newChildDescriptors.add
- (createChildParameter
- (XMLTypePackage.Literals.ANY_TYPE__MIXED,
- FeatureMapUtil.createEntry
- (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
- SmooksFactory.eINSTANCE.createSmooksResourceListType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
+// "")));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+// "")));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
+// XMLTypeFactory.eINSTANCE.createProcessingInstruction())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
+// "")));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
+// GroovyFactory.eINSTANCE.createGroovy())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT,
+// GroovyFactory.eINSTANCE.createScriptType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
+// SmooksFactory.eINSTANCE.createConditionType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
+// SmooksFactory.eINSTANCE.createConditionsType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
+// SmooksFactory.eINSTANCE.createFeaturesType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
+// SmooksFactory.eINSTANCE.createHandlerType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
+// SmooksFactory.eINSTANCE.createHandlersType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
+// SmooksFactory.eINSTANCE.createImportType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
+// SmooksFactory.eINSTANCE.createParamType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
+// SmooksFactory.eINSTANCE.createParamsType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
+// SmooksFactory.eINSTANCE.createProfileType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
+// SmooksFactory.eINSTANCE.createProfilesType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
+// SmooksFactory.eINSTANCE.createReaderType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
+// SmooksFactory.eINSTANCE.createResourceType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
+// SmooksFactory.eINSTANCE.createResourceConfigType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
+// SmooksFactory.eINSTANCE.createSetOffType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
+// SmooksFactory.eINSTANCE.createSetOnType())));
+//
+// newChildDescriptors.add
+// (createChildParameter
+// (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+// FeatureMapUtil.createEntry
+// (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
+// SmooksFactory.eINSTANCE.createSmooksResourceListType())));
}
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -26,6 +26,8 @@
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.jboss.tools.smooks.edit.common.provider.AbstractAnyTypeItemProvider;
import org.jboss.tools.smooks.edit.xsl.provider.Xsl1EditPlugin;
+import org.jboss.tools.smooks.model.fileRouting.FileRoutingFactory;
+import org.jboss.tools.smooks.model.fileRouting.FileRoutingPackage;
import org.jboss.tools.smooks.model.freemarker.FreemarkerFactory;
import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
import org.jboss.tools.smooks.model.javabean.JavabeanFactory;
@@ -301,6 +303,13 @@
(createChildParameter
(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
FeatureMapUtil.createEntry
+ (FileRoutingPackage.Literals.DOCUMENT_ROOT__OUTPUT_STREAM,
+ FileRoutingFactory.eINSTANCE.createOutputStream())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
+ FeatureMapUtil.createEntry
(XslPackage.Literals.DOCUMENT_ROOT__XSL,
XslFactory.eINSTANCE.createXsl())));
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -13,6 +13,8 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+import org.jboss.tools.smooks.model.fileRouting.FileRoutingPackage;
import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
import org.jboss.tools.smooks.model.groovy.GroovyPackage;
@@ -44,7 +46,7 @@
public static void main(String[] args) {
Codegenerator g = new Codegenerator();
try {
- g.generateCodes(GroovyPackage.eINSTANCE);
+ g.generateCodes(EdiPackage.eINSTANCE);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizard.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com)
+ * Date Apr 13, 2009
+ */
+public class FileSelectionWizard extends Wizard implements INewWizard {
+
+ private FileSelectionWizardPage wizardPage = null;
+
+ private String filePath = null;
+
+ @Override
+ public void addPages() {
+ wizardPage = new FileSelectionWizardPage("File Selection");
+ this.addPage(wizardPage);
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ filePath = wizardPage.getFilePath();
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+
+ }
+
+ public String getFilePath() {
+ return filePath;
+ }
+
+ public void setFilePath(String filePath) {
+ this.filePath = filePath;
+ }
+
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.jboss.tools.smooks.configuration.editors.xml.AbstractFileSelectionWizardPage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com)
+ * Date Apr 13, 2009
+ */
+public class FileSelectionWizardPage extends AbstractFileSelectionWizardPage {
+
+ public FileSelectionWizardPage(String pageName) {
+ super(pageName);
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.xml.AbstractFileSelectionWizardPage#loadedTheObject(java.lang.String)
+ */
+ @Override
+ protected Object loadedTheObject(String path) throws Exception {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+
+ @Override
+ protected Composite createFileSelectionComposite(Composite parent) {
+ Composite composite = super.createFileSelectionComposite(parent);
+ GridData gd = new GridData();
+ gd.widthHint = 0;
+ fileSystemBrowseButton.setLayoutData(gd);
+ this.fileSystemBrowseButton.setVisible(false);
+ return composite;
+ }
+
+ @Override
+ protected String processWorkSpaceFilePath(IFile file) {
+ String s = file.getFullPath().toPortableString();
+ return s;
+ }
+
+
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/FileSelectionWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -10,16 +10,35 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
import org.eclipse.core.resources.IResource;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.uitls.IFieldDialog;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
/**
* @author Dart (dpeng(a)redhat.com)
@@ -38,10 +57,27 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
- if(feature == SmooksPackage.eINSTANCE.getAbstractReader_TargetProfile()){
-
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (isBeanIDRefFieldFeature(feature)) {
+ return createBeanIDRefFieldEditor(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
}
+ if (isSelectorFeature(feature)) {
+ return createSelectorFieldEditor(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+ if (isJavaTypeFeature(feature)) {
+ return createJavaTypeSearchEditor(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+ if (isFileSelectionFeature(feature)) {
+ return createFileSelectionFieldEditor(toolkit, parent, propertyDescriptor, model,
+ feature, formEditor);
+ }
+ if (feature == SmooksPackage.eINSTANCE.getAbstractReader_TargetProfile()) {
+
+ }
return null;
}
@@ -54,13 +90,149 @@
}
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model,SmooksMultiFormEditor formEditor) {
-
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+
}
+ public boolean isFileSelectionFeature(EAttribute attribute) {
+ return false;
+ }
+
+ public Composite createFileSelectionFieldEditor(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ IFieldDialog dialog = new IFieldDialog() {
+ public Object open(Shell shell) {
+ FileSelectionWizard wizard = new FileSelectionWizard();
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ if (dialog.open() == Dialog.OK) {
+ return wizard.getFilePath();
+ }
+ return null;
+ }
+ };
+ final IItemPropertyDescriptor fp = propertyDescriptor;
+ final Object fm = model;
+ IHyperlinkListener listener = new IHyperlinkListener() {
+
+ public void linkActivated(HyperlinkEvent e) {
+ Object value = SmooksUIUtils.getEditValue(fp, fm);
+ System.out.println(value);
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+
+ }
+
+ public void linkExited(HyperlinkEvent e) {
+
+ }
+ };
+
+ return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Browse",
+ dialog, (EObject) model, true, listener);
+ }
+
+ public boolean isSelectorFeature(EAttribute attribute) {
+ return false;
+ }
+
+ public Composite createSelectorFieldEditor(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null) {
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
+ model, ext);
+ }
+ return null;
+ }
+
+ public boolean isJavaTypeFeature(EAttribute attribute) {
+ return false;
+ }
+
+ public Composite createJavaTypeSearchEditor(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (model instanceof EObject) return SmooksUIUtils.createJavaTypeSearchFieldEditor(parent,
+ toolkit, propertyDescriptor, (EObject) model);
+ return null;
+ }
+
+ public boolean isBeanIDRefFieldFeature(EAttribute attribute) {
+ return false;
+ }
+
+ public Composite createBeanIDRefFieldEditor(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (model instanceof EObject) {
+ SmooksResourceListType smooksResourceList = getSmooksResourceList((EObject) model);
+ if (smooksResourceList != null) {
+ String displayName = propertyDescriptor.getDisplayName(model);
+ toolkit.createLabel(parent, displayName + " :");
+ final CCombo combo = new CCombo(parent, SWT.BORDER);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ combo.setLayoutData(gd);
+ Object editValue = SmooksUIUtils.getEditValue(propertyDescriptor, model);
+ if (editValue != null) {
+ combo.setText(editValue.toString());
+ }
+ List<String> list = getBeanIdList(smooksResourceList);
+ for (Iterator<String> iterator = list.iterator(); iterator.hasNext();) {
+ String beanId = (String) iterator.next();
+ combo.add(beanId);
+ }
+ int selectIndex = list.indexOf(editValue);
+ if (selectIndex != -1) {
+ combo.select(selectIndex);
+ }
+ final IItemPropertyDescriptor ip = propertyDescriptor;
+ final Object cmodel = model;
+ combo.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ Object editValue = SmooksUIUtils.getEditValue(ip, cmodel);
+ if (combo.getText().equals(editValue)) {
+ return;
+ }
+ ip.setPropertyValue(cmodel, combo.getText());
+ }
+ });
+ return combo;
+ }
+ }
+ return null;
+ }
+
+ protected SmooksResourceListType getSmooksResourceList(EObject model) {
+ EObject parent = model.eContainer();
+ while (parent != null && !(parent instanceof SmooksResourceListType)) {
+ parent = parent.eContainer();
+ }
+ if (parent instanceof SmooksResourceListType) {
+ return (SmooksResourceListType) parent;
+ }
+ return null;
+ }
+
+ protected List<String> getBeanIdList(SmooksResourceListType resourceList) {
+ List<AbstractResourceConfig> rlist = resourceList.getAbstractResourceConfig();
+ List<String> beanIdList = new ArrayList<String>();
+ for (Iterator<?> iterator = rlist.iterator(); iterator.hasNext();) {
+ AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator
+ .next();
+ if (abstractResourceConfig instanceof BindingsType) {
+ String beanId = ((BindingsType) abstractResourceConfig).getBeanId();
+ if (beanId == null) continue;
+ beanIdList.add(beanId);
+ }
+ }
+ return beanIdList;
+ }
+
public boolean ignoreProperty(EAttribute feature) {
return false;
}
-
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -13,6 +13,17 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.tools.smooks.configuration.editors.edi.ComponentUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.DelimitersUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.DescriptionUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.EdiMapUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.FieldUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.MappingNodeUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.SegmentUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.SegmentsUICreator;
+import org.jboss.tools.smooks.configuration.editors.edi.SubComponentUICreator;
+import org.jboss.tools.smooks.configuration.editors.filerouting.HighWaterMarkUICreator;
+import org.jboss.tools.smooks.configuration.editors.filerouting.OutputStreamUICreator;
import org.jboss.tools.smooks.configuration.editors.freemarker.FreemarkerUICreator;
import org.jboss.tools.smooks.configuration.editors.freemarker.InlineUICreator;
import org.jboss.tools.smooks.configuration.editors.freemarker.UseUICreator;
@@ -30,6 +41,17 @@
import org.jboss.tools.smooks.configuration.editors.xsl.OutputToUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.TemplateUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.XslUICreator;
+import org.jboss.tools.smooks.model.edi.impl.ComponentImpl;
+import org.jboss.tools.smooks.model.edi.impl.DelimitersImpl;
+import org.jboss.tools.smooks.model.edi.impl.DescriptionImpl;
+import org.jboss.tools.smooks.model.edi.impl.EdiMapImpl;
+import org.jboss.tools.smooks.model.edi.impl.FieldImpl;
+import org.jboss.tools.smooks.model.edi.impl.MappingNodeImpl;
+import org.jboss.tools.smooks.model.edi.impl.SegmentImpl;
+import org.jboss.tools.smooks.model.edi.impl.SegmentsImpl;
+import org.jboss.tools.smooks.model.edi.impl.SubComponentImpl;
+import org.jboss.tools.smooks.model.fileRouting.impl.HighWaterMarkImpl;
+import org.jboss.tools.smooks.model.fileRouting.impl.OutputStreamImpl;
import org.jboss.tools.smooks.model.freemarker.impl.FreemarkerImpl;
import org.jboss.tools.smooks.model.freemarker.impl.InlineImpl;
import org.jboss.tools.smooks.model.freemarker.impl.UseImpl;
@@ -64,6 +86,10 @@
}
private void init() {
+ /*
+ * below if for smooks1.1
+ */
+ // for javabean
map.put(BindingsTypeImpl.class, new BindingsPropertyUICreator());
map.put(ValueTypeImpl.class, new JavabeanValueUICreator());
map.put(WiringTypeImpl.class, new JavabeanWiringUICreator());
@@ -95,7 +121,26 @@
// for groovy
map.put(GroovyImpl.class, new GroovyUICreator());
map.put(ScriptTypeImpl.class, new ScriptUICreator());
+
+ // for filerouting
+ map.put(HighWaterMarkImpl.class, new HighWaterMarkUICreator());
+ map.put(OutputStreamImpl.class, new OutputStreamUICreator());
+
+ // for edi
+ map.put(ComponentImpl.class, new ComponentUICreator());
+ map.put(DelimitersImpl.class, new DelimitersUICreator());
+ map.put(DescriptionImpl.class, new DescriptionUICreator());
+ map.put(EdiMapImpl.class, new EdiMapUICreator());
+ map.put(FieldImpl.class, new FieldUICreator());
+ map.put(MappingNodeImpl.class, new MappingNodeUICreator());
+ map.put(SegmentImpl.class, new SegmentUICreator());
+ map.put(SegmentsImpl.class, new SegmentsUICreator());
+ map.put(SubComponentImpl.class, new SubComponentUICreator());
+ /*
+ * up if for smooks1.1
+ */
+
}
public void registePropertyUICreator(Class<?> key, IPropertyUICreator creator) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -10,6 +10,7 @@
import java.util.Collection;
import org.eclipse.emf.common.ui.viewer.IViewerProvider;
+import org.eclipse.emf.edit.command.CommandParameter;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
@@ -41,125 +42,125 @@
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
/**
- * This is the action bar contributor for the Smooks model editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the action bar contributor for the Smooks model editor. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
-public class SmooksActionBarContributor
- extends EditingDomainActionBarContributor
- implements ISelectionChangedListener {
+public class SmooksActionBarContributor extends EditingDomainActionBarContributor implements
+ ISelectionChangedListener {
/**
- * This keeps track of the active editor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This keeps track of the active editor. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
protected IEditorPart activeEditorPart;
/**
- * This keeps track of the current selection provider.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This keeps track of the current selection provider. <!-- begin-user-doc
+ * --> <!-- end-user-doc -->
+ *
* @generated
*/
protected ISelectionProvider selectionProvider;
/**
- * This action opens the Properties view.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This action opens the Properties view. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- protected IAction showPropertiesViewAction =
- new Action("Show Properties") {
- @Override
- public void run() {
- try {
- getPage().showView("org.eclipse.ui.views.PropertySheet");
- }
- catch (PartInitException exception) {
- SmooksConfigurationActivator.getDefault().log(exception);
- }
+ protected IAction showPropertiesViewAction = new Action("Show Properties") {
+ @Override
+ public void run() {
+ try {
+ getPage().showView("org.eclipse.ui.views.PropertySheet");
+ } catch (PartInitException exception) {
+ SmooksConfigurationActivator.getDefault().log(exception);
}
- };
+ }
+ };
/**
* This action refreshes the viewer of the current editor if the editor
- * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected IAction refreshViewerAction =
- new Action("Refresh Viewer") {
- @Override
- public boolean isEnabled() {
- return activeEditorPart instanceof IViewerProvider;
- }
+ protected IAction refreshViewerAction = new Action("Refresh Viewer") {
+ @Override
+ public boolean isEnabled() {
+ return activeEditorPart instanceof IViewerProvider;
+ }
- @Override
- public void run() {
- if (activeEditorPart instanceof IViewerProvider) {
- Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
- if (viewer != null) {
- viewer.refresh();
- }
+ @Override
+ public void run() {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer();
+ if (viewer != null) {
+ viewer.refresh();
}
}
- };
+ }
+ };
/**
- * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
- * generated for the current selection by the item provider.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This will contain one
+ * {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to
+ * each descriptor generated for the current selection by the item provider.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<IAction> createChildActions;
/**
- * This is the menu manager into which menu contribution items should be added for CreateChild actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the menu manager into which menu contribution items should be
+ * added for CreateChild actions. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
protected IMenuManager createChildMenuManager;
/**
- * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
- * generated for the current selection by the item provider.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This will contain one
+ * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding
+ * to each descriptor generated for the current selection by the item
+ * provider. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<IAction> createSiblingActions;
/**
- * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This is the menu manager into which menu contribution items should be
+ * added for CreateSibling actions. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
protected IMenuManager createSiblingMenuManager;
/**
- * This creates an instance of the contributor.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This creates an instance of the contributor. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
public SmooksActionBarContributor() {
super(ADDITIONS_LAST_STYLE);
- loadResourceAction = new LoadResourceAction();
+// loadResourceAction = new LoadResourceAction();
validateAction = new ValidateAction();
controlAction = new ControlAction();
}
/**
- * This adds Separators for editor additions to the tool bar.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This adds Separators for editor additions to the tool bar. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -169,10 +170,10 @@
}
/**
- * This adds to the menu bar a menu and some separators for editor additions,
- * as well as the sub-menus for object creation items.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This adds to the menu bar a menu and some separators for editor
+ * additions, as well as the sub-menus for object creation items. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -198,20 +199,20 @@
// Force an update because Eclipse hides empty menus now.
//
- submenuManager.addMenuListener
- (new IMenuListener() {
- public void menuAboutToShow(IMenuManager menuManager) {
- menuManager.updateAll(true);
- }
- });
+ submenuManager.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager menuManager) {
+ menuManager.updateAll(true);
+ }
+ });
addGlobalActions(submenuManager);
}
/**
- * When the active editor changes, this remembers the change and registers with it as a selection provider.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * When the active editor changes, this remembers the change and registers
+ * with it as a selection provider. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
@Override
@@ -226,25 +227,27 @@
}
if (part == null) {
selectionProvider = null;
- }
- else {
+ } else {
selectionProvider = part.getSite().getSelectionProvider();
selectionProvider.addSelectionChangedListener(this);
// Fake a selection changed event to update the menus.
//
if (selectionProvider.getSelection() != null) {
- selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
+ selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider
+ .getSelection()));
}
}
}
/**
- * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
- * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
- * that can be added to the selected object and updating the menus accordingly.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This implements
+ * {@link org.eclipse.jface.viewers.ISelectionChangedListener}, handling
+ * {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for
+ * the children and siblings that can be added to the selected object and
+ * updating the menus accordingly. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
+ *
* @generated
*/
public void selectionChanged(SelectionChangedEvent event) {
@@ -260,22 +263,24 @@
// Query the new selection for appropriate new child/sibling descriptors
//
Collection<?> newChildDescriptors = null;
- Collection<?> newSiblingDescriptors = null;
+// Collection<?> newSiblingDescriptors = null;
ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
- Object object = ((IStructuredSelection)selection).getFirstElement();
+ if (selection instanceof IStructuredSelection
+ && ((IStructuredSelection) selection).size() == 1) {
+ Object object = ((IStructuredSelection) selection).getFirstElement();
object = AdapterFactoryEditingDomain.unwrap(object);
- EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+ EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
newChildDescriptors = domain.getNewChildDescriptors(object, null);
- newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
+// newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
}
// Generate actions for selection; populate and redraw the menus.
//
createChildActions = generateCreateChildActions(newChildDescriptors, selection);
- createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
+ // createSiblingActions =
+ // generateCreateSiblingActions(newSiblingDescriptors, selection);
if (createChildMenuManager != null) {
populateManager(createChildMenuManager, createChildActions, null);
@@ -288,14 +293,23 @@
}
/**
- * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
- * and returns the collection of these actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction}
+ * for each object in <code>descriptors</code>, and returns the collection
+ * of these actions. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
+ protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors,
+ ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
+// if (selection != null && selection.isEmpty() && descriptors != null) {
+// CommandParameter cp = createChildParameter(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE,
+// SmooksFactory.eINSTANCE.createSmooksResourceListType());
+// CommandParameter cp2 = createChildParameter(EdiPackage.Literals.EDI_MAP,
+// EdiFactory.eINSTANCE.createEdiMap());
+// descriptors.add(cp);
+// descriptors.add(cp2);
+// }
if (descriptors != null) {
for (Object descriptor : descriptors) {
actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
@@ -304,14 +318,20 @@
return actions;
}
+ protected CommandParameter createChildParameter(Object feature, Object child) {
+ return new CommandParameter(null, feature, child);
+ }
+
/**
- * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
- * and returns the collection of these actions.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This generates a
+ * {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each
+ * object in <code>descriptors</code>, and returns the collection of these
+ * actions. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
+ protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors,
+ ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
if (descriptors != null) {
for (Object descriptor : descriptors) {
@@ -322,35 +342,40 @@
}
/**
- * This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
- * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
- * by inserting them before the specified contribution item <code>contributionID</code>.
- * If <code>contributionID</code> is <code>null</code>, they are simply added.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This populates the specified <code>manager</code> with
+ * {@link org.eclipse.jface.action.ActionContributionItem}s based on the
+ * {@link org.eclipse.jface.action.IAction}s contained in the
+ * <code>actions</code> collection, by inserting them before the specified
+ * contribution item <code>contributionID</code>. If
+ * <code>contributionID</code> is <code>null</code>, they are simply added.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
- protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
+ protected void populateManager(IContributionManager manager,
+ Collection<? extends IAction> actions, String contributionID) {
if (actions != null) {
for (IAction action : actions) {
if (contributionID != null) {
manager.insertBefore(contributionID, action);
- }
- else {
+ } else {
manager.add(action);
}
}
}
}
-
+
/**
- * This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
- * based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This removes from the specified <code>manager</code> all
+ * {@link org.eclipse.jface.action.ActionContributionItem}s based on the
+ * {@link org.eclipse.jface.action.IAction}s contained in the
+ * <code>actions</code> collection. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
* @generated
*/
- protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
+ protected void depopulateManager(IContributionManager manager,
+ Collection<? extends IAction> actions) {
if (actions != null) {
IContributionItem[] items = manager.getItems();
for (int i = 0; i < items.length; i++) {
@@ -358,13 +383,13 @@
//
IContributionItem contributionItem = items[i];
while (contributionItem instanceof SubContributionItem) {
- contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ contributionItem = ((SubContributionItem) contributionItem).getInnerItem();
}
// Delete the ActionContributionItems with matching action.
//
if (contributionItem instanceof ActionContributionItem) {
- IAction action = ((ActionContributionItem)contributionItem).getAction();
+ IAction action = ((ActionContributionItem) contributionItem).getAction();
if (actions.contains(action)) {
manager.remove(contributionItem);
}
@@ -374,9 +399,9 @@
}
/**
- * This populates the pop-up menu before it appears.
- * <!-- begin-user-doc -->
+ * This populates the pop-up menu before it appears. <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -394,9 +419,9 @@
}
/**
- * This inserts global actions before the "additions-end" separator.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This inserts global actions before the "additions-end" separator. <!--
+ * begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -404,16 +429,16 @@
menuManager.insertAfter("additions-end", new Separator("ui-actions"));
menuManager.insertAfter("ui-actions", showPropertiesViewAction);
- refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
+ refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
menuManager.insertAfter("ui-actions", refreshViewerAction);
super.addGlobalActions(menuManager);
}
/**
- * This ensures that a delete action will clean up all references to deleted objects.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
+ * This ensures that a delete action will clean up all references to deleted
+ * objects. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -63,7 +63,9 @@
import org.jboss.tools.smooks.configuration.wizards.SmooksConfigurationFileNewWizard;
import org.jboss.tools.smooks.edit.common.provider.CommonItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.edi.provider.EdiItemProviderAdapterFactory;
+import org.jboss.tools.smooks.edit.fileRouting.provider.FileRoutingItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.freemarker.provider.FreemarkerItemProviderAdapterFactory;
+import org.jboss.tools.smooks.edit.groovy.provider.GroovyItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.javabean.provider.JavabeanItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.smooks.provider.SmooksItemProviderAdapterFactory;
import org.jboss.tools.smooks.edit.xsl.provider.XslItemProviderAdapterFactory;
@@ -173,6 +175,8 @@
adapterFactory.addAdapterFactory(new CommonItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new SmooksItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EdiItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new GroovyItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new FileRoutingItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
BasicCommandStack commandStack = new BasicCommandStack();
handleCommandStack(commandStack);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt 2009-04-13 08:45:19 UTC (rev 14703)
@@ -37,7 +37,8 @@
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature ,SmooksMultiFormEditor formEditor) {
${attributeMethod}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
}
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/ComponentUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/ComponentUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/ComponentUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class ComponentUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == EdiPackage.eINSTANCE.getComponent_Required()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getComponent_Truncatable()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/ComponentUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DelimitersUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DelimitersUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DelimitersUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class DelimitersUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ if (feature == EdiPackage.eINSTANCE.getDelimiters_Component()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getDelimiters_Field()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getDelimiters_Segment()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getDelimiters_SubComponent()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DelimitersUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DescriptionUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DescriptionUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DescriptionUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class DescriptionUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ if (feature == EdiPackage.eINSTANCE.getDescription_Name()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getDescription_Version()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/DescriptionUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EdiMapUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EdiMapUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EdiMapUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class EdiMapUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/EdiMapUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/FieldUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/FieldUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/FieldUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class FieldUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ if (feature == EdiPackage.eINSTANCE.getField_Required()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getField_Truncatable()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/FieldUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/MappingNodeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/MappingNodeUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/MappingNodeUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class MappingNodeUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ if (feature == EdiPackage.eINSTANCE.getMappingNode_Xmltag()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/MappingNodeUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SegmentUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ if (feature == EdiPackage.eINSTANCE.getSegment_MaxOccurs()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getSegment_MinOccurs()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getSegment_Segcode()) {
+ }
+ if (feature == EdiPackage.eINSTANCE.getSegment_Truncatable()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentsUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentsUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentsUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SegmentsUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SegmentsUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SubComponentUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SubComponentUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SubComponentUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.edi;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.edi.EdiPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class SubComponentUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
+ if (feature == EdiPackage.eINSTANCE.getSubComponent_Required()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/edi/SubComponentUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/HighWaterMarkUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/HighWaterMarkUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/HighWaterMarkUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.filerouting;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.fileRouting.FileRoutingPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class HighWaterMarkUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FileRoutingPackage.eINSTANCE.getHighWaterMark_Mark()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getHighWaterMark_PollFrequency()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getHighWaterMark_Timeout()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/HighWaterMarkUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/OutputStreamUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/OutputStreamUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/OutputStreamUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.filerouting;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.fileRouting.FileRoutingPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class OutputStreamUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_FileNamePattern()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_DestinationDirectoryPattern()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_ListFileNamePattern()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_CloseOnCondition()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_Encoding()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_OpenOnElement()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_OpenOnElementNS()) {
+ }
+ if (feature == FileRoutingPackage.eINSTANCE.getOutputStream_ResourceName()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/filerouting/OutputStreamUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -38,7 +38,7 @@
if (feature == FreemarkerPackage.eINSTANCE.getBindTo_Id()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -16,9 +16,7 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
/**
* @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
@@ -39,17 +37,27 @@
SmooksMultiFormEditor formEditor) {
if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyBefore()) {
}
- if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
- SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
- if (ext != null) {
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
- model, ext);
- }
- }
+// if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
+// SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+// if (ext != null) {
+// return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
+// model, ext);
+// }
+// }
if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElementNS()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
+
+
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -38,7 +38,7 @@
if (feature == FreemarkerPackage.eINSTANCE.getInline_Directive()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -38,7 +38,7 @@
if (feature == FreemarkerPackage.eINSTANCE.getOutputTo_OutputStreamResource()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -42,7 +42,7 @@
if (feature == FreemarkerPackage.eINSTANCE.getTemplate_Encoding()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -34,7 +34,7 @@
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
SmooksMultiFormEditor formEditor) {
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -17,8 +17,6 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.groovy.GroovyPackage;
/**
@@ -44,19 +42,24 @@
}
if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteBefore()) {
}
- if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElement()) {
- SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
- if (ext != null) {
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
- model, ext);
- }
- }
if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElementNS()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
+
+
@Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElement()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
+
+
+ @Override
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
Composite parent, Object model, SmooksMultiFormEditor formEditor) {
// SmooksUIUtils.createCommentFieldEditor("Script Contents",editingdomain, toolkit, parent, model);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -36,7 +36,7 @@
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
SmooksMultiFormEditor formEditor) {
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -18,7 +18,6 @@
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
/**
@@ -57,13 +56,17 @@
if (feature == JavabeanPackage.eINSTANCE.getBindingsType_Class()) {
return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
}
- if(feature == JavabeanPackage.eINSTANCE.getBindingsType_CreateOnElement()){
- SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
- if (ext != null)
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor, model,
- ext);
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ }
+
+
+
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if(attribute == JavabeanPackage.eINSTANCE.getBindingsType_CreateOnElement()){
+ return true;
}
- return null;
+ return super.isSelectorFeature(attribute);
}
protected Composite createBeanClassTextWithButton(Composite composite, FormToolkit toolkit,
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -15,8 +15,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
@@ -50,14 +48,15 @@
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
SmooksMultiFormEditor formEditor) {
- if(feature == JavabeanPackage.eINSTANCE.getValueType_Data()){
- SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
- if (ext != null)
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor, model,
- ext);
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ }
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if(attribute == JavabeanPackage.eINSTANCE.getValueType_Data()){
+ return true;
}
- return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ return super.isSelectorFeature(attribute);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -10,27 +10,12 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
-import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
-import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
-import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
/**
* @author Dart Peng (dpeng(a)redhat.com) Date Apr 9, 2009
@@ -52,83 +37,30 @@
}
return super.canCreateMethodsSearchFieldEditor(feature);
}
+
+
@Override
- public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
- SmooksMultiFormEditor formEditor) {
- if (feature == JavabeanPackage.eINSTANCE.getWiringType_WireOnElement()) {
- SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
- if (ext != null) {
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
- model, ext);
- }
+ public boolean isBeanIDRefFieldFeature(EAttribute attribute) {
+ if(attribute == JavabeanPackage.eINSTANCE.getWiringType_BeanIdRef()){
+ return true;
}
- if (feature == JavabeanPackage.eINSTANCE.getWiringType_BeanIdRef()) {
- if (model instanceof EObject) {
- SmooksResourceListType smooksResourceList = getSmooksResourceList((EObject) model);
- if (smooksResourceList != null) {
- String displayName = propertyDescriptor.getDisplayName(model);
- toolkit.createLabel(parent, displayName + " :");
- final CCombo combo = new CCombo(parent, SWT.BORDER);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- combo.setLayoutData(gd);
- Object editValue = SmooksUIUtils.getEditValue(propertyDescriptor, model);
- if (editValue != null) {
- combo.setText(editValue.toString());
- }
- List<String> list = getBeanIdList(smooksResourceList);
- for (Iterator<String> iterator = list.iterator(); iterator.hasNext();) {
- String beanId = (String) iterator.next();
- combo.add(beanId);
- }
- int selectIndex = list.indexOf(editValue);
- if (selectIndex != -1) {
- combo.select(selectIndex);
- }
- final IItemPropertyDescriptor ip = propertyDescriptor;
- final Object cmodel = model;
- combo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- Object editValue = SmooksUIUtils.getEditValue(ip, cmodel);
- if (combo.getText().equals(editValue)) {
- return;
- }
- ip.setPropertyValue(cmodel, combo.getText());
- }
- });
- return combo;
- }
- }
- }
- return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
- formEditor);
+ return super.isBeanIDRefFieldFeature(attribute);
}
- protected List<String> getBeanIdList(SmooksResourceListType resourceList) {
- List<AbstractResourceConfig> rlist = resourceList.getAbstractResourceConfig();
- List<String> beanIdList = new ArrayList<String>();
- for (Iterator<?> iterator = rlist.iterator(); iterator.hasNext();) {
- AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator
- .next();
- if (abstractResourceConfig instanceof BindingsType) {
- String beanId = ((BindingsType) abstractResourceConfig).getBeanId();
- if (beanId == null) continue;
- beanIdList.add(beanId);
- }
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if(attribute == JavabeanPackage.eINSTANCE.getWiringType_WireOnElement()){
+ return true;
}
- return beanIdList;
+ return super.isSelectorFeature(attribute);
}
- private SmooksResourceListType getSmooksResourceList(EObject model) {
- EObject parent = model.eContainer();
- while (parent != null && !(parent instanceof SmooksResourceListType)) {
- parent = parent.eContainer();
- }
- if (parent instanceof SmooksResourceListType) {
- return (SmooksResourceListType) parent;
- }
- return null;
+ @Override
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
}
-
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -34,7 +34,7 @@
if(canCreateMethodsSearchFieldEditor(feature)){
return createMethodsSearchFieldEditor(toolkit, parent, propertyDescriptor, model);
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
protected boolean canCreatePropertiesSearchFieldEditor(EAttribute feature) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -46,7 +46,7 @@
if (feature == SmooksPackage.eINSTANCE.getConditionType_IdRef()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ImportTypeUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -36,7 +36,7 @@
IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getImportType_File()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -40,7 +40,7 @@
}
if (feature == SmooksPackage.eINSTANCE.getParamType_Type()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -48,7 +48,15 @@
}
if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_TargetProfile()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == SmooksPackage.eINSTANCE.getResourceConfigType_Selector()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceTypeUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -42,7 +42,7 @@
}
if (feature == SmooksPackage.eINSTANCE.getResourceType_Type()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -379,10 +379,8 @@
JavaMethodsSelectionDialog dialog = new JavaMethodsSelectionDialog(project, clazz);
return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
"Select method", dialog, (EObject) model);
- } catch (JavaModelException e) {
+ } catch (Exception e) {
// ignore
- } catch (ClassNotFoundException e) {
- // ignore
}
return null;
}
@@ -464,10 +462,8 @@
JavaPropertiesSelectionDialog dialog = new JavaPropertiesSelectionDialog(project, clazz);
return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
"Select property", dialog, (EObject) model);
- } catch (JavaModelException e) {
+ } catch (Exception e) {
// ignore
- } catch (ClassNotFoundException e) {
- // ignore
}
return null;
}
@@ -484,8 +480,21 @@
public static Composite createDialogFieldEditor(Composite parent, FormToolkit toolkit,
final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
final EObject model) {
+ return createDialogFieldEditor(parent, toolkit, propertyDescriptor, buttonName, dialog, model, false, null);
+ }
+
+ public static Composite createDialogFieldEditor(Composite parent, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
+ final EObject model, boolean labelLink, IHyperlinkListener listener) {
String displayName = propertyDescriptor.getDisplayName(model);
- toolkit.createLabel(parent, displayName + " :");
+ if (labelLink) {
+ Hyperlink link = toolkit.createHyperlink(parent, displayName + " :", SWT.NONE);
+ if(listener != null){
+ link.addHyperlinkListener(listener);
+ }
+ } else {
+ toolkit.createLabel(parent, displayName + " :");
+ }
final Composite classTextComposite = toolkit.createComposite(parent);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
classTextComposite.setLayoutData(gd);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -39,7 +39,7 @@
protected CheckboxTableViewer tableViewer = null;
protected Button fileSystemBrowseButton;
protected boolean reasourceLoaded = false;
- private Button workspaceBrowseButton;
+ protected Button workspaceBrowseButton;
private String filePath = null;
public AbstractFileSelectionWizardPage(String pageName) {
@@ -156,11 +156,21 @@
// dialog.setInitialSelections(selectedResources);
if (files.length > 0) {
IFile file = files[0];
- String s = file.getFullPath().toPortableString();
- s = SmooksUIUtils.WORKSPACE_PRIX + s;
+ String s = processWorkSpaceFilePath(file);
relationT.setText(s);
}
}
+
+ protected String processFileSystemFilePath(String path){
+ path = SmooksUIUtils.FILE_PRIX + path;
+ return path;
+ }
+
+ protected String processWorkSpaceFilePath(IFile file){
+ String s = file.getFullPath().toPortableString();
+ s = SmooksUIUtils.WORKSPACE_PRIX + s;
+ return s;
+ }
protected Composite createFileSelectionComposite(Composite parent) {
Composite xsdComposite = new Composite(parent, SWT.NONE);
@@ -221,10 +231,10 @@
browseButtonComposite.setLayout(bg);
fileSystemBrowseButton = new Button(browseButtonComposite, SWT.NONE);
- fileSystemBrowseButton.setText("File System"); //$NON-NLS-1$
+ fileSystemBrowseButton.setText("Browse File System"); //$NON-NLS-1$
workspaceBrowseButton = new Button(browseButtonComposite, SWT.NONE);
- workspaceBrowseButton.setText("Work Space"); //$NON-NLS-1$
+ workspaceBrowseButton.setText("Browse WorkSpace"); //$NON-NLS-1$
gd = new GridData();
gd.horizontalAlignment = GridData.END;
workspaceBrowseButton.setLayoutData(gd);
@@ -280,7 +290,7 @@
FileDialog dialog = new FileDialog(this.getShell());
String path = dialog.open();
if (path != null) {
- path = SmooksUIUtils.FILE_PRIX + path;
+ path = processFileSystemFilePath(path);
relationText.setText(path);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -37,7 +37,7 @@
if (feature == XslPackage.eINSTANCE.getBindTo_Id()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/OutputToUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -37,7 +37,7 @@
if (feature == XslPackage.eINSTANCE.getOutputTo_OutputStreamResource()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -41,7 +41,7 @@
if (feature == XslPackage.eINSTANCE.getTemplate_Encoding()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-04-13 08:45:19 UTC (rev 14703)
@@ -16,8 +16,6 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.xsl.XslPackage;
/**
@@ -39,17 +37,19 @@
SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getXsl_ApplyBefore()) {
}
- if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElement()) {
- SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
- if (ext != null) {
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
- model, ext);
- }
- }
if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElementNS()) {
}
- return null;
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
}
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == XslPackage.eINSTANCE.getXsl_ApplyOnElement()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
}
\ No newline at end of file
15 years, 8 months
JBoss Tools SVN: r14702 - in trunk/smooks/plugins: org.jboss.tools.smooks.core/model and 12 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-13 02:05:11 -0400 (Mon, 13 Apr 2009)
New Revision: 14702
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.ecore
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.genmodel
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/ScriptType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/ScriptTypeImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.ecore
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.genmodel
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.xsd
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerPackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
Log:
JBIDE-4172
Add new attribute GUI for edit "groovy" and "freemarker" elements
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.ecore
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.ecore (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.ecore 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="groovy"
+ nsURI="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd" nsPrefix="g">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Groovy Scripting Configuration"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value=""/>
+ <details key="kind" value="mixed"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed" unique="false" upperBound="-1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="elementWildcard"/>
+ <details key="name" value=":mixed"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
+ transient="true" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="xmlns:prefix"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="xSISchemaLocation" upperBound="-1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
+ transient="true" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="xsi:schemaLocation"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="groovy" upperBound="-2"
+ eType="#//Groovy" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="
 Groovy Script.
 "/>
+ </eAnnotations>
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="groovy"/>
+ <details key="namespace" value="##targetNamespace"/>
+ <details key="affiliation" value="http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="script" upperBound="-2"
+ eType="#//ScriptType" volatile="true" transient="true" derived="true" containment="true"
+ resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="script"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Groovy" eSuperTypes="smooks-1.1.ecore#//ElementVisitor">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="
 Groovy Script.
 "/>
+ </eAnnotations>
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="groovy"/>
+ <details key="kind" value="elementOnly"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="imports" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="imports"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="param" upperBound="-1"
+ eType="ecore:EClass smooks-1.1.ecore#//ParamType" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="param"/>
+ <details key="namespace" value="http://www.milyn.org/xsd/smooks-1.1.xsd"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="script" lowerBound="1"
+ eType="#//ScriptType" containment="true" resolveProxies="false">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="element"/>
+ <details key="name" value="script"/>
+ <details key="namespace" value="##targetNamespace"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="executeBefore" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
+ defaultValueLiteral="false" unsettable="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="
 Execute the script before visiting the elements child content. Default is 'false'.
 "/>
+ </eAnnotations>
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="executeBefore"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="executeOnElement" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="
 The name of the element on which to execute the script.
 "/>
+ </eAnnotations>
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="executeOnElement"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="executeOnElementNS" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//AnyURI">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="
 The namespace of the element on which to execute the script.
 "/>
+ </eAnnotations>
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="kind" value="attribute"/>
+ <details key="name" value="executeOnElementNS"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="ScriptType" eSuperTypes="http://www.eclipse.org/emf/2003/XMLType#//AnyType">
+ <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
+ <details key="name" value="script_._type"/>
+ <details key="kind" value="mixed"/>
+ </eAnnotations>
+ </eClassifiers>
+</ecore:EPackage>
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.ecore
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.genmodel
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.genmodel (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.genmodel 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/newgroovy/src"
+ modelPluginID="newgroovy" modelName="Groovy-1" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>groovy-1.1.ecore</foreignModel>
+ <genPackages prefix="Groovy" resource="XML" disposableProviderFactory="true" ecorePackage="groovy-1.1.ecore#/">
+ <genClasses ecoreClass="groovy-1.1.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute groovy-1.1.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference groovy-1.1.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference groovy-1.1.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference groovy-1.1.ecore#//DocumentRoot/groovy"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference groovy-1.1.ecore#//DocumentRoot/script"/>
+ </genClasses>
+ <genClasses ecoreClass="groovy-1.1.ecore#//Groovy">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy-1.1.ecore#//Groovy/imports"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference groovy-1.1.ecore#//Groovy/param"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference groovy-1.1.ecore#//Groovy/script"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy-1.1.ecore#//Groovy/executeBefore"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy-1.1.ecore#//Groovy/executeOnElement"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy-1.1.ecore#//Groovy/executeOnElementNS"/>
+ </genClasses>
+ <genClasses ecoreClass="groovy-1.1.ecore#//ScriptType"/>
+ </genPackages>
+ <genPackages prefix="Smooks" resource="XML" disposableProviderFactory="true" ecorePackage="smooks-1.1.ecore#/">
+ <genClasses image="false" ecoreClass="smooks-1.1.ecore#//AbstractReader">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//AbstractReader/targetProfile"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="smooks-1.1.ecore#//AbstractResourceConfig"/>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ConditionsType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ConditionsType/condition"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ConditionType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/evaluator"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/id"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/idRef"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//DocumentRoot">
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//DocumentRoot/mixed"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/xMLNSPrefixMap"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/xSISchemaLocation"/>
+ <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/abstractReader"/>
+ <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/abstractResourceConfig"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/condition"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/conditions"/>
+ <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/elementVisitor"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/features"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/handler"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/handlers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/import"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/param"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/params"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/profile"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/profiles"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/reader"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/resource"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/resourceConfig"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/setOff"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/setOn"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/smooksResourceList"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="smooks-1.1.ecore#//ElementVisitor">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ElementVisitor/condition"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ElementVisitor/targetProfile"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//FeaturesType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//FeaturesType/setOn"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//FeaturesType/setOff"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//HandlersType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//HandlersType/handler"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//HandlerType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//HandlerType/class"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ImportType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ImportType/param"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ImportType/file"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ParamsType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ParamsType/param"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ParamType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ParamType/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ParamType/type"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ProfilesType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ProfilesType/profile"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ProfileType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ProfileType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ProfileType/baseProfile"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ProfileType/subProfiles"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ReaderType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ReaderType/handlers"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ReaderType/features"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ReaderType/params"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ReaderType/class"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ResourceConfigType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ResourceConfigType/resource"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ResourceConfigType/condition"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ResourceConfigType/param"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceConfigType/selector"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceConfigType/selectorNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceConfigType/targetProfile"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//ResourceType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceType/value"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceType/type"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//SetOffType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SetOffType/feature"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//SetOnType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SetOnType/feature"/>
+ </genClasses>
+ <genClasses ecoreClass="smooks-1.1.ecore#//SmooksResourceListType">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/params"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/conditions"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/profiles"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/abstractReaderGroup"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/abstractReader"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/abstractResourceConfigGroup"/>
+ <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/abstractResourceConfig"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultConditionRef"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultSelector"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultSelectorNamespace"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultTargetProfile"/>
+ </genClasses>
+ </genPackages>
+ <genPackages prefix="Common" resource="XML" disposableProviderFactory="true" ecorePackage="common.ecore#/">
+ <genClasses image="false" ecoreClass="common.ecore#//AbstractAnyType">
+ <genOperations ecoreOperation="common.ecore#//AbstractAnyType/getCDATA"/>
+ <genOperations ecoreOperation="common.ecore#//AbstractAnyType/setCDATA">
+ <genParameters ecoreParameter="common.ecore#//AbstractAnyType/setCDATA/cdata"/>
+ </genOperations>
+ <genOperations ecoreOperation="common.ecore#//AbstractAnyType/getStringValue"/>
+ <genOperations ecoreOperation="common.ecore#//AbstractAnyType/setStringValue">
+ <genParameters ecoreParameter="common.ecore#//AbstractAnyType/setStringValue/stringValue"/>
+ </genOperations>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.genmodel
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.xsd
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.xsd 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy-1.1.xsd 2009-04-13 06:05:11 UTC (rev 14702)
@@ -24,9 +24,11 @@
<xs:complexContent>
<xs:extension base="smooks:element-visitor">
<xs:sequence>
- <xs:element name="imports" type="xs:string" minOccurs="0"/>
- <xs:element name="script" type="xs:string"/>
- <xs:element ref="smooks:param" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="imports" type="xs:string"
+ minOccurs="0" />
+ <xs:element ref="smooks:param" minOccurs="0"
+ maxOccurs="unbounded" />
+ <xs:element ref="smooks-groovy:script"></xs:element>
</xs:sequence>
<xs:attribute name="executeOnElement" type="xs:string" use="required">
<xs:annotation>
@@ -53,4 +55,13 @@
</xs:complexContent>
</xs:complexType>
+
+ <xs:element name="script">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:anyType">
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
</xs:schema>
\ No newline at end of file
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.ecore
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.ecore 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.ecore 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ecore:EPackage xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="groovy"
- nsURI="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd" nsPrefix="g">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="Groovy Scripting Configuration"/>
- </eAnnotations>
- <eClassifiers xsi:type="ecore:EClass" name="DocumentRoot">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value=""/>
- <details key="kind" value="mixed"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="mixed" unique="false" upperBound="-1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFeatureMapEntry">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="elementWildcard"/>
- <details key="name" value=":mixed"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="xMLNSPrefixMap" upperBound="-1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
- transient="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="xmlns:prefix"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="xSISchemaLocation" upperBound="-1"
- eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EStringToStringMapEntry"
- transient="true" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="xsi:schemaLocation"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="groovy" upperBound="-2"
- eType="#//Groovy" volatile="true" transient="true" derived="true" containment="true"
- resolveProxies="false">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="
 Groovy Script.
 "/>
- </eAnnotations>
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="groovy"/>
- <details key="namespace" value="##targetNamespace"/>
- <details key="affiliation" value="http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="Groovy" eSuperTypes="smooks-1.1.ecore#//ElementVisitor">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="
 Groovy Script.
 "/>
- </eAnnotations>
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="name" value="groovy"/>
- <details key="kind" value="elementOnly"/>
- </eAnnotations>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="imports" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="imports"/>
- <details key="namespace" value="##targetNamespace"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="script" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="script"/>
- <details key="namespace" value="##targetNamespace"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="param" upperBound="-1"
- eType="ecore:EClass smooks-1.1.ecore#//ParamType" containment="true" resolveProxies="false">
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="element"/>
- <details key="name" value="param"/>
- <details key="namespace" value="http://www.milyn.org/xsd/smooks-1.1.xsd"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="executeBefore" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//Boolean"
- defaultValueLiteral="false" unsettable="true">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="
 Execute the script before visiting the elements child content. Default is 'false'.
 "/>
- </eAnnotations>
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="executeBefore"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="executeOnElement" lowerBound="1"
- eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="
 The name of the element on which to execute the script.
 "/>
- </eAnnotations>
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="executeOnElement"/>
- </eAnnotations>
- </eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="executeOnElementNS" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//AnyURI">
- <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
- <details key="documentation" value="
 The namespace of the element on which to execute the script.
 "/>
- </eAnnotations>
- <eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
- <details key="kind" value="attribute"/>
- <details key="name" value="executeOnElementNS"/>
- </eAnnotations>
- </eStructuralFeatures>
- </eClassifiers>
-</ecore:EPackage>
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.genmodel
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.genmodel 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/model/groovy.genmodel 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,145 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<genmodel:GenModel xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/groovymodel/src"
- modelPluginID="groovymodel" modelName="Groovy" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="6.0" copyrightFields="false">
- <foreignModel>groovy.ecore</foreignModel>
- <genPackages prefix="Groovy" resource="XML" disposableProviderFactory="true" ecorePackage="groovy.ecore#/">
- <genClasses ecoreClass="groovy.ecore#//DocumentRoot">
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute groovy.ecore#//DocumentRoot/mixed"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference groovy.ecore#//DocumentRoot/xMLNSPrefixMap"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference groovy.ecore#//DocumentRoot/xSISchemaLocation"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference groovy.ecore#//DocumentRoot/groovy"/>
- </genClasses>
- <genClasses ecoreClass="groovy.ecore#//Groovy">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy.ecore#//Groovy/imports"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy.ecore#//Groovy/script"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference groovy.ecore#//Groovy/param"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy.ecore#//Groovy/executeBefore"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy.ecore#//Groovy/executeOnElement"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute groovy.ecore#//Groovy/executeOnElementNS"/>
- </genClasses>
- </genPackages>
- <genPackages prefix="Smooks" resource="XML" disposableProviderFactory="true" ecorePackage="smooks-1.1.ecore#/">
- <genClasses image="false" ecoreClass="smooks-1.1.ecore#//AbstractReader">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//AbstractReader/targetProfile"/>
- </genClasses>
- <genClasses image="false" ecoreClass="smooks-1.1.ecore#//AbstractResourceConfig"/>
- <genClasses ecoreClass="smooks-1.1.ecore#//ConditionsType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ConditionsType/condition"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ConditionType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/value"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/evaluator"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/id"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ConditionType/idRef"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//DocumentRoot">
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//DocumentRoot/mixed"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/xMLNSPrefixMap"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/xSISchemaLocation"/>
- <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/abstractReader"/>
- <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/abstractResourceConfig"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/condition"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/conditions"/>
- <genFeatures property="None" children="true" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/elementVisitor"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/features"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/handler"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/handlers"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/import"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/param"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/params"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/profile"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/profiles"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/reader"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/resource"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/resourceConfig"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/setOff"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/setOn"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//DocumentRoot/smooksResourceList"/>
- </genClasses>
- <genClasses image="false" ecoreClass="smooks-1.1.ecore#//ElementVisitor">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ElementVisitor/condition"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ElementVisitor/targetProfile"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//FeaturesType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//FeaturesType/setOn"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//FeaturesType/setOff"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//HandlersType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//HandlersType/handler"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//HandlerType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//HandlerType/class"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ImportType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ImportType/param"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ImportType/file"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ParamsType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ParamsType/param"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ParamType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ParamType/name"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ParamType/type"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ProfilesType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ProfilesType/profile"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ProfileType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ProfileType/value"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ProfileType/baseProfile"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ProfileType/subProfiles"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ReaderType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ReaderType/handlers"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ReaderType/features"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ReaderType/params"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ReaderType/class"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ResourceConfigType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ResourceConfigType/resource"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ResourceConfigType/condition"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//ResourceConfigType/param"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceConfigType/selector"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceConfigType/selectorNamespace"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceConfigType/targetProfile"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//ResourceType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceType/value"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//ResourceType/type"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//SetOffType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SetOffType/feature"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//SetOnType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SetOnType/feature"/>
- </genClasses>
- <genClasses ecoreClass="smooks-1.1.ecore#//SmooksResourceListType">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/params"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/conditions"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/profiles"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/abstractReaderGroup"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/abstractReader"/>
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/abstractResourceConfigGroup"/>
- <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference smooks-1.1.ecore#//SmooksResourceListType/abstractResourceConfig"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultConditionRef"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultSelector"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultSelectorNamespace"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute smooks-1.1.ecore#//SmooksResourceListType/defaultTargetProfile"/>
- </genClasses>
- </genPackages>
- <genPackages prefix="Common" resource="XML" disposableProviderFactory="true" ecorePackage="common.ecore#/">
- <genClasses image="false" ecoreClass="common.ecore#//AbstractAnyType">
- <genOperations ecoreOperation="common.ecore#//AbstractAnyType/getCDATA"/>
- <genOperations ecoreOperation="common.ecore#//AbstractAnyType/setCDATA">
- <genParameters ecoreParameter="common.ecore#//AbstractAnyType/setCDATA/cdata"/>
- </genOperations>
- <genOperations ecoreOperation="common.ecore#//AbstractAnyType/getStringValue"/>
- <genOperations ecoreOperation="common.ecore#//AbstractAnyType/setStringValue">
- <genParameters ecoreParameter="common.ecore#//AbstractAnyType/setStringValue/stringValue"/>
- </genOperations>
- </genClasses>
- </genPackages>
-</genmodel:GenModel>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml 2009-04-13 06:05:11 UTC (rev 14702)
@@ -32,7 +32,7 @@
<package
uri="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"
class="org.jboss.tools.smooks.model.groovy.GroovyPackage"
- genModel="model/groovy.genmodel"/>
+ genModel="model/groovy-1.1.genmodel"/>
</extension>
<extension point="org.eclipse.emf.ecore.extension_parser">
@@ -142,7 +142,7 @@
<extension point="org.eclipse.emf.ecore.extension_parser">
<parser
- type="filerouting"
+ type="smooks-graphics-ext"
class="org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl"/>
</extension>
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,171 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-import org.eclipse.emf.ecore.EStructuralFeature;
-
-import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
-import org.eclipse.emf.edit.provider.IItemLabelProvider;
-import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemProviderAdapter;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.jboss.tools.smooks.model.groovy.DocumentRoot;
-import org.jboss.tools.smooks.model.groovy.GroovyFactory;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-
-/**
- * This is the item provider adapter for a {@link org.jboss.tools.smooks.model.groovy.DocumentRoot} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class DocumentRootItemProvider
- 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 DocumentRootItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
- * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns DocumentRoot.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/DocumentRoot"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- return getString("_UI_DocumentRoot_type");
- }
-
- /**
- * This handles model notifications by calling {@link #updateChildren} to update any cached
- * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(DocumentRoot.class)) {
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- 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
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
- GroovyFactory.eINSTANCE.createGroovy()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return GroovyEditPlugin.INSTANCE;
- }
-
-}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/DocumentRootItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,174 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+
+/**
+ * This is the item provider adapter for a {@link groovy.DocumentRoot} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class DocumentRootItemProvider
+ 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 DocumentRootItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY);
+ childrenFeatures.add(GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns DocumentRoot.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/DocumentRoot"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_DocumentRoot_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(DocumentRoot.class)) {
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ case GroovyPackage.DOCUMENT_ROOT__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
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
+ GroovyFactory.eINSTANCE.createGroovy()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT,
+ GroovyFactory.eINSTANCE.createScriptType()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return GroovyEditPlugin.INSTANCE;
+ }
+
+}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,93 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-import org.eclipse.emf.common.EMFPlugin;
-
-import org.eclipse.emf.common.util.ResourceLocator;
-
-/**
- * This is the central singleton for the Groovy edit plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public final class GroovyEditPlugin extends EMFPlugin {
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static final GroovyEditPlugin INSTANCE = new GroovyEditPlugin();
-
- /**
- * Keep track of the singleton.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static Implementation plugin;
-
- /**
- * Create the instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyEditPlugin() {
- super
- (new ResourceLocator [] {
- });
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- @Override
- public ResourceLocator getPluginResourceLocator() {
- return plugin;
- }
-
- /**
- * Returns the singleton instance of the Eclipse plugin.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the singleton instance.
- * @generated
- */
- public static Implementation getPlugin() {
- return plugin;
- }
-
- /**
- * The actual implementation of the Eclipse <b>Plugin</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static class Implementation extends EclipsePlugin {
- /**
- * Creates an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Implementation() {
- super();
-
- // Remember the static instance.
- //
- plugin = this;
- }
- }
-
-}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyEditPlugin.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,93 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+import org.eclipse.emf.common.EMFPlugin;
+
+import org.eclipse.emf.common.util.ResourceLocator;
+
+/**
+ * This is the central singleton for the Groovy-1 edit plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public final class GroovyEditPlugin extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static final GroovyEditPlugin INSTANCE = new GroovyEditPlugin();
+
+ /**
+ * Keep track of the singleton.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static Implementation plugin;
+
+ /**
+ * Create the instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyEditPlugin() {
+ super
+ (new ResourceLocator [] {
+ });
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
+ }
+
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the singleton instance.
+ * @generated
+ */
+ public static Implementation getPlugin() {
+ return plugin;
+ }
+
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+ }
+ }
+
+}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,295 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.common.notify.AdapterFactory;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.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.IItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
-import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.jboss.tools.smooks.edit.smooks.provider.ElementVisitorItemProvider;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksFactory;
-
-/**
- * This is the item provider adapter for a {@link org.jboss.tools.smooks.model.groovy.Groovy} object.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyItemProvider
- extends ElementVisitorItemProvider
- implements
- IEditingDomainItemProvider,
- IStructuredItemContentProvider,
- ITreeItemContentProvider,
- IItemLabelProvider,
- IItemPropertySource {
- /**
- * This constructs an instance from a factory and a notifier.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyItemProvider(AdapterFactory adapterFactory) {
- super(adapterFactory);
- }
-
- /**
- * This returns the property descriptors for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
- if (itemPropertyDescriptors == null) {
- super.getPropertyDescriptors(object);
-
- addImportsPropertyDescriptor(object);
- addScriptPropertyDescriptor(object);
- addExecuteBeforePropertyDescriptor(object);
- addExecuteOnElementPropertyDescriptor(object);
- addExecuteOnElementNSPropertyDescriptor(object);
- }
- return itemPropertyDescriptors;
- }
-
- /**
- * This adds a property descriptor for the Imports feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addImportsPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_imports_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Groovy_imports_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__IMPORTS,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Script feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addScriptPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_script_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Groovy_script_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__SCRIPT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Execute Before feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addExecuteBeforePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_executeBefore_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Groovy_executeBefore_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__EXECUTE_BEFORE,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Execute On Element feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addExecuteOnElementPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_executeOnElement_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Groovy_executeOnElement_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
- }
-
- /**
- * This adds a property descriptor for the Execute On Element NS feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addExecuteOnElementNSPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Groovy_executeOnElementNS_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Groovy_executeOnElementNS_feature", "_UI_Groovy_type"),
- GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT_NS,
- 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
- */
- @Override
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(GroovyPackage.Literals.GROOVY__PARAM);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
- * This returns Groovy.gif.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/Groovy"));
- }
-
- /**
- * This returns the label text for the adapted class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String getText(Object object) {
- String label = ((Groovy)object).getTargetProfile();
- return label == null || label.length() == 0 ?
- getString("_UI_Groovy_type") :
- getString("_UI_Groovy_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
- */
- @Override
- public void notifyChanged(Notification notification) {
- updateChildren(notification);
-
- switch (notification.getFeatureID(Groovy.class)) {
- case GroovyPackage.GROOVY__IMPORTS:
- case GroovyPackage.GROOVY__SCRIPT:
- case GroovyPackage.GROOVY__EXECUTE_BEFORE:
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case GroovyPackage.GROOVY__PARAM:
- 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
- */
- @Override
- protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (GroovyPackage.Literals.GROOVY__PARAM,
- SmooksFactory.eINSTANCE.createParamType()));
- }
-
- /**
- * Return the resource locator for this item provider's resources.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public ResourceLocator getResourceLocator() {
- return GroovyEditPlugin.INSTANCE;
- }
-
-}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,278 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.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.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.edit.smooks.provider.ElementVisitorItemProvider;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.smooks.SmooksFactory;
+
+/**
+ * This is the item provider adapter for a {@link groovy.Groovy} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyItemProvider
+ extends ElementVisitorItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addImportsPropertyDescriptor(object);
+ addExecuteBeforePropertyDescriptor(object);
+ addExecuteOnElementPropertyDescriptor(object);
+ addExecuteOnElementNSPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Imports feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addImportsPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_imports_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Groovy_imports_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__IMPORTS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute Before feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteBeforePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_executeBefore_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Groovy_executeBefore_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__EXECUTE_BEFORE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute On Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteOnElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_executeOnElement_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Groovy_executeOnElement_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute On Element NS feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteOnElementNSPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Groovy_executeOnElementNS_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Groovy_executeOnElementNS_feature", "_UI_Groovy_type"),
+ GroovyPackage.Literals.GROOVY__EXECUTE_ON_ELEMENT_NS,
+ 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
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(GroovyPackage.Literals.GROOVY__PARAM);
+ childrenFeatures.add(GroovyPackage.Literals.GROOVY__SCRIPT);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns Groovy.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Groovy"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Groovy)object).getTargetProfile();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Groovy_type") :
+ getString("_UI_Groovy_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
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Groovy.class)) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case GroovyPackage.GROOVY__PARAM:
+ case GroovyPackage.GROOVY__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
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GroovyPackage.Literals.GROOVY__PARAM,
+ SmooksFactory.eINSTANCE.createParamType()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GroovyPackage.Literals.GROOVY__SCRIPT,
+ GroovyFactory.eINSTANCE.createScriptType()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return GroovyEditPlugin.INSTANCE;
+ }
+
+}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,227 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.edit.groovy.provider;
-
-
-import java.util.ArrayList;
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.edit.provider.ChangeNotifier;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
-import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
-import org.eclipse.emf.edit.provider.IChangeNotifier;
-import org.eclipse.emf.edit.provider.IDisposable;
-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.INotifyChangedListener;
-import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
-import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.jboss.tools.smooks.model.groovy.util.GroovyAdapterFactory;
-
-/**
- * This is the factory that is used to provide the interfaces needed to support Viewers.
- * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
- * The adapters also support Eclipse property sheets.
- * Note that most of the adapters are shared among multiple instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyItemProviderAdapterFactory extends GroovyAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
- /**
- * This keeps track of the root adapter factory that delegates to this adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ComposedAdapterFactory parentAdapterFactory;
-
- /**
- * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected IChangeNotifier changeNotifier = new ChangeNotifier();
-
- /**
- * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected Collection<Object> supportedTypes = new ArrayList<Object>();
-
- /**
- * This constructs an instance.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyItemProviderAdapterFactory() {
- supportedTypes.add(IEditingDomainItemProvider.class);
- supportedTypes.add(IStructuredItemContentProvider.class);
- supportedTypes.add(ITreeItemContentProvider.class);
- supportedTypes.add(IItemLabelProvider.class);
- supportedTypes.add(IItemPropertySource.class);
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.jboss.tools.smooks.model.groovy.DocumentRoot} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DocumentRootItemProvider documentRootItemProvider;
-
- /**
- * This creates an adapter for a {@link org.jboss.tools.smooks.model.groovy.DocumentRoot}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createDocumentRootAdapter() {
- if (documentRootItemProvider == null) {
- documentRootItemProvider = new DocumentRootItemProvider(this);
- }
-
- return documentRootItemProvider;
- }
-
- /**
- * This keeps track of the one adapter used for all {@link org.jboss.tools.smooks.model.groovy.Groovy} instances.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected GroovyItemProvider groovyItemProvider;
-
- /**
- * This creates an adapter for a {@link org.jboss.tools.smooks.model.groovy.Groovy}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter createGroovyAdapter() {
- if (groovyItemProvider == null) {
- groovyItemProvider = new GroovyItemProvider(this);
- }
-
- return groovyItemProvider;
- }
-
- /**
- * This returns the root adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public ComposeableAdapterFactory getRootAdapterFactory() {
- return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
- }
-
- /**
- * This sets the composed adapter factory that contains this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
- this.parentAdapterFactory = parentAdapterFactory;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object type) {
- return supportedTypes.contains(type) || super.isFactoryForType(type);
- }
-
- /**
- * This implementation substitutes the factory itself as the key for the adapter.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Adapter adapt(Notifier notifier, Object type) {
- return super.adapt(notifier, this);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object adapt(Object object, Object type) {
- if (isFactoryForType(type)) {
- Object adapter = super.adapt(object, type);
- if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
- return adapter;
- }
- }
-
- return null;
- }
-
- /**
- * This adds a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void addListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.addListener(notifyChangedListener);
- }
-
- /**
- * This removes a listener.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void removeListener(INotifyChangedListener notifyChangedListener) {
- changeNotifier.removeListener(notifyChangedListener);
- }
-
- /**
- * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void fireNotifyChanged(Notification notification) {
- changeNotifier.fireNotifyChanged(notification);
-
- if (parentAdapterFactory != null) {
- parentAdapterFactory.fireNotifyChanged(notification);
- }
- }
-
- /**
- * This disposes all of the item providers created by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void dispose() {
- if (documentRootItemProvider != null) documentRootItemProvider.dispose();
- if (groovyItemProvider != null) groovyItemProvider.dispose();
- }
-
-}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/GroovyItemProviderAdapterFactory.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,249 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+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.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.jboss.tools.smooks.model.groovy.util.GroovyAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyItemProviderAdapterFactory extends GroovyAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link groovy.DocumentRoot} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootItemProvider documentRootItemProvider;
+
+ /**
+ * This creates an adapter for a {@link groovy.DocumentRoot}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createDocumentRootAdapter() {
+ if (documentRootItemProvider == null) {
+ documentRootItemProvider = new DocumentRootItemProvider(this);
+ }
+
+ return documentRootItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link groovy.Groovy} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroovyItemProvider groovyItemProvider;
+
+ /**
+ * This creates an adapter for a {@link groovy.Groovy}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createGroovyAdapter() {
+ if (groovyItemProvider == null) {
+ groovyItemProvider = new GroovyItemProvider(this);
+ }
+
+ return groovyItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link groovy.ScriptType} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ScriptTypeItemProvider scriptTypeItemProvider;
+
+ /**
+ * This creates an adapter for a {@link groovy.ScriptType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createScriptTypeAdapter() {
+ if (scriptTypeItemProvider == null) {
+ scriptTypeItemProvider = new ScriptTypeItemProvider(this);
+ }
+
+ return scriptTypeItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (documentRootItemProvider != null) documentRootItemProvider.dispose();
+ if (groovyItemProvider != null) groovyItemProvider.dispose();
+ if (scriptTypeItemProvider != null) scriptTypeItemProvider.dispose();
+ }
+
+}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,323 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.edit.groovy.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
+import org.eclipse.emf.ecore.xml.type.XMLTypeFactory;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+import org.jboss.tools.smooks.model.smooks.SmooksFactory;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+
+/**
+ * This is the item provider adapter for a {@link groovy.ScriptType} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ScriptTypeItemProvider
+ 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 ScriptTypeItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(XMLTypePackage.Literals.ANY_TYPE__MIXED);
+ childrenFeatures.add(XMLTypePackage.Literals.ANY_TYPE__ANY_ATTRIBUTE);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns ScriptType.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/ScriptType"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_ScriptType_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(ScriptType.class)) {
+ case GroovyPackage.SCRIPT_TYPE__MIXED:
+ case GroovyPackage.SCRIPT_TYPE__ANY_ATTRIBUTE:
+ 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
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT,
+ "")));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+ "")));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__PROCESSING_INSTRUCTION,
+ XMLTypeFactory.eINSTANCE.createProcessingInstruction())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
+ "")));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY,
+ GroovyFactory.eINSTANCE.createGroovy())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT,
+ GroovyFactory.eINSTANCE.createScriptType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITION,
+ SmooksFactory.eINSTANCE.createConditionType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__CONDITIONS,
+ SmooksFactory.eINSTANCE.createConditionsType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__FEATURES,
+ SmooksFactory.eINSTANCE.createFeaturesType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLER,
+ SmooksFactory.eINSTANCE.createHandlerType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__HANDLERS,
+ SmooksFactory.eINSTANCE.createHandlersType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__IMPORT,
+ SmooksFactory.eINSTANCE.createImportType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__PARAM,
+ SmooksFactory.eINSTANCE.createParamType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__PARAMS,
+ SmooksFactory.eINSTANCE.createParamsType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILE,
+ SmooksFactory.eINSTANCE.createProfileType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__PROFILES,
+ SmooksFactory.eINSTANCE.createProfilesType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__READER,
+ SmooksFactory.eINSTANCE.createReaderType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE,
+ SmooksFactory.eINSTANCE.createResourceType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__RESOURCE_CONFIG,
+ SmooksFactory.eINSTANCE.createResourceConfigType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__SET_OFF,
+ SmooksFactory.eINSTANCE.createSetOffType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__SET_ON,
+ SmooksFactory.eINSTANCE.createSetOnType())));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (XMLTypePackage.Literals.ANY_TYPE__MIXED,
+ FeatureMapUtil.createEntry
+ (SmooksPackage.Literals.DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST,
+ SmooksFactory.eINSTANCE.createSmooksResourceListType())));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return GroovyEditPlugin.INSTANCE;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/edit/groovy/provider/ScriptTypeItemProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerPackageImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerPackageImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -743,7 +743,7 @@
source,
new String[] {
"name", "template",
- "kind", "simple"
+ "kind", "mixed"
});
addAnnotation
(getTemplate_Value(),
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,116 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy;
-
-import org.eclipse.emf.common.util.EMap;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Document Root</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getMixed <em>Mixed</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy <em>Groovy</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot()
- * @model extendedMetaData="name='' kind='mixed'"
- * @generated
- */
-public interface DocumentRoot extends EObject {
- /**
- * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mixed</em>' attribute list.
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_Mixed()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * extendedMetaData="kind='elementWildcard' name=':mixed'"
- * @generated
- */
- FeatureMap getMixed();
-
- /**
- * Returns the value of the '<em><b>XMLNS Prefix Map</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XMLNS Prefix Map</em>' map.
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_XMLNSPrefixMap()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xmlns:prefix'"
- * @generated
- */
- EMap<String, String> getXMLNSPrefixMap();
-
- /**
- * Returns the value of the '<em><b>XSI Schema Location</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XSI Schema Location</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XSI Schema Location</em>' map.
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_XSISchemaLocation()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
- * @generated
- */
- EMap<String, String> getXSISchemaLocation();
-
- /**
- * Returns the value of the '<em><b>Groovy</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- *
- * Groovy Script.
- *
- * <!-- end-model-doc -->
- * @return the value of the '<em>Groovy</em>' containment reference.
- * @see #setGroovy(Groovy)
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getDocumentRoot_Groovy()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='groovy' namespace='##targetNamespace' affiliation='http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config'"
- * @generated
- */
- Groovy getGroovy();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy <em>Groovy</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Groovy</em>' containment reference.
- * @see #getGroovy()
- * @generated
- */
- void setGroovy(Groovy value);
-
-} // DocumentRoot
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/DocumentRoot.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,144 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.common.util.EMap;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.util.FeatureMap;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Document Root</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link groovy.DocumentRoot#getMixed <em>Mixed</em>}</li>
+ * <li>{@link groovy.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link groovy.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link groovy.DocumentRoot#getGroovy <em>Groovy</em>}</li>
+ * <li>{@link groovy.DocumentRoot#getScript <em>Script</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see groovy.GroovyPackage#getDocumentRoot()
+ * @model extendedMetaData="name='' kind='mixed'"
+ * @generated
+ */
+public interface DocumentRoot extends EObject {
+ /**
+ * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
+ * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Mixed</em>' attribute list.
+ * @see groovy.GroovyPackage#getDocumentRoot_Mixed()
+ * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
+ * extendedMetaData="kind='elementWildcard' name=':mixed'"
+ * @generated
+ */
+ FeatureMap getMixed();
+
+ /**
+ * Returns the value of the '<em><b>XMLNS Prefix Map</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type {@link java.lang.String},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>XMLNS Prefix Map</em>' map.
+ * @see groovy.GroovyPackage#getDocumentRoot_XMLNSPrefixMap()
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
+ * extendedMetaData="kind='attribute' name='xmlns:prefix'"
+ * @generated
+ */
+ EMap<String, String> getXMLNSPrefixMap();
+
+ /**
+ * Returns the value of the '<em><b>XSI Schema Location</b></em>' map.
+ * The key is of type {@link java.lang.String},
+ * and the value is of type {@link java.lang.String},
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>XSI Schema Location</em>' map isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>XSI Schema Location</em>' map.
+ * @see groovy.GroovyPackage#getDocumentRoot_XSISchemaLocation()
+ * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
+ * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
+ * @generated
+ */
+ EMap<String, String> getXSISchemaLocation();
+
+ /**
+ * Returns the value of the '<em><b>Groovy</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * Groovy Script.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Groovy</em>' containment reference.
+ * @see #setGroovy(Groovy)
+ * @see groovy.GroovyPackage#getDocumentRoot_Groovy()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='groovy' namespace='##targetNamespace' affiliation='http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config'"
+ * @generated
+ */
+ Groovy getGroovy();
+
+ /**
+ * Sets the value of the '{@link groovy.DocumentRoot#getGroovy <em>Groovy</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Groovy</em>' containment reference.
+ * @see #getGroovy()
+ * @generated
+ */
+ void setGroovy(Groovy value);
+
+ /**
+ * Returns the value of the '<em><b>Script</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Script</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Script</em>' containment reference.
+ * @see #setScript(ScriptType)
+ * @see groovy.GroovyPackage#getDocumentRoot_Script()
+ * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
+ * extendedMetaData="kind='element' name='script' namespace='##targetNamespace'"
+ * @generated
+ */
+ ScriptType getScript();
+
+ /**
+ * Sets the value of the '{@link groovy.DocumentRoot#getScript <em>Script</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Script</em>' containment reference.
+ * @see #getScript()
+ * @generated
+ */
+ void setScript(ScriptType value);
+
+} // DocumentRoot
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,224 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy;
-
-import org.eclipse.emf.common.util.EList;
-import org.jboss.tools.smooks.model.smooks.ElementVisitor;
-import org.jboss.tools.smooks.model.smooks.ParamType;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Groovy</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- *
- * Groovy Script.
- *
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getImports <em>Imports</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getScript <em>Script</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getParam <em>Param</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute Before</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement <em>Execute On Element</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS <em>Execute On Element NS</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy()
- * @model extendedMetaData="name='groovy' kind='elementOnly'"
- * @generated
- */
-public interface Groovy extends ElementVisitor {
- /**
- * Returns the value of the '<em><b>Imports</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Imports</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Imports</em>' attribute.
- * @see #setImports(String)
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_Imports()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='element' name='imports' namespace='##targetNamespace'"
- * @generated
- */
- String getImports();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#getImports <em>Imports</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Imports</em>' attribute.
- * @see #getImports()
- * @generated
- */
- void setImports(String value);
-
- /**
- * Returns the value of the '<em><b>Script</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Script</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Script</em>' attribute.
- * @see #setScript(String)
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_Script()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='element' name='script' namespace='##targetNamespace'"
- * @generated
- */
- String getScript();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#getScript <em>Script</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Script</em>' attribute.
- * @see #getScript()
- * @generated
- */
- void setScript(String value);
-
- /**
- * Returns the value of the '<em><b>Param</b></em>' containment reference list.
- * The list contents are of type {@link smooks.ParamType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Param</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Param</em>' containment reference list.
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_Param()
- * @model containment="true"
- * extendedMetaData="kind='element' name='param' namespace='http://www.milyn.org/xsd/smooks-1.1.xsd'"
- * @generated
- */
- EList<ParamType> getParam();
-
- /**
- * Returns the value of the '<em><b>Execute Before</b></em>' attribute.
- * The default value is <code>"false"</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- *
- * Execute the script before visiting the elements child content. Default is 'false'.
- *
- * <!-- end-model-doc -->
- * @return the value of the '<em>Execute Before</em>' attribute.
- * @see #isSetExecuteBefore()
- * @see #unsetExecuteBefore()
- * @see #setExecuteBefore(boolean)
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_ExecuteBefore()
- * @model default="false" unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Boolean"
- * extendedMetaData="kind='attribute' name='executeBefore'"
- * @generated
- */
- boolean isExecuteBefore();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute Before</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Execute Before</em>' attribute.
- * @see #isSetExecuteBefore()
- * @see #unsetExecuteBefore()
- * @see #isExecuteBefore()
- * @generated
- */
- void setExecuteBefore(boolean value);
-
- /**
- * Unsets the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute Before</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetExecuteBefore()
- * @see #isExecuteBefore()
- * @see #setExecuteBefore(boolean)
- * @generated
- */
- void unsetExecuteBefore();
-
- /**
- * Returns whether the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute Before</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Execute Before</em>' attribute is set.
- * @see #unsetExecuteBefore()
- * @see #isExecuteBefore()
- * @see #setExecuteBefore(boolean)
- * @generated
- */
- boolean isSetExecuteBefore();
-
- /**
- * Returns the value of the '<em><b>Execute On Element</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- *
- * The name of the element on which to execute the script.
- *
- * <!-- end-model-doc -->
- * @return the value of the '<em>Execute On Element</em>' attribute.
- * @see #setExecuteOnElement(String)
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_ExecuteOnElement()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='attribute' name='executeOnElement'"
- * @generated
- */
- String getExecuteOnElement();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement <em>Execute On Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Execute On Element</em>' attribute.
- * @see #getExecuteOnElement()
- * @generated
- */
- void setExecuteOnElement(String value);
-
- /**
- * Returns the value of the '<em><b>Execute On Element NS</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- *
- * The namespace of the element on which to execute the script.
- *
- * <!-- end-model-doc -->
- * @return the value of the '<em>Execute On Element NS</em>' attribute.
- * @see #setExecuteOnElementNS(String)
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#getGroovy_ExecuteOnElementNS()
- * @model dataType="org.eclipse.emf.ecore.xml.type.AnyURI"
- * extendedMetaData="kind='attribute' name='executeOnElementNS'"
- * @generated
- */
- String getExecuteOnElementNS();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS <em>Execute On Element NS</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Execute On Element NS</em>' attribute.
- * @see #getExecuteOnElementNS()
- * @generated
- */
- void setExecuteOnElementNS(String value);
-
-} // Groovy
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/Groovy.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,224 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.common.util.EList;
+import org.jboss.tools.smooks.model.smooks.ElementVisitor;
+import org.jboss.tools.smooks.model.smooks.ParamType;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Groovy</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ *
+ * Groovy Script.
+ *
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link groovy.Groovy#getImports <em>Imports</em>}</li>
+ * <li>{@link groovy.Groovy#getParam <em>Param</em>}</li>
+ * <li>{@link groovy.Groovy#getScript <em>Script</em>}</li>
+ * <li>{@link groovy.Groovy#isExecuteBefore <em>Execute Before</em>}</li>
+ * <li>{@link groovy.Groovy#getExecuteOnElement <em>Execute On Element</em>}</li>
+ * <li>{@link groovy.Groovy#getExecuteOnElementNS <em>Execute On Element NS</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see groovy.GroovyPackage#getGroovy()
+ * @model extendedMetaData="name='groovy' kind='elementOnly'"
+ * @generated
+ */
+public interface Groovy extends ElementVisitor {
+ /**
+ * Returns the value of the '<em><b>Imports</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Imports</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Imports</em>' attribute.
+ * @see #setImports(String)
+ * @see groovy.GroovyPackage#getGroovy_Imports()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String"
+ * extendedMetaData="kind='element' name='imports' namespace='##targetNamespace'"
+ * @generated
+ */
+ String getImports();
+
+ /**
+ * Sets the value of the '{@link groovy.Groovy#getImports <em>Imports</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Imports</em>' attribute.
+ * @see #getImports()
+ * @generated
+ */
+ void setImports(String value);
+
+ /**
+ * Returns the value of the '<em><b>Param</b></em>' containment reference list.
+ * The list contents are of type {@link smooks.ParamType}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Param</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Param</em>' containment reference list.
+ * @see groovy.GroovyPackage#getGroovy_Param()
+ * @model containment="true"
+ * extendedMetaData="kind='element' name='param' namespace='http://www.milyn.org/xsd/smooks-1.1.xsd'"
+ * @generated
+ */
+ EList<ParamType> getParam();
+
+ /**
+ * Returns the value of the '<em><b>Script</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Script</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Script</em>' containment reference.
+ * @see #setScript(ScriptType)
+ * @see groovy.GroovyPackage#getGroovy_Script()
+ * @model containment="true" required="true"
+ * extendedMetaData="kind='element' name='script' namespace='##targetNamespace'"
+ * @generated
+ */
+ ScriptType getScript();
+
+ /**
+ * Sets the value of the '{@link groovy.Groovy#getScript <em>Script</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Script</em>' containment reference.
+ * @see #getScript()
+ * @generated
+ */
+ void setScript(ScriptType value);
+
+ /**
+ * Returns the value of the '<em><b>Execute Before</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * Execute the script before visiting the elements child content. Default is 'false'.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Execute Before</em>' attribute.
+ * @see #isSetExecuteBefore()
+ * @see #unsetExecuteBefore()
+ * @see #setExecuteBefore(boolean)
+ * @see groovy.GroovyPackage#getGroovy_ExecuteBefore()
+ * @model default="false" unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.Boolean"
+ * extendedMetaData="kind='attribute' name='executeBefore'"
+ * @generated
+ */
+ boolean isExecuteBefore();
+
+ /**
+ * Sets the value of the '{@link groovy.Groovy#isExecuteBefore <em>Execute Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Execute Before</em>' attribute.
+ * @see #isSetExecuteBefore()
+ * @see #unsetExecuteBefore()
+ * @see #isExecuteBefore()
+ * @generated
+ */
+ void setExecuteBefore(boolean value);
+
+ /**
+ * Unsets the value of the '{@link groovy.Groovy#isExecuteBefore <em>Execute Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isSetExecuteBefore()
+ * @see #isExecuteBefore()
+ * @see #setExecuteBefore(boolean)
+ * @generated
+ */
+ void unsetExecuteBefore();
+
+ /**
+ * Returns whether the value of the '{@link groovy.Groovy#isExecuteBefore <em>Execute Before</em>}' attribute is set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return whether the value of the '<em>Execute Before</em>' attribute is set.
+ * @see #unsetExecuteBefore()
+ * @see #isExecuteBefore()
+ * @see #setExecuteBefore(boolean)
+ * @generated
+ */
+ boolean isSetExecuteBefore();
+
+ /**
+ * Returns the value of the '<em><b>Execute On Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * The name of the element on which to execute the script.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Execute On Element</em>' attribute.
+ * @see #setExecuteOnElement(String)
+ * @see groovy.GroovyPackage#getGroovy_ExecuteOnElement()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
+ * extendedMetaData="kind='attribute' name='executeOnElement'"
+ * @generated
+ */
+ String getExecuteOnElement();
+
+ /**
+ * Sets the value of the '{@link groovy.Groovy#getExecuteOnElement <em>Execute On Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Execute On Element</em>' attribute.
+ * @see #getExecuteOnElement()
+ * @generated
+ */
+ void setExecuteOnElement(String value);
+
+ /**
+ * Returns the value of the '<em><b>Execute On Element NS</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ *
+ * The namespace of the element on which to execute the script.
+ *
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Execute On Element NS</em>' attribute.
+ * @see #setExecuteOnElementNS(String)
+ * @see groovy.GroovyPackage#getGroovy_ExecuteOnElementNS()
+ * @model dataType="org.eclipse.emf.ecore.xml.type.AnyURI"
+ * extendedMetaData="kind='attribute' name='executeOnElementNS'"
+ * @generated
+ */
+ String getExecuteOnElementNS();
+
+ /**
+ * Sets the value of the '{@link groovy.Groovy#getExecuteOnElementNS <em>Execute On Element NS</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Execute On Element NS</em>' attribute.
+ * @see #getExecuteOnElementNS()
+ * @generated
+ */
+ void setExecuteOnElementNS(String value);
+
+} // Groovy
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,55 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage
- * @generated
- */
-public interface GroovyFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- GroovyFactory eINSTANCE = org.jboss.tools.smooks.model.groovy.impl.GroovyFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Document Root</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Document Root</em>'.
- * @generated
- */
- DocumentRoot createDocumentRoot();
-
- /**
- * Returns a new object of class '<em>Groovy</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Groovy</em>'.
- * @generated
- */
- Groovy createGroovy();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- GroovyPackage getGroovyPackage();
-
-} //GroovyFactory
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyFactory.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,65 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.ecore.EFactory;
+import org.jboss.tools.smooks.model.groovy.impl.GroovyFactoryImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see groovy.GroovyPackage
+ * @generated
+ */
+public interface GroovyFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GroovyFactory eINSTANCE = GroovyFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Document Root</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Document Root</em>'.
+ * @generated
+ */
+ DocumentRoot createDocumentRoot();
+
+ /**
+ * Returns a new object of class '<em>Groovy</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Groovy</em>'.
+ * @generated
+ */
+ Groovy createGroovy();
+
+ /**
+ * Returns a new object of class '<em>Script Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Script Type</em>'.
+ * @generated
+ */
+ ScriptType createScriptType();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ GroovyPackage getGroovyPackage();
+
+} //GroovyFactory
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,494 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * <!-- begin-model-doc -->
- * Groovy Scripting Configuration
- * <!-- end-model-doc -->
- * @see org.jboss.tools.smooks.model.groovy.GroovyFactory
- * @model kind="package"
- * @generated
- */
-public interface GroovyPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "groovy";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.milyn.org/xsd/smooks/groovy-1.1.xsd";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "g";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- GroovyPackage eINSTANCE = org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl <em>Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl
- * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getDocumentRoot()
- * @generated
- */
- int DOCUMENT_ROOT = 0;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__MIXED = 0;
-
- /**
- * The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
-
- /**
- * The feature id for the '<em><b>XSI Schema Location</b></em>' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
-
- /**
- * The feature id for the '<em><b>Groovy</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT__GROOVY = 3;
-
- /**
- * The number of structural features of the '<em>Document Root</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int DOCUMENT_ROOT_FEATURE_COUNT = 4;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl <em>Groovy</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.impl.GroovyImpl
- * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getGroovy()
- * @generated
- */
- int GROOVY = 1;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__MIXED = SmooksPackage.ELEMENT_VISITOR__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__ANY = SmooksPackage.ELEMENT_VISITOR__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__ANY_ATTRIBUTE = SmooksPackage.ELEMENT_VISITOR__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Condition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__CONDITION = SmooksPackage.ELEMENT_VISITOR__CONDITION;
-
- /**
- * The feature id for the '<em><b>Target Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__TARGET_PROFILE = SmooksPackage.ELEMENT_VISITOR__TARGET_PROFILE;
-
- /**
- * The feature id for the '<em><b>Imports</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__IMPORTS = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Script</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__SCRIPT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Param</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__PARAM = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Execute Before</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__EXECUTE_BEFORE = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Execute On Element</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__EXECUTE_ON_ELEMENT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Execute On Element NS</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY__EXECUTE_ON_ELEMENT_NS = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Groovy</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GROOVY_FEATURE_COUNT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 6;
-
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot <em>Document Root</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Document Root</em>'.
- * @see org.jboss.tools.smooks.model.groovy.DocumentRoot
- * @generated
- */
- EClass getDocumentRoot();
-
- /**
- * Returns the meta object for the attribute list '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getMixed <em>Mixed</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Mixed</em>'.
- * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getMixed()
- * @see #getDocumentRoot()
- * @generated
- */
- EAttribute getDocumentRoot_Mixed();
-
- /**
- * Returns the meta object for the map '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the map '<em>XMLNS Prefix Map</em>'.
- * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getXMLNSPrefixMap()
- * @see #getDocumentRoot()
- * @generated
- */
- EReference getDocumentRoot_XMLNSPrefixMap();
-
- /**
- * Returns the meta object for the map '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the map '<em>XSI Schema Location</em>'.
- * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getXSISchemaLocation()
- * @see #getDocumentRoot()
- * @generated
- */
- EReference getDocumentRoot_XSISchemaLocation();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy <em>Groovy</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Groovy</em>'.
- * @see org.jboss.tools.smooks.model.groovy.DocumentRoot#getGroovy()
- * @see #getDocumentRoot()
- * @generated
- */
- EReference getDocumentRoot_Groovy();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks.model.groovy.Groovy <em>Groovy</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Groovy</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy
- * @generated
- */
- EClass getGroovy();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.groovy.Groovy#getImports <em>Imports</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Imports</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy#getImports()
- * @see #getGroovy()
- * @generated
- */
- EAttribute getGroovy_Imports();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.groovy.Groovy#getScript <em>Script</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Script</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy#getScript()
- * @see #getGroovy()
- * @generated
- */
- EAttribute getGroovy_Script();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.groovy.Groovy#getParam <em>Param</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Param</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy#getParam()
- * @see #getGroovy()
- * @generated
- */
- EReference getGroovy_Param();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore <em>Execute Before</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Execute Before</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy#isExecuteBefore()
- * @see #getGroovy()
- * @generated
- */
- EAttribute getGroovy_ExecuteBefore();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement <em>Execute On Element</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Execute On Element</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElement()
- * @see #getGroovy()
- * @generated
- */
- EAttribute getGroovy_ExecuteOnElement();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS <em>Execute On Element NS</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Execute On Element NS</em>'.
- * @see org.jboss.tools.smooks.model.groovy.Groovy#getExecuteOnElementNS()
- * @see #getGroovy()
- * @generated
- */
- EAttribute getGroovy_ExecuteOnElementNS();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- GroovyFactory getGroovyFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl <em>Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl
- * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getDocumentRoot()
- * @generated
- */
- EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
-
- /**
- * The meta object literal for the '<em><b>Mixed</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed();
-
- /**
- * The meta object literal for the '<em><b>XMLNS Prefix Map</b></em>' map feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap();
-
- /**
- * The meta object literal for the '<em><b>XSI Schema Location</b></em>' map feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation();
-
- /**
- * The meta object literal for the '<em><b>Groovy</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference DOCUMENT_ROOT__GROOVY = eINSTANCE.getDocumentRoot_Groovy();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl <em>Groovy</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.impl.GroovyImpl
- * @see org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl#getGroovy()
- * @generated
- */
- EClass GROOVY = eINSTANCE.getGroovy();
-
- /**
- * The meta object literal for the '<em><b>Imports</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute GROOVY__IMPORTS = eINSTANCE.getGroovy_Imports();
-
- /**
- * The meta object literal for the '<em><b>Script</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute GROOVY__SCRIPT = eINSTANCE.getGroovy_Script();
-
- /**
- * The meta object literal for the '<em><b>Param</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference GROOVY__PARAM = eINSTANCE.getGroovy_Param();
-
- /**
- * The meta object literal for the '<em><b>Execute Before</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute GROOVY__EXECUTE_BEFORE = eINSTANCE.getGroovy_ExecuteBefore();
-
- /**
- * The meta object literal for the '<em><b>Execute On Element</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute GROOVY__EXECUTE_ON_ELEMENT = eINSTANCE.getGroovy_ExecuteOnElement();
-
- /**
- * The meta object literal for the '<em><b>Execute On Element NS</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute GROOVY__EXECUTE_ON_ELEMENT_NS = eINSTANCE.getGroovy_ExecuteOnElementNS();
-
- }
-
-} //GroovyPackage
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/GroovyPackage.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,590 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.jboss.tools.smooks.model.groovy.impl.GroovyPackageImpl;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Groovy Scripting Configuration
+ * <!-- end-model-doc -->
+ * @see groovy.GroovyFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface GroovyPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "groovy";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.milyn.org/xsd/smooks/groovy-1.1.xsd";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "g";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GroovyPackage eINSTANCE = GroovyPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link groovy.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see groovy.impl.DocumentRootImpl
+ * @see groovy.impl.GroovyPackageImpl#getDocumentRoot()
+ * @generated
+ */
+ int DOCUMENT_ROOT = 0;
+
+ /**
+ * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__MIXED = 0;
+
+ /**
+ * The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
+
+ /**
+ * The feature id for the '<em><b>XSI Schema Location</b></em>' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
+
+ /**
+ * The feature id for the '<em><b>Groovy</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__GROOVY = 3;
+
+ /**
+ * The feature id for the '<em><b>Script</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT__SCRIPT = 4;
+
+ /**
+ * The number of structural features of the '<em>Document Root</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int DOCUMENT_ROOT_FEATURE_COUNT = 5;
+
+ /**
+ * The meta object id for the '{@link groovy.impl.GroovyImpl <em>Groovy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see groovy.impl.GroovyImpl
+ * @see groovy.impl.GroovyPackageImpl#getGroovy()
+ * @generated
+ */
+ int GROOVY = 1;
+
+ /**
+ * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__MIXED = SmooksPackage.ELEMENT_VISITOR__MIXED;
+
+ /**
+ * The feature id for the '<em><b>Any</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__ANY = SmooksPackage.ELEMENT_VISITOR__ANY;
+
+ /**
+ * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__ANY_ATTRIBUTE = SmooksPackage.ELEMENT_VISITOR__ANY_ATTRIBUTE;
+
+ /**
+ * The feature id for the '<em><b>Condition</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__CONDITION = SmooksPackage.ELEMENT_VISITOR__CONDITION;
+
+ /**
+ * The feature id for the '<em><b>Target Profile</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__TARGET_PROFILE = SmooksPackage.ELEMENT_VISITOR__TARGET_PROFILE;
+
+ /**
+ * The feature id for the '<em><b>Imports</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__IMPORTS = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Param</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__PARAM = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Script</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__SCRIPT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Execute Before</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__EXECUTE_BEFORE = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Execute On Element</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__EXECUTE_ON_ELEMENT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>Execute On Element NS</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY__EXECUTE_ON_ELEMENT_NS = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 5;
+
+ /**
+ * The number of structural features of the '<em>Groovy</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GROOVY_FEATURE_COUNT = SmooksPackage.ELEMENT_VISITOR_FEATURE_COUNT + 6;
+
+ /**
+ * The meta object id for the '{@link groovy.impl.ScriptTypeImpl <em>Script Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see groovy.impl.ScriptTypeImpl
+ * @see groovy.impl.GroovyPackageImpl#getScriptType()
+ * @generated
+ */
+ int SCRIPT_TYPE = 2;
+
+ /**
+ * The feature id for the '<em><b>Mixed</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SCRIPT_TYPE__MIXED = XMLTypePackage.ANY_TYPE__MIXED;
+
+ /**
+ * The feature id for the '<em><b>Any</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SCRIPT_TYPE__ANY = XMLTypePackage.ANY_TYPE__ANY;
+
+ /**
+ * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SCRIPT_TYPE__ANY_ATTRIBUTE = XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE;
+
+ /**
+ * The number of structural features of the '<em>Script Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int SCRIPT_TYPE_FEATURE_COUNT = XMLTypePackage.ANY_TYPE_FEATURE_COUNT + 0;
+
+
+ /**
+ * Returns the meta object for class '{@link groovy.DocumentRoot <em>Document Root</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Document Root</em>'.
+ * @see groovy.DocumentRoot
+ * @generated
+ */
+ EClass getDocumentRoot();
+
+ /**
+ * Returns the meta object for the attribute list '{@link groovy.DocumentRoot#getMixed <em>Mixed</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute list '<em>Mixed</em>'.
+ * @see groovy.DocumentRoot#getMixed()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EAttribute getDocumentRoot_Mixed();
+
+ /**
+ * Returns the meta object for the map '{@link groovy.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>XMLNS Prefix Map</em>'.
+ * @see groovy.DocumentRoot#getXMLNSPrefixMap()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * Returns the meta object for the map '{@link groovy.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the map '<em>XSI Schema Location</em>'.
+ * @see groovy.DocumentRoot#getXSISchemaLocation()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * Returns the meta object for the containment reference '{@link groovy.DocumentRoot#getGroovy <em>Groovy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Groovy</em>'.
+ * @see groovy.DocumentRoot#getGroovy()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Groovy();
+
+ /**
+ * Returns the meta object for the containment reference '{@link groovy.DocumentRoot#getScript <em>Script</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Script</em>'.
+ * @see groovy.DocumentRoot#getScript()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ EReference getDocumentRoot_Script();
+
+ /**
+ * Returns the meta object for class '{@link groovy.Groovy <em>Groovy</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Groovy</em>'.
+ * @see groovy.Groovy
+ * @generated
+ */
+ EClass getGroovy();
+
+ /**
+ * Returns the meta object for the attribute '{@link groovy.Groovy#getImports <em>Imports</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Imports</em>'.
+ * @see groovy.Groovy#getImports()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_Imports();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link groovy.Groovy#getParam <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Param</em>'.
+ * @see groovy.Groovy#getParam()
+ * @see #getGroovy()
+ * @generated
+ */
+ EReference getGroovy_Param();
+
+ /**
+ * Returns the meta object for the containment reference '{@link groovy.Groovy#getScript <em>Script</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Script</em>'.
+ * @see groovy.Groovy#getScript()
+ * @see #getGroovy()
+ * @generated
+ */
+ EReference getGroovy_Script();
+
+ /**
+ * Returns the meta object for the attribute '{@link groovy.Groovy#isExecuteBefore <em>Execute Before</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Execute Before</em>'.
+ * @see groovy.Groovy#isExecuteBefore()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_ExecuteBefore();
+
+ /**
+ * Returns the meta object for the attribute '{@link groovy.Groovy#getExecuteOnElement <em>Execute On Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Execute On Element</em>'.
+ * @see groovy.Groovy#getExecuteOnElement()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_ExecuteOnElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link groovy.Groovy#getExecuteOnElementNS <em>Execute On Element NS</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Execute On Element NS</em>'.
+ * @see groovy.Groovy#getExecuteOnElementNS()
+ * @see #getGroovy()
+ * @generated
+ */
+ EAttribute getGroovy_ExecuteOnElementNS();
+
+ /**
+ * Returns the meta object for class '{@link groovy.ScriptType <em>Script Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Script Type</em>'.
+ * @see groovy.ScriptType
+ * @generated
+ */
+ EClass getScriptType();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ GroovyFactory getGroovyFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link groovy.impl.DocumentRootImpl <em>Document Root</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see groovy.impl.DocumentRootImpl
+ * @see groovy.impl.GroovyPackageImpl#getDocumentRoot()
+ * @generated
+ */
+ EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
+
+ /**
+ * The meta object literal for the '<em><b>Mixed</b></em>' attribute list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed();
+
+ /**
+ * The meta object literal for the '<em><b>XMLNS Prefix Map</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * The meta object literal for the '<em><b>XSI Schema Location</b></em>' map feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * The meta object literal for the '<em><b>Groovy</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__GROOVY = eINSTANCE.getDocumentRoot_Groovy();
+
+ /**
+ * The meta object literal for the '<em><b>Script</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference DOCUMENT_ROOT__SCRIPT = eINSTANCE.getDocumentRoot_Script();
+
+ /**
+ * The meta object literal for the '{@link groovy.impl.GroovyImpl <em>Groovy</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see groovy.impl.GroovyImpl
+ * @see groovy.impl.GroovyPackageImpl#getGroovy()
+ * @generated
+ */
+ EClass GROOVY = eINSTANCE.getGroovy();
+
+ /**
+ * The meta object literal for the '<em><b>Imports</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__IMPORTS = eINSTANCE.getGroovy_Imports();
+
+ /**
+ * The meta object literal for the '<em><b>Param</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GROOVY__PARAM = eINSTANCE.getGroovy_Param();
+
+ /**
+ * The meta object literal for the '<em><b>Script</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GROOVY__SCRIPT = eINSTANCE.getGroovy_Script();
+
+ /**
+ * The meta object literal for the '<em><b>Execute Before</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__EXECUTE_BEFORE = eINSTANCE.getGroovy_ExecuteBefore();
+
+ /**
+ * The meta object literal for the '<em><b>Execute On Element</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__EXECUTE_ON_ELEMENT = eINSTANCE.getGroovy_ExecuteOnElement();
+
+ /**
+ * The meta object literal for the '<em><b>Execute On Element NS</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute GROOVY__EXECUTE_ON_ELEMENT_NS = eINSTANCE.getGroovy_ExecuteOnElementNS();
+
+ /**
+ * The meta object literal for the '{@link groovy.impl.ScriptTypeImpl <em>Script Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see groovy.impl.ScriptTypeImpl
+ * @see groovy.impl.GroovyPackageImpl#getScriptType()
+ * @generated
+ */
+ EClass SCRIPT_TYPE = eINSTANCE.getScriptType();
+
+ }
+
+} //GroovyPackage
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/ScriptType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/ScriptType.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/ScriptType.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,24 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.emf.ecore.xml.type.AnyType;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Script Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ *
+ * @see groovy.GroovyPackage#getScriptType()
+ * @model extendedMetaData="name='script_._type' kind='mixed'"
+ * @generated
+ */
+public interface ScriptType extends EObject, AnyType {
+} // ScriptType
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/ScriptType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,286 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.impl;
-
-
-import org.eclipse.emf.common.notify.NotificationChain;
-
-import org.eclipse.emf.common.util.EMap;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.EObjectImpl;
-import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
-
-import org.eclipse.emf.ecore.util.BasicFeatureMap;
-import org.eclipse.emf.ecore.util.EcoreEMap;
-import org.eclipse.emf.ecore.util.FeatureMap;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.jboss.tools.smooks.model.groovy.DocumentRoot;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Document Root</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.DocumentRootImpl#getGroovy <em>Groovy</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class DocumentRootImpl extends EObjectImpl implements DocumentRoot {
- /**
- * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getMixed()
- * @generated
- * @ordered
- */
- protected FeatureMap mixed;
-
- /**
- * The cached value of the '{@link #getXMLNSPrefixMap() <em>XMLNS Prefix Map</em>}' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getXMLNSPrefixMap()
- * @generated
- * @ordered
- */
- protected EMap<String, String> xMLNSPrefixMap;
-
- /**
- * The cached value of the '{@link #getXSISchemaLocation() <em>XSI Schema Location</em>}' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getXSISchemaLocation()
- * @generated
- * @ordered
- */
- protected EMap<String, String> xSISchemaLocation;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected DocumentRootImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return GroovyPackage.Literals.DOCUMENT_ROOT;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public FeatureMap getMixed() {
- if (mixed == null) {
- mixed = new BasicFeatureMap(this, GroovyPackage.DOCUMENT_ROOT__MIXED);
- }
- return mixed;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EMap<String, String> getXMLNSPrefixMap() {
- if (xMLNSPrefixMap == null) {
- xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
- }
- return xMLNSPrefixMap;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EMap<String, String> getXSISchemaLocation() {
- if (xSISchemaLocation == null) {
- xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
- }
- return xSISchemaLocation;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Groovy getGroovy() {
- return (Groovy)getMixed().get(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, true);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public NotificationChain basicSetGroovy(Groovy newGroovy, NotificationChain msgs) {
- return ((FeatureMap.Internal)getMixed()).basicAdd(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, newGroovy, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setGroovy(Groovy newGroovy) {
- ((FeatureMap.Internal)getMixed()).set(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, newGroovy);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case GroovyPackage.DOCUMENT_ROOT__MIXED:
- return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
- case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
- return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
- case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
- return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- return basicSetGroovy(null, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case GroovyPackage.DOCUMENT_ROOT__MIXED:
- if (coreType) return getMixed();
- return ((FeatureMap.Internal)getMixed()).getWrapper();
- case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
- if (coreType) return getXMLNSPrefixMap();
- else return getXMLNSPrefixMap().map();
- case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
- if (coreType) return getXSISchemaLocation();
- else return getXSISchemaLocation().map();
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- return getGroovy();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case GroovyPackage.DOCUMENT_ROOT__MIXED:
- ((FeatureMap.Internal)getMixed()).set(newValue);
- return;
- case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
- ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
- return;
- case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
- ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
- return;
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- setGroovy((Groovy)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case GroovyPackage.DOCUMENT_ROOT__MIXED:
- getMixed().clear();
- return;
- case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
- getXMLNSPrefixMap().clear();
- return;
- case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
- getXSISchemaLocation().clear();
- return;
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- setGroovy((Groovy)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case GroovyPackage.DOCUMENT_ROOT__MIXED:
- return mixed != null && !mixed.isEmpty();
- case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
- return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
- case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
- return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
- case GroovyPackage.DOCUMENT_ROOT__GROOVY:
- return getGroovy() != null;
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (mixed: ");
- result.append(mixed);
- result.append(')');
- return result.toString();
- }
-
-} //DocumentRootImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/DocumentRootImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,322 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EMap;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl;
+import org.eclipse.emf.ecore.util.BasicFeatureMap;
+import org.eclipse.emf.ecore.util.EcoreEMap;
+import org.eclipse.emf.ecore.util.FeatureMap;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Document Root</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link groovy.impl.DocumentRootImpl#getMixed <em>Mixed</em>}</li>
+ * <li>{@link groovy.impl.DocumentRootImpl#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
+ * <li>{@link groovy.impl.DocumentRootImpl#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
+ * <li>{@link groovy.impl.DocumentRootImpl#getGroovy <em>Groovy</em>}</li>
+ * <li>{@link groovy.impl.DocumentRootImpl#getScript <em>Script</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class DocumentRootImpl extends EObjectImpl implements DocumentRoot {
+ /**
+ * The cached value of the '{@link #getMixed() <em>Mixed</em>}' attribute list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMixed()
+ * @generated
+ * @ordered
+ */
+ protected FeatureMap mixed;
+
+ /**
+ * The cached value of the '{@link #getXMLNSPrefixMap() <em>XMLNS Prefix Map</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXMLNSPrefixMap()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> xMLNSPrefixMap;
+
+ /**
+ * The cached value of the '{@link #getXSISchemaLocation() <em>XSI Schema Location</em>}' map.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getXSISchemaLocation()
+ * @generated
+ * @ordered
+ */
+ protected EMap<String, String> xSISchemaLocation;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected DocumentRootImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GroovyPackage.Literals.DOCUMENT_ROOT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FeatureMap getMixed() {
+ if (mixed == null) {
+ mixed = new BasicFeatureMap(this, GroovyPackage.DOCUMENT_ROOT__MIXED);
+ }
+ return mixed;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getXMLNSPrefixMap() {
+ if (xMLNSPrefixMap == null) {
+ xMLNSPrefixMap = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ }
+ return xMLNSPrefixMap;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EMap<String, String> getXSISchemaLocation() {
+ if (xSISchemaLocation == null) {
+ xSISchemaLocation = new EcoreEMap<String,String>(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ }
+ return xSISchemaLocation;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Groovy getGroovy() {
+ return (Groovy)getMixed().get(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetGroovy(Groovy newGroovy, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, newGroovy, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setGroovy(Groovy newGroovy) {
+ ((FeatureMap.Internal)getMixed()).set(GroovyPackage.Literals.DOCUMENT_ROOT__GROOVY, newGroovy);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ScriptType getScript() {
+ return (ScriptType)getMixed().get(GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetScript(ScriptType newScript, NotificationChain msgs) {
+ return ((FeatureMap.Internal)getMixed()).basicAdd(GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT, newScript, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setScript(ScriptType newScript) {
+ ((FeatureMap.Internal)getMixed()).set(GroovyPackage.Literals.DOCUMENT_ROOT__SCRIPT, newScript);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ return ((InternalEList<?>)getMixed()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return ((InternalEList<?>)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return ((InternalEList<?>)getXSISchemaLocation()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ return basicSetGroovy(null, msgs);
+ case GroovyPackage.DOCUMENT_ROOT__SCRIPT:
+ return basicSetScript(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ if (coreType) return getMixed();
+ return ((FeatureMap.Internal)getMixed()).getWrapper();
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ if (coreType) return getXMLNSPrefixMap();
+ else return getXMLNSPrefixMap().map();
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ if (coreType) return getXSISchemaLocation();
+ else return getXSISchemaLocation().map();
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ return getGroovy();
+ case GroovyPackage.DOCUMENT_ROOT__SCRIPT:
+ return getScript();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ ((FeatureMap.Internal)getMixed()).set(newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ setGroovy((Groovy)newValue);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__SCRIPT:
+ setScript((ScriptType)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ getMixed().clear();
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ getXMLNSPrefixMap().clear();
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ getXSISchemaLocation().clear();
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ setGroovy((Groovy)null);
+ return;
+ case GroovyPackage.DOCUMENT_ROOT__SCRIPT:
+ setScript((ScriptType)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.DOCUMENT_ROOT__MIXED:
+ return mixed != null && !mixed.isEmpty();
+ case GroovyPackage.DOCUMENT_ROOT__XMLNS_PREFIX_MAP:
+ return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty();
+ case GroovyPackage.DOCUMENT_ROOT__XSI_SCHEMA_LOCATION:
+ return xSISchemaLocation != null && !xSISchemaLocation.isEmpty();
+ case GroovyPackage.DOCUMENT_ROOT__GROOVY:
+ return getGroovy() != null;
+ case GroovyPackage.DOCUMENT_ROOT__SCRIPT:
+ return getScript() != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (mixed: ");
+ result.append(mixed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //DocumentRootImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,110 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.impl;
-
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.impl.EFactoryImpl;
-
-import org.eclipse.emf.ecore.plugin.EcorePlugin;
-import org.jboss.tools.smooks.model.groovy.*;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Factory</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyFactoryImpl extends EFactoryImpl implements GroovyFactory {
- /**
- * Creates the default factory implementation.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public static GroovyFactory init() {
- try {
- GroovyFactory theGroovyFactory = (GroovyFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.milyn.org/xsd/smooks/groovy-1.1.xsd");
- if (theGroovyFactory != null) {
- return theGroovyFactory;
- }
- }
- catch (Exception exception) {
- EcorePlugin.INSTANCE.log(exception);
- }
- return new GroovyFactoryImpl();
- }
-
- /**
- * Creates an instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyFactoryImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public EObject create(EClass eClass) {
- switch (eClass.getClassifierID()) {
- case GroovyPackage.DOCUMENT_ROOT: return createDocumentRoot();
- case GroovyPackage.GROOVY: return createGroovy();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
- }
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public DocumentRoot createDocumentRoot() {
- DocumentRootImpl documentRoot = new DocumentRootImpl();
- return documentRoot;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public Groovy createGroovy() {
- GroovyImpl groovy = new GroovyImpl();
- return groovy;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyPackage getGroovyPackage() {
- return (GroovyPackage)getEPackage();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @deprecated
- * @generated
- */
- @Deprecated
- public static GroovyPackage getPackage() {
- return GroovyPackage.eINSTANCE;
- }
-
-} //GroovyFactoryImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyFactoryImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,122 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyFactoryImpl extends EFactoryImpl implements GroovyFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static GroovyFactory init() {
+ try {
+ GroovyFactory theGroovyFactory = (GroovyFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.milyn.org/xsd/smooks/groovy-1.1.xsd");
+ if (theGroovyFactory != null) {
+ return theGroovyFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new GroovyFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case GroovyPackage.DOCUMENT_ROOT: return createDocumentRoot();
+ case GroovyPackage.GROOVY: return createGroovy();
+ case GroovyPackage.SCRIPT_TYPE: return createScriptType();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public DocumentRoot createDocumentRoot() {
+ DocumentRootImpl documentRoot = new DocumentRootImpl();
+ return documentRoot;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Groovy createGroovy() {
+ GroovyImpl groovy = new GroovyImpl();
+ return groovy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ScriptType createScriptType() {
+ ScriptTypeImpl scriptType = new ScriptTypeImpl();
+ return scriptType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyPackage getGroovyPackage() {
+ return (GroovyPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static GroovyPackage getPackage() {
+ return GroovyPackage.eINSTANCE;
+ }
+
+} //GroovyFactoryImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,472 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.impl;
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
-import org.eclipse.emf.ecore.util.InternalEList;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.smooks.ParamType;
-import org.jboss.tools.smooks.model.smooks.impl.ElementVisitorImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Groovy</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getImports <em>Imports</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getScript <em>Script</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getParam <em>Param</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#isExecuteBefore <em>Execute Before</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getExecuteOnElement <em>Execute On Element</em>}</li>
- * <li>{@link org.jboss.tools.smooks.model.groovy.impl.GroovyImpl#getExecuteOnElementNS <em>Execute On Element NS</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class GroovyImpl extends ElementVisitorImpl implements Groovy {
- /**
- * The default value of the '{@link #getImports() <em>Imports</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImports()
- * @generated
- * @ordered
- */
- protected static final String IMPORTS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getImports() <em>Imports</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImports()
- * @generated
- * @ordered
- */
- protected String imports = IMPORTS_EDEFAULT;
-
- /**
- * The default value of the '{@link #getScript() <em>Script</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScript()
- * @generated
- * @ordered
- */
- protected static final String SCRIPT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getScript() <em>Script</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getScript()
- * @generated
- * @ordered
- */
- protected String script = SCRIPT_EDEFAULT;
-
- /**
- * The cached value of the '{@link #getParam() <em>Param</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getParam()
- * @generated
- * @ordered
- */
- protected EList<ParamType> param;
-
- /**
- * The default value of the '{@link #isExecuteBefore() <em>Execute Before</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExecuteBefore()
- * @generated
- * @ordered
- */
- protected static final boolean EXECUTE_BEFORE_EDEFAULT = false;
-
- /**
- * The cached value of the '{@link #isExecuteBefore() <em>Execute Before</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isExecuteBefore()
- * @generated
- * @ordered
- */
- protected boolean executeBefore = EXECUTE_BEFORE_EDEFAULT;
-
- /**
- * This is true if the Execute Before attribute has been set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- protected boolean executeBeforeESet;
-
- /**
- * The default value of the '{@link #getExecuteOnElement() <em>Execute On Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getExecuteOnElement()
- * @generated
- * @ordered
- */
- protected static final String EXECUTE_ON_ELEMENT_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getExecuteOnElement() <em>Execute On Element</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getExecuteOnElement()
- * @generated
- * @ordered
- */
- protected String executeOnElement = EXECUTE_ON_ELEMENT_EDEFAULT;
-
- /**
- * The default value of the '{@link #getExecuteOnElementNS() <em>Execute On Element NS</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getExecuteOnElementNS()
- * @generated
- * @ordered
- */
- protected static final String EXECUTE_ON_ELEMENT_NS_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getExecuteOnElementNS() <em>Execute On Element NS</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getExecuteOnElementNS()
- * @generated
- * @ordered
- */
- protected String executeOnElementNS = EXECUTE_ON_ELEMENT_NS_EDEFAULT;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected GroovyImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return GroovyPackage.Literals.GROOVY;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getImports() {
- return imports;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setImports(String newImports) {
- String oldImports = imports;
- imports = newImports;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__IMPORTS, oldImports, imports));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getScript() {
- return script;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setScript(String newScript) {
- String oldScript = script;
- script = newScript;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__SCRIPT, oldScript, script));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EList<ParamType> getParam() {
- if (param == null) {
- param = new EObjectContainmentEList<ParamType>(ParamType.class, this, GroovyPackage.GROOVY__PARAM);
- }
- return param;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isExecuteBefore() {
- return executeBefore;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setExecuteBefore(boolean newExecuteBefore) {
- boolean oldExecuteBefore = executeBefore;
- executeBefore = newExecuteBefore;
- boolean oldExecuteBeforeESet = executeBeforeESet;
- executeBeforeESet = true;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__EXECUTE_BEFORE, oldExecuteBefore, executeBefore, !oldExecuteBeforeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void unsetExecuteBefore() {
- boolean oldExecuteBefore = executeBefore;
- boolean oldExecuteBeforeESet = executeBeforeESet;
- executeBefore = EXECUTE_BEFORE_EDEFAULT;
- executeBeforeESet = false;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.UNSET, GroovyPackage.GROOVY__EXECUTE_BEFORE, oldExecuteBefore, EXECUTE_BEFORE_EDEFAULT, oldExecuteBeforeESet));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public boolean isSetExecuteBefore() {
- return executeBeforeESet;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getExecuteOnElement() {
- return executeOnElement;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setExecuteOnElement(String newExecuteOnElement) {
- String oldExecuteOnElement = executeOnElement;
- executeOnElement = newExecuteOnElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT, oldExecuteOnElement, executeOnElement));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public String getExecuteOnElementNS() {
- return executeOnElementNS;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setExecuteOnElementNS(String newExecuteOnElementNS) {
- String oldExecuteOnElementNS = executeOnElementNS;
- executeOnElementNS = newExecuteOnElementNS;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS, oldExecuteOnElementNS, executeOnElementNS));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case GroovyPackage.GROOVY__PARAM:
- return ((InternalEList<?>)getParam()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case GroovyPackage.GROOVY__IMPORTS:
- return getImports();
- case GroovyPackage.GROOVY__SCRIPT:
- return getScript();
- case GroovyPackage.GROOVY__PARAM:
- return getParam();
- case GroovyPackage.GROOVY__EXECUTE_BEFORE:
- return isExecuteBefore() ? Boolean.TRUE : Boolean.FALSE;
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
- return getExecuteOnElement();
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
- return getExecuteOnElementNS();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case GroovyPackage.GROOVY__IMPORTS:
- setImports((String)newValue);
- return;
- case GroovyPackage.GROOVY__SCRIPT:
- setScript((String)newValue);
- return;
- case GroovyPackage.GROOVY__PARAM:
- getParam().clear();
- getParam().addAll((Collection<? extends ParamType>)newValue);
- return;
- case GroovyPackage.GROOVY__EXECUTE_BEFORE:
- setExecuteBefore(((Boolean)newValue).booleanValue());
- return;
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
- setExecuteOnElement((String)newValue);
- return;
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
- setExecuteOnElementNS((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case GroovyPackage.GROOVY__IMPORTS:
- setImports(IMPORTS_EDEFAULT);
- return;
- case GroovyPackage.GROOVY__SCRIPT:
- setScript(SCRIPT_EDEFAULT);
- return;
- case GroovyPackage.GROOVY__PARAM:
- getParam().clear();
- return;
- case GroovyPackage.GROOVY__EXECUTE_BEFORE:
- unsetExecuteBefore();
- return;
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
- setExecuteOnElement(EXECUTE_ON_ELEMENT_EDEFAULT);
- return;
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
- setExecuteOnElementNS(EXECUTE_ON_ELEMENT_NS_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case GroovyPackage.GROOVY__IMPORTS:
- return IMPORTS_EDEFAULT == null ? imports != null : !IMPORTS_EDEFAULT.equals(imports);
- case GroovyPackage.GROOVY__SCRIPT:
- return SCRIPT_EDEFAULT == null ? script != null : !SCRIPT_EDEFAULT.equals(script);
- case GroovyPackage.GROOVY__PARAM:
- return param != null && !param.isEmpty();
- case GroovyPackage.GROOVY__EXECUTE_BEFORE:
- return isSetExecuteBefore();
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
- return EXECUTE_ON_ELEMENT_EDEFAULT == null ? executeOnElement != null : !EXECUTE_ON_ELEMENT_EDEFAULT.equals(executeOnElement);
- case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
- return EXECUTE_ON_ELEMENT_NS_EDEFAULT == null ? executeOnElementNS != null : !EXECUTE_ON_ELEMENT_NS_EDEFAULT.equals(executeOnElementNS);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuffer result = new StringBuffer(super.toString());
- result.append(" (imports: ");
- result.append(imports);
- result.append(", script: ");
- result.append(script);
- result.append(", executeBefore: ");
- if (executeBeforeESet) result.append(executeBefore); else result.append("<unset>");
- result.append(", executeOnElement: ");
- result.append(executeOnElement);
- result.append(", executeOnElementNS: ");
- result.append(executeOnElementNS);
- result.append(')');
- return result.toString();
- }
-
-} //GroovyImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,484 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+import org.jboss.tools.smooks.model.smooks.ParamType;
+import org.jboss.tools.smooks.model.smooks.impl.ElementVisitorImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Groovy</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link groovy.impl.GroovyImpl#getImports <em>Imports</em>}</li>
+ * <li>{@link groovy.impl.GroovyImpl#getParam <em>Param</em>}</li>
+ * <li>{@link groovy.impl.GroovyImpl#getScript <em>Script</em>}</li>
+ * <li>{@link groovy.impl.GroovyImpl#isExecuteBefore <em>Execute Before</em>}</li>
+ * <li>{@link groovy.impl.GroovyImpl#getExecuteOnElement <em>Execute On Element</em>}</li>
+ * <li>{@link groovy.impl.GroovyImpl#getExecuteOnElementNS <em>Execute On Element NS</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GroovyImpl extends ElementVisitorImpl implements Groovy {
+ /**
+ * The default value of the '{@link #getImports() <em>Imports</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImports()
+ * @generated
+ * @ordered
+ */
+ protected static final String IMPORTS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getImports() <em>Imports</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getImports()
+ * @generated
+ * @ordered
+ */
+ protected String imports = IMPORTS_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getParam() <em>Param</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParam()
+ * @generated
+ * @ordered
+ */
+ protected EList<ParamType> param;
+
+ /**
+ * The cached value of the '{@link #getScript() <em>Script</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getScript()
+ * @generated
+ * @ordered
+ */
+ protected ScriptType script;
+
+ /**
+ * The default value of the '{@link #isExecuteBefore() <em>Execute Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isExecuteBefore()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean EXECUTE_BEFORE_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isExecuteBefore() <em>Execute Before</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isExecuteBefore()
+ * @generated
+ * @ordered
+ */
+ protected boolean executeBefore = EXECUTE_BEFORE_EDEFAULT;
+
+ /**
+ * This is true if the Execute Before attribute has been set.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ protected boolean executeBeforeESet;
+
+ /**
+ * The default value of the '{@link #getExecuteOnElement() <em>Execute On Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElement()
+ * @generated
+ * @ordered
+ */
+ protected static final String EXECUTE_ON_ELEMENT_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExecuteOnElement() <em>Execute On Element</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElement()
+ * @generated
+ * @ordered
+ */
+ protected String executeOnElement = EXECUTE_ON_ELEMENT_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getExecuteOnElementNS() <em>Execute On Element NS</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElementNS()
+ * @generated
+ * @ordered
+ */
+ protected static final String EXECUTE_ON_ELEMENT_NS_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getExecuteOnElementNS() <em>Execute On Element NS</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getExecuteOnElementNS()
+ * @generated
+ * @ordered
+ */
+ protected String executeOnElementNS = EXECUTE_ON_ELEMENT_NS_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroovyImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GroovyPackage.Literals.GROOVY;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getImports() {
+ return imports;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setImports(String newImports) {
+ String oldImports = imports;
+ imports = newImports;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__IMPORTS, oldImports, imports));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<ParamType> getParam() {
+ if (param == null) {
+ param = new EObjectContainmentEList<ParamType>(ParamType.class, this, GroovyPackage.GROOVY__PARAM);
+ }
+ return param;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ScriptType getScript() {
+ return script;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetScript(ScriptType newScript, NotificationChain msgs) {
+ ScriptType oldScript = script;
+ script = newScript;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__SCRIPT, oldScript, newScript);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setScript(ScriptType newScript) {
+ if (newScript != script) {
+ NotificationChain msgs = null;
+ if (script != null)
+ msgs = ((InternalEObject)script).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GroovyPackage.GROOVY__SCRIPT, null, msgs);
+ if (newScript != null)
+ msgs = ((InternalEObject)newScript).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GroovyPackage.GROOVY__SCRIPT, null, msgs);
+ msgs = basicSetScript(newScript, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__SCRIPT, newScript, newScript));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isExecuteBefore() {
+ return executeBefore;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExecuteBefore(boolean newExecuteBefore) {
+ boolean oldExecuteBefore = executeBefore;
+ executeBefore = newExecuteBefore;
+ boolean oldExecuteBeforeESet = executeBeforeESet;
+ executeBeforeESet = true;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__EXECUTE_BEFORE, oldExecuteBefore, executeBefore, !oldExecuteBeforeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void unsetExecuteBefore() {
+ boolean oldExecuteBefore = executeBefore;
+ boolean oldExecuteBeforeESet = executeBeforeESet;
+ executeBefore = EXECUTE_BEFORE_EDEFAULT;
+ executeBeforeESet = false;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.UNSET, GroovyPackage.GROOVY__EXECUTE_BEFORE, oldExecuteBefore, EXECUTE_BEFORE_EDEFAULT, oldExecuteBeforeESet));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isSetExecuteBefore() {
+ return executeBeforeESet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExecuteOnElement() {
+ return executeOnElement;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExecuteOnElement(String newExecuteOnElement) {
+ String oldExecuteOnElement = executeOnElement;
+ executeOnElement = newExecuteOnElement;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT, oldExecuteOnElement, executeOnElement));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getExecuteOnElementNS() {
+ return executeOnElementNS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setExecuteOnElementNS(String newExecuteOnElementNS) {
+ String oldExecuteOnElementNS = executeOnElementNS;
+ executeOnElementNS = newExecuteOnElementNS;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS, oldExecuteOnElementNS, executeOnElementNS));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__PARAM:
+ return ((InternalEList<?>)getParam()).basicRemove(otherEnd, msgs);
+ case GroovyPackage.GROOVY__SCRIPT:
+ return basicSetScript(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ return getImports();
+ case GroovyPackage.GROOVY__PARAM:
+ return getParam();
+ case GroovyPackage.GROOVY__SCRIPT:
+ return getScript();
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ return isExecuteBefore() ? Boolean.TRUE : Boolean.FALSE;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ return getExecuteOnElement();
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ return getExecuteOnElementNS();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ setImports((String)newValue);
+ return;
+ case GroovyPackage.GROOVY__PARAM:
+ getParam().clear();
+ getParam().addAll((Collection<? extends ParamType>)newValue);
+ return;
+ case GroovyPackage.GROOVY__SCRIPT:
+ setScript((ScriptType)newValue);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ setExecuteBefore(((Boolean)newValue).booleanValue());
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ setExecuteOnElement((String)newValue);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ setExecuteOnElementNS((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ setImports(IMPORTS_EDEFAULT);
+ return;
+ case GroovyPackage.GROOVY__PARAM:
+ getParam().clear();
+ return;
+ case GroovyPackage.GROOVY__SCRIPT:
+ setScript((ScriptType)null);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ unsetExecuteBefore();
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ setExecuteOnElement(EXECUTE_ON_ELEMENT_EDEFAULT);
+ return;
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ setExecuteOnElementNS(EXECUTE_ON_ELEMENT_NS_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GroovyPackage.GROOVY__IMPORTS:
+ return IMPORTS_EDEFAULT == null ? imports != null : !IMPORTS_EDEFAULT.equals(imports);
+ case GroovyPackage.GROOVY__PARAM:
+ return param != null && !param.isEmpty();
+ case GroovyPackage.GROOVY__SCRIPT:
+ return script != null;
+ case GroovyPackage.GROOVY__EXECUTE_BEFORE:
+ return isSetExecuteBefore();
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT:
+ return EXECUTE_ON_ELEMENT_EDEFAULT == null ? executeOnElement != null : !EXECUTE_ON_ELEMENT_EDEFAULT.equals(executeOnElement);
+ case GroovyPackage.GROOVY__EXECUTE_ON_ELEMENT_NS:
+ return EXECUTE_ON_ELEMENT_NS_EDEFAULT == null ? executeOnElementNS != null : !EXECUTE_ON_ELEMENT_NS_EDEFAULT.equals(executeOnElementNS);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (imports: ");
+ result.append(imports);
+ result.append(", executeBefore: ");
+ if (executeBeforeESet) result.append(executeBefore); else result.append("<unset>");
+ result.append(", executeOnElement: ");
+ result.append(executeOnElement);
+ result.append(", executeOnElementNS: ");
+ result.append(executeOnElementNS);
+ result.append(')');
+ return result.toString();
+ }
+
+} //GroovyImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,432 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.impl;
-
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-import org.eclipse.emf.ecore.impl.EPackageImpl;
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-import org.jboss.tools.smooks.model.common.CommonPackage;
-import org.jboss.tools.smooks.model.common.impl.CommonPackageImpl;
-import org.jboss.tools.smooks.model.groovy.DocumentRoot;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyFactory;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
-import org.jboss.tools.smooks.model.smooks.impl.SmooksPackageImpl;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model <b>Package</b>.
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyPackageImpl extends EPackageImpl implements GroovyPackage {
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass documentRootEClass = null;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private EClass groovyEClass = null;
-
- /**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
- * package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.eclipse.emf.ecore.EPackage.Registry
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage#eNS_URI
- * @see #init()
- * @generated
- */
- private GroovyPackageImpl() {
- super(eNS_URI, GroovyFactory.eINSTANCE);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private static boolean isInited = false;
-
- /**
- * Creates, registers, and initializes the <b>Package</b> for this
- * model, and for any others upon which it depends. Simple
- * dependencies are satisfied by calling this method on all
- * dependent packages before doing anything else. This method drives
- * initialization for interdependent packages directly, in parallel
- * with this package, itself.
- * <p>Of this package and its interdependencies, all packages which
- * have not yet been registered by their URI values are first created
- * and registered. The packages are then initialized in two steps:
- * meta-model objects for all of the packages are created before any
- * are initialized, since one package's meta-model objects may refer to
- * those of another.
- * <p>Invocation of this method will not affect any packages that have
- * already been initialized.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #eNS_URI
- * @see #createPackageContents()
- * @see #initializePackageContents()
- * @generated
- */
- public static GroovyPackage init() {
- if (isInited) return (GroovyPackage)EPackage.Registry.INSTANCE.getEPackage(GroovyPackage.eNS_URI);
-
- // Obtain or create and register package
- GroovyPackageImpl theGroovyPackage = (GroovyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof GroovyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new GroovyPackageImpl());
-
- isInited = true;
-
- // Initialize simple dependencies
- XMLTypePackage.eINSTANCE.eClass();
-
- // Obtain or create and register interdependencies
- SmooksPackageImpl theSmooksPackage = (SmooksPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) instanceof SmooksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) : SmooksPackage.eINSTANCE);
- CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
-
- // Create package meta-data objects
- theGroovyPackage.createPackageContents();
- theSmooksPackage.createPackageContents();
- theCommonPackage.createPackageContents();
-
- // Initialize created meta-data
- theGroovyPackage.initializePackageContents();
- theSmooksPackage.initializePackageContents();
- theCommonPackage.initializePackageContents();
-
- // Mark meta-data to indicate it can't be changed
- theGroovyPackage.freeze();
-
- return theGroovyPackage;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getDocumentRoot() {
- return documentRootEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getDocumentRoot_Mixed() {
- return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getDocumentRoot_XMLNSPrefixMap() {
- return (EReference)documentRootEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getDocumentRoot_XSISchemaLocation() {
- return (EReference)documentRootEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getDocumentRoot_Groovy() {
- return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getGroovy() {
- return groovyEClass;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getGroovy_Imports() {
- return (EAttribute)groovyEClass.getEStructuralFeatures().get(0);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getGroovy_Script() {
- return (EAttribute)groovyEClass.getEStructuralFeatures().get(1);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EReference getGroovy_Param() {
- return (EReference)groovyEClass.getEStructuralFeatures().get(2);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getGroovy_ExecuteBefore() {
- return (EAttribute)groovyEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getGroovy_ExecuteOnElement() {
- return (EAttribute)groovyEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EAttribute getGroovy_ExecuteOnElementNS() {
- return (EAttribute)groovyEClass.getEStructuralFeatures().get(5);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyFactory getGroovyFactory() {
- return (GroovyFactory)getEFactoryInstance();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isCreated = false;
-
- /**
- * Creates the meta-model objects for the package. This method is
- * guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void createPackageContents() {
- if (isCreated) return;
- isCreated = true;
-
- // Create classes and their features
- documentRootEClass = createEClass(DOCUMENT_ROOT);
- createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
- createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
- createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
- createEReference(documentRootEClass, DOCUMENT_ROOT__GROOVY);
-
- groovyEClass = createEClass(GROOVY);
- createEAttribute(groovyEClass, GROOVY__IMPORTS);
- createEAttribute(groovyEClass, GROOVY__SCRIPT);
- createEReference(groovyEClass, GROOVY__PARAM);
- createEAttribute(groovyEClass, GROOVY__EXECUTE_BEFORE);
- createEAttribute(groovyEClass, GROOVY__EXECUTE_ON_ELEMENT);
- createEAttribute(groovyEClass, GROOVY__EXECUTE_ON_ELEMENT_NS);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- private boolean isInitialized = false;
-
- /**
- * Complete the initialization of the package and its meta-model. This
- * method is guarded to have no affect on any invocation but its first.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void initializePackageContents() {
- if (isInitialized) return;
- isInitialized = true;
-
- // Initialize package
- setName(eNAME);
- setNsPrefix(eNS_PREFIX);
- setNsURI(eNS_URI);
-
- // Obtain other dependent packages
- SmooksPackage theSmooksPackage = (SmooksPackage)EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI);
- XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
-
- // Create type parameters
-
- // Set bounds for type parameters
-
- // Add supertypes to classes
- groovyEClass.getESuperTypes().add(theSmooksPackage.getElementVisitor());
-
- // Initialize classes and features; add operations and parameters
- initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getDocumentRoot_Groovy(), this.getGroovy(), null, "groovy", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
-
- initEClass(groovyEClass, Groovy.class, "Groovy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getGroovy_Imports(), theXMLTypePackage.getString(), "imports", null, 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getGroovy_Script(), theXMLTypePackage.getString(), "script", null, 1, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getGroovy_Param(), theSmooksPackage.getParamType(), null, "param", null, 0, -1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getGroovy_ExecuteBefore(), theXMLTypePackage.getBoolean(), "executeBefore", "false", 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getGroovy_ExecuteOnElement(), theXMLTypePackage.getString(), "executeOnElement", null, 1, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getGroovy_ExecuteOnElementNS(), theXMLTypePackage.getAnyURI(), "executeOnElementNS", null, 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-
- // Create resource
- createResource(eNS_URI);
-
- // Create annotations
- // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
- createExtendedMetaDataAnnotations();
- }
-
- /**
- * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void createExtendedMetaDataAnnotations() {
- String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
- addAnnotation
- (documentRootEClass,
- source,
- new String[] {
- "name", "",
- "kind", "mixed"
- });
- addAnnotation
- (getDocumentRoot_Mixed(),
- source,
- new String[] {
- "kind", "elementWildcard",
- "name", ":mixed"
- });
- addAnnotation
- (getDocumentRoot_XMLNSPrefixMap(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "xmlns:prefix"
- });
- addAnnotation
- (getDocumentRoot_XSISchemaLocation(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "xsi:schemaLocation"
- });
- addAnnotation
- (getDocumentRoot_Groovy(),
- source,
- new String[] {
- "kind", "element",
- "name", "groovy",
- "namespace", "##targetNamespace",
- "affiliation", "http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config"
- });
- addAnnotation
- (groovyEClass,
- source,
- new String[] {
- "name", "groovy",
- "kind", "elementOnly"
- });
- addAnnotation
- (getGroovy_Imports(),
- source,
- new String[] {
- "kind", "element",
- "name", "imports",
- "namespace", "##targetNamespace"
- });
- addAnnotation
- (getGroovy_Script(),
- source,
- new String[] {
- "kind", "element",
- "name", "script",
- "namespace", "##targetNamespace"
- });
- addAnnotation
- (getGroovy_Param(),
- source,
- new String[] {
- "kind", "element",
- "name", "param",
- "namespace", "http://www.milyn.org/xsd/smooks-1.1.xsd"
- });
- addAnnotation
- (getGroovy_ExecuteBefore(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "executeBefore"
- });
- addAnnotation
- (getGroovy_ExecuteOnElement(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "executeOnElement"
- });
- addAnnotation
- (getGroovy_ExecuteOnElementNS(),
- source,
- new String[] {
- "kind", "attribute",
- "name", "executeOnElementNS"
- });
- }
-
-} //GroovyPackageImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/GroovyPackageImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,479 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
+import org.jboss.tools.smooks.model.common.CommonPackage;
+import org.jboss.tools.smooks.model.common.impl.CommonPackageImpl;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyFactory;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+import org.jboss.tools.smooks.model.smooks.impl.SmooksPackageImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyPackageImpl extends EPackageImpl implements GroovyPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass groovyEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass scriptTypeEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see groovy.GroovyPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private GroovyPackageImpl() {
+ super(eNS_URI, GroovyFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static GroovyPackage init() {
+ if (isInited) return (GroovyPackage)EPackage.Registry.INSTANCE.getEPackage(GroovyPackage.eNS_URI);
+
+ // Obtain or create and register package
+ GroovyPackageImpl theGroovyPackage = (GroovyPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof GroovyPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new GroovyPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ XMLTypePackage.eINSTANCE.eClass();
+
+ // Obtain or create and register interdependencies
+ SmooksPackageImpl theSmooksPackage = (SmooksPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) instanceof SmooksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) : SmooksPackage.eINSTANCE);
+ CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE);
+
+ // Create package meta-data objects
+ theGroovyPackage.createPackageContents();
+ theSmooksPackage.createPackageContents();
+ theCommonPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theGroovyPackage.initializePackageContents();
+ theSmooksPackage.initializePackageContents();
+ theCommonPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theGroovyPackage.freeze();
+
+ return theGroovyPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getDocumentRoot() {
+ return documentRootEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getDocumentRoot_Mixed() {
+ return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_XMLNSPrefixMap() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_XSISchemaLocation() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_Groovy() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getDocumentRoot_Script() {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGroovy() {
+ return groovyEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_Imports() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGroovy_Param() {
+ return (EReference)groovyEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGroovy_Script() {
+ return (EReference)groovyEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_ExecuteBefore() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_ExecuteOnElement() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getGroovy_ExecuteOnElementNS() {
+ return (EAttribute)groovyEClass.getEStructuralFeatures().get(5);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getScriptType() {
+ return scriptTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyFactory getGroovyFactory() {
+ return (GroovyFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ documentRootEClass = createEClass(DOCUMENT_ROOT);
+ createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__GROOVY);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__SCRIPT);
+
+ groovyEClass = createEClass(GROOVY);
+ createEAttribute(groovyEClass, GROOVY__IMPORTS);
+ createEReference(groovyEClass, GROOVY__PARAM);
+ createEReference(groovyEClass, GROOVY__SCRIPT);
+ createEAttribute(groovyEClass, GROOVY__EXECUTE_BEFORE);
+ createEAttribute(groovyEClass, GROOVY__EXECUTE_ON_ELEMENT);
+ createEAttribute(groovyEClass, GROOVY__EXECUTE_ON_ELEMENT_NS);
+
+ scriptTypeEClass = createEClass(SCRIPT_TYPE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ SmooksPackage theSmooksPackage = (SmooksPackage)EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI);
+ XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ groovyEClass.getESuperTypes().add(theSmooksPackage.getElementVisitor());
+ scriptTypeEClass.getESuperTypes().add(theXMLTypePackage.getAnyType());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(documentRootEClass, DocumentRoot.class, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_Groovy(), this.getGroovy(), null, "groovy", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_Script(), this.getScriptType(), null, "script", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ initEClass(groovyEClass, Groovy.class, "Groovy", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getGroovy_Imports(), theXMLTypePackage.getString(), "imports", null, 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGroovy_Param(), theSmooksPackage.getParamType(), null, "param", null, 0, -1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGroovy_Script(), this.getScriptType(), null, "script", null, 1, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_ExecuteBefore(), theXMLTypePackage.getBoolean(), "executeBefore", "false", 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_ExecuteOnElement(), theXMLTypePackage.getString(), "executeOnElement", null, 1, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getGroovy_ExecuteOnElementNS(), theXMLTypePackage.getAnyURI(), "executeOnElementNS", null, 0, 1, Groovy.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(scriptTypeEClass, ScriptType.class, "ScriptType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations() {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (documentRootEClass,
+ source,
+ new String[] {
+ "name", "",
+ "kind", "mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_Mixed(),
+ source,
+ new String[] {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_XMLNSPrefixMap(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "xmlns:prefix"
+ });
+ addAnnotation
+ (getDocumentRoot_XSISchemaLocation(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "xsi:schemaLocation"
+ });
+ addAnnotation
+ (getDocumentRoot_Groovy(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "groovy",
+ "namespace", "##targetNamespace",
+ "affiliation", "http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config"
+ });
+ addAnnotation
+ (getDocumentRoot_Script(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "script",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (groovyEClass,
+ source,
+ new String[] {
+ "name", "groovy",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getGroovy_Imports(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "imports",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getGroovy_Param(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "param",
+ "namespace", "http://www.milyn.org/xsd/smooks-1.1.xsd"
+ });
+ addAnnotation
+ (getGroovy_Script(),
+ source,
+ new String[] {
+ "kind", "element",
+ "name", "script",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getGroovy_ExecuteBefore(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "executeBefore"
+ });
+ addAnnotation
+ (getGroovy_ExecuteOnElement(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "executeOnElement"
+ });
+ addAnnotation
+ (getGroovy_ExecuteOnElementNS(),
+ source,
+ new String[] {
+ "kind", "attribute",
+ "name", "executeOnElementNS"
+ });
+ addAnnotation
+ (scriptTypeEClass,
+ source,
+ new String[] {
+ "name", "script_._type",
+ "kind", "mixed"
+ });
+ }
+
+} //GroovyPackageImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/ScriptTypeImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/ScriptTypeImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/ScriptTypeImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,43 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Script Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * </p>
+ *
+ * @generated
+ */
+public class ScriptTypeImpl extends AnyTypeImpl implements ScriptType {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ScriptTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GroovyPackage.Literals.SCRIPT_TYPE;
+ }
+
+} //ScriptTypeImpl
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/impl/ScriptTypeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,218 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.util;
-
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.jboss.tools.smooks.model.common.AbstractAnyType;
-import org.jboss.tools.smooks.model.groovy.DocumentRoot;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
-import org.jboss.tools.smooks.model.smooks.ElementVisitor;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage
- * @generated
- */
-public class GroovyAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static GroovyPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = GroovyPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected GroovySwitch<Adapter> modelSwitch =
- new GroovySwitch<Adapter>() {
- @Override
- public Adapter caseDocumentRoot(DocumentRoot object) {
- return createDocumentRootAdapter();
- }
- @Override
- public Adapter caseGroovy(Groovy object) {
- return createGroovyAdapter();
- }
- @Override
- public Adapter caseAnyType(AnyType object) {
- return createAnyTypeAdapter();
- }
- @Override
- public Adapter caseAbstractAnyType(AbstractAnyType object) {
- return createAbstractAnyTypeAdapter();
- }
- @Override
- public Adapter caseAbstractResourceConfig(AbstractResourceConfig object) {
- return createAbstractResourceConfigAdapter();
- }
- @Override
- public Adapter caseElementVisitor(ElementVisitor object) {
- return createElementVisitorAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.groovy.DocumentRoot <em>Document Root</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks.model.groovy.DocumentRoot
- * @generated
- */
- public Adapter createDocumentRootAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.groovy.Groovy <em>Groovy</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks.model.groovy.Groovy
- * @generated
- */
- public Adapter createGroovyAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.xml.type.AnyType <em>Any Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.ecore.xml.type.AnyType
- * @generated
- */
- public Adapter createAnyTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link common.AbstractAnyType <em>Abstract Any Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see common.AbstractAnyType
- * @generated
- */
- public Adapter createAbstractAnyTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link smooks.AbstractResourceConfig <em>Abstract Resource Config</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see smooks.AbstractResourceConfig
- * @generated
- */
- public Adapter createAbstractResourceConfigAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link smooks.ElementVisitor <em>Element Visitor</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see smooks.ElementVisitor
- * @generated
- */
- public Adapter createElementVisitorAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //GroovyAdapterFactory
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyAdapterFactory.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,236 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.jboss.tools.smooks.model.common.AbstractAnyType;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
+import org.jboss.tools.smooks.model.smooks.ElementVisitor;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see groovy.GroovyPackage
+ * @generated
+ */
+public class GroovyAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GroovyPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = GroovyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GroovySwitch<Adapter> modelSwitch =
+ new GroovySwitch<Adapter>() {
+ @Override
+ public Adapter caseDocumentRoot(DocumentRoot object) {
+ return createDocumentRootAdapter();
+ }
+ @Override
+ public Adapter caseGroovy(Groovy object) {
+ return createGroovyAdapter();
+ }
+ @Override
+ public Adapter caseScriptType(ScriptType object) {
+ return createScriptTypeAdapter();
+ }
+ @Override
+ public Adapter caseAnyType(AnyType object) {
+ return createAnyTypeAdapter();
+ }
+ @Override
+ public Adapter caseAbstractAnyType(AbstractAnyType object) {
+ return createAbstractAnyTypeAdapter();
+ }
+ @Override
+ public Adapter caseAbstractResourceConfig(AbstractResourceConfig object) {
+ return createAbstractResourceConfigAdapter();
+ }
+ @Override
+ public Adapter caseElementVisitor(ElementVisitor object) {
+ return createElementVisitorAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link groovy.DocumentRoot <em>Document Root</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see groovy.DocumentRoot
+ * @generated
+ */
+ public Adapter createDocumentRootAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link groovy.Groovy <em>Groovy</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see groovy.Groovy
+ * @generated
+ */
+ public Adapter createGroovyAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link groovy.ScriptType <em>Script Type</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see groovy.ScriptType
+ * @generated
+ */
+ public Adapter createScriptTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.xml.type.AnyType <em>Any Type</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.xml.type.AnyType
+ * @generated
+ */
+ public Adapter createAnyTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link common.AbstractAnyType <em>Abstract Any Type</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see common.AbstractAnyType
+ * @generated
+ */
+ public Adapter createAbstractAnyTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link smooks.AbstractResourceConfig <em>Abstract Resource Config</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see smooks.AbstractResourceConfig
+ * @generated
+ */
+ public Adapter createAbstractResourceConfigAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link smooks.ElementVisitor <em>Element Visitor</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see smooks.ElementVisitor
+ * @generated
+ */
+ public Adapter createElementVisitorAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //GroovyAdapterFactory
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,56 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.util.GroovyResourceImpl
- * @generated
- */
-public class GroovyResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Resource createResource(URI uri) {
- XMLResource result = new GroovyResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- return result;
- }
-
-} //GroovyResourceFactoryImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceFactoryImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,56 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
+
+import org.eclipse.emf.ecore.xmi.XMLResource;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource Factory</b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see groovy.util.GroovyResourceImpl
+ * @generated
+ */
+public class GroovyResourceFactoryImpl extends ResourceFactoryImpl {
+ /**
+ * Creates an instance of the resource factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyResourceFactoryImpl() {
+ super();
+ }
+
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Resource createResource(URI uri) {
+ XMLResource result = new GroovyResourceImpl(uri);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+
+ result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ return result;
+ }
+
+} //GroovyResourceFactoryImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,32 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.util.GroovyResourceFactoryImpl
- * @generated
- */
-public class GroovyResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public GroovyResourceImpl(URI uri) {
- super(uri);
- }
-
-} //GroovyResourceImpl
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyResourceImpl.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,32 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.util;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Resource </b> associated with the package.
+ * <!-- end-user-doc -->
+ * @see groovy.util.GroovyResourceFactoryImpl
+ * @generated
+ */
+public class GroovyResourceImpl extends XMLResourceImpl {
+ /**
+ * Creates an instance of the resource.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param uri the URI of the new resource.
+ * @generated
+ */
+ public GroovyResourceImpl(URI uri) {
+ super(uri);
+ }
+
+} //GroovyResourceImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,221 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.util;
-
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.jboss.tools.smooks.model.common.AbstractAnyType;
-import org.jboss.tools.smooks.model.groovy.DocumentRoot;
-import org.jboss.tools.smooks.model.groovy.Groovy;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
-import org.jboss.tools.smooks.model.smooks.ElementVisitor;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.model.groovy.GroovyPackage
- * @generated
- */
-public class GroovySwitch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static GroovyPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovySwitch() {
- if (modelPackage == null) {
- modelPackage = GroovyPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case GroovyPackage.DOCUMENT_ROOT: {
- DocumentRoot documentRoot = (DocumentRoot)theEObject;
- T result = caseDocumentRoot(documentRoot);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case GroovyPackage.GROOVY: {
- Groovy groovy = (Groovy)theEObject;
- T result = caseGroovy(groovy);
- if (result == null) result = caseElementVisitor(groovy);
- if (result == null) result = caseAbstractResourceConfig(groovy);
- if (result == null) result = caseAbstractAnyType(groovy);
- if (result == null) result = caseAnyType(groovy);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Document Root</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Document Root</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseDocumentRoot(DocumentRoot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Groovy</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Groovy</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseGroovy(Groovy object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Any Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Any Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAnyType(AnyType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Any Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Any Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractAnyType(AbstractAnyType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Resource Config</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Resource Config</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractResourceConfig(AbstractResourceConfig object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Element Visitor</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Element Visitor</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseElementVisitor(ElementVisitor object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //GroovySwitch
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovySwitch.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,243 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.jboss.tools.smooks.model.common.AbstractAnyType;
+import org.jboss.tools.smooks.model.groovy.DocumentRoot;
+import org.jboss.tools.smooks.model.groovy.Groovy;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+import org.jboss.tools.smooks.model.groovy.ScriptType;
+import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
+import org.jboss.tools.smooks.model.smooks.ElementVisitor;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see groovy.GroovyPackage
+ * @generated
+ */
+public class GroovySwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GroovyPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovySwitch() {
+ if (modelPackage == null) {
+ modelPackage = GroovyPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ public T doSwitch(EObject theEObject) {
+ return doSwitch(theEObject.eClass(), theEObject);
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(EClass theEClass, EObject theEObject) {
+ if (theEClass.eContainer() == modelPackage) {
+ return doSwitch(theEClass.getClassifierID(), theEObject);
+ }
+ else {
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return
+ eSuperTypes.isEmpty() ?
+ defaultCase(theEObject) :
+ doSwitch(eSuperTypes.get(0), theEObject);
+ }
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case GroovyPackage.DOCUMENT_ROOT: {
+ DocumentRoot documentRoot = (DocumentRoot)theEObject;
+ T result = caseDocumentRoot(documentRoot);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GroovyPackage.GROOVY: {
+ Groovy groovy = (Groovy)theEObject;
+ T result = caseGroovy(groovy);
+ if (result == null) result = caseElementVisitor(groovy);
+ if (result == null) result = caseAbstractResourceConfig(groovy);
+ if (result == null) result = caseAbstractAnyType(groovy);
+ if (result == null) result = caseAnyType(groovy);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GroovyPackage.SCRIPT_TYPE: {
+ ScriptType scriptType = (ScriptType)theEObject;
+ T result = caseScriptType(scriptType);
+ if (result == null) result = caseAnyType(scriptType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Document Root</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Document Root</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseDocumentRoot(DocumentRoot object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Groovy</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Groovy</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGroovy(Groovy object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Script Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Script Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseScriptType(ScriptType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Any Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Any Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAnyType(AnyType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Abstract Any Type</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Abstract Any Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAbstractAnyType(AbstractAnyType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Abstract Resource Config</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Abstract Resource Config</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAbstractResourceConfig(AbstractResourceConfig object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Element Visitor</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Element Visitor</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseElementVisitor(ElementVisitor object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //GroovySwitch
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,54 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.model.groovy.util;
-
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
-import org.jboss.tools.smooks.model.groovy.GroovyPackage;
-
-/**
- * This class contains helper methods to serialize and deserialize XML documents
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class GroovyXMLProcessor extends XMLProcessor {
-
- /**
- * Public constructor to instantiate the helper.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GroovyXMLProcessor() {
- super((EPackage.Registry.INSTANCE));
- GroovyPackage.eINSTANCE.eClass();
- }
-
- /**
- * Register for "*" and "xml" file extensions the GroovyResourceFactoryImpl factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Map<String, Resource.Factory> getRegistrations() {
- if (registrations == null) {
- super.getRegistrations();
- registrations.put(XML_EXTENSION, new GroovyResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new GroovyResourceFactoryImpl());
- }
- return registrations;
- }
-
-} //GroovyXMLProcessor
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/groovy/util/GroovyXMLProcessor.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,51 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.groovy.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+
+/**
+ * This class contains helper methods to serialize and deserialize XML documents
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GroovyXMLProcessor extends XMLProcessor {
+
+ /**
+ * Public constructor to instantiate the helper.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GroovyXMLProcessor() {
+ super((EPackage.Registry.INSTANCE));
+ GroovyPackage.eINSTANCE.eClass();
+ }
+
+ /**
+ * Register for "*" and "xml" file extensions the GroovyResourceFactoryImpl factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected Map<String, Resource.Factory> getRegistrations() {
+ if (registrations == null) {
+ super.getRegistrations();
+ registrations.put(XML_EXTENSION, new GroovyResourceFactoryImpl());
+ registrations.put(STAR_EXTENSION, new GroovyResourceFactoryImpl());
+ }
+ return registrations;
+ }
+
+} //GroovyXMLProcessor
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -64,34 +64,34 @@
public static final String BINDINGS = "bindings";
- public static EStructuralFeature ATTRIBUTE_PROPERTY = ExtendedMetaData.INSTANCE.demandFeature(null,
- "property", false);
+ public static EStructuralFeature ATTRIBUTE_PROPERTY = ExtendedMetaData.INSTANCE.demandFeature(
+ null, "property", false);
- public static EStructuralFeature ATTRIBUTE_SELECTOR = ExtendedMetaData.INSTANCE.demandFeature(null,
- "selector", false);
+ public static EStructuralFeature ATTRIBUTE_SELECTOR = ExtendedMetaData.INSTANCE.demandFeature(
+ null, "selector", false);
- public static EStructuralFeature ATTRIBUTE_TYPE = ExtendedMetaData.INSTANCE.demandFeature(null, "type",
- false);
+ public static EStructuralFeature ATTRIBUTE_TYPE = ExtendedMetaData.INSTANCE.demandFeature(null,
+ "type", false);
public static EStructuralFeature ELEMENT_BINDING = ExtendedMetaData.INSTANCE.demandFeature(
- "http://www.milyn.org/xsd/smooks-1.0.xsd", "binding", true);
+ "http://www.milyn.org/xsd/smooks-1.0.xsd", "binding", true);
- public static AnyType addBindingTypeToParamType(ParamType param, String property, String selector,
- String type, String uri) {
+ public static AnyType addBindingTypeToParamType(ParamType param, String property,
+ String selector, String type, String uri) {
AnyType binding = createBindingType(property, selector, type, uri);
param.getMixed().add(ELEMENT_BINDING, binding);
return binding;
}
- public static List<Object> getBindingListFromResourceConfigType(ResourceConfigType resourceConfig) {
+ public static List<Object> getBindingListFromResourceConfigType(
+ ResourceConfigType resourceConfig) {
List<ParamType> paramList = resourceConfig.getParam();
for (Iterator<ParamType> iterator = paramList.iterator(); iterator.hasNext();) {
ParamType param = iterator.next();
if ("bindings".equals(param.getName())) {
- if (param.eContents().isEmpty())
- continue;
+ if (param.eContents().isEmpty()) continue;
List<Object> bindingList = (List<Object>) param.getMixed().get(
- SmooksModelUtils.ELEMENT_BINDING, false);
+ SmooksModelUtils.ELEMENT_BINDING, false);
return bindingList;
}
}
@@ -100,18 +100,17 @@
public static boolean isBeanPopulatorResource(ResourceConfigType type) {
ResourceType resource = type.getResource();
- if (resource == null)
- return false;
+ if (resource == null) return false;
String value = resource.getStringValue();
- if (value != null)
- value = value.trim();
+ if (value != null) value = value.trim();
if (SmooksModelConstants.BEAN_POPULATOR.equals(value)) {
return true;
}
return false;
}
- public static void setPropertyValueToAnyType(Object value, EStructuralFeature attribute, AnyType anyType) {
+ public static void setPropertyValueToAnyType(Object value, EStructuralFeature attribute,
+ AnyType anyType) {
anyType.getAnyAttribute().set(attribute, value);
}
@@ -120,8 +119,7 @@
for (Iterator iterator = bindingList.iterator(); iterator.hasNext();) {
AnyType binding = (AnyType) iterator.next();
String pro = getAttributeValueFromAnyType(binding, ATTRIBUTE_PROPERTY);
- if (pro != null)
- pro = pro.trim();
+ if (pro != null) pro = pro.trim();
if (property.equals(pro)) {
return binding;
}
@@ -131,26 +129,21 @@
public static boolean isInnerFileContents(ResourceConfigType resourceConfig) {
ResourceType resource = resourceConfig.getResource();
- if (resource == null)
- return false;
+ if (resource == null) return false;
String type = resource.getType();
- if (type != null)
- type = type.trim();
+ if (type != null) type = type.trim();
for (int i = 0; i < TEMPLATE_TYPES.length; i++) {
String type1 = TEMPLATE_TYPES[i];
- if (type1.equalsIgnoreCase(type))
- return true;
+ if (type1.equalsIgnoreCase(type)) return true;
}
return false;
}
public static boolean isDateTypeSelector(ResourceConfigType type) {
ResourceType resource = type.getResource();
- if (resource == null)
- return false;
+ if (resource == null) return false;
String value = resource.getStringValue();
- if (value != null)
- value = value.trim();
+ if (value != null) value = value.trim();
for (int i = 0; i < SmooksModelConstants.DECODER_CLASSES.length; i++) {
String decoderClass = SmooksModelConstants.DECODER_CLASSES[i];
if (decoderClass.equals(value)) {
@@ -162,15 +155,13 @@
public static String getTransformType(ResourceConfigType resourceConfig) {
ParamType typeParam = null;
- if (resourceConfig == null)
- return "";
+ if (resourceConfig == null) return "";
if (isTransformTypeResourceConfig(resourceConfig)) {
List paramList = resourceConfig.getParam();
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
ParamType param = (ParamType) iterator.next();
String name = param.getName();
- if (name != null)
- name = name.trim();
+ if (name != null) name = name.trim();
if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(name)) {
typeParam = param;
break;
@@ -184,8 +175,7 @@
}
public static void setTransformType(ResourceConfigType resourceConfig, String type) {
- if (type == null)
- type = "";
+ if (type == null) type = "";
if (isTransformTypeResourceConfig(resourceConfig)) {
List paramList = resourceConfig.getParam();
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
@@ -216,8 +206,7 @@
public static boolean isTransformTypeResourceConfig(ResourceConfigType resourceConfig) {
String selector = resourceConfig.getSelector();
- if (selector != null)
- selector = selector.trim();
+ if (selector != null) selector = selector.trim();
if (!SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector)) {
return false;
}
@@ -229,8 +218,7 @@
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
ParamType p = (ParamType) iterator.next();
String paramName = p.getName();
- if (paramName != null)
- paramName = paramName.trim();
+ if (paramName != null) paramName = paramName.trim();
if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(paramName)) {
return true;
}
@@ -239,14 +227,14 @@
}
}
- public static void setParamText(String paramName, String value, ResourceConfigType resourceConfigType) {
+ public static void setParamText(String paramName, String value,
+ ResourceConfigType resourceConfigType) {
List<ParamType> list = resourceConfigType.getParam();
ParamType param = null;
for (Iterator<ParamType> iterator = list.iterator(); iterator.hasNext();) {
ParamType paramType = (ParamType) iterator.next();
String n = paramType.getName();
- if (n == null)
- continue;
+ if (n == null) continue;
n = n.trim();
if (n.equalsIgnoreCase(paramName)) {
param = paramType;
@@ -266,8 +254,7 @@
for (Iterator iterator = plist.iterator(); iterator.hasNext();) {
ParamType p = (ParamType) iterator.next();
String n = p.getName();
- if (n == null)
- continue;
+ if (n == null) continue;
n = n.trim();
if (paramName.equalsIgnoreCase(n)) {
return getAnyTypeText(p);
@@ -282,7 +269,8 @@
}
public static String getAnyTypeText(AnyType anyType) {
- Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
+ Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+ true);
if (value != null) {
if (value instanceof List && !((List) value).isEmpty()) {
return ((List) value).get(0).toString().trim();
@@ -293,7 +281,8 @@
}
public static String getAnyTypeCDATA(AnyType anyType) {
- Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
+ Object value = anyType.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
if (value != null) {
if (value instanceof List && !((List) value).isEmpty()) {
return ((List) value).get(0).toString().trim();
@@ -303,7 +292,20 @@
return null;
}
- public static AnyType createBindingType(String property, String selector, String type, String uri) {
+ public static String getAnyTypeComment(AnyType anyType) {
+ Object value = anyType.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, true);
+ if (value != null) {
+ if (value instanceof List && !((List) value).isEmpty()) {
+ return ((List) value).get(0).toString().trim();
+ }
+ // return value.toString();
+ }
+ return null;
+ }
+
+ public static AnyType createBindingType(String property, String selector, String type,
+ String uri) {
if (uri == null) {
uri = SmooksPackage.eNS_URI;
}
@@ -326,21 +328,23 @@
smooksModel.getMixed().add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text);
}
- public static void setTextToSmooksType(EditingDomain editingDomain, AnyType smooksModel, String text) {
+ public static void setTextToSmooksType(EditingDomain editingDomain, AnyType smooksModel,
+ String text) {
CompoundCommand ccommand = new CompoundCommand();
List<String> listValue = new ArrayList<String>();
listValue.add(text);
Command addCommand = AddCommand.create(editingDomain, smooksModel,
- XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text));
+ XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text));
Object removeValue = (smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true));
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true));
if (removeValue != null && removeValue instanceof Collection<?>) {
List<Object> rList = new ArrayList<Object>();
- for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator
+ .hasNext();) {
Object string = (Object) iterator.next();
- rList.add(FeatureMapUtil.createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
- string));
+ rList.add(FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, string));
}
Command cc = RemoveCommand.create(editingDomain, smooksModel, null, rList);
if (cc != null && cc.canExecute()) {
@@ -352,22 +356,53 @@
}
editingDomain.getCommandStack().execute(ccommand);
}
+
+ public static void setCommentToSmooksType(EditingDomain editingDomain, AnyType smooksModel,
+ String cdata) {
+ CompoundCommand ccommand = new CompoundCommand();
+ List<String> listValue = new ArrayList<String>();
+ listValue.add(cdata);
+ Command addCommand = AddCommand.create(editingDomain, smooksModel,
+ XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, cdata));
+ Object removeValue = (smooksModel.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, true));
+ if (removeValue != null && removeValue instanceof Collection<?>) {
+ List<Object> rList = new ArrayList<Object>();
+ for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator
+ .hasNext();) {
+ Object string = (Object) iterator.next();
+ rList.add(FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, string));
+ }
+ Command cc = RemoveCommand.create(editingDomain, smooksModel, null, rList);
+ if (cc != null && cc.canExecute()) {
+ ccommand.append(cc);
+ }
+ }
+ if (addCommand != null && addCommand.canExecute()) {
+ ccommand.append(addCommand);
+ }
+ editingDomain.getCommandStack().execute(ccommand);
+ }
- public static void setCDATAToSmooksType(EditingDomain editingDomain, AnyType smooksModel, String cdata) {
+ public static void setCDATAToSmooksType(EditingDomain editingDomain, AnyType smooksModel,
+ String cdata) {
CompoundCommand ccommand = new CompoundCommand();
List<String> listValue = new ArrayList<String>();
listValue.add(cdata);
Command addCommand = AddCommand.create(editingDomain, smooksModel,
- XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, cdata));
+ XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, cdata));
Object removeValue = (smooksModel.getMixed().get(
- XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true));
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true));
if (removeValue != null && removeValue instanceof Collection<?>) {
List<Object> rList = new ArrayList<Object>();
- for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator.hasNext();) {
+ for (Iterator<?> iterator = ((Collection<?>) removeValue).iterator(); iterator
+ .hasNext();) {
Object string = (Object) iterator.next();
- rList.add(FeatureMapUtil.createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA,
- string));
+ rList.add(FeatureMapUtil.createEntry(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, string));
}
Command cc = RemoveCommand.create(editingDomain, smooksModel, null, rList);
if (cc != null && cc.canExecute()) {
@@ -395,14 +430,16 @@
}
public static void cleanTextToSmooksType(AnyType smooksModel) {
- Object obj = smooksModel.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
+ Object obj = smooksModel.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, true);
if (obj instanceof List) {
((List) obj).clear();
}
}
public static void cleanCDATAToSmooksType(AnyType smooksModel) {
- Object obj = smooksModel.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
+ Object obj = smooksModel.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__CDATA, true);
if (obj instanceof List) {
((List) obj).clear();
}
@@ -410,7 +447,7 @@
public static CommandParameter createTextCommandParamter(Object owner, String value) {
return createChildParameter(owner, XMLTypePackage.Literals.ANY_TYPE__MIXED, FeatureMapUtil
- .createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, value));
+ .createEntry(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, value));
}
public static CommandParameter createChildParameter(Object owner, Object feature, Object child) {
@@ -421,7 +458,7 @@
InputType javaInput = SmooksGraphicsExtFactory.eINSTANCE.createInputType();
javaInput.setType(INPUT_TYPE_JAVA);
org.jboss.tools.smooks.model.graphics.ext.ParamType p = SmooksGraphicsExtFactory.eINSTANCE
- .createParamType();
+ .createParamType();
p.setName(PARAM_NAME_CLASS);
p.setValue(className);
javaInput.getParam().add(p);
@@ -431,14 +468,13 @@
public static String getInputPath(InputType input) {
List<org.jboss.tools.smooks.model.graphics.ext.ParamType> list = input.getParam();
if (INPUT_TYPE_JAVA.equals(input.getType()) || INPUT_TYPE_XML.equals(input.getType())
- || INPUT_TYPE_XSD.equals(input.getType())) {
+ || INPUT_TYPE_XSD.equals(input.getType())) {
for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
org.jboss.tools.smooks.model.graphics.ext.ParamType paramType = (org.jboss.tools.smooks.model.graphics.ext.ParamType) iterator
- .next();
+ .next();
if ("path".equals(paramType.getName())) {
String value = paramType.getValue();
- if (value != null)
- value = value.trim();
+ if (value != null) value = value.trim();
return value;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -13,18 +13,18 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
-import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
public class Codegenerator {
- String basePath = "/home/DartPeng/Work/eclipse/new-smooks-editor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp";
+ String basePath = "/home/Dart/Works/eclipse_wtp.3.0.4/eclipse/workspace/jbosstools/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/";
String tempContents = "";
public Codegenerator() {
try {
FileReader reader = new FileReader(
- new File(
- "/home/DartPeng/Work/eclipse/new-smooks-editor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
+ new File(
+ "/home/Dart/Works/eclipse_wtp.3.0.4/eclipse/workspace/jbosstools/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
BufferedReader r = new BufferedReader(reader);
String line = r.readLine();
while (line != null) {
@@ -44,7 +44,7 @@
public static void main(String[] args) {
Codegenerator g = new Codegenerator();
try {
- g.generateCodes(JavabeanPackage.eINSTANCE);
+ g.generateCodes(GroovyPackage.eINSTANCE);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
@@ -54,8 +54,8 @@
}
}
- public void generateCodes(EPackage epackage) throws IllegalArgumentException, IllegalAccessException,
- IOException {
+ public void generateCodes(EPackage epackage) throws IllegalArgumentException,
+ IllegalAccessException, IOException {
Field[] fields = epackage.getClass().getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field f = fields[i];
@@ -67,8 +67,8 @@
continue;
}
File file = new File(basePath + eClass.getName() + "UICreator.java");
- System.out.println("map.put(" + eClass.getName() + "Impl.class, new " + eClass.getName()
- + "UICreator());");
+ System.out.println("map.put(" + eClass.getName() + "Impl.class, new "
+ + eClass.getName() + "UICreator());");
if (!file.exists()) {
file.createNewFile();
FileWriter writer = new FileWriter(file);
@@ -85,7 +85,8 @@
String t = tempContents;
if (t.indexOf("${className}") != -1) {
String s = t.substring(0, t.indexOf("${className}"));
- String es = t.substring(t.indexOf("${className}") + "${className}".length(), t.length());
+ String es = t.substring(t.indexOf("${className}") + "${className}".length(), t
+ .length());
t = s + className + es;
}
String epName = ePackage.getClass().getSimpleName();
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -1,201 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.window.IShellProvider;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
-import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
-import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModelFactory;
-import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
-import org.jboss.tools.smooks.configuration.editors.xml.TagList;
-import org.jboss.tools.smooks.configuration.editors.xml.XMLObjectAnalyzer;
-import org.jboss.tools.smooks.model.graphics.ext.InputType;
-import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
-import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
-
-/**
- * @author Dart (dpeng(a)redhat.com)
- * <p>
- * Apr 12, 2009
- */
-public class InputStructuredDataSelectionDialog extends Dialog {
-
- private SmooksGraphicsExtType graphicsExt;
- private TreeViewer viewer;
- private Object currentSelection;
-
- public InputStructuredDataSelectionDialog(IShellProvider parentShell) {
- super(parentShell);
- // TODO Auto-generated constructor stub
- }
-
- public InputStructuredDataSelectionDialog(Shell parentShell, SmooksGraphicsExtType graphicsExt) {
- super(parentShell);
- this.graphicsExt = graphicsExt;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
- * .Composite)
- */
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite composite = (Composite) super.createDialogArea(parent);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 500;
- gd.widthHint = 450;
- composite.setLayoutData(gd);
- GridLayout layout = new GridLayout();
- layout.numColumns = 2;
- layout.marginHeight = 10;
- layout.marginWidth = 10;
- layout.makeColumnsEqualWidth = false;
- composite.setLayout(layout);
-
- Label label = new Label(composite,SWT.NONE);
- label.setText("Sperator Char : ");
- CCombo speratorCombo = new CCombo(composite,SWT.BORDER);
- speratorCombo.add(" ");
- speratorCombo.add("/");
- speratorCombo.setEditable(false);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- speratorCombo.setLayoutData(gd);
-
- viewer = new TreeViewer(composite, SWT.BORDER);
- viewer.setContentProvider(new CompoundStructuredDataContentProvider());
- viewer.setLabelProvider(new CompoundStructuredDataLabelProvider());
- viewer.setInput(generateInputData());
- viewer.addDoubleClickListener(new IDoubleClickListener() {
- public void doubleClick(DoubleClickEvent event) {
- okPressed();
- }
- });
- viewer.addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- currentSelection = ((IStructuredSelection) event.getSelection()).getFirstElement();
- }
- });
-
- gd = new GridData(GridData.FILL_BOTH);
- gd.horizontalSpan = 2;
- viewer.getTree().setLayoutData(gd);
-
- Label l = new Label(composite,SWT.NONE);
- l.setText("Selector generate policy : ");
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- l.setLayoutData(gd);
-
- Composite com = new Composite(composite,SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = 2;
- com.setLayoutData(gd);
-
- GridLayout gl = new GridLayout();
- gl.numColumns = 3;
- com.setLayout(gl);
- Button fullPathButton = new Button(com,SWT.RADIO);
- fullPathButton.setText("Full Path");
- Button onlyNameButton = new Button(com,SWT.RADIO);
- onlyNameButton.setText("Only Name");
- Button containtParentButton = new Button(com,SWT.RADIO);
- containtParentButton.setText("Containt Parent Name");
-
- getShell().setText("Selector generate dialog");
- return composite;
- }
-
- protected List<?> generateInputData() {
- List<Object> list = new ArrayList<Object>();
- if (this.graphicsExt != null) {
- IJavaProject project = SmooksUIUtils.getJavaProject(graphicsExt);
- try {
- ProjectClassLoader classLoader = new ProjectClassLoader(project);
- List<InputType> inputLists = graphicsExt.getInput();
- for (Iterator<?> iterator = inputLists.iterator(); iterator.hasNext();) {
- InputType inputType = (InputType) iterator.next();
- String type = inputType.getType();
- String path = SmooksModelUtils.getInputPath(inputType);
- if (type != null && path != null) {
- path = path.trim();
- if (SmooksModelUtils.INPUT_TYPE_JAVA.equals(type)) {
- try {
- JavaBeanModel model = JavaBeanModelFactory
- .getJavaBeanModelWithLazyLoad(classLoader.loadClass(path));
- if (model != null) {
- list.add(model);
- }
- } finally {
-
- }
- }
- if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
- try {
- path = SmooksUIUtils.parseFilePath(path);
- AbstractXMLObject model = new XMLObjectAnalyzer().analyze(path, null);
- if (model != null) {
- if (model instanceof TagList) {
- List<IXMLStructuredObject> children = ((TagList) model).getChildren();
- for (Iterator<?> iterator2 = children.iterator(); iterator2.hasNext();) {
- IXMLStructuredObject structuredObject = (IXMLStructuredObject) iterator2
- .next();
- list.add(structuredObject);
- }
- } else {
- list.add(model);
- }
- }
- } finally {
-
- }
- }
- }
- }
- } catch (Exception e) {
- SmooksConfigurationActivator.getDefault().log(e);
- }
- }
- return list;
- }
-
- /**
- * @return the currentSelection
- */
- public Object getCurrentSelection() {
- return currentSelection;
- }
-}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -13,6 +13,11 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.tools.smooks.configuration.editors.freemarker.FreemarkerUICreator;
+import org.jboss.tools.smooks.configuration.editors.freemarker.InlineUICreator;
+import org.jboss.tools.smooks.configuration.editors.freemarker.UseUICreator;
+import org.jboss.tools.smooks.configuration.editors.groovy.GroovyUICreator;
+import org.jboss.tools.smooks.configuration.editors.groovy.ScriptUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.BindingsPropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanValueUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanWiringUICreator;
@@ -25,6 +30,11 @@
import org.jboss.tools.smooks.configuration.editors.xsl.OutputToUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.TemplateUICreator;
import org.jboss.tools.smooks.configuration.editors.xsl.XslUICreator;
+import org.jboss.tools.smooks.model.freemarker.impl.FreemarkerImpl;
+import org.jboss.tools.smooks.model.freemarker.impl.InlineImpl;
+import org.jboss.tools.smooks.model.freemarker.impl.UseImpl;
+import org.jboss.tools.smooks.model.groovy.impl.GroovyImpl;
+import org.jboss.tools.smooks.model.groovy.impl.ScriptTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.BindingsTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.ValueTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.WiringTypeImpl;
@@ -39,53 +49,69 @@
import org.jboss.tools.smooks.model.xsl.impl.XslImpl;
/**
- * @author Dart (dpeng(a)redhat.com)<p>
- * Apr 7, 2009
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 7, 2009
*/
public class PropertyUICreatorManager {
private static PropertyUICreatorManager instance;
-
- private Map<Class<?>,IPropertyUICreator> map = null;
-
- private PropertyUICreatorManager(){
- map = new HashMap<Class<?>,IPropertyUICreator>();
+
+ private Map<Class<?>, IPropertyUICreator> map = null;
+
+ private PropertyUICreatorManager() {
+ map = new HashMap<Class<?>, IPropertyUICreator>();
init();
}
-
+
private void init() {
map.put(BindingsTypeImpl.class, new BindingsPropertyUICreator());
map.put(ValueTypeImpl.class, new JavabeanValueUICreator());
map.put(WiringTypeImpl.class, new JavabeanWiringUICreator());
-
- // for smooks models
+
+ // for smooks models
map.put(ConditionTypeImpl.class, new ConditionTypeUICreator());
map.put(ImportTypeImpl.class, new ImportTypeUICreator());
map.put(ParamTypeImpl.class, new ParamTypeUICreator());
map.put(ResourceConfigTypeImpl.class, new ResourceConfigTypeUICreator());
map.put(ResourceTypeImpl.class, new ResourceTypeUICreator());
-
+
// for xsl models
map.put(BindToImpl.class, new BindToUICreator());
map.put(OutputToImpl.class, new OutputToUICreator());
map.put(TemplateImpl.class, new TemplateUICreator());
map.put(XslImpl.class, new XslUICreator());
+ // for freemarker
+ map.put(org.jboss.tools.smooks.model.freemarker.impl.BindToImpl.class,
+ new org.jboss.tools.smooks.configuration.editors.freemarker.BindToUICreator());
+ map.put(FreemarkerImpl.class, new FreemarkerUICreator());
+ map.put(InlineImpl.class, new InlineUICreator());
+ map.put(org.jboss.tools.smooks.model.freemarker.impl.OutputToImpl.class,
+ new org.jboss.tools.smooks.configuration.editors.freemarker.OutputToUICreator());
+ map.put(org.jboss.tools.smooks.model.freemarker.impl.TemplateImpl.class,
+ new org.jboss.tools.smooks.configuration.editors.freemarker.TemplateUICreator());
+ map.put(UseImpl.class, new UseUICreator());
+
+ // for groovy
+ map.put(GroovyImpl.class, new GroovyUICreator());
+ map.put(ScriptTypeImpl.class, new ScriptUICreator());
+
}
- public void registePropertyUICreator(Class<?> key,IPropertyUICreator creator){
+ public void registePropertyUICreator(Class<?> key, IPropertyUICreator creator) {
map.put(key, creator);
}
-
- public IPropertyUICreator getPropertyUICreator(Class<?> key){
+
+ public IPropertyUICreator getPropertyUICreator(Class<?> key) {
return map.get(key);
}
-
- public IPropertyUICreator getPropertyUICreator(Object model){
+
+ public IPropertyUICreator getPropertyUICreator(Object model) {
return map.get(model.getClass());
}
public static synchronized PropertyUICreatorManager getInstance() {
- if(instance == null){
+ if (instance == null) {
instance = new PropertyUICreatorManager();
}
return instance;
Copied: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java (from rev 14697, trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java)
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModelFactory;
+import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
+import org.jboss.tools.smooks.configuration.editors.xml.TagList;
+import org.jboss.tools.smooks.configuration.editors.xml.XMLObjectAnalyzer;
+import org.jboss.tools.smooks.model.graphics.ext.InputType;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ * <p>
+ * Apr 12, 2009
+ */
+public class SelectoreSelectionDialog extends Dialog {
+
+ private SmooksGraphicsExtType graphicsExt;
+ private TreeViewer viewer;
+ private Object currentSelection;
+ private Button onlyNameButton;
+ private Button fullPathButton;
+ private SelectorAttributes selectorAttributes = null;
+
+ public SelectoreSelectionDialog(IShellProvider parentShell) {
+ super(parentShell);
+ }
+
+ public SelectoreSelectionDialog(Shell parentShell, SmooksGraphicsExtType graphicsExt) {
+ super(parentShell);
+ this.graphicsExt = graphicsExt;
+ selectorAttributes = new SelectorAttributes();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
+ * .Composite)
+ */
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite composite = (Composite) super.createDialogArea(parent);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.heightHint = 500;
+ gd.widthHint = 450;
+ composite.setLayoutData(gd);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginHeight = 10;
+ layout.marginWidth = 10;
+ layout.makeColumnsEqualWidth = false;
+ composite.setLayout(layout);
+
+ Label label = new Label(composite,SWT.NONE);
+ label.setText("Sperator Char : ");
+ final CCombo speratorCombo = new CCombo(composite,SWT.BORDER);
+ speratorCombo.add(" ");
+ speratorCombo.add("/");
+ speratorCombo.select(0);
+ speratorCombo.setEditable(false);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ speratorCombo.setLayoutData(gd);
+ speratorCombo.addModifyListener(new ModifyListener(){
+
+ public void modifyText(ModifyEvent e) {
+ selectorAttributes.setSelectorSperator(speratorCombo.getText());
+ }
+
+ });
+ viewer = new TreeViewer(composite, SWT.BORDER);
+ viewer.setContentProvider(new CompoundStructuredDataContentProvider());
+ viewer.setLabelProvider(new CompoundStructuredDataLabelProvider());
+ viewer.setInput(generateInputData());
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ okPressed();
+ }
+ });
+ viewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ public void selectionChanged(SelectionChangedEvent event) {
+ currentSelection = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ }
+ });
+
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ viewer.getTree().setLayoutData(gd);
+
+ Label l = new Label(composite,SWT.NONE);
+ l.setText("Selector generate policy : ");
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ l.setLayoutData(gd);
+
+ Composite com = new Composite(composite,SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ com.setLayoutData(gd);
+
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 2;
+ com.setLayout(gl);
+ fullPathButton = new Button(com,SWT.RADIO);
+ fullPathButton.setText("Full Path");
+ onlyNameButton = new Button(com,SWT.RADIO);
+ onlyNameButton.setText("Only Name");
+// Button containtParentButton = new Button(com,SWT.RADIO);
+// containtParentButton.setText("Containt Parent Name");
+ fullPathButton.setSelection(true);
+
+ handleButtons();
+
+ getShell().setText("Selector generate dialog");
+ return composite;
+ }
+
+ private void handleButtons() {
+ fullPathButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ selectorAttributes.setSelectorPolicy(SelectorAttributes.FULL_PATH);
+ }
+ });
+
+ onlyNameButton.addSelectionListener(new SelectionAdapter(){
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ selectorAttributes.setSelectorPolicy(SelectorAttributes.ONLY_NAME);
+ }
+ });
+ }
+
+ protected List<?> generateInputData() {
+ List<Object> list = new ArrayList<Object>();
+ if (this.graphicsExt != null) {
+ IJavaProject project = SmooksUIUtils.getJavaProject(graphicsExt);
+ try {
+ ProjectClassLoader classLoader = new ProjectClassLoader(project);
+ List<InputType> inputLists = graphicsExt.getInput();
+ for (Iterator<?> iterator = inputLists.iterator(); iterator.hasNext();) {
+ InputType inputType = (InputType) iterator.next();
+ String type = inputType.getType();
+ String path = SmooksModelUtils.getInputPath(inputType);
+ if (type != null && path != null) {
+ path = path.trim();
+ if (SmooksModelUtils.INPUT_TYPE_JAVA.equals(type)) {
+ try {
+ JavaBeanModel model = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(classLoader.loadClass(path));
+ if (model != null) {
+ list.add(model);
+ }
+ } finally {
+
+ }
+ }
+ if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
+ try {
+ path = SmooksUIUtils.parseFilePath(path);
+ AbstractXMLObject model = new XMLObjectAnalyzer().analyze(path, null);
+ if (model != null) {
+ if (model instanceof TagList) {
+ List<IXMLStructuredObject> children = ((TagList) model).getChildren();
+ for (Iterator<?> iterator2 = children.iterator(); iterator2.hasNext();) {
+ IXMLStructuredObject structuredObject = (IXMLStructuredObject) iterator2
+ .next();
+ list.add(structuredObject);
+ }
+ } else {
+ list.add(model);
+ }
+ }
+ } finally {
+
+ }
+ }
+ }
+ }
+ } catch (Exception e) {
+ SmooksConfigurationActivator.getDefault().log(e);
+ }
+ }
+ return list;
+ }
+
+ /**
+ * @return the currentSelection
+ */
+ public Object getCurrentSelection() {
+ return currentSelection;
+ }
+
+ public SelectorAttributes getSelectorAttributes() {
+ return selectorAttributes;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.freemarker;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class BindToUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FreemarkerPackage.eINSTANCE.getBindTo_Id()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.freemarker;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class FreemarkerUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyBefore()) {
+ }
+ if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null) {
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
+ model, ext);
+ }
+ }
+ if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElementNS()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.freemarker;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class InlineUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FreemarkerPackage.eINSTANCE.getInline_Directive()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/InlineUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.freemarker;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class OutputToUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FreemarkerPackage.eINSTANCE.getOutputTo_OutputStreamResource()) {
+ }
+
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/OutputToUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.freemarker;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class TemplateUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == FreemarkerPackage.eINSTANCE.getTemplate_Value()) {
+ }
+ if (feature == FreemarkerPackage.eINSTANCE.getTemplate_Encoding()) {
+ }
+
+ return null;
+ }
+
+ @Override
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ SmooksUIUtils.createTextFieldEditor("Value", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createCDATAFieldEditor("Template Contents", editingdomain, toolkit, parent, model);
+ }
+
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == FreemarkerPackage.eINSTANCE.getTemplate_Value()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.freemarker;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class UseUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ return null;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/UseUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.groovy;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks.model.groovy.GroovyPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class GroovyUICreator extends PropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_Imports()) {
+ }
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_Script()) {
+ }
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteBefore()) {
+ }
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElement()) {
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null) {
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
+ model, ext);
+ }
+ }
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElementNS()) {
+ }
+ return null;
+ }
+
+ @Override
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+// SmooksUIUtils.createCommentFieldEditor("Script Contents",editingdomain, toolkit, parent, model);
+ }
+
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ return super.ignoreProperty(feature);
+ }
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.groovy;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com)
+ * Date Apr 13, 2009
+ */
+public class ScriptUICreator extends PropertyUICreator {
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute)
+ */
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ return null;
+ }
+
+ @Override
+ public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ SmooksUIUtils.createCommentFieldEditor("Script Contents",editingdomain, toolkit, parent, model);
+ }
+
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ return super.ignoreProperty(feature);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/ScriptUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -26,6 +26,7 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
@@ -54,8 +55,15 @@
@Override
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
- SmooksMultiFormEditor formEditor) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if (feature == JavabeanPackage.eINSTANCE.getWiringType_WireOnElement()) {
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null) {
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
+ model, ext);
+ }
+ }
if (feature == JavabeanPackage.eINSTANCE.getWiringType_BeanIdRef()) {
if (model instanceof EObject) {
SmooksResourceListType smooksResourceList = getSmooksResourceList((EObject) model);
@@ -93,18 +101,19 @@
}
}
}
- return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,formEditor);
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
+ formEditor);
}
protected List<String> getBeanIdList(SmooksResourceListType resourceList) {
List<AbstractResourceConfig> rlist = resourceList.getAbstractResourceConfig();
List<String> beanIdList = new ArrayList<String>();
for (Iterator<?> iterator = rlist.iterator(); iterator.hasNext();) {
- AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator.next();
+ AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator
+ .next();
if (abstractResourceConfig instanceof BindingsType) {
String beanId = ((BindingsType) abstractResourceConfig).getBeanId();
- if (beanId == null)
- continue;
+ if (beanId == null) continue;
beanIdList.add(beanId);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -55,8 +55,8 @@
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
-import org.jboss.tools.smooks.configuration.editors.InputStructuredDataSelectionDialog;
import org.jboss.tools.smooks.configuration.editors.SelectorAttributes;
+import org.jboss.tools.smooks.configuration.editors.SelectoreSelectionDialog;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaMethodsSelectionDialog;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaPropertiesSelectionDialog;
import org.jboss.tools.smooks.model.graphics.ext.DocumentRoot;
@@ -79,12 +79,32 @@
public static final String XSL_NAMESPACE = " xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" ";
- public static void createTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model) {
- toolkit.createLabel(parent, "Value :");
+ public static void createTextFieldEditor(String label,
+ AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model) {
+ createTextFieldEditor(label, editingdomain, toolkit, parent, model, false, 0);
+ }
+
+ public static void createMultiTextFieldEditor(String label,
+ AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model, int height) {
+ createTextFieldEditor(label, editingdomain, toolkit, parent, model, true, height);
+ }
+
+ public static void createTextFieldEditor(String label,
+ AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model, boolean multiText, int height) {
+ toolkit.createLabel(parent, label + " :");
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- final Text valueText = toolkit.createText(parent, "", SWT.FLAT);
+ int textType = SWT.FLAT;
+ if (multiText) {
+ textType = SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL;
+ }
+ final Text valueText = toolkit.createText(parent, "", textType);
gd = new GridData(GridData.FILL_HORIZONTAL);
+ if (multiText && height > 0) {
+ gd.heightHint = height;
+ }
valueText.setLayoutData(gd);
if (model instanceof AnyType) {
String text = SmooksModelUtils.getAnyTypeText((AnyType) model);
@@ -101,7 +121,8 @@
}
String text = SmooksModelUtils.getAnyTypeText((AnyType) fm);
if (!valueText.getText().equals(text)) {
- SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, valueText.getText());
+ SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, valueText
+ .getText());
}
}
});
@@ -120,39 +141,42 @@
if (file.exists()) {
path = file.getLocation().toOSString();
} else {
- throw new InvocationTargetException(new Exception("File : " + path + " isn't exsit")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new InvocationTargetException(new Exception(
+ "File : " + path + " isn't exsit")); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
- throw new InvocationTargetException(new Exception("This path is un-support" + path + ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new InvocationTargetException(new Exception(
+ "This path is un-support" + path + ".")); //$NON-NLS-1$ //$NON-NLS-2$
}
}
return path;
}
public static Composite createSelectorFieldEditor(FormToolkit toolkit, Composite parent,
- final IItemPropertyDescriptor propertyDescriptor, Object model,
- final SmooksGraphicsExtType extType) {
- return createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Browse", new IFieldDialog() {
- public Object open(Shell shell) {
- InputStructuredDataSelectionDialog dialog = new InputStructuredDataSelectionDialog(shell,
- extType);
- if (dialog.open() == Dialog.OK) {
- Object currentSelection = dialog.getCurrentSelection();
- if (currentSelection instanceof IXMLStructuredObject) {
- String s = SmooksUIUtils.generateFullPath((IXMLStructuredObject) currentSelection,
- "/");
- return s;
+ final IItemPropertyDescriptor propertyDescriptor, Object model,
+ final SmooksGraphicsExtType extType) {
+ return createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Browse",
+ new IFieldDialog() {
+ public Object open(Shell shell) {
+ SelectoreSelectionDialog dialog = new SelectoreSelectionDialog(shell, extType);
+ if (dialog.open() == Dialog.OK) {
+ Object currentSelection = dialog.getCurrentSelection();
+ SelectorAttributes sa = dialog.getSelectorAttributes();
+ if (currentSelection instanceof IXMLStructuredObject) {
+ String s = SmooksUIUtils.generatePath(
+ (IXMLStructuredObject) currentSelection, sa);
+ return s;
+ }
}
+ return null;
}
- return null;
- }
- }, (EObject) model);
+ }, (EObject) model);
}
public static SmooksGraphicsExtType loadSmooksGraphicsExt(IFile file) throws IOException {
Resource resource = new SmooksGraphicsExtResourceFactoryImpl().createResource(URI
- .createPlatformResourceURI(file.getFullPath().toPortableString(), false));
+ .createPlatformResourceURI(file.getFullPath().toPortableString(), false));
resource.load(Collections.emptyMap());
if (resource.getContents().size() > 0) {
Object obj = resource.getContents().get(0);
@@ -163,13 +187,15 @@
return null;
}
- public static void createCDATAFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model) {
+ public static void createCDATAFieldEditor(String label,
+ AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model) {
Label label1 = toolkit.createLabel(parent, label + " :");
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
label1.setLayoutData(gd);
gd = new GridData(GridData.FILL_HORIZONTAL);
- final Text cdataText = toolkit.createText(parent, "", SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ final Text cdataText = toolkit.createText(parent, "", SWT.MULTI | SWT.H_SCROLL
+ | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 300;
cdataText.setLayoutData(gd);
@@ -189,26 +215,58 @@
}
String text = SmooksModelUtils.getAnyTypeCDATA((AnyType) fm);
if (!cdataText.getText().equals(text)) {
- SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, cdataText.getText());
+ SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, cdataText
+ .getText());
}
}
});
}
- public static void createCommentFieldEditor(String label, FormToolkit toolkit, Composite parent,
- Object model) {
+ public static void createCommentFieldEditor(String label,
+ AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model) {
+ Label label1 = toolkit.createLabel(parent, label + " :");
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+ label1.setLayoutData(gd);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ final Text cdataText = toolkit.createText(parent, "", SWT.MULTI | SWT.H_SCROLL
+ | SWT.V_SCROLL);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.heightHint = 300;
+ cdataText.setLayoutData(gd);
+ if (model instanceof AnyType) {
+ String cdata = SmooksModelUtils.getAnyTypeComment((AnyType) model);
+ if (cdata != null) {
+ cdataText.setText(cdata);
+ }
+ }
+ final Object fm = model;
+ final AdapterFactoryEditingDomain fEditingDomain = editingdomain;
+ cdataText.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ if (!(fm instanceof AnyType)) {
+ return;
+ }
+ String text = SmooksModelUtils.getAnyTypeCDATA((AnyType) fm);
+ if (!cdataText.getText().equals(text)) {
+ SmooksModelUtils.setCommentToSmooksType(fEditingDomain, (AnyType) fm, cdataText
+ .getText());
+ }
+ }
+ });
}
public static Composite createJavaTypeSearchFieldEditor(Composite parent, FormToolkit toolkit,
- final IItemPropertyDescriptor propertyDescriptor, final EObject model) {
+ final IItemPropertyDescriptor propertyDescriptor, final EObject model) {
if (model instanceof EObject) {
final Resource resource = ((EObject) model).eResource();
URI uri = resource.getURI();
IResource workspaceResource = null;
if (uri.isPlatformResource()) {
String path = uri.toPlatformString(true);
- workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
+ workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(
+ new Path(path));
JavaTypeFieldDialog dialog = new JavaTypeFieldDialog(workspaceResource);
String displayName = propertyDescriptor.getDisplayName(model);
Hyperlink link = toolkit.createHyperlink(parent, displayName + " :", SWT.NONE);
@@ -219,8 +277,8 @@
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
classTextComposite.setLayout(fillLayout);
- final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit,
- "Search Class", dialog, SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(classTextComposite,
+ toolkit, "Search Class", dialog, SWT.NONE);
Object editValue = getEditValue(propertyDescriptor, model);
if (editValue != null) {
searchComposite.getText().setText(editValue.toString());
@@ -229,18 +287,20 @@
public void modifyText(ModifyEvent e) {
Object value = propertyDescriptor.getPropertyValue(model);
if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value).getEditableValue(model);
+ Object editValue = ((PropertyValueWrapper) value)
+ .getEditableValue(model);
if (editValue != null) {
if (!editValue.equals(searchComposite.getText().getText())) {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText()
- .getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite
+ .getText().getText());
}
} else {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText()
- .getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite
+ .getText().getText());
}
} else {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText()
+ .getText());
}
}
});
@@ -249,18 +309,17 @@
public void linkActivated(HyperlinkEvent e) {
try {
- if (fresource == null)
- return;
+ if (fresource == null) return;
if (fresource.getProject().hasNature(JavaCore.NATURE_ID)) {
IJavaProject javaProject = JavaCore.create(fresource.getProject());
String typeName = searchComposite.getText().getText();
IJavaElement result = javaProject.findType(typeName);
- if (result != null)
- JavaUI.openInEditor(result);
+ if (result != null) JavaUI.openInEditor(result);
else {
MessageDialog.openInformation(classTextComposite.getShell(),
- "Can't find type", "Can't find type \"" + typeName + "\" in \""
- + javaProject.getProject().getName() + "\" project.");
+ "Can't find type", "Can't find type \"" + typeName
+ + "\" in \"" + javaProject.getProject().getName()
+ + "\" project.");
}
}
} catch (PartInitException ex) {
@@ -309,9 +368,9 @@
return null;
}
- public static Composite createJavaMethodSearchFieldEditor(BindingsType container, Composite parent,
- FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String buttonName,
- final EObject model) {
+ public static Composite createJavaMethodSearchFieldEditor(BindingsType container,
+ Composite parent, FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor,
+ String buttonName, final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
try {
@@ -319,7 +378,7 @@
Class<?> clazz = classLoader.loadClass(classString);
JavaMethodsSelectionDialog dialog = new JavaMethodsSelectionDialog(project, clazz);
return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
- "Select method", dialog, (EObject) model);
+ "Select method", dialog, (EObject) model);
} catch (JavaModelException e) {
// ignore
} catch (ClassNotFoundException e) {
@@ -334,10 +393,8 @@
public static IXMLStructuredObject getRootParent(IXMLStructuredObject child) {
IXMLStructuredObject parent = child.getParent();
- if (child.isRootNode())
- return child;
- if (parent == null || parent.isRootNode())
- return child;
+ if (child.isRootNode()) return child;
+ if (parent == null || parent.isRootNode()) return child;
IXMLStructuredObject temp = parent;
while (temp != null && !temp.isRootNode()) {
parent = temp;
@@ -346,13 +403,12 @@
return parent;
}
- public static String generatePath(IXMLStructuredObject node, SelectorAttributes selectorAttributes) {
+ public static String generatePath(IXMLStructuredObject node,
+ SelectorAttributes selectorAttributes) {
String sperator = selectorAttributes.getSelectorSperator();
String policy = selectorAttributes.getSelectorPolicy();
- if (sperator == null)
- sperator = " ";
- if (policy == null)
- policy = SelectorAttributes.FULL_PATH;
+ if (sperator == null) sperator = " ";
+ if (policy == null) policy = SelectorAttributes.FULL_PATH;
if (policy.equals(SelectorAttributes.FULL_PATH)) {
return generateFullPath(node, sperator);
}
@@ -368,8 +424,8 @@
return generateFullPath(node, sperator);
}
- public static String generatePath(IXMLStructuredObject startNode, IXMLStructuredObject stopNode,
- final String sperator, boolean includeContext) {
+ public static String generatePath(IXMLStructuredObject startNode,
+ IXMLStructuredObject stopNode, final String sperator, boolean includeContext) {
String name = "";
if (startNode == stopNode) {
return startNode.getNodeName();
@@ -397,9 +453,9 @@
return name.trim();
}
- public static Composite createJavaPropertySearchFieldEditor(BindingsType container, Composite parent,
- FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String buttonName,
- final EObject model) {
+ public static Composite createJavaPropertySearchFieldEditor(BindingsType container,
+ Composite parent, FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor,
+ String buttonName, final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
try {
@@ -407,7 +463,7 @@
Class<?> clazz = classLoader.loadClass(classString);
JavaPropertiesSelectionDialog dialog = new JavaPropertiesSelectionDialog(project, clazz);
return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
- "Select property", dialog, (EObject) model);
+ "Select property", dialog, (EObject) model);
} catch (JavaModelException e) {
// ignore
} catch (ClassNotFoundException e) {
@@ -426,8 +482,8 @@
}
public static Composite createDialogFieldEditor(Composite parent, FormToolkit toolkit,
- final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
- final EObject model) {
+ final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
+ final EObject model) {
String displayName = propertyDescriptor.getDisplayName(model);
toolkit.createLabel(parent, displayName + " :");
final Composite classTextComposite = toolkit.createComposite(parent);
@@ -437,8 +493,8 @@
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
classTextComposite.setLayout(fillLayout);
- final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit, buttonName,
- dialog, SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit,
+ buttonName, dialog, SWT.NONE);
Object editValue = getEditValue(propertyDescriptor, model);
if (editValue != null) {
searchComposite.getText().setText(editValue.toString());
@@ -450,10 +506,12 @@
Object editValue = ((PropertyValueWrapper) value).getEditableValue(model);
if (editValue != null) {
if (!editValue.equals(searchComposite.getText().getText())) {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText()
+ .getText());
}
} else {
- propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
+ propertyDescriptor.setPropertyValue(model, searchComposite.getText()
+ .getText());
}
} else {
propertyDescriptor.setPropertyValue(model, searchComposite.getText().getText());
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-04-13 05:53:13 UTC (rev 14701)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-04-13 06:05:11 UTC (rev 14702)
@@ -16,6 +16,8 @@
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.xsl.XslPackage;
/**
@@ -33,10 +35,16 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getXsl_ApplyBefore()) {
}
if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElement()) {
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null) {
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
+ model, ext);
+ }
}
if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElementNS()) {
}
15 years, 8 months
JBoss Tools SVN: r14701 - trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-13 01:53:13 -0400 (Mon, 13 Apr 2009)
New Revision: 14701
Modified:
trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java
Log:
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java 2009-04-13 05:06:24 UTC (rev 14700)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.archives.integration.test/src/org/jboss/ide/eclipse/as/archives/integration/test/ASArchivesIntegrationTestSuite.java 2009-04-13 05:53:13 UTC (rev 14701)
@@ -27,7 +27,7 @@
public class ASArchivesIntegrationTestSuite extends TestSuite {
public static Test suite() {
TestSuite suite = new TestSuite("AS Archives Integration Test Suite");
- suite.addTest(new BuildDeployTest());
+ suite.addTestSuite(BuildDeployTest.class);
return suite;
}
15 years, 8 months
JBoss Tools SVN: r14700 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-13 01:06:24 -0400 (Mon, 13 Apr 2009)
New Revision: 14700
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
Log:
JBIDE-4085 - server publish time reduced to 1
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2009-04-13 04:51:12 UTC (rev 14699)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2009-04-13 05:06:24 UTC (rev 14700)
@@ -57,7 +57,12 @@
public JBossServer() {
}
-
+
+ public void setDefaults(IProgressMonitor monitor) {
+ super.setDefaults(monitor);
+ setAttribute("auto-publish-time", 1);
+ }
+
public void saveConfiguration(IProgressMonitor monitor) throws CoreException {
// here we update the launch configuration with any details that might have changed.
try {
15 years, 8 months
JBoss Tools SVN: r14699 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: editor and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-13 00:51:12 -0400 (Mon, 13 Apr 2009)
New Revision: 14699
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-4094 - externalized
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2009-04-13 04:47:15 UTC (rev 14698)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2009-04-13 04:51:12 UTC (rev 14699)
@@ -151,9 +151,9 @@
public static String EditorCPD_DefaultShellTitle;
public static String EditorCPD_DefaultDescription;
public static String EditorCPD_RestoreDefault;
+ public static String EditorNoRuntimeSelected;
-
public static String Configure;
// misc
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2009-04-13 04:47:15 UTC (rev 14698)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2009-04-13 04:51:12 UTC (rev 14699)
@@ -129,6 +129,7 @@
EditorCPD_DefaultShellTitle=Edit Port
EditorCPD_DefaultDescription=This wizard allows you to edit which xpath is used to locate a port used by the tooling.\nThis will not change any server files, only what ports are used to interact with it.
EditorCPD_RestoreDefault=Restore Default
+EditorNoRuntimeSelected=No Runtime Selected. Please select a runtime and refresh your deployment options.
Configure=Configure...
# misc
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2009-04-13 04:47:15 UTC (rev 14698)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2009-04-13 04:51:12 UTC (rev 14699)
@@ -256,7 +256,7 @@
String error = "";
List<Status> status = new ArrayList<Status>();
if( getRuntime() == null ) {
- String msg = "No Runtime Selected";
+ String msg = Messages.EditorNoRuntimeSelected;
status.add(new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, msg));
error = error + msg + "\n";
}
15 years, 8 months
JBoss Tools SVN: r14698 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-04-13 00:47:15 -0400 (Mon, 13 Apr 2009)
New Revision: 14698
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
Log:
JBIDE-4094
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2009-04-12 23:09:45 UTC (rev 14697)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploySection.java 2009-04-13 04:47:15 UTC (rev 14698)
@@ -62,6 +62,7 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.Messages;
/**
@@ -102,7 +103,6 @@
Label descriptionLabel = toolkit.createLabel(composite, Messages.swf_DeploymentDescription);
Control top = descriptionLabel;
- if( getRuntime() != null ) {
Composite inner = toolkit.createComposite(composite);
inner.setLayout(new GridLayout(1, false));
metadataRadio = toolkit.createButton(inner, Messages.EditorUseWorkspaceMetadata, SWT.RADIO);
@@ -136,7 +136,6 @@
radios.right = new FormAttachment(100,-5);
inner.setLayoutData(radios);
top = inner;
- }
Label label = toolkit.createLabel(composite, Messages.swf_DeployDirectory);
@@ -256,18 +255,22 @@
public IStatus[] getSaveStatus() {
String error = "";
List<Status> status = new ArrayList<Status>();
+ if( getRuntime() == null ) {
+ String msg = "No Runtime Selected";
+ status.add(new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, msg));
+ error = error + msg + "\n";
+ }
if(!new File(makeGlobal(deployText.getText())).exists()) {
String msg = NLS.bind(Messages.EditorDeployDNE, deployText.getText());
- status.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, msg));
- error = msg + "\n";
+ status.add(new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, msg));
+ error = error + msg + "\n";
}
if(!new File(makeGlobal(tempDeployText.getText())).exists()) {
String msg = NLS.bind(Messages.EditorTempDeployDNE, tempDeployText.getText());
- status.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, msg));
+ status.add(new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, msg));
error = error + msg + "\n";
}
-
setErrorMessage(error.equals("") ? null : error);
return status.size() == 0 ? null : status.toArray(new IStatus[status.size()]);
}
@@ -359,15 +362,17 @@
new File(newTemp).mkdirs();
} else if( newSelection == serverRadio ) {
IRuntime rt = DeploySection.this.server.getRuntime();
- IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- String config = jbsrt.getJBossConfiguration();
- newDir = new Path(IJBossServerConstants.SERVER)
- .append(config)
- .append(IJBossServerConstants.DEPLOY).makeRelative().toString();
- newTemp = new Path(IJBossServerConstants.SERVER).append(config)
- .append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
- new File(newTemp).mkdirs();
+ if( rt != null ) {
+ IJBossServerRuntime jbsrt = (IJBossServerRuntime)rt.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
+ String config = jbsrt.getJBossConfiguration();
+ newDir = new Path(IJBossServerConstants.SERVER)
+ .append(config)
+ .append(IJBossServerConstants.DEPLOY).makeRelative().toString();
+ newTemp = new Path(IJBossServerConstants.SERVER).append(config)
+ .append(IJBossServerConstants.TMP)
+ .append(IJBossServerConstants.JBOSSTOOLS_TMP).makeRelative().toString();
+ new File(newTemp).mkdirs();
+ }
type = IDeployableServer.DEPLOY_SERVER;
} else {
newDir = lastCustomDeploy;
15 years, 8 months
JBoss Tools SVN: r14697 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-04-12 19:09:45 -0400 (Sun, 12 Apr 2009)
New Revision: 14697
Modified:
workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
Log:
JBIDE-4000 TestNG failed for Seam Example Projects.
Modified: workspace/snjeza/seam-examples/booking-mavenized-2.1.1.zip
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Tools SVN: r14696 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui: src/org/jboss/tools/smooks/configuration/editors and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-12 13:57:11 -0400 (Sun, 12 Apr 2009)
New Revision: 14696
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractStructuredDdataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractXMLObject.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagList.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagObject.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagPropertyObject.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLObjectAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataContentProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataLabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/ProjectClassLoader.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
Log:
Add new feature for smooks-configuration-editor:
1.Add input data path
2.Show editor to select input data and transform the data to "selector"
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-04-12 17:57:11 UTC (rev 14696)
@@ -22,3 +22,5 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
+Bundle-ClassPath: libs/dom4j-1.6.1.jar,
+ .
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -13,17 +13,18 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
+import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
public class Codegenerator {
- String basePath = "/home/Dart/Works/eclipse_wtp.3.0.4/eclipse/workspace/jbosstools/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/";
+ String basePath = "/home/DartPeng/Work/eclipse/new-smooks-editor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp";
String tempContents = "";
public Codegenerator() {
try {
FileReader reader = new FileReader(
- new File(
- "/home/DartPeng/Work/eclipse/new-smooks-editor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
+ new File(
+ "/home/DartPeng/Work/eclipse/new-smooks-editor/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
BufferedReader r = new BufferedReader(reader);
String line = r.readLine();
while (line != null) {
@@ -43,7 +44,7 @@
public static void main(String[] args) {
Codegenerator g = new Codegenerator();
try {
- g.generateCodes(SmooksPackage.eINSTANCE);
+ g.generateCodes(JavabeanPackage.eINSTANCE);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
@@ -53,8 +54,8 @@
}
}
- public void generateCodes(EPackage epackage) throws IllegalArgumentException,
- IllegalAccessException, IOException {
+ public void generateCodes(EPackage epackage) throws IllegalArgumentException, IllegalAccessException,
+ IOException {
Field[] fields = epackage.getClass().getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
Field f = fields[i];
@@ -66,7 +67,8 @@
continue;
}
File file = new File(basePath + eClass.getName() + "UICreator.java");
- System.out.println("map.put("+eClass.getName()+"Impl.class, new "+eClass.getName()+"UICreator());");
+ System.out.println("map.put(" + eClass.getName() + "Impl.class, new " + eClass.getName()
+ + "UICreator());");
if (!file.exists()) {
file.createNewFile();
FileWriter writer = new FileWriter(file);
@@ -83,8 +85,7 @@
String t = tempContents;
if (t.indexOf("${className}") != -1) {
String s = t.substring(0, t.indexOf("${className}"));
- String es = t.substring(t.indexOf("${className}") + "${className}".length(), t
- .length());
+ String es = t.substring(t.indexOf("${className}") + "${className}".length(), t.length());
t = s + className + es;
}
String epName = ePackage.getClass().getSimpleName();
@@ -98,9 +99,9 @@
for (Iterator<?> iterator = alist.iterator(); iterator.hasNext();) {
EAttribute attribute = (EAttribute) iterator.next();
String atn = attribute.getName();
- String firstC = new String(new char[]{ atn.toCharArray()[0] });
+ String firstC = new String(new char[] { atn.toCharArray()[0] });
firstC = firstC.toUpperCase();
- atn = firstC + atn.substring(1,atn.length());
+ atn = firstC + atn.substring(1, atn.length());
String n = allepName + "_" + atn + "()";
String cn = "if(feature == " + n + "){}\n";
attributeMethod += cn;
@@ -108,7 +109,7 @@
int index2 = t.indexOf("${attributeMethod}");
if (index2 != -1) {
String am1 = t.substring(0, index2);
- String am2 = t.substring(index2 + "${attributeMethod}".length() , t.length());
+ String am2 = t.substring(index2 + "${attributeMethod}".length(), t.length());
t = am1 + attributeMethod + am2;
}
return t;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/InputStructuredDataSelectionDialog.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -24,16 +24,22 @@
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.IShellProvider;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModelFactory;
import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject;
+import org.jboss.tools.smooks.configuration.editors.xml.TagList;
+import org.jboss.tools.smooks.configuration.editors.xml.XMLObjectAnalyzer;
import org.jboss.tools.smooks.model.graphics.ext.InputType;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
@@ -70,10 +76,25 @@
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
GridData gd = new GridData(GridData.FILL_BOTH);
- gd.heightHint = 400;
- gd.widthHint = 400;
+ gd.heightHint = 500;
+ gd.widthHint = 450;
composite.setLayoutData(gd);
- composite.setLayout(new FillLayout());
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 2;
+ layout.marginHeight = 10;
+ layout.marginWidth = 10;
+ layout.makeColumnsEqualWidth = false;
+ composite.setLayout(layout);
+
+ Label label = new Label(composite,SWT.NONE);
+ label.setText("Sperator Char : ");
+ CCombo speratorCombo = new CCombo(composite,SWT.BORDER);
+ speratorCombo.add(" ");
+ speratorCombo.add("/");
+ speratorCombo.setEditable(false);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ speratorCombo.setLayoutData(gd);
+
viewer = new TreeViewer(composite, SWT.BORDER);
viewer.setContentProvider(new CompoundStructuredDataContentProvider());
viewer.setLabelProvider(new CompoundStructuredDataLabelProvider());
@@ -88,7 +109,33 @@
currentSelection = ((IStructuredSelection) event.getSelection()).getFirstElement();
}
});
- getShell().setText("Input Datas");
+
+ gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = 2;
+ viewer.getTree().setLayoutData(gd);
+
+ Label l = new Label(composite,SWT.NONE);
+ l.setText("Selector generate policy : ");
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ l.setLayoutData(gd);
+
+ Composite com = new Composite(composite,SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ com.setLayoutData(gd);
+
+ GridLayout gl = new GridLayout();
+ gl.numColumns = 3;
+ com.setLayout(gl);
+ Button fullPathButton = new Button(com,SWT.RADIO);
+ fullPathButton.setText("Full Path");
+ Button onlyNameButton = new Button(com,SWT.RADIO);
+ onlyNameButton.setText("Only Name");
+ Button containtParentButton = new Button(com,SWT.RADIO);
+ containtParentButton.setText("Containt Parent Name");
+
+ getShell().setText("Selector generate dialog");
return composite;
}
@@ -117,7 +164,24 @@
}
}
if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
+ try {
+ path = SmooksUIUtils.parseFilePath(path);
+ AbstractXMLObject model = new XMLObjectAnalyzer().analyze(path, null);
+ if (model != null) {
+ if (model instanceof TagList) {
+ List<IXMLStructuredObject> children = ((TagList) model).getChildren();
+ for (Iterator<?> iterator2 = children.iterator(); iterator2.hasNext();) {
+ IXMLStructuredObject structuredObject = (IXMLStructuredObject) iterator2
+ .next();
+ list.add(structuredObject);
+ }
+ } else {
+ list.add(model);
+ }
+ }
+ } finally {
+ }
}
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -18,6 +18,7 @@
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
/**
@@ -52,10 +53,16 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEdtior) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEditor) {
if (feature == JavabeanPackage.eINSTANCE.getBindingsType_Class()) {
return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
}
+ if(feature == JavabeanPackage.eINSTANCE.getBindingsType_CreateOnElement()){
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null)
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor, model,
+ ext);
+ }
return null;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -98,7 +98,10 @@
gd.heightHint = 400;
gd.widthHint = 400;
composite.setLayoutData(gd);
- composite.setLayout(new FillLayout());
+ FillLayout fl = new FillLayout();
+ fl.marginHeight = 10;
+ fl.marginWidth = 10;
+ composite.setLayout(fl);
viewer = new TableViewer(composite, SWT.BORDER);
Table table = viewer.getTable();
TableColumn nameColumn = new TableColumn(table, SWT.NONE);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -98,7 +98,10 @@
gd.heightHint = 400;
gd.widthHint = 400;
composite.setLayoutData(gd);
- composite.setLayout(new FillLayout());
+ FillLayout fl = new FillLayout();
+ fl.marginHeight = 10;
+ fl.marginWidth = 10;
+ composite.setLayout(fl);
viewer = new TableViewer(composite, SWT.BORDER);
Table table = viewer.getTable();
TableColumn nameColumn = new TableColumn(table, SWT.NONE);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -11,6 +11,12 @@
package org.jboss.tools.smooks.configuration.editors.javabean;
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
@@ -37,4 +43,23 @@
return super.canCreateMethodsSearchFieldEditor(feature);
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.javabean.PropertiesAndSetterMethodSearchFieldEditorCreator#createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite, org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object, org.eclipse.emf.ecore.EAttribute, org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ if(feature == JavabeanPackage.eINSTANCE.getValueType_Data()){
+ SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ if (ext != null)
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor, model,
+ ext);
+
+ }
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ }
+
+
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanlabelProvider.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -47,7 +47,7 @@
return name;
}
- return super.getText(element);
+ return "";
}
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/ProjectClassLoader.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/ProjectClassLoader.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/ProjectClassLoader.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -102,7 +102,7 @@
URL[] urls = new URL[list.size()];
int index = 0;
- for (Iterator i = list.iterator(); i.hasNext(); index++) {
+ for (Iterator<?> i = list.iterator(); i.hasNext(); index++) {
urls[index] = (URL) i.next();
}
return urls;
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.configuration.editors.uitls;
import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -21,6 +22,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
@@ -34,6 +36,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.ui.JavaUI;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -68,6 +71,14 @@
*/
public class SmooksUIUtils {
+ public static final String FILE_PRIX = "File:/"; //$NON-NLS-1$
+
+ public static final String WORKSPACE_PRIX = "Workspace:/"; //$NON-NLS-1$
+
+ public static final String RESOURCE = "Resource:/";
+
+ public static final String XSL_NAMESPACE = " xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" ";
+
public static void createTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
FormToolkit toolkit, Composite parent, Object model) {
toolkit.createLabel(parent, "Value :");
@@ -96,6 +107,28 @@
});
}
+ public static String parseFilePath(String path) throws InvocationTargetException {
+ int index = path.indexOf(FILE_PRIX);
+ if (index != -1) {
+ path = path.substring(index + FILE_PRIX.length(), path.length());
+ } else {
+ index = path.indexOf(WORKSPACE_PRIX);
+ if (index != -1) {
+ path = path.substring(index + WORKSPACE_PRIX.length(), path.length());
+ Path wpath = new Path(path);
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(wpath);
+ if (file.exists()) {
+ path = file.getLocation().toOSString();
+ } else {
+ throw new InvocationTargetException(new Exception("File : " + path + " isn't exsit")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ } else {
+ throw new InvocationTargetException(new Exception("This path is un-support" + path + ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ return path;
+ }
+
public static Composite createSelectorFieldEditor(FormToolkit toolkit, Composite parent,
final IItemPropertyDescriptor propertyDescriptor, Object model,
final SmooksGraphicsExtType extType) {
@@ -430,4 +463,20 @@
toolkit.paintBordersFor(classTextComposite);
return classTextComposite;
}
+
+ public static void showErrorDialog(Shell shell, Status status) {
+ ErrorDialog.openError(shell, "Error", "error", status); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ public static Status createErrorStatus(Throwable throwable, String message) {
+ while (throwable != null && throwable instanceof InvocationTargetException) {
+ throwable = ((InvocationTargetException) throwable).getTargetException();
+ }
+ return new Status(Status.ERROR, SmooksConfigurationActivator.PLUGIN_ID, message, throwable);
+ }
+
+ public static Status createErrorStatus(Throwable throwable) {
+ return createErrorStatus(throwable, "Error"); //$NON-NLS-1$
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java 2009-04-12 11:09:30 UTC (rev 14695)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/wizard/ViewerInitorStore.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -19,6 +19,9 @@
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanContentProvider;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanlabelProvider;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanStrucutredDataWizard;
+import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataContentProvider;
+import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataLabelProvider;
+import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataWizard;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
@@ -120,9 +123,11 @@
protected HashMap<String, IViewerInitor> createNewInitorMap() {
HashMap<String, IViewerInitor> map = new HashMap<String, IViewerInitor>();
+
+ // for java
BaseViewerInitor javabeanViewerInitor = new BaseViewerInitor();
String name = "Java";
- String description = "Java class";
+ String description = "Browse a Java type";
String iconPath = null;
String typeID = SmooksModelUtils.INPUT_TYPE_JAVA;
@@ -134,6 +139,24 @@
javabeanViewerInitor.setTreeContentProvider(new JavabeanContentProvider());
javabeanViewerInitor.setStructuredDataLoadWizard(new JavabeanStrucutredDataWizard());
map.put(typeID, javabeanViewerInitor);
+
+ // for XML
+
+ BaseViewerInitor xmlViewerInitor = new BaseViewerInitor();
+ name = "XML";
+ description = "Select a xml file ";
+ iconPath = null;
+ typeID = SmooksModelUtils.INPUT_TYPE_XML;
+
+ xmlViewerInitor.setName(name);
+ xmlViewerInitor.setDescription(description);
+ xmlViewerInitor.setWizardIconPath(iconPath);
+ xmlViewerInitor.setTypeID(typeID);
+ xmlViewerInitor.setLabelProvider(new XMLStructuredDataLabelProvider());
+ xmlViewerInitor.setTreeContentProvider(new XMLStructuredDataContentProvider());
+ xmlViewerInitor.setStructuredDataLoadWizard(new XMLStructuredDataWizard());
+ map.put(typeID, xmlViewerInitor);
+
return map;
}
}
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,331 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.Collections;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+
+/**
+ *
+ * @author Dart Peng Date : 2008-8-13
+ */
+public abstract class AbstractFileSelectionWizardPage extends WizardPage
+ implements SelectionListener {
+ protected IStructuredSelection selection;
+ protected Object returnObject = null;
+ protected Text fileText;
+ protected Composite fileTextComposite;
+ protected CheckboxTableViewer tableViewer = null;
+ protected Button fileSystemBrowseButton;
+ protected boolean reasourceLoaded = false;
+ private Button workspaceBrowseButton;
+ private String filePath = null;
+
+ public AbstractFileSelectionWizardPage(String pageName) {
+ super(pageName);
+ // TODO Auto-generated constructor stub
+ }
+
+ public Object getReturnValue() {
+ try {
+ String path = getFilePath();
+ if(path == null) return null;
+ path = SmooksUIUtils.parseFilePath(path);
+ returnObject = this.loadedTheObject(path);
+ } catch (Exception e) {
+ SmooksUIUtils.showErrorDialog(getShell(), SmooksUIUtils.createErrorStatus(e));
+ }
+ return returnObject;
+ }
+
+ public String getFilePath(){
+ return filePath;
+ }
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+ */
+ public void createControl(Composite parent) {
+
+ Composite mainComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout();
+ layout.numColumns = 1;
+ mainComposite.setLayout(layout);
+
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.grabExcessHorizontalSpace = true;
+ gd.grabExcessVerticalSpace = true;
+ mainComposite.setLayoutData(gd);
+
+ // xmlButton = new Button(mainComposite, SWT.RADIO);
+ // xmlButton.setText("Select a XML file");
+ //
+ // Composite xmlComposite = this
+ // .createXMLFileSelectionComposite(mainComposite);
+ //
+ // Label sp = new Label(mainComposite, SWT.HORIZONTAL | SWT.SEPARATOR);
+ // gd = new GridData(GridData.FILL_HORIZONTAL);
+ // sp.setLayoutData(gd);
+ //
+ // xsdButton = new Button(mainComposite, SWT.RADIO);
+ // xsdButton.setText("Select a XSD file");
+
+ Composite xsdComposite = this
+ .createFileSelectionComposite(mainComposite);
+
+ // init the panel status (XSD file selection composite is disabled)
+ // xsdButton.setSelection(true);
+ //
+ // setCompositeChildrenEnabled(xmlComposite, false);
+
+ // registe the listener for controls
+ hookBrowseButtonSelectionAdapter();
+ hookFileTextModifyListener();
+ this.setControl(mainComposite);
+ }
+
+ protected void hookFileTextModifyListener() {
+ final ModifyListener modifyListener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ filePath = fileText.getText();
+ changeWizardPageStatus();
+ }
+ };
+ // xmlFileText.addModifyListener(modifyListener);
+ fileText.addModifyListener(modifyListener);
+ }
+
+ protected void hookRadioButtonSelectionAdapter() {
+ // xsdButton.addSelectionListener(this);
+ }
+
+ protected void hookBrowseButtonSelectionAdapter() {
+ SelectionAdapter browseButtonSelectionAdapter = new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ Text relationT = null;
+ if (e.getSource() == fileSystemBrowseButton) {
+ relationT = fileText;
+ }
+ openFileSelection(relationT);
+ }
+ };
+ SelectionAdapter wbrowseButtonSelectionAdapter = new SelectionAdapter() {
+ public void widgetSelected(SelectionEvent e) {
+ Text relationT = null;
+ if (e.getSource() == workspaceBrowseButton) {
+ relationT = fileText;
+ }
+ openWorkSpaceSelection(relationT);
+ }
+
+ };
+
+ workspaceBrowseButton
+ .addSelectionListener(wbrowseButtonSelectionAdapter);
+ // xmlFileSystemBrowseButton
+ // .addSelectionListener(browseButtonSelectionAdapter);
+ fileSystemBrowseButton
+ .addSelectionListener(browseButtonSelectionAdapter);
+ }
+
+ protected void openWorkSpaceSelection(Text relationT) {
+ IFile[] files = WorkspaceResourceDialog.openFileSelection(getShell(),
+ "Select Files", "", false, null, Collections.EMPTY_LIST); //$NON-NLS-1$ //$NON-NLS-2$
+ // dialog.setInitialSelections(selectedResources);
+ if (files.length > 0) {
+ IFile file = files[0];
+ String s = file.getFullPath().toPortableString();
+ s = SmooksUIUtils.WORKSPACE_PRIX + s;
+ relationT.setText(s);
+ }
+ }
+
+ protected Composite createFileSelectionComposite(Composite parent) {
+ Composite xsdComposite = new Composite(parent, SWT.NONE);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ xsdComposite.setLayoutData(gd);
+ GridLayout xsdLayout = new GridLayout();
+ xsdLayout.numColumns = 2;
+ xsdLayout.marginWidth = 0;
+ xsdComposite.setLayout(xsdLayout);
+
+ Label nfileLanel = new Label(xsdComposite, SWT.NONE);
+ nfileLanel.setText("File : "); //$NON-NLS-1$
+ fileTextComposite = new Composite(xsdComposite, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.grabExcessHorizontalSpace = true;
+ fileTextComposite.setLayoutData(gd);
+ GridLayout xsdtgl = new GridLayout();
+ xsdtgl.marginWidth = 0;
+ xsdtgl.marginHeight = 0;
+ xsdtgl.numColumns = 1;
+ fileTextComposite.setLayout(xsdtgl);
+
+ fileText = new Text(fileTextComposite, SWT.BORDER);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ fileText.setLayoutData(gd);
+ gd.grabExcessHorizontalSpace = true;
+
+// final Button loadXSDButton = new Button(fileTextComposite, SWT.NONE);
+// loadXSDButton.setText("Load");
+// loadXSDButton.addSelectionListener(new SelectionAdapter() {
+//
+// @Override
+// public void widgetSelected(SelectionEvent e) {
+// super.widgetSelected(e);
+// reasourceLoaded = false;
+// try {
+// returnObject = loadedTheObject(fileText.getText());
+// reasourceLoaded = true;
+// } catch (Throwable e2) {
+// // ignore
+// e2.printStackTrace();
+// }
+// changeWizardPageStatus();
+// }
+//
+// });
+
+ Composite browseButtonComposite = new Composite(xsdComposite, SWT.NONE);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ browseButtonComposite.setLayoutData(gd);
+
+ GridLayout bg = new GridLayout();
+ bg.numColumns = 2;
+ bg.marginHeight = 0;
+ bg.marginWidth = 0;
+ bg.makeColumnsEqualWidth = false;
+ browseButtonComposite.setLayout(bg);
+
+ fileSystemBrowseButton = new Button(browseButtonComposite, SWT.NONE);
+ fileSystemBrowseButton.setText("File System"); //$NON-NLS-1$
+
+ workspaceBrowseButton = new Button(browseButtonComposite, SWT.NONE);
+ workspaceBrowseButton.setText("Work Space"); //$NON-NLS-1$
+ gd = new GridData();
+ gd.horizontalAlignment = GridData.END;
+ workspaceBrowseButton.setLayoutData(gd);
+
+ gd = new GridData();
+ gd.grabExcessHorizontalSpace = true;
+ gd.horizontalAlignment = GridData.END;
+ fileSystemBrowseButton.setLayoutData(gd);
+
+ return xsdComposite;
+ }
+
+ abstract protected Object loadedTheObject(String path) throws Exception;
+
+ protected void initTableViewer() {
+// tableViewer.addCheckStateListener(new ICheckStateListener() {
+// boolean flag = true;
+//
+// public void checkStateChanged(CheckStateChangedEvent event) {
+// if (flag) {
+// Object checkObject = event.getElement();
+// boolean check = event.getChecked();
+// flag = false;
+// tableViewer.setAllChecked(false);
+// tableViewer.setChecked(checkObject, check);
+// flag = true;
+// changeWizardPageStatus();
+// }
+// }
+// });
+// tableViewer.setContentProvider(new XSDStructuredModelContentProvider());
+// tableViewer.setLabelProvider(new XSDStructuredModelLabelProvider());
+ }
+
+ protected void setCompositeChildrenEnabled(Composite composite,
+ boolean enabled) {
+ Control[] children = composite.getChildren();
+ for (int i = 0; i < children.length; i++) {
+ Control child = children[i];
+ if (child instanceof Text) {
+ child.setEnabled(enabled);
+ }
+ if (child instanceof Button) {
+ child.setEnabled(enabled);
+ }
+ if (child instanceof Composite) {
+ setCompositeChildrenEnabled((Composite) child, enabled);
+ }
+ }
+ }
+
+ protected void openFileSelection(Text relationText) {
+ FileDialog dialog = new FileDialog(this.getShell());
+ String path = dialog.open();
+ if (path != null) {
+ path = SmooksUIUtils.FILE_PRIX + path;
+ relationText.setText(path);
+ }
+ }
+
+ protected void changeWizardPageStatus() {
+ String text = this.fileText.getText();
+ String error = null;
+ if (text == null || "".equals(text)) //$NON-NLS-1$
+ error = "File's name can be null"; //$NON-NLS-1$
+
+// File tempFile = new File(text);
+// if(!tempFile.exists()){
+// error = "Can't find the file , please select another one.";
+// }
+
+// if (!reasourceLoaded) {
+// error = "Resource must be loaded";
+// }
+ this.setErrorMessage(error);
+ this.setPageComplete(error == null);
+
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ changeWizardPageStatus();
+ }
+
+ public CheckboxTableViewer getTableViewer() {
+ return tableViewer;
+ }
+
+ public void setTableViewer(CheckboxTableViewer tableViewer) {
+ this.tableViewer = tableViewer;
+ }
+
+ public IStructuredSelection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(IStructuredSelection selection) {
+ this.selection = selection;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractFileSelectionWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractStructuredDdataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractStructuredDdataWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractStructuredDdataWizard.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,78 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardNode;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.jboss.tools.smooks.configuration.editors.wizard.IStructuredDataSelectionWizard;
+
+/**
+ * @author Dart
+ *
+ */
+public abstract class AbstractStructuredDdataWizard extends Wizard implements
+ IStructuredDataSelectionWizard, INewWizard {
+ protected IWorkbench workbench;
+
+ protected IStructuredSelection selection;
+
+ protected AbstractFileSelectionWizardPage page = null;
+ protected Object xsdElement = null;
+ protected IWizardNode strucutredDataCreationWizardNode;
+
+ public AbstractStructuredDdataWizard() {
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public void addPages() {
+ if (page == null) {
+ page = createAbstractFileSelectionWizardPage();
+ page.setSelection(this.selection);
+ }
+ this.addPage(page);
+ }
+
+ abstract protected AbstractFileSelectionWizardPage createAbstractFileSelectionWizardPage();
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.wizard.Wizard#performFinish()
+ */
+ @Override
+ public boolean performFinish() {
+ xsdElement = this.page.getReturnValue();
+ return true;
+ }
+
+ public Object getReturnData() {
+ return xsdElement;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.ui.IStructuredDataCreationWizard#
+ * getStructuredDataSourcePath()
+ */
+ public String getStructuredDataSourcePath() {
+ return page.getFilePath();
+ }
+
+ public void init(IEditorSite site, IEditorInput input) {
+
+ }
+
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ this.workbench = workbench;
+ this.selection = selection;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractStructuredDdataWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractXMLObject.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractXMLObject.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractXMLObject.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,142 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.beans.PropertyChangeListener;
+import java.beans.PropertyChangeSupport;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.dom4j.Element;
+import org.dom4j.QName;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 25, 2008
+ */
+public class AbstractXMLObject implements IXMLStructuredObject{
+
+ protected PropertyChangeSupport support = new PropertyChangeSupport(this);
+
+ protected Element referenceElement = null;
+
+ protected boolean canEdit = false;
+
+ public boolean isCanEdit() {
+ return canEdit;
+ }
+
+ public boolean isAttribute(){
+ return false;
+ }
+
+ public void setCanEdit(boolean canEdit) {
+ this.canEdit = canEdit;
+ }
+
+ protected AbstractXMLObject parent;
+
+ protected String name;
+
+ public String getNamespaceURL() {
+ return namespaceURL;
+ }
+
+ public void setNamespaceURL(String namespaceURL) {
+ this.namespaceURL = namespaceURL;
+ }
+
+ protected String namespaceURL = null;
+
+ protected List<AbstractXMLObject> children = new ArrayList<AbstractXMLObject>();
+
+ public String getName() {
+ return name;
+ }
+
+ public PropertyChangeListener[] getPropertyChangeListeners(){
+ return support.getPropertyChangeListeners();
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ Element element = this.getReferenceElement();
+ if(element != null){
+ element.setQName(new QName(name,element.getNamespace()));
+ }
+ }
+
+ public List<AbstractXMLObject> getXMLNodeChildren() {
+ return children;
+ }
+
+ public void setChildren(List<AbstractXMLObject> children) {
+ this.children = children;
+ }
+
+ public Element getReferenceElement() {
+ return referenceElement;
+ }
+
+ public void setReferenceElement(Element referenceElement) {
+ this.referenceElement = referenceElement;
+ }
+
+ /**
+ * @return the parent
+ */
+ public AbstractXMLObject getParent() {
+ return parent;
+ }
+
+ /**
+ * @param parent the parent to set
+ */
+ public void setParent(AbstractXMLObject parent) {
+ this.parent = parent;
+ }
+
+ public void addNodePropetyChangeListener(PropertyChangeListener listener) {
+ support.addPropertyChangeListener(listener);
+ }
+
+ public void removeNodePropetyChangeListener(PropertyChangeListener listener) {
+ support.removePropertyChangeListener(listener);
+ }
+
+ public void cleanAllNodePropertyChangeListeners() {
+ PropertyChangeListener[] ps = support.getPropertyChangeListeners();
+ for (int i = 0; i < ps.length; i++) {
+ PropertyChangeListener p = ps[i];
+ support.removePropertyChangeListener(p);
+ }
+ }
+
+ public List<IXMLStructuredObject> getChildren() {
+ List children = getXMLNodeChildren();
+ return children;
+ }
+
+ public Object getID() {
+ return getName();
+ }
+
+ public String getNodeName() {
+ return getName();
+ }
+
+ public boolean isRootNode() {
+ return false;
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/AbstractXMLObject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagList.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagList.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagList.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 26, 2008
+ */
+public class TagList extends AbstractXMLObject {
+ List<TagObject> rootTagList = new ArrayList<TagObject>();
+
+ private Object id = new Object();
+
+// public TagObject getRootTag() {
+// return rootTag;
+// }
+
+ public List<TagObject> getRootTagList() {
+ return rootTagList;
+ }
+
+
+
+ @Override
+ public List<IXMLStructuredObject> getChildren() {
+ List tags = getRootTagList();
+ return tags;
+ }
+
+
+
+ @Override
+ public Object getID() {
+ return id;
+ }
+
+
+
+ @Override
+ public String getName() {
+ return "";
+ }
+
+
+
+ public void removeRootTag(TagObject rootTag){
+ rootTagList.remove(rootTag);
+ if(rootTag != null) rootTag.setParent(null);
+ }
+
+ public void addRootTag(TagObject rootTag) {
+ rootTagList.add(rootTag);
+ if(rootTag != null) rootTag.setParent(this);
+ }
+
+ public String toString(){
+// if(rootTag != null)
+// return "Document : " + getName() + "\n" + getRootTag().toString();
+
+ return "Docuement Object : " +getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.xml.model.AbstractXMLObject#getParent()
+ */
+ @Override
+ public AbstractXMLObject getParent() {
+ return null;
+ }
+
+
+
+ @Override
+ public boolean isRootNode() {
+ return true;
+ }
+
+
+
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagList.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagObject.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagObject.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagObject.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 25, 2008
+ */
+public class TagObject extends AbstractXMLObject {
+ protected List<TagPropertyObject> properties = new ArrayList<TagPropertyObject>();
+
+ public List<TagPropertyObject> getProperties() {
+ return properties;
+ }
+
+ public void setProperties(List<TagPropertyObject> properties) {
+ this.properties = properties;
+ }
+
+ public void addProperty(TagPropertyObject pro) {
+ this.getProperties().add(pro);
+ if (pro != null)
+ pro.setParent(this);
+ }
+
+ public void removeProperty(TagPropertyObject pro) {
+ this.getProperties().remove(pro);
+ if (pro != null)
+ pro.setParent(null);
+ }
+
+ public void addChildTag(TagObject tag) {
+ this.getXMLNodeChildren().add(tag);
+ if (tag != null)
+ tag.setParent(this);
+ }
+
+ public void removeChildTag(TagObject tag) {
+ this.getXMLNodeChildren().remove(tag);
+ if (tag != null)
+ tag.setParent(null);
+ }
+
+ @Override
+ public List<IXMLStructuredObject> getChildren() {
+ List all = new ArrayList();
+ List tags = this.getXMLNodeChildren();
+ List properties = this.getProperties();
+ all.addAll(properties);
+ all.addAll(tags);
+ return all;
+ }
+
+ public String toString() {
+ StringBuffer buffer = new StringBuffer(getName());
+ buffer.append("\n");
+ for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
+ TagPropertyObject pro = (TagPropertyObject) iterator.next();
+ buffer.append("\t");
+ buffer.append(pro.getName());
+ buffer.append("\n");
+ }
+
+ List l = getXMLNodeChildren();
+ for (Iterator iterator = l.iterator(); iterator.hasNext();) {
+ TagObject tag = (TagObject) iterator.next();
+ buffer.append("\t");
+ buffer.append(tag.toString());
+ buffer.append("\n");
+ }
+ return buffer.toString();
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagObject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagPropertyObject.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagPropertyObject.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagPropertyObject.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 25, 2008
+ */
+public class TagPropertyObject extends AbstractXMLObject {
+
+ protected String type = "string";
+
+ protected String value = null;
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+
+
+ @Override
+ public boolean isAttribute() {
+ return true;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @Override
+ public Object getID() {
+ return "@" + super.getID();
+ }
+
+ @Override
+ public List<AbstractXMLObject> getXMLNodeChildren() {
+ return Collections.EMPTY_LIST;
+ }
+ @Override
+ public void setChildren(List<AbstractXMLObject> children) {
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/TagPropertyObject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLObjectAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLObjectAnalyzer.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLObjectAnalyzer.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+import java.util.Iterator;
+import java.util.List;
+
+import org.dom4j.Attribute;
+import org.dom4j.Document;
+import org.dom4j.DocumentException;
+import org.dom4j.Element;
+import org.dom4j.io.SAXReader;
+
+/**
+ * @author Dart Peng
+ * @Date Jul 25, 2008
+ */
+public class XMLObjectAnalyzer {
+ public TagList analyze(String xmlFilePath,String[] ignoreNodeNames)
+ throws FileNotFoundException, DocumentException {
+ FileInputStream stream = new FileInputStream(xmlFilePath);
+ return this.analyze(stream,ignoreNodeNames);
+ }
+
+ public TagList analyze(InputStream stream , String[] ignoreNodeNames) throws DocumentException {
+ SAXReader reader = new SAXReader();
+ Document doc = reader.read(stream);
+ Element rootElement = doc.getRootElement();
+ TagList dco = new TagList();
+ dco.setName("Docuement");
+ dco.addRootTag( parseElement(rootElement, null , ignoreNodeNames));
+ return dco;
+ }
+
+ public TagObject analyzeFregment(InputStream stream,String[] ignoreNodeNames) throws DocumentException {
+ SAXReader reader = new SAXReader();
+ Document doc = reader.read(stream);
+ Element rootElement = doc.getRootElement();
+ return parseElement(rootElement, null ,ignoreNodeNames);
+ }
+
+ protected TagObject getChildTagByName(String name, TagObject tag , String[] ignoreNodeNames) {
+ if(isIgnoreNode(name, ignoreNodeNames)) return null;
+ if (tag == null)
+ return null;
+ List<?> list = tag.getXMLNodeChildren();
+ for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ TagObject tagc = (TagObject) iterator.next();
+ if (tagc.getName().equals(name))
+ return tagc;
+ }
+ return null;
+ }
+
+ private boolean isIgnoreNode(Element element , String[] ignoreNodeNames){
+ return isIgnoreNode(element.getName(), ignoreNodeNames);
+ }
+
+// private boolean isIgnoreNode(TagObject element , String[] ignoreNodeNames){
+// return isIgnoreNode(element.getName(), ignoreNodeNames);
+// }
+
+ private boolean isIgnoreNode(String name , String[] ignoreNodeNames){
+ if(ignoreNodeNames == null) return false;
+ for (int i = 0; i < ignoreNodeNames.length; i++) {
+ String ignore = ignoreNodeNames[i];
+ if(ignore.trim().equalsIgnoreCase(name)) return true;
+ }
+ return false;
+ }
+
+ protected TagObject parseElement(Element element, TagObject parentTag , String[] ignoreNodeNames) {
+
+ if(isIgnoreNode(element, ignoreNodeNames))
+ return null;
+ boolean canAdd = false;
+ TagObject tag = getChildTagByName(element.getName(), parentTag , ignoreNodeNames);
+ if (tag == null) {
+ tag = new TagObject();
+ canAdd = true;
+ }
+ tag.setReferenceElement(element);
+ tag.setName(element.getName());
+ fillProperties(element, tag ,ignoreNodeNames);
+ tag.setNamespaceURL(element.getNamespaceURI());
+ List<?> list = element.elements();
+ for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
+ Element childElement = (Element) iterator.next();
+ TagObject t = parseElement(childElement, tag , ignoreNodeNames);
+ if (t != null){
+ t.setReferenceElement(childElement);
+ tag.addChildTag(t);
+ }
+ }
+ if (canAdd)
+ return tag;
+ else
+ return null;
+ }
+
+ protected boolean hasSameNameProperty(String proName, TagObject tag) {
+ List<TagPropertyObject> pros = tag.getProperties();
+ for (Iterator<TagPropertyObject> iterator = pros.iterator(); iterator.hasNext();) {
+ TagPropertyObject tp = (TagPropertyObject) iterator.next();
+ if (tp.getName().equals(proName))
+ return true;
+ }
+ return false;
+ }
+
+ protected void fillProperties(Element element, TagObject tag , String[] ignoreNodeNames) {
+ Iterator<?> it = element.attributeIterator();
+ for (Iterator<?> iterator = it; iterator.hasNext();) {
+ Attribute attr = (Attribute) iterator.next();
+ String attrName = attr.getName();
+ String value = attr.getValue();
+ if(isIgnoreNode(attrName, ignoreNodeNames)) continue;
+ if (hasSameNameProperty(attrName, tag)) {
+ continue;
+ }
+ TagPropertyObject pro = new TagPropertyObject();
+ pro.setName(attr.getName());
+ pro.setValue(value);
+ pro.setNamespaceURL(attr.getNamespaceURI());
+ tag.addProperty(pro);
+ }
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLObjectAnalyzer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataContentProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataContentProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataContentProvider.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 18, 2008
+ */
+public class XMLStructuredDataContentProvider implements ITreeContentProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
+ */
+ public Object[] getChildren(Object obj) {
+ // for AbstractXMLObject (come from xml file fragment)
+ if(obj instanceof TagList){
+ return ((TagList)obj).getRootTagList().toArray();
+ }
+
+ if(obj instanceof TagObject){
+ List c = new ArrayList();
+ List pros = ((TagObject)obj).getProperties();
+ c.addAll(pros);
+ c.addAll(((TagObject)obj).getXMLNodeChildren());
+
+ return c.toArray();
+ }
+ return new Object[] {};
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object )
+ */
+ public Object getParent(Object arg0) {
+ if(arg0 instanceof AbstractXMLObject){
+ return ((AbstractXMLObject)arg0).getParent();
+ }
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.
+ * Object)
+ */
+ public boolean hasChildren(Object obj) {
+
+ // for AbstractXMLObject (come from xml file fragment)
+ if(obj instanceof TagList){
+ return true;
+ }
+ if(obj instanceof TagObject){
+ List pros = ((TagObject)obj).getProperties();
+ List c = (((TagObject)obj).getXMLNodeChildren());
+ return !pros.isEmpty() || !c.isEmpty();
+ }
+ return false;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java
+ * .lang.Object)
+ */
+ public Object[] getElements(Object arg0) {
+ if(arg0 instanceof TagList){
+ return ((TagList)arg0).getRootTagList().toArray();
+ }
+ return new Object[] {};
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+ */
+ public void dispose() {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface
+ * .viewers.Viewer, java.lang.Object, java.lang.Object)
+ */
+ public void inputChanged(Viewer arg0, Object arg1, Object arg2) {
+
+ }
+
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataContentProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataLabelProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataLabelProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataLabelProvider.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 18, 2008
+ */
+public class XMLStructuredDataLabelProvider extends LabelProvider {
+
+ public Image getXmlElementImage() {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_XML_ELEMENT);
+
+ }
+
+ public Image getXmlAttributeImage() {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_XML_ATTRIBUTE);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof TagObject) {
+ return getXmlElementImage();
+ }
+ if (element instanceof TagPropertyObject) {
+ return getXmlAttributeImage();
+ }
+ return super.getImage(element);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof TagList) {
+ return "Root";
+ }
+ if (element instanceof AbstractXMLObject) {
+ return ((AbstractXMLObject) element).getName();
+ }
+ return "";
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataLabelProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizard.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizard.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+import java.util.Properties;
+
+import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
+
+/**
+ * @author Dart Peng
+ * @Date Aug 18, 2008
+ */
+public class XMLStructuredDataWizard extends AbstractStructuredDdataWizard {
+
+
+ Properties properties = new Properties();
+ String filePath = null;
+
+ public static final String XML_FILE = "xmlFile";
+
+ @Override
+ protected AbstractFileSelectionWizardPage createAbstractFileSelectionWizardPage() {
+ return new XMLStructuredDataWizardPage("XML");
+ }
+
+ public boolean performFinish() {
+ filePath = page.getFilePath();
+// properties.put(XML_FILE, filePath);
+ return super.performFinish();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard#getInputDataTypeID()
+ */
+ public String getInputDataTypeID() {
+ return SmooksModelUtils.INPUT_TYPE_XML;
+ }
+
+ public Properties getProperties() {
+ return properties;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizard.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java 2009-04-12 17:57:11 UTC (rev 14696)
@@ -0,0 +1,35 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.configuration.editors.xml;
+
+/**
+ * @author Dart Peng Date : 2008-8-16
+ */
+public class XMLStructuredDataWizardPage extends AbstractFileSelectionWizardPage {
+
+ public XMLStructuredDataWizardPage(String pageName) {
+ super(pageName);
+ setPageText();
+ }
+
+ private void setPageText() {
+ this.setTitle("XML File"); //$NON-NLS-1$
+ this.setDescription("Select XML File"); //$NON-NLS-1$
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.xml.ui.AbstractFileSelectionWizardPage#loadedTheObject
+ * (java.lang.String)
+ */
+ @Override
+ protected Object loadedTheObject(String path) throws Exception {
+ XMLObjectAnalyzer analyzer = new XMLObjectAnalyzer();
+ TagList doc = analyzer.analyze(path, null);
+ return doc;
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xml/XMLStructuredDataWizardPage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
JBoss Tools SVN: r14695 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-12 07:09:30 -0400 (Sun, 12 Apr 2009)
New Revision: 14695
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
Log:
Add new feature for smooks-configuration-editor:
1.Add input data path
2.Show editor to select input data and transform the data to "selector"
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-12 10:57:27 UTC (rev 14694)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-04-12 11:09:30 UTC (rev 14695)
@@ -16,6 +16,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
@@ -51,7 +52,7 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public Composite createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,SmooksMultiFormEditor formEdtior) {
if (feature == JavabeanPackage.eINSTANCE.getBindingsType_Class()) {
return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
}
15 years, 8 months
JBoss Tools SVN: r14694 - trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-12 06:57:27 -0400 (Sun, 12 Apr 2009)
New Revision: 14694
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF
Log:
Add new feature for smooks-configuration-editor:
1.Add input data path
2.Show editor to select input data and transform the data to "selector"
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF 2009-04-12 10:57:04 UTC (rev 14693)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF 2009-04-12 10:57:27 UTC (rev 14694)
@@ -15,7 +15,9 @@
Export-Package: org.jboss.tools.smooks.core,
org.jboss.tools.smooks.edit.common.provider,
org.jboss.tools.smooks.edit.edi.provider,
+ org.jboss.tools.smooks.edit.fileRouting.provider,
org.jboss.tools.smooks.edit.freemarker.provider,
+ org.jboss.tools.smooks.edit.groovy.provider,
org.jboss.tools.smooks.edit.javabean.provider,
org.jboss.tools.smooks.edit.smooks.provider,
org.jboss.tools.smooks.edit.xsl.provider,
@@ -25,9 +27,18 @@
org.jboss.tools.smooks.model.edi,
org.jboss.tools.smooks.model.edi.impl,
org.jboss.tools.smooks.model.edi.util,
+ org.jboss.tools.smooks.model.fileRouting,
+ org.jboss.tools.smooks.model.fileRouting.impl,
+ org.jboss.tools.smooks.model.fileRouting.util,
org.jboss.tools.smooks.model.freemarker,
org.jboss.tools.smooks.model.freemarker.impl,
org.jboss.tools.smooks.model.freemarker.util,
+ org.jboss.tools.smooks.model.graphics.ext,
+ org.jboss.tools.smooks.model.graphics.ext.impl,
+ org.jboss.tools.smooks.model.graphics.ext.util,
+ org.jboss.tools.smooks.model.groovy,
+ org.jboss.tools.smooks.model.groovy.impl,
+ org.jboss.tools.smooks.model.groovy.util,
org.jboss.tools.smooks.model.javabean,
org.jboss.tools.smooks.model.javabean.impl,
org.jboss.tools.smooks.model.javabean.util,
15 years, 8 months