Author: DartPeng
Date: 2009-05-14 23:56:39 -0400 (Thu, 14 May 2009)
New Revision: 15261
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java
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/PropertyUICreatorManager.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/CounterUICreator.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/groovy/GroovyUICreator.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/jms/JmsRouterUICreator.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/SmooksResourceListTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java
Log:
JBIDE-4298
change some field editor to be "selector group section"
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -20,6 +20,7 @@
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ViewerFilter;
@@ -296,6 +297,31 @@
protected List<AttributeFieldEditPart> createElementSelectionSection(String
sectionTitle,
AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
Object model,
+ SmooksMultiFormEditor formEditor, EAttribute nameAttribute, EAttribute
namespaceAttribute) {
+ IItemPropertySource itemPropertySource = (IItemPropertySource)
editingdomain.getAdapterFactory().adapt(model,
+ IItemPropertySource.class);
+ List<IItemPropertyDescriptor> propertyDes =
itemPropertySource.getPropertyDescriptors(model);
+ IItemPropertyDescriptor createOnElementFeature = null;
+ IItemPropertyDescriptor createOnElementFeatureNS = null;
+ for (Iterator<?> iterator = propertyDes.iterator(); iterator.hasNext();) {
+ IItemPropertyDescriptor itemPropertyDescriptor = (IItemPropertyDescriptor)
iterator.next();
+ if (itemPropertyDescriptor.getFeature(model) == nameAttribute) {
+ createOnElementFeature = itemPropertyDescriptor;
+ }
+ if (itemPropertyDescriptor.getFeature(model) == namespaceAttribute) {
+ createOnElementFeatureNS = itemPropertyDescriptor;
+ }
+ }
+ if (createOnElementFeature == null || createOnElementFeatureNS == null) {
+ return Collections.emptyList();
+ }
+
+ return createElementSelectionSection(sectionTitle, editingdomain, toolkit, parent,
model, formEditor,
+ createOnElementFeature, createOnElementFeatureNS);
+ }
+
+ protected List<AttributeFieldEditPart> createElementSelectionSection(String
sectionTitle,
+ AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
Object model,
SmooksMultiFormEditor formEditor, IItemPropertyDescriptor createOnElementFeature,
IItemPropertyDescriptor createOnElementFeatureNS) {
Section section = toolkit.createSection(parent, Section.TITLE_BAR);
@@ -319,12 +345,19 @@
GridLayout glayout = new GridLayout();
glayout.numColumns = 2;
container.setLayout(glayout);
-
- AttributeFieldEditPart editPart1 =
SmooksUIUtils.createSelectorFieldEditor("Name", toolkit, container,
+ String name = "Name";
+ if (((EAttribute) createOnElementFeature.getFeature(model)).isRequired()) {
+ name += "*";
+ }
+ AttributeFieldEditPart editPart1 = SmooksUIUtils.createSelectorFieldEditor(name,
toolkit, container,
createOnElementFeature, model, formEditor.getSmooksGraphicsExt());
editPart1.setAttribute(createOnElementFeature.getFeature(model));
- AttributeFieldEditPart editPart2 =
SmooksUIUtils.createStringFieldEditor("Namespace", container, editingdomain,
+ String namespace = "Namespace";
+ if (((EAttribute) createOnElementFeatureNS.getFeature(model)).isRequired()) {
+ namespace += "*";
+ }
+ AttributeFieldEditPart editPart2 = SmooksUIUtils.createStringFieldEditor(namespace,
container, editingdomain,
toolkit, createOnElementFeatureNS, model, false, false, false, 0, null,
SmooksUIUtils.VALUE_TYPE_VALUE,
null);
editPart2.setAttribute(createOnElementFeatureNS.getFeature(model));
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -39,6 +39,7 @@
import org.jboss.tools.smooks.configuration.editors.groovy.ScriptUICreator;
import org.jboss.tools.smooks.configuration.editors.iorouting.IORouterUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.BindingsPropertyUICreator;
+import
org.jboss.tools.smooks.configuration.editors.javabean.JavabeanExpressionUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanValueUICreator;
import org.jboss.tools.smooks.configuration.editors.javabean.JavabeanWiringUICreator;
import org.jboss.tools.smooks.configuration.editors.jms.ConnectionUICreator;
@@ -86,6 +87,7 @@
import org.jboss.tools.smooks.model.groovy.impl.ScriptTypeImpl;
import org.jboss.tools.smooks.model.iorouting.impl.IORouterImpl;
import org.jboss.tools.smooks.model.javabean.impl.BindingsTypeImpl;
+import org.jboss.tools.smooks.model.javabean.impl.ExpressionTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.ValueTypeImpl;
import org.jboss.tools.smooks.model.javabean.impl.WiringTypeImpl;
import org.jboss.tools.smooks.model.jmsrouting.impl.ConnectionImpl;
@@ -149,6 +151,7 @@
map.put(BindingsTypeImpl.class, new BindingsPropertyUICreator());
map.put(ValueTypeImpl.class, new JavabeanValueUICreator());
map.put(WiringTypeImpl.class, new JavabeanWiringUICreator());
+ map.put(ExpressionTypeImpl.class,new JavabeanExpressionUICreator());
// for smooks models
map.put(ConditionTypeImpl.class, new ConditionTypeUICreator());
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/CounterUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/CounterUICreator.java 2009-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/CounterUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.calc;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -33,9 +36,10 @@
* org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
* org.eclipse.emf.ecore.EAttribute)
*/
- public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model,
- EAttribute feature, SmooksMultiFormEditor formEditor) {
-
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
if (feature == CalcPackage.eINSTANCE.getCounter_StartExpression()) {
}
if (feature == CalcPackage.eINSTANCE.getCounter_AmountExpression()) {
@@ -59,12 +63,42 @@
@Override
public boolean isSelectorFeature(EAttribute attribute) {
- if (attribute == CalcPackage.eINSTANCE.getCounter_CountOnElement()) {
+ return super.isSelectorFeature(attribute);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Count On Element", editingdomain,
toolkit, parent, model, formEditor,
+ CalcPackage.Literals.COUNTER__COUNT_ON_ELEMENT,
CalcPackage.Literals.COUNTER__COUNT_ON_ELEMENT_NS);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == CalcPackage.eINSTANCE.getCounter_CountOnElement()) {
return true;
}
- return super.isSelectorFeature(attribute);
+ if (feature == CalcPackage.eINSTANCE.getCounter_CountOnElementNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
}
-
-
}
\ 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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/FreemarkerUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.freemarker;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -34,17 +37,19 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
- SmooksMultiFormEditor formEditor) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyBefore()) {
}
-// if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
-// SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
-// if (ext != null) {
-// return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent,
propertyDescriptor,
-// model, ext);
-// }
-// }
+ // if (feature ==
+ // FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
+ // SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
+ // if (ext != null) {
+ // return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent,
+ // propertyDescriptor,
+ // model, ext);
+ // }
+ // }
if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElementNS()) {
}
@@ -58,7 +63,41 @@
}
return super.isSelectorFeature(attribute);
}
-
-
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Apply On Element", editingdomain,
toolkit, parent, model, formEditor,
+ FreemarkerPackage.Literals.FREEMARKER__APPLY_ON_ELEMENT,
+ FreemarkerPackage.Literals.FREEMARKER__APPLY_ON_ELEMENT_NS);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElement()) {
+ return true;
+ }
+ if (feature == FreemarkerPackage.eINSTANCE.getFreemarker_ApplyOnElementNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
}
\ 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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/groovy/GroovyUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.groovy;
-import java.util.Collections;
import java.util.List;
import org.eclipse.emf.ecore.EAttribute;
@@ -38,20 +37,16 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
- SmooksMultiFormEditor formEditor) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == GroovyPackage.eINSTANCE.getGroovy_Imports()) {
}
if (feature == GroovyPackage.eINSTANCE.getGroovy_Script()) {
}
if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteBefore()) {
}
- if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElementNS()) {
- }
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
}
-
-
@Override
public boolean isSelectorFeature(EAttribute attribute) {
@@ -61,17 +56,24 @@
return super.isSelectorFeature(attribute);
}
-
-
@Override
public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
- Composite parent, Object model, SmooksMultiFormEditor formEditor) {
- return Collections.emptyList();
-// SmooksUIUtils.createCommentFieldEditor("Script Contents",editingdomain,
toolkit, parent, model);
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Execute On Element", editingdomain,
toolkit, parent, model, formEditor,
+ GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElement(), GroovyPackage.eINSTANCE
+ .getGroovy_ExecuteOnElementNS());
+ // SmooksUIUtils.createCommentFieldEditor("Script Contents",editingdomain,
+ // toolkit, parent, model);
}
@Override
public boolean ignoreProperty(EAttribute feature) {
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElement()) {
+ return true;
+ }
+ if (feature == GroovyPackage.eINSTANCE.getGroovy_ExecuteOnElementNS()) {
+ return true;
+ }
return super.ignoreProperty(feature);
}
}
\ No newline at end of file
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/BindingsPropertyUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,8 +10,11 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.List;
+
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.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -46,6 +49,24 @@
/*
* (non-Javadoc)
*
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == JavabeanPackage.eINSTANCE.getBindingsType_CreateOnElement()) {
+ return true;
+ }
+ if (feature == JavabeanPackage.eINSTANCE.getBindingsType_CreateOnElementNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @seeorg.jboss.tools.smooks.configuration.editors.IPropertyUICreator#
* createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
* org.eclipse.swt.widgets.Composite,
@@ -53,25 +74,39 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute
feature,SmooksMultiFormEditor formEditor) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == JavabeanPackage.eINSTANCE.getBindingsType_Class()) {
return createBeanClassTextWithButton(parent, toolkit, propertyDescriptor, model);
}
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
}
-
-
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
@Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Create On Element", editingdomain,
toolkit, parent, model, formEditor,
+ JavabeanPackage.Literals.BINDINGS_TYPE__CREATE_ON_ELEMENT,
+ JavabeanPackage.Literals.BINDINGS_TYPE__CREATE_ON_ELEMENT_NS);
+ }
+
+ @Override
public boolean isSelectorFeature(EAttribute attribute) {
- if(attribute == JavabeanPackage.eINSTANCE.getBindingsType_CreateOnElement()){
- return true;
- }
return super.isSelectorFeature(attribute);
}
protected AttributeFieldEditPart createBeanClassTextWithButton(Composite composite,
FormToolkit toolkit,
final IItemPropertyDescriptor propertyDescriptor, final Object model) {
- return SmooksUIUtils.createJavaTypeSearchFieldEditor(composite, toolkit,
propertyDescriptor, (EObject)model);
+ return SmooksUIUtils.createJavaTypeSearchFieldEditor(composite, toolkit,
propertyDescriptor, (EObject) model);
}
}
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java
(rev 0)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.javabean;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.jboss.tools.smooks.configuration.actions.OpenEditorEditInnerContentsAction;
+import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
+import org.jboss.tools.smooks.configuration.editors.IPropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
+import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
+import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class JavabeanExpressionUICreator extends PropertyUICreator implements
IPropertyUICreator {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ List<AttributeFieldEditPart> list = createElementSelectionSection("Execute
On Element", editingdomain, toolkit,
+ parent, model, formEditor,
JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT,
+ JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS);
+
+ OpenEditorEditInnerContentsAction openCDATAEditorAction = new
OpenEditorEditInnerContentsAction(editingdomain,
+ (AnyType) model, SmooksUIUtils.VALUE_TYPE_TEXT, "txt");
+
+ AttributeFieldEditPart cdatatext =
SmooksUIUtils.createStringFieldEditor("Expression", parent, editingdomain,
+ toolkit, null, model, true, false, false, 300, null, SmooksUIUtils.VALUE_TYPE_TEXT,
+ openCDATAEditorAction);
+
+ if(cdatatext != null){
+ list.add(cdatatext);
+ }
+ openCDATAEditorAction.setRelateText((Text)cdatatext.getContentControl());
+
+ return list;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT) {
+ return true;
+ }
+ if (feature == JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS) {
+ return true;
+ }
+ if (feature == JavabeanPackage.Literals.EXPRESSION_TYPE__VALUE) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.PropertyUICreator#
+ * createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
+ }
+
+}
Property changes on:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanValueUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -18,7 +21,6 @@
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
-
/**
* @author Dart (dpeng(a)redhat.com)
* <p>
@@ -28,7 +30,7 @@
@Override
protected boolean canCreatePropertiesSearchFieldEditor(EAttribute feature) {
- if(feature == JavabeanPackage.eINSTANCE.getValueType_Property()){
+ if (feature == JavabeanPackage.eINSTANCE.getValueType_Property()) {
return true;
}
return false;
@@ -36,14 +38,22 @@
@Override
protected boolean canCreateMethodsSearchFieldEditor(EAttribute feature) {
- if(feature == JavabeanPackage.eINSTANCE.getValueType_SetterMethod()){
+ if (feature == JavabeanPackage.eINSTANCE.getValueType_SetterMethod()) {
return true;
}
return super.canCreateMethodsSearchFieldEditor(feature);
}
- /* (non-Javadoc)
- * @see
org.jboss.tools.smooks.configuration.editors.javabean.PropertiesAndSetterMethodSearchFieldEditorCreator#createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
org.eclipse.swt.widgets.Composite, org.eclipse.emf.edit.provider.IItemPropertyDescriptor,
java.lang.Object, org.eclipse.emf.ecore.EAttribute,
org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ /*
+ * (non-Javadoc)
+ *
+ * @seeorg.jboss.tools.smooks.configuration.editors.javabean.
+ * PropertiesAndSetterMethodSearchFieldEditorCreator
+ * #createPropertyUI(org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite,
+ * org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
+ * org.eclipse.emf.ecore.EAttribute,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
*/
@Override
public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
@@ -52,14 +62,44 @@
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
@Override
- public boolean isSelectorFeature(EAttribute attribute) {
- if(attribute == JavabeanPackage.eINSTANCE.getValueType_Data()){
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Data", editingdomain, toolkit, parent,
model, formEditor,
+ JavabeanPackage.eINSTANCE.getValueType_Data(),
JavabeanPackage.eINSTANCE.getValueType_DataNS());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == JavabeanPackage.eINSTANCE.getValueType_Data()) {
return true;
}
+ if (feature == JavabeanPackage.eINSTANCE.getValueType_DataNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -38,12 +41,46 @@
}
return super.canCreateMethodsSearchFieldEditor(feature);
}
-
-
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
@Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == JavabeanPackage.eINSTANCE.getWiringType_WireOnElement()) {
+ return true;
+ }
+ if (feature == JavabeanPackage.eINSTANCE.getWiringType_WireOnElementNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Wrie On Element", editingdomain,
toolkit, parent, model, formEditor,
+ JavabeanPackage.eINSTANCE.getWiringType_WireOnElement(),
+ JavabeanPackage.Literals.WIRING_TYPE__WIRE_ON_ELEMENT_NS);
+ }
+
+ @Override
public boolean isBeanIDRefFieldFeature(EAttribute attribute) {
- if(attribute == JavabeanPackage.eINSTANCE.getWiringType_BeanIdRef()){
+ if (attribute == JavabeanPackage.eINSTANCE.getWiringType_BeanIdRef()) {
return true;
}
return super.isBeanIDRefFieldFeature(attribute);
@@ -51,17 +88,13 @@
@Override
public boolean isSelectorFeature(EAttribute attribute) {
- if(attribute == JavabeanPackage.eINSTANCE.getWiringType_WireOnElement()){
- return true;
- }
return super.isSelectorFeature(attribute);
}
@Override
public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
- SmooksMultiFormEditor formEditor) {
- return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
- formEditor);
+ 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/jms/JmsRouterUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/jms/JmsRouterUICreator.java 2009-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/jms/JmsRouterUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.jms;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -33,9 +36,10 @@
* org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
* org.eclipse.emf.ecore.EAttribute)
*/
- public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model,
- EAttribute feature, SmooksMultiFormEditor formEditor) {
-
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
+
if (feature == JmsroutingPackage.eINSTANCE.getJmsRouter_BeanId()) {
}
if (feature == JmsroutingPackage.eINSTANCE.getJmsRouter_Destination()) {
@@ -50,4 +54,40 @@
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Route On Element", editingdomain,
toolkit, parent, model, formEditor,
+ JmsroutingPackage.eINSTANCE.getJmsRouter_RouteOnElement(),
JmsroutingPackage.eINSTANCE
+ .getJmsRouter_RouteOnElementNS());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == JmsroutingPackage.eINSTANCE.getJmsRouter_RouteOnElement()) {
+ return true;
+ }
+ if (feature == JmsroutingPackage.eINSTANCE.getJmsRouter_RouteOnElementNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
}
\ No newline at end of file
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ResourceConfigTypeUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.smooks;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -41,8 +44,7 @@
if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_Selector()) {
SmooksGraphicsExtType ext = formEditor.getSmooksGraphicsExt();
if (ext != null) {
- return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
model,
- ext);
+ return SmooksUIUtils.createSelectorFieldEditor(toolkit, parent, propertyDescriptor,
model, ext);
}
}
if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_SelectorNamespace()) {
@@ -60,4 +62,40 @@
return super.isSelectorFeature(attribute);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Selector", editingdomain, toolkit,
parent, model, formEditor,
+ SmooksPackage.eINSTANCE.getResourceConfigType_Selector(), SmooksPackage.eINSTANCE
+ .getResourceConfigType_SelectorNamespace());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_Selector()) {
+ return true;
+ }
+ if (feature == SmooksPackage.eINSTANCE.getResourceConfigType_SelectorNamespace()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
}
\ No newline at end of file
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/SmooksResourceListTypeUICreator.java
===================================================================
---
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/SmooksResourceListTypeUICreator.java 2009-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/SmooksResourceListTypeUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.smooks;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -33,8 +36,9 @@
* org.eclipse.emf.edit.provider.IItemPropertyDescriptor, java.lang.Object,
* org.eclipse.emf.ecore.EAttribute)
*/
- public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
IItemPropertyDescriptor propertyDescriptor, Object model,
- EAttribute feature, SmooksMultiFormEditor formEditor) {
+ public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_AbstractReaderGroup())
{
}
if (feature ==
SmooksPackage.eINSTANCE.getSmooksResourceListType_AbstractResourceConfigGroup()) {
@@ -48,11 +52,45 @@
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
@Override
- public boolean isSelectorFeature(EAttribute attribute) {
- if (attribute == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelector())
{
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+
+ return createElementSelectionSection("Default Selector", editingdomain,
toolkit, parent, model, formEditor,
+ SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelector(),
SmooksPackage.eINSTANCE
+ .getSmooksResourceListType_DefaultSelectorNamespace());
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelector()) {
return true;
}
+ if (feature ==
SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelectorNamespace()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
+ }
+
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
return super.isSelectorFeature(attribute);
}
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-05-15
01:06:00 UTC (rev 15260)
+++
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/XslUICreator.java 2009-05-15
03:56:39 UTC (rev 15261)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.xsl;
+import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;
@@ -34,23 +37,54 @@
* org.eclipse.emf.ecore.EAttribute)
*/
public AttributeFieldEditPart createPropertyUI(FormToolkit toolkit, Composite parent,
- IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
- SmooksMultiFormEditor formEditor) {
+ IItemPropertyDescriptor propertyDescriptor, Object model, EAttribute feature,
+ SmooksMultiFormEditor formEditor) {
if (feature == XslPackage.eINSTANCE.getXsl_ApplyBefore()) {
}
if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElementNS()) {
}
- return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
- formEditor);
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature,
formEditor);
}
@Override
public boolean isSelectorFeature(EAttribute attribute) {
- if (attribute == XslPackage.eINSTANCE.getXsl_ApplyOnElement()) {
+ return super.isSelectorFeature(attribute);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#createExtendUI
+ * (org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain,
+ * org.eclipse.ui.forms.widgets.FormToolkit,
+ * org.eclipse.swt.widgets.Composite, java.lang.Object,
+ * org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
+ */
+ @Override
+ public List<AttributeFieldEditPart> createExtendUI(AdapterFactoryEditingDomain
editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ return createElementSelectionSection("Apply On Element", editingdomain,
toolkit, parent, model, formEditor,
+ XslPackage.Literals.XSL__APPLY_ON_ELEMENT,
XslPackage.Literals.XSL__APPLY_ON_ELEMENT_NS);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.editors.PropertyUICreator#ignoreProperty
+ * (org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ public boolean ignoreProperty(EAttribute feature) {
+ if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElement()) {
return true;
}
- return super.isSelectorFeature(attribute);
+ if (feature == XslPackage.eINSTANCE.getXsl_ApplyOnElementNS()) {
+ return true;
+ }
+ return super.ignoreProperty(feature);
}
}
\ No newline at end of file