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