JBoss Tools SVN: r14763 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-15 14:20:58 -0400 (Wed, 15 Apr 2009)
New Revision: 14763
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
Log:
JBIDE-4171
Fix a problem : can't use ctrl+v/ctrl+c/ctrl+x on text box
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-15 18:05:05 UTC (rev 14762)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-04-15 18:20:58 UTC (rev 14763)
@@ -15,10 +15,14 @@
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.ui.action.ControlAction;
+import org.eclipse.emf.edit.ui.action.CopyAction;
import org.eclipse.emf.edit.ui.action.CreateChildAction;
import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
+import org.eclipse.emf.edit.ui.action.CutAction;
import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
-import org.eclipse.emf.edit.ui.action.LoadResourceAction;
+import org.eclipse.emf.edit.ui.action.PasteAction;
+import org.eclipse.emf.edit.ui.action.RedoAction;
+import org.eclipse.emf.edit.ui.action.UndoAction;
import org.eclipse.emf.edit.ui.action.ValidateAction;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
@@ -37,8 +41,15 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Widget;
+import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
/**
@@ -239,7 +250,74 @@
}
}
}
+
+
+ @Override
+ public void init(IActionBars actionBars) {
+ super.init(actionBars);
+ ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+ cutAction = new CutAction(){
+
+ public void runWithEvent(Event event) {
+ Widget widget = event.widget;
+ if(widget instanceof Text){
+ ((Text)widget).cut();
+ return;
+ }
+ super.runWithEvent(event);
+ }
+
+ };
+ cutAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT));
+ actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), cutAction);
+
+ copyAction = new CopyAction(){
+
+ public void runWithEvent(Event event) {
+ Widget widget = event.widget;
+ if(widget instanceof Text){
+ ((Text)widget).copy();
+ return;
+ }
+ super.runWithEvent(event);
+ }
+
+ };
+ copyAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY));
+ actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
+
+ pasteAction = new PasteAction(){
+
+ public void runWithEvent(Event event) {
+ Widget widget = event.widget;
+ if(widget instanceof Text){
+ ((Text)widget).paste();
+ return;
+ }
+ super.runWithEvent(event);
+ }
+
+ @Override
+ public boolean updateSelection(IStructuredSelection selection) {
+ super.updateSelection(selection);
+ return true;
+ }
+
+
+ };
+ pasteAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
+ actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
+
+ undoAction = new UndoAction();
+ undoAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO));
+ actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), undoAction);
+
+ redoAction = new RedoAction();
+ redoAction.setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO));
+ actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), redoAction);
+ }
+
/**
* This implements
* {@link org.eclipse.jface.viewers.ISelectionChangedListener}, handling
15 years, 8 months
JBoss Tools SVN: r14762 - in trunk/seam/tests/org.jboss.tools.seam.core.test: src/org/jboss/tools/seam/core/test/refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-04-15 14:05:05 -0400 (Wed, 15 Apr 2009)
New Revision: 14762
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamPropertyRefactoringTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4123 Migration to Eclipse 3.5
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-04-15 17:19:41 UTC (rev 14761)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-04-15 18:05:05 UTC (rev 14762)
@@ -29,12 +29,11 @@
org.eclipse.ltk.core.refactoring,
org.eclipse.ltk.ui.refactoring,
org.eclipse.jdt.core,
- org.eclipse.jdt.ui,
org.eclipse.ui.ide,
org.eclipse.jface,
org.eclipse.jdt.core.manipulation,
org.eclipse.jst.jsf.core,
org.eclipse.wst.validation,
- org.eclipse.jdt.launching
-Provide-Package: org.jboss.tools.seam.core.test
+ org.eclipse.jdt.launching,
+ org.eclipse.jdt.ui
Bundle-Localization: plugin
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamPropertyRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamPropertyRefactoringTest.java 2009-04-15 17:19:41 UTC (rev 14761)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamPropertyRefactoringTest.java 2009-04-15 18:05:05 UTC (rev 14762)
@@ -38,8 +38,8 @@
import org.eclipse.jdt.internal.corext.refactoring.reorg.IReorgPolicy.IMovePolicy;
import org.eclipse.jdt.internal.corext.refactoring.tagging.ITextUpdating;
import org.eclipse.jdt.internal.ui.refactoring.RefactoringExecutionHelper;
-import org.eclipse.jdt.internal.ui.refactoring.RefactoringSaveHelper;
import org.eclipse.jdt.internal.ui.refactoring.reorg.RenameSelectionState;
+import org.eclipse.jdt.ui.refactoring.RefactoringSaveHelper;
import org.eclipse.jdt.ui.refactoring.RenameSupport;
import org.eclipse.ltk.core.refactoring.RefactoringCore;
import org.eclipse.ltk.core.refactoring.participants.MoveRefactoring;
15 years, 8 months
JBoss Tools SVN: r14761 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-04-15 13:19:41 -0400 (Wed, 15 Apr 2009)
New Revision: 14761
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
property names in seam.properties. E.g. <oldName>.property1 = ... -> <newName>.property1 = ...
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-04-15 16:59:30 UTC (rev 14760)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-04-15 17:19:41 UTC (rev 14761)
@@ -13,6 +13,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.Set;
+import java.util.StringTokenizer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
@@ -357,6 +358,39 @@
private void scanProperties(IFile file, String content){
scanString(file, content, 0);
+ StringTokenizer tokenizer = new StringTokenizer(content, "= \t\r\n\f", true);
+
+ String lastToken = "\n";
+ int offset = 0;
+ boolean comment = false;
+ boolean key = true;
+
+ while(tokenizer.hasMoreTokens()){
+ String token = tokenizer.nextToken(".#= \t\r\n\f");//$NON-NLS-1$
+ if(token.equals("\r"))
+ token = "\n";
+
+ if(token.equals("#") && lastToken.equals("\n"))
+ comment = true;
+ else if(token.equals("\n") && comment)
+ comment = false;
+
+ if(!comment){
+ if(!token.equals("\n") && lastToken.equals("\n"))
+ key = true;
+ else if(key && (token.equals("=") || token.equals(" ")))
+ key = false;
+
+ if(key && token.equals(component.getName())){
+ checkLastChange(file);
+ TextEdit edit = new ReplaceEdit(offset, token.length(), newName);
+ lastChange.addEdit(edit);
+ }
+ }
+
+ lastToken = token;
+ offset += token.length();
+ }
}
/*
15 years, 8 months
JBoss Tools SVN: r14760 - trunk/ws/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2009-04-15 12:59:30 -0400 (Wed, 15 Apr 2009)
New Revision: 14760
Modified:
trunk/ws/docs/reference/en/modules/client.xml
trunk/ws/docs/reference/en/modules/preference.xml
trunk/ws/docs/reference/en/modules/topdown.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-398 - the chapters are revised: initial and final sentences are added, some sentences are rewritten to make the flow logical.
Modified: trunk/ws/docs/reference/en/modules/client.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/client.xml 2009-04-15 14:29:32 UTC (rev 14759)
+++ trunk/ws/docs/reference/en/modules/client.xml 2009-04-15 16:59:30 UTC (rev 14760)
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="client" revisionflag="added">
<title>Creating a Web Service Client from a WSDL Document using JBoss WS</title>
- <para>To create a Web Service Client from a WSDL Document using JBoss WS:</para>
+ <para>To create a Web Service Client from a WSDL Document using JBoss WS you need to fulfil the following steps:</para>
<para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
- <para><link linkend="createproject">Creating a Dynamic Web project</link>.</para>
+ <para><link linkend="createproject">Create a Dynamic Web project</link>.</para>
<para><link linkend="addfacet">Add JBossWS Facet to Web project</link>.</para>
- <para>Create a Web Service Client from a WSDL document: </para>
+ <para>Then you can create a Web Service Client from a WSDL document: </para>
<itemizedlist>
<listitem>
<para>Switch to the Java EE perspective <emphasis><property>Window > Open Perspective > Java EE</property></emphasis>.</para>
Modified: trunk/ws/docs/reference/en/modules/preference.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/preference.xml 2009-04-15 14:29:32 UTC (rev 14759)
+++ trunk/ws/docs/reference/en/modules/preference.xml 2009-04-15 16:59:30 UTC (rev 14760)
@@ -1,7 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="preference" revisionflag="added">
<title>JBoss WS and development environment</title>
+
+ <para>In this chapter you will learn how to change JBossWS preferences and how to set default server and runtime.</para>
<section id="jbosswspreference">
+
+
<title>JBossWS Preferences</title>
<para>In this section you will know how JBossWS preferences can be modified during the
@@ -28,7 +32,7 @@
<property>Add</property>
</emphasis> or <emphasis>
<property>Edit</property>
- </emphasis> button will open the form where you can configure a new JbossWS runtime and
+ </emphasis> button will open the form where you can configure a new JBossWS runtime and
change the path to JBossWS runtime home folder, modify the name and version of the
existing JBossWS runtime settings. Press <property>Finish</property> to apply the
changes.</para>
@@ -56,7 +60,7 @@
</mediaobject>
</figure>
<para>Click on <emphasis><property>Apply</property></emphasis> and then on <emphasis><property>Ok</property></emphasis>.</para>
- <para>To change Javadoc Location choose <emphasis><property>Javadoc Location</property></emphasis> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called <emphasis><property>package-list</property></emphasis>:</para>
+ <para>To change JavaDoc Location choose <emphasis><property>Javadoc Location</property></emphasis> and specify URL to the documentation generated by Javadoc. The Javadoc location will contain a file called <emphasis><property>package-list</property></emphasis>:</para>
<figure>
<title>Classpath Container: Javadoc Location</title>
Modified: trunk/ws/docs/reference/en/modules/topdown.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/topdown.xml 2009-04-15 14:29:32 UTC (rev 14759)
+++ trunk/ws/docs/reference/en/modules/topdown.xml 2009-04-15 16:59:30 UTC (rev 14760)
@@ -193,7 +193,7 @@
</imageobject>
</mediaobject>
</figure>
-
+<para>In the next chapter you will find out how to create a Web service from a Java bean.</para>
</section>
<section id="bottomupws">
@@ -377,6 +377,8 @@
</figure>
</listitem>
</itemizedlist>
+ <para>In the next chapter you will be able to create a Web Service Client from a WSDL document using JBoss WS.</para>
+
</section>
</chapter>
15 years, 8 months
JBoss Tools SVN: r14759 - trunk/seam/docs/reference/en/images/seam_editors.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-04-15 10:29:32 -0400 (Wed, 15 Apr 2009)
New Revision: 14759
Added:
trunk/seam/docs/reference/en/images/seam_editors/seam_editors_12.png
Log:
https://jira.jboss.org/jira/browse/JBDS--518 - Content Assist for "jsfc" attribute in facelets pages now sorts proposals to have a list of available jsf components above other proposals.New picture was added to Seam Dev Tools Reference Guide.
Added: trunk/seam/docs/reference/en/images/seam_editors/seam_editors_12.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/docs/reference/en/images/seam_editors/seam_editors_12.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
15 years, 8 months
JBoss Tools SVN: r14758 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-04-15 10:27:18 -0400 (Wed, 15 Apr 2009)
New Revision: 14758
Modified:
trunk/seam/docs/reference/en/modules/seam_editors.xml
Log:
https://jira.jboss.org/jira/browse/JBDS--518 - Content Assist for "jsfc" attribute in facelets pages now sorts proposals to have a list of available jsf components above other proposals.Seam Dev Tools Reference Guide was added according to the new performance of the Content Assist.
Modified: trunk/seam/docs/reference/en/modules/seam_editors.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_editors.xml 2009-04-15 14:11:28 UTC (rev 14757)
+++ trunk/seam/docs/reference/en/modules/seam_editors.xml 2009-04-15 14:27:18 UTC (rev 14758)
@@ -411,7 +411,18 @@
</imageobject>
</mediaobject>
</figure>
-
+ <para> Content Assist is also available for the <emphasis
+ role="italic">
+ <property>"jsfc "</property>
+ </emphasis> attribute, it lets you select from a list of possible attribute values. Whereas, JSF components appear above all other components in the list.</para>
+ <figure>
+ <title>Content Assist for the "jsfc" attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_editors/seam_editors_12.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<note>
<title>Note:</title>
15 years, 8 months
JBoss Tools SVN: r14757 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-04-15 10:11:28 -0400 (Wed, 15 Apr 2009)
New Revision: 14757
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
RESOLVED - issue JBIDE-4108: VPE Refresh is broken with NPE
https://jira.jboss.org/jira/browse/JBIDE-4108
- GreedyRule has modified such a way that UIJobs created in different editors can be run concurrently.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-04-15 12:34:57 UTC (rev 14756)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-04-15 14:11:28 UTC (rev 14757)
@@ -1387,7 +1387,7 @@
return Status.OK_STATUS;
}
};
- visualRefreshJob.setRule(new GreedyRule());
+ visualRefreshJob.setRule(new GreedyRule(this));
visualRefreshJob.setPriority(Job.SHORT);
visualRefreshJob.schedule();
}
@@ -2664,7 +2664,7 @@
return Status.OK_STATUS;
}
};
- reinitJob.setRule(new GreedyRule());
+ reinitJob.setRule(new GreedyRule(this));
reinitJob.schedule();
}
@@ -2755,16 +2755,25 @@
/**
* Jobs with different instances of {@code GreedyRule}
- * are never run in parallel.
+ * but the same {@code grredyObject} are
+ * never run concurrently.
*
* @author yradtsevich
*/
- private class GreedyRule implements ISchedulingRule {
+ private final class GreedyRule implements ISchedulingRule {
+ private Object greedyObject;
+ public GreedyRule(Object greedyObject) {
+ this.greedyObject = greedyObject;
+ }
public boolean contains(ISchedulingRule rule) {
return this == rule;
}
public boolean isConflicting(ISchedulingRule rule) {
- return this.getClass() == rule.getClass();
+ if (rule instanceof GreedyRule) {
+ return ((GreedyRule) rule).greedyObject == this.greedyObject;
+ } else {
+ return false;
+ }
}
}
}
15 years, 8 months
JBoss Tools SVN: r14756 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-04-15 08:34:57 -0400 (Wed, 15 Apr 2009)
New Revision: 14756
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
RESOLVED - issue JBIDE-4108: VPE Refresh is broken with NPE
https://jira.jboss.org/jira/browse/JBIDE-4108
- ISchedulingRule has been added to visualRefreshJob and reinitJob. It prohibits these jobs to be run in parallel.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-04-15 11:59:15 UTC (rev 14755)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-04-15 12:34:57 UTC (rev 14756)
@@ -20,6 +20,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.bindings.Binding;
@@ -469,13 +470,12 @@
monitor.worked((int) (100 / getChangeEvents().size()));
VpeEventBean eventBean = getChangeEvents().getFirst();
if (monitor.isCanceled()) {
- /*
- * Yahor Radtsevich: the following line is commented
+ /* Yahor Radtsevich: the following line is commented
* as fix of JBIDE-3758: VPE autorefresh is broken in some cases.
- * Now if the change events queue should be cleared, the user have to do it explicitly.
+ * Now if the change events queue should be cleared, the programmer
+ * have to do it explicitly.
*/
- // getChangeEvents().clear();
-
+ // getChangeEvents().clear();
return Status.CANCEL_STATUS;
}
try {
@@ -490,8 +490,7 @@
// JBIDE-675 we will get this exception if user
// close editor,
// when update visual editor job is running, we
- // shoud ignore this
- // exception
+ // should ignore this exception
break;
} catch (NullPointerException ex) {
if (switcher != null) {
@@ -1388,7 +1387,7 @@
return Status.OK_STATUS;
}
};
-
+ visualRefreshJob.setRule(new GreedyRule());
visualRefreshJob.setPriority(Job.SHORT);
visualRefreshJob.schedule();
}
@@ -2665,6 +2664,7 @@
return Status.OK_STATUS;
}
};
+ reinitJob.setRule(new GreedyRule());
reinitJob.schedule();
}
@@ -2752,5 +2752,19 @@
public ISelectionManager getSelectionManager() {
return selectionManager;
}
-
+
+ /**
+ * Jobs with different instances of {@code GreedyRule}
+ * are never run in parallel.
+ *
+ * @author yradtsevich
+ */
+ private class GreedyRule implements ISchedulingRule {
+ public boolean contains(ISchedulingRule rule) {
+ return this == rule;
+ }
+ public boolean isConflicting(ISchedulingRule rule) {
+ return this.getClass() == rule.getClass();
+ }
+ }
}
15 years, 8 months
JBoss Tools SVN: r14755 - in trunk: vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-04-15 07:59:15 -0400 (Wed, 15 Apr 2009)
New Revision: 14755
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
Log:
Code refactored.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java 2009-04-15 10:22:15 UTC (rev 14754)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3617Test.java 2009-04-15 11:59:15 UTC (rev 14755)
@@ -73,32 +73,4 @@
throw getException();
}
}
-
- /**
- * Opens specified file in VPE editor
- *
- * @param projectName the name of the project
- * @param fileName the name of the file
- *
- * @return VpeController
- * @throws Throwable
- */
- private VpeController openInVpe(String projectName, String fileName) throws Throwable {
- // get test page path
- IFile file = (IFile) TestUtil.getComponentPath(fileName,
- projectName);
- assertNotNull("Could not open specified file. componentPage = " + fileName//$NON-NLS-1$
- + ";projectName = " + projectName, file);//$NON-NLS-1$
-
- IEditorInput input = new FileEditorInput(file);
-
- assertNotNull("Editor input is null", input); //$NON-NLS-1$
-
- // open and get editor
- JSPMultiPageEditor part = openEditor(input);
-
- VpeController vpeController = TestUtil.getVpeController(part);
-
- return vpeController;
- }
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2009-04-15 10:22:15 UTC (rev 14754)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.test/src/org/jboss/tools/vpe/ui/test/VpeTest.java 2009-04-15 11:59:15 UTC (rev 14755)
@@ -323,4 +323,32 @@
}
}
}
+
+ /**
+ * Opens specified file in the VPE editor.
+ *
+ * @param projectName the name of the project
+ * @param fileName the name of the file
+ *
+ * @return VpeController
+ * @throws Throwable
+ */
+ protected VpeController openInVpe(String projectName, String fileName)
+ throws Throwable {
+ // get test page path
+ final IFile file =
+ (IFile) TestUtil.getComponentPath(fileName, projectName);
+ assertNotNull("Could not open specified file." //$NON-NLS-1$
+ + " componentPage = " + fileName //$NON-NLS-1$
+ + ";projectName = " + projectName, file); //$NON-NLS-1$
+
+ final IEditorInput input = new FileEditorInput(file);
+ assertNotNull("Editor input is null", input); //$NON-NLS-1$
+
+ // open and get the editor
+ final JSPMultiPageEditor part = openEditor(input);
+
+ final VpeController vpeController = TestUtil.getVpeController(part);
+ return vpeController;
+ }
}
15 years, 8 months
JBoss Tools SVN: r14754 - in trunk/smooks/plugins: org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-04-15 06:22:15 -0400 (Wed, 15 Apr 2009)
New Revision: 14754
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/XSDFileCollect.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcDocumentRootItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcItemProviderAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CounterItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/
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/datasource/
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DataSourceJndiUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DirectUICreator.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/provider/SmooksResourceListTypeItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/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/SmooksConfigurationFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.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/SmooksStuffPropertyDetailPage.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/smooks/ParamTypeUICreator.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/uitls/IModelProcsser.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java
Log:
JBIDE-4171
Change CDATA/Comment edit UI
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF 2009-04-15 10:22:15 UTC (rev 14754)
@@ -13,6 +13,10 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.jboss.tools.smooks.core,
+ org.jboss.tools.smooks.model.calc,
+ org.jboss.tools.smooks.model.calc.impl,
+ org.jboss.tools.smooks.model.calc.provider,
+ org.jboss.tools.smooks.model.calc.util,
org.jboss.tools.smooks.model.common,
org.jboss.tools.smooks.model.common.impl,
org.jboss.tools.smooks.model.common.provider,
@@ -21,6 +25,10 @@
org.jboss.tools.smooks.model.csv.impl,
org.jboss.tools.smooks.model.csv.provider,
org.jboss.tools.smooks.model.csv.util,
+ org.jboss.tools.smooks.model.datasource,
+ org.jboss.tools.smooks.model.datasource.impl,
+ org.jboss.tools.smooks.model.datasource.provider,
+ org.jboss.tools.smooks.model.datasource.util,
org.jboss.tools.smooks.model.dbrouting,
org.jboss.tools.smooks.model.dbrouting.impl,
org.jboss.tools.smooks.model.dbrouting.provider,
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/XSDFileCollect.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/XSDFileCollect.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/XSDFileCollect.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,27 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.core;
+
+import java.io.File;
+
+/**
+ * @author DartPeng
+ *
+ */
+public class XSDFileCollect {
+ public static void main(String[] args) {
+ String path = "/home/DartPeng/Work/eclipse/smooks-configuration-workspace/org.jboss.tools.smooks.core/xsd";
+ File folder = new File(path);
+ File[] files = folder.listFiles();
+ for (int i = 0; i < files.length; i++) {
+ File file = files[i];
+ if (file.isFile()) {
+ String name = file.getName();
+ if(name.endsWith(".xsd")){
+ System.out.println(file.getName());
+ }
+ }
+ }
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/XSDFileCollect.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcDocumentRootItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcDocumentRootItemProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcDocumentRootItemProvider.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,168 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.calc.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemProviderAdapter;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.model.calc.CalcDocumentRoot;
+import org.jboss.tools.smooks.model.calc.CalcFactory;
+import org.jboss.tools.smooks.model.calc.CalcPackage;
+import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.jboss.tools.smooks.model.calc.CalcDocumentRoot} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CalcDocumentRootItemProvider
+ extends ItemProviderAdapter
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CalcDocumentRootItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
+ * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(CalcPackage.Literals.CALC_DOCUMENT_ROOT__COUNTER);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
+ * This returns CalcDocumentRoot.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/CalcDocumentRoot"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ return getString("_UI_CalcDocumentRoot_type");
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(CalcDocumentRoot.class)) {
+ case CalcPackage.CALC_DOCUMENT_ROOT__COUNTER:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (CalcPackage.Literals.CALC_DOCUMENT_ROOT__COUNTER,
+ CalcFactory.eINSTANCE.createCounter()));
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Xsl1EditPlugin.INSTANCE;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcDocumentRootItemProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcItemProviderAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcItemProviderAdapterFactory.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcItemProviderAdapterFactory.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,227 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.calc.provider;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.edit.provider.ChangeNotifier;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.provider.IChangeNotifier;
+import org.eclipse.emf.edit.provider.IDisposable;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.INotifyChangedListener;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+
+import org.jboss.tools.smooks.model.calc.util.CalcAdapterFactory;
+
+/**
+ * This is the factory that is used to provide the interfaces needed to support Viewers.
+ * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
+ * The adapters also support Eclipse property sheets.
+ * Note that most of the adapters are shared among multiple instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CalcItemProviderAdapterFactory extends CalcAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
+ /**
+ * This keeps track of the root adapter factory that delegates to this adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ComposedAdapterFactory parentAdapterFactory;
+
+ /**
+ * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected IChangeNotifier changeNotifier = new ChangeNotifier();
+
+ /**
+ * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected Collection<Object> supportedTypes = new ArrayList<Object>();
+
+ /**
+ * This constructs an instance.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CalcItemProviderAdapterFactory() {
+ supportedTypes.add(IEditingDomainItemProvider.class);
+ supportedTypes.add(IStructuredItemContentProvider.class);
+ supportedTypes.add(ITreeItemContentProvider.class);
+ supportedTypes.add(IItemLabelProvider.class);
+ supportedTypes.add(IItemPropertySource.class);
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.jboss.tools.smooks.model.calc.Counter} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CounterItemProvider counterItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.jboss.tools.smooks.model.calc.Counter}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createCounterAdapter() {
+ if (counterItemProvider == null) {
+ counterItemProvider = new CounterItemProvider(this);
+ }
+
+ return counterItemProvider;
+ }
+
+ /**
+ * This keeps track of the one adapter used for all {@link org.jboss.tools.smooks.model.calc.CalcDocumentRoot} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected CalcDocumentRootItemProvider calcDocumentRootItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.jboss.tools.smooks.model.calc.CalcDocumentRoot}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createCalcDocumentRootAdapter() {
+ if (calcDocumentRootItemProvider == null) {
+ calcDocumentRootItemProvider = new CalcDocumentRootItemProvider(this);
+ }
+
+ return calcDocumentRootItemProvider;
+ }
+
+ /**
+ * This returns the root adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ComposeableAdapterFactory getRootAdapterFactory() {
+ return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
+ }
+
+ /**
+ * This sets the composed adapter factory that contains this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
+ this.parentAdapterFactory = parentAdapterFactory;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object type) {
+ return supportedTypes.contains(type) || super.isFactoryForType(type);
+ }
+
+ /**
+ * This implementation substitutes the factory itself as the key for the adapter.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter adapt(Notifier notifier, Object type) {
+ return super.adapt(notifier, this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object adapt(Object object, Object type) {
+ if (isFactoryForType(type)) {
+ Object adapter = super.adapt(object, type);
+ if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) {
+ return adapter;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * This adds a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void addListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.addListener(notifyChangedListener);
+ }
+
+ /**
+ * This removes a listener.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void removeListener(INotifyChangedListener notifyChangedListener) {
+ changeNotifier.removeListener(notifyChangedListener);
+ }
+
+ /**
+ * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void fireNotifyChanged(Notification notification) {
+ changeNotifier.fireNotifyChanged(notification);
+
+ if (parentAdapterFactory != null) {
+ parentAdapterFactory.fireNotifyChanged(notification);
+ }
+ }
+
+ /**
+ * This disposes all of the item providers created by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void dispose() {
+ if (counterItemProvider != null) counterItemProvider.dispose();
+ if (calcDocumentRootItemProvider != null) calcDocumentRootItemProvider.dispose();
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CalcItemProviderAdapterFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CounterItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CounterItemProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CounterItemProvider.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,375 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.model.calc.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.model.calc.CalcPackage;
+import org.jboss.tools.smooks.model.calc.Counter;
+import org.jboss.tools.smooks.model.smooks.provider.ElementVisitorItemProvider;
+import org.jboss.tools.smooks.model.xsl.provider.Xsl1EditPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.jboss.tools.smooks.model.calc.Counter} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class CounterItemProvider
+ extends ElementVisitorItemProvider
+ implements
+ IEditingDomainItemProvider,
+ IStructuredItemContentProvider,
+ ITreeItemContentProvider,
+ IItemLabelProvider,
+ IItemPropertySource {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public CounterItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addStartExpressionPropertyDescriptor(object);
+ addAmountExpressionPropertyDescriptor(object);
+ addResetConditionPropertyDescriptor(object);
+ addAmountPropertyDescriptor(object);
+ addBeanIdPropertyDescriptor(object);
+ addCountOnElementPropertyDescriptor(object);
+ addCountOnElementNSPropertyDescriptor(object);
+ addDirectionPropertyDescriptor(object);
+ addExecuteAfterPropertyDescriptor(object);
+ addStartPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Start Expression feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStartExpressionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_startExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_startExpression_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__START_EXPRESSION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Amount Expression feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAmountExpressionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_amountExpression_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_amountExpression_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__AMOUNT_EXPRESSION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Reset Condition feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addResetConditionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_resetCondition_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_resetCondition_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__RESET_CONDITION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Amount feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addAmountPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_amount_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_amount_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__AMOUNT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Bean Id feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addBeanIdPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_beanId_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_beanId_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__BEAN_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Count On Element feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCountOnElementPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_countOnElement_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_countOnElement_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__COUNT_ON_ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Count On Element NS feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCountOnElementNSPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_countOnElementNS_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_countOnElementNS_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__COUNT_ON_ELEMENT_NS,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Direction feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addDirectionPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_direction_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_direction_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__DIRECTION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Execute After feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addExecuteAfterPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_executeAfter_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_executeAfter_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__EXECUTE_AFTER,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Start feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addStartPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Counter_start_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Counter_start_feature", "_UI_Counter_type"),
+ CalcPackage.Literals.COUNTER__START,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns Counter.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/Counter"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String getText(Object object) {
+ String label = ((Counter)object).getTargetProfile();
+ return label == null || label.length() == 0 ?
+ getString("_UI_Counter_type") :
+ getString("_UI_Counter_type") + " " + label;
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Counter.class)) {
+ case CalcPackage.COUNTER__START_EXPRESSION:
+ case CalcPackage.COUNTER__AMOUNT_EXPRESSION:
+ case CalcPackage.COUNTER__RESET_CONDITION:
+ case CalcPackage.COUNTER__AMOUNT:
+ case CalcPackage.COUNTER__BEAN_ID:
+ case CalcPackage.COUNTER__COUNT_ON_ELEMENT:
+ case CalcPackage.COUNTER__COUNT_ON_ELEMENT_NS:
+ case CalcPackage.COUNTER__DIRECTION:
+ case CalcPackage.COUNTER__EXECUTE_AFTER:
+ case CalcPackage.COUNTER__START:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator() {
+ return Xsl1EditPlugin.INSTANCE;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/provider/CounterItemProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/provider/SmooksResourceListTypeItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/provider/SmooksResourceListTypeItemProvider.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -23,9 +23,13 @@
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.jboss.tools.smooks.model.calc.CalcFactory;
+import org.jboss.tools.smooks.model.calc.CalcPackage;
import org.jboss.tools.smooks.model.common.provider.AbstractAnyTypeItemProvider;
import org.jboss.tools.smooks.model.csv.CsvFactory;
import org.jboss.tools.smooks.model.csv.CsvPackage;
+import org.jboss.tools.smooks.model.datasource.DatasourceFactory;
+import org.jboss.tools.smooks.model.datasource.DatasourcePackage;
import org.jboss.tools.smooks.model.dbrouting.DbroutingFactory;
import org.jboss.tools.smooks.model.dbrouting.DbroutingPackage;
import org.jboss.tools.smooks.model.edi.EdiFactory;
@@ -273,6 +277,17 @@
newChildDescriptors.add(createChildParameter(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_READER_GROUP, FeatureMapUtil
.createEntry(JsonPackage.Literals.JSON_DOCUMENT_ROOT__READER, JsonFactory.eINSTANCE.createJsonReader())));
+ // for calc
+ newChildDescriptors.add(createChildParameter(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP, FeatureMapUtil
+ .createEntry(CalcPackage.Literals.CALC_DOCUMENT_ROOT__COUNTER, CalcFactory.eINSTANCE.createCounter())));
+
+ // for datasource
+ newChildDescriptors.add(createChildParameter(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP, FeatureMapUtil
+ .createEntry(DatasourcePackage.Literals.DATA_SOURCE_DOCUMENT_ROOT__DIRECT, DatasourceFactory.eINSTANCE.createDirect())));
+
+ newChildDescriptors.add(createChildParameter(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP, FeatureMapUtil
+ .createEntry(DatasourcePackage.Literals.DATA_SOURCE_DOCUMENT_ROOT__JNDI, DatasourceFactory.eINSTANCE.createDataSourceJndi())));
+
// for javabean
newChildDescriptors.add(createChildParameter(SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP, FeatureMapUtil
.createEntry(JavabeanPackage.Literals.DOCUMENT_ROOT__BINDINGS, JavabeanFactory.eINSTANCE.createBindingsType())));
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -31,6 +31,9 @@
import org.jboss.tools.smooks.model.graphics.ext.InputType;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtFactory;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks.model.smooks.ConditionType;
+import org.jboss.tools.smooks.model.smooks.ConditionsType;
+import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
import org.jboss.tools.smooks10.model.smooks.ParamType;
import org.jboss.tools.smooks10.model.smooks.ResourceConfigType;
import org.jboss.tools.smooks10.model.smooks.ResourceType;
@@ -481,5 +484,13 @@
}
return null;
}
+
+ public static List<ConditionType> collectConditionType(SmooksResourceListType resourceList){
+ ConditionsType conditions = resourceList.getConditions();
+ if(conditions != null){
+ return conditions.getCondition();
+ }
+ return Collections.emptyList();
+ }
}
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Codegenerator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -13,18 +13,18 @@
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
-import org.jboss.tools.smooks.model.dbrouting.DbroutingPackage;
-import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+import org.jboss.tools.smooks.model.calc.CalcPackage;
+import org.jboss.tools.smooks.model.datasource.DatasourcePackage;
public class Codegenerator {
- String basePath = "F:\\works\\eclipse_wtp_3.0.3\\eclipse\\workspace_cr1\\org.jboss.tools.smooks.ui\\src\\org\\jboss\\tools\\smooks\\configuration\\editors\\uitls\\temp\\";
+ String basePath = "/home/DartPeng/Work/eclipse/smooks-configuration-workspace/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/temp/";
String tempContents = "";
public Codegenerator() {
try {
FileReader reader = new FileReader(
new File(
- "F:\\works\\eclipse_wtp_3.0.3\\eclipse\\workspace_cr1\\org.jboss.tools.smooks.ui\\src\\org\\jboss\\tools\\smooks\\configuration\\editors\\Template.txt"));
+ "/home/DartPeng/Work/eclipse/smooks-configuration-workspace/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/Template.txt"));
BufferedReader r = new BufferedReader(reader);
String line = r.readLine();
while (line != null) {
@@ -44,7 +44,7 @@
public static void main(String[] args) {
Codegenerator g = new Codegenerator();
try {
- g.generateCodes(SmooksPackage.eINSTANCE);
+ g.generateCodes(DatasourcePackage.eINSTANCE);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -30,7 +30,6 @@
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.uitls.IFieldDialog;
@@ -52,7 +51,7 @@
protected IModelProcsser fileFiledEditorModelProcess;
protected IHyperlinkListener fileFiledEditorLinkListener;
-
+
protected List<ViewerFilter> viewerFilters = null;
/*
@@ -78,12 +77,20 @@
if (isFileSelectionFeature(feature)) {
return createFileSelectionFieldEditor(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
+ if(isConditionSelectionFeature(feature)){
+ SmooksUIUtils.createContionsChoiceFieldEditor(parent, toolkit, propertyDescriptor, model);
+ return parent;
+ }
if (feature == SmooksPackage.eINSTANCE.getAbstractReader_TargetProfile()) {
}
return null;
}
+ protected boolean isConditionSelectionFeature(EAttribute feature) {
+ return false;
+ }
+
public IHyperlinkListener getFileFiledEditorLinkListener() {
return fileFiledEditorLinkListener;
}
@@ -120,10 +127,9 @@
SmooksMultiFormEditor formEditor) {
}
- public boolean isFileSelectionFeature(EAttribute attribute) {
+ protected boolean isFileSelectionFeature(EAttribute attribute) {
return false;
}
-
public Composite createFileSelectionFieldEditor(FormToolkit toolkit, Composite parent, IItemPropertyDescriptor propertyDescriptor, Object model,
EAttribute feature, SmooksMultiFormEditor formEditor) {
@@ -136,7 +142,7 @@
IModelProcsser p = getModelProcesser();
String path = wizard.getFilePath();
if (p != null) {
- path = p.processModel(path).toString();
+ path = p.unwrapValue(path).toString();
}
return path;
}
@@ -156,7 +162,7 @@
getFileFiledEditorLinkListener());
}
- public boolean isSelectorFeature(EAttribute attribute) {
+ protected boolean isSelectorFeature(EAttribute attribute) {
return false;
}
@@ -180,7 +186,7 @@
return null;
}
- public boolean isBeanIDRefFieldFeature(EAttribute attribute) {
+ protected boolean isBeanIDRefFieldFeature(EAttribute attribute) {
return false;
}
@@ -189,8 +195,7 @@
if (model instanceof EObject) {
SmooksResourceListType smooksResourceList = getSmooksResourceList((EObject) model);
if (smooksResourceList != null) {
- String displayName = propertyDescriptor.getDisplayName(model);
- toolkit.createLabel(parent, displayName + " :").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ SmooksUIUtils.createFiledEditorLabel(parent, toolkit, propertyDescriptor, model, false);
final Combo combo = new Combo(parent, SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
combo.setLayoutData(gd);
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreatorManager.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -13,7 +13,10 @@
import java.util.HashMap;
import java.util.Map;
+import org.jboss.tools.smooks.configuration.editors.calc.CounterUICreator;
import org.jboss.tools.smooks.configuration.editors.csv.CsvReaderUICreator;
+import org.jboss.tools.smooks.configuration.editors.datasource.DataSourceJndiUICreator;
+import org.jboss.tools.smooks.configuration.editors.datasource.DirectUICreator;
import org.jboss.tools.smooks.configuration.editors.dbrouting.ExecutorUICreator;
import org.jboss.tools.smooks.configuration.editors.dbrouting.ResultSetRowSelectorUICreator;
import org.jboss.tools.smooks.configuration.editors.dbrouting.ResultSetUICreator;
@@ -66,7 +69,10 @@
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.calc.impl.CounterImpl;
import org.jboss.tools.smooks.model.csv.impl.CsvReaderImpl;
+import org.jboss.tools.smooks.model.datasource.impl.DataSourceJndiImpl;
+import org.jboss.tools.smooks.model.datasource.impl.DirectImpl;
import org.jboss.tools.smooks.model.dbrouting.impl.ExecutorImpl;
import org.jboss.tools.smooks.model.dbrouting.impl.ResultSetImpl;
import org.jboss.tools.smooks.model.dbrouting.impl.ResultSetRowSelectorImpl;
@@ -226,10 +232,15 @@
map.put(ResultSetImpl.class, new ResultSetUICreator());
map.put(ResultSetRowSelectorImpl.class, new ResultSetRowSelectorUICreator());
+ // for calc
+ map.put(CounterImpl.class, new CounterUICreator());
+
+ // for datasource
+ map.put(DirectImpl.class, new DirectUICreator());
+ map.put(DataSourceJndiImpl.class, new DataSourceJndiUICreator());
-
/*
- * up if for smooks1.1
+ * up is for smooks1.1
*/
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationFormPage.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -133,7 +133,7 @@
tableComposite.setBackground(GraphicsConstants.BORDER_CORLOER);
tableComposite.setLayout(fillLayout);
- inputDataViewer = new TableViewer(tableComposite, SWT.MULTI);
+ inputDataViewer = new TableViewer(tableComposite, SWT.MULTI | SWT.FULL_SELECTION);
TableColumn header = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
header.setText("Type");
header.setWidth(100);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -138,8 +138,8 @@
configurationSection = tool.createSection(rootMainControl, Section.TITLE_BAR
| Section.DESCRIPTION);
configurationSection
- .setDescription("Define Smooks stuffes for configuration file in the following section.");
- configurationSection.setText("All Smooks Stuffes");
+ .setDescription("Define Smooks elements for configuration file in the following section.");
+ configurationSection.setText("Smooks elements");
sectionPart = new SectionPart(configurationSection);
managedForm.addPart(sectionPart);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -61,8 +61,10 @@
import org.jboss.tools.smooks.configuration.SmooksConstants;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.configuration.wizards.SmooksConfigurationFileNewWizard;
+import org.jboss.tools.smooks.model.calc.provider.CalcItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.common.provider.CommonItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.csv.provider.CsvItemProviderAdapterFactory;
+import org.jboss.tools.smooks.model.datasource.provider.DatasourceItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.dbrouting.provider.DbroutingItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.edi.provider.EdiItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.fileRouting.provider.FileRoutingItemProviderAdapterFactory;
@@ -188,6 +190,8 @@
adapterFactory.addAdapterFactory(new JmsroutingItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new DbroutingItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new CsvItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new DatasourceItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new CalcItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new GroovyItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new FileRoutingItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
@@ -220,7 +224,7 @@
configurationPage = createSmooksConfigurationFormPage();
try {
int index = this.addPage(configurationPage);
- setPageText(index, "Configuraion");
+ setPageText(index, "Design");
} catch (PartInitException e) {
e.printStackTrace();
}
@@ -309,7 +313,7 @@
}
protected SmooksConfigurationFormPage createSmooksConfigurationFormPage() {
- return new SmooksConfigurationFormPage(this, "ConfigurationPage", "Configuration Page");
+ return new SmooksConfigurationFormPage(this, "DesignPage", "Design Page");
}
protected void initSaveOptions(Map<?, ?> options) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -11,7 +11,6 @@
package org.jboss.tools.smooks.configuration.editors;
import java.lang.reflect.Method;
-import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
@@ -30,22 +29,20 @@
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Spinner;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.IDetailsPage;
-import org.eclipse.ui.forms.IFormColors;
import org.eclipse.ui.forms.IFormPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;
-import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
+import org.jboss.tools.smooks.configuration.editors.uitls.IModelProcsser;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
/**
*
@@ -73,16 +70,13 @@
public SmooksStuffPropertyDetailPage(SmooksMultiFormEditor formEditor) {
super();
this.formEditor = formEditor;
- editingDomain = (AdapterFactoryEditingDomain) formEditor
- .getEditingDomain();
- labelProvider = new AdapterFactoryLabelProvider(editingDomain
- .getAdapterFactory());
+ editingDomain = (AdapterFactoryEditingDomain) formEditor.getEditingDomain();
+ labelProvider = new AdapterFactoryLabelProvider(editingDomain.getAdapterFactory());
}
public void createContents(Composite parent) {
parent.setLayout(new FillLayout());
- section = formToolkit.createSection(parent, Section.DESCRIPTION
- | Section.TITLE_BAR);
+ section = formToolkit.createSection(parent, Section.DESCRIPTION | Section.TITLE_BAR);
Composite client = formToolkit.createComposite(section);
section.setLayout(new FillLayout());
@@ -106,10 +100,8 @@
GridLayout layout = new GridLayout();
layout.numColumns = 2;
detailsComposite.setLayout(layout);
- IPropertyUICreator creator = PropertyUICreatorManager.getInstance()
- .getPropertyUICreator(getModel());
- List<IItemPropertyDescriptor> propertyDes = itemPropertySource
- .getPropertyDescriptors(getModel());
+ IPropertyUICreator creator = PropertyUICreatorManager.getInstance().getPropertyUICreator(getModel());
+ List<IItemPropertyDescriptor> propertyDes = itemPropertySource.getPropertyDescriptors(getModel());
for (int i = 0; i < propertyDes.size(); i++) {
IItemPropertyDescriptor pd = propertyDes.get(i);
EAttribute attribute = (EAttribute) pd.getFeature(getModel());
@@ -125,9 +117,8 @@
}
}
if (creator != null) {
- creator.createExtendUI((AdapterFactoryEditingDomain) formEditor
- .getEditingDomain(), formToolkit, detailsComposite,
- getModel(), getFormEditor());
+ creator.createExtendUI((AdapterFactoryEditingDomain) formEditor.getEditingDomain(), formToolkit, detailsComposite, getModel(),
+ getFormEditor());
}
formToolkit.paintBordersFor(detailsComposite);
detailsComposite.pack();
@@ -137,20 +128,16 @@
}
}
- protected void createAttributeUI(Composite detailsComposite,
- IItemPropertyDescriptor propertyDescriptor,
- IPropertyUICreator creator) {
+ protected void createAttributeUI(Composite detailsComposite, IItemPropertyDescriptor propertyDescriptor, IPropertyUICreator creator) {
final IItemPropertyDescriptor itemPropertyDescriptor = propertyDescriptor;
- EAttribute feature = (EAttribute) itemPropertyDescriptor
- .getFeature(getModel());
+ EAttribute feature = (EAttribute) itemPropertyDescriptor.getFeature(getModel());
boolean createDefault = true;
if (creator != null) {
if (creator.ignoreProperty(feature)) {
return;
}
- Composite composite = creator.createPropertyUI(formToolkit,
- detailsComposite, itemPropertyDescriptor, getModel(),
- feature, getFormEditor());
+ Composite composite = creator.createPropertyUI(formToolkit, detailsComposite, itemPropertyDescriptor, getModel(), feature,
+ getFormEditor());
if (composite != null) {
createDefault = false;
}
@@ -159,24 +146,18 @@
EClassifier typeClazz = feature.getEType();
boolean hasCreated = false;
if (typeClazz instanceof EEnum) {
- createEnumFieldEditor(detailsComposite, feature,
- (EEnum) typeClazz, formToolkit, itemPropertyDescriptor);
+ createEnumFieldEditor(detailsComposite, feature, (EEnum) typeClazz, formToolkit, itemPropertyDescriptor);
hasCreated = true;
}
if (typeClazz.getInstanceClass() == String.class) {
- createStringFieldEditor(detailsComposite, feature, formToolkit,
- itemPropertyDescriptor);
+ createStringFieldEditor(detailsComposite, feature, formToolkit, itemPropertyDescriptor);
}
- if (typeClazz.getInstanceClass() == Boolean.class
- || typeClazz.getInstanceClass() == boolean.class) {
- createBooleanFieldEditor(detailsComposite, feature,
- formToolkit, itemPropertyDescriptor);
+ if (typeClazz.getInstanceClass() == Boolean.class || typeClazz.getInstanceClass() == boolean.class) {
+ createBooleanFieldEditor(detailsComposite, feature, formToolkit, itemPropertyDescriptor);
hasCreated = true;
}
- if (typeClazz.getInstanceClass() == Integer.class
- || typeClazz.getInstanceClass() == int.class) {
- createIntegerFieldEditor(detailsComposite, feature,
- formToolkit, itemPropertyDescriptor);
+ if (typeClazz.getInstanceClass() == Integer.class || typeClazz.getInstanceClass() == int.class) {
+ createStringFieldEditor(detailsComposite, feature, formToolkit, itemPropertyDescriptor);
hasCreated = true;
}
if (!hasCreated) {
@@ -187,197 +168,127 @@
}
}
- protected void createEnumFieldEditor(Composite propertyComposite,
- EAttribute feature, final EEnum typeClass, FormToolkit formToolKit,
+ protected Control createEnumFieldEditor(Composite propertyComposite, EAttribute feature, final EEnum typeClass, FormToolkit formToolKit,
final IItemPropertyDescriptor itemPropertyDescriptor) {
- String displayName = itemPropertyDescriptor.getDisplayName(getModel());
- if (feature.isRequired()) {
- displayName = "*" + displayName;
- }
- formToolKit.createLabel(propertyComposite, displayName + " :")
- .setForeground(
- formToolKit.getColors().getColor(IFormColors.TITLE));
- final Combo combo = new Combo(propertyComposite, SWT.BORDER
- | SWT.READ_ONLY);
- formToolKit.adapt(combo, true, false);
List<EEnumLiteral> literalList = typeClass.getELiterals();
- for (Iterator<EEnumLiteral> iterator = literalList.iterator(); iterator
- .hasNext();) {
- EEnumLiteral enumLiteral = (EEnumLiteral) iterator.next();
- combo.add(enumLiteral.getName());
+ String[] items = new String[literalList.size()];
+ for (int i = 0; i < literalList.size(); i++) {
+ EEnumLiteral enumLiteral = (EEnumLiteral) literalList.get(i);
+ items[i] = (enumLiteral.getName());
}
- Object value = itemPropertyDescriptor.getPropertyValue(getModel());
- if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
- if (editValue != null && editValue instanceof Enumerator) {
- String[] strings = combo.getItems();
- for (int i = 0; i < strings.length; i++) {
- String item = strings[i];
- if (item.equals(((Enumerator) editValue).getName())) {
- combo.select(i);
- break;
- }
+ final IItemPropertyDescriptor fip = itemPropertyDescriptor;
+ IModelProcsser processer = new IModelProcsser() {
+
+ public Object unwrapValue(Object model) {
+ Object editValue = SmooksUIUtils.getEditValue(fip, getModel());
+ if (editValue instanceof Enumerator) {
+ return ((Enumerator) editValue).getName();
}
+ return null;
}
- }
- combo.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
+
+ public Object wrapValue(Object model) {
+ String name = model.toString();
+ Object v = null;
try {
- Object value = itemPropertyDescriptor
- .getPropertyValue(getModel());
- Method method = typeClass.getInstanceClass().getMethod(
- "get", new Class<?>[] { String.class });
+ Method method = typeClass.getInstanceClass().getMethod("get", new Class<?>[] { String.class });
// it's static method
- Object v = method.invoke(null, combo.getText());
- if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
- if (editValue != null) {
-
- if (!editValue.equals(v)) {
- itemPropertyDescriptor.setPropertyValue(
- getModel(), v);
- }
- } else {
- itemPropertyDescriptor.setPropertyValue(getModel(),
- v);
- }
- } else {
- itemPropertyDescriptor.setPropertyValue(getModel(), v);
+ if (method != null) {
+ v = method.invoke(null, name);
}
} catch (Throwable t) {
- SmooksConfigurationActivator.getDefault().log(t);
}
+ return v;
}
- });
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- combo.setLayoutData(gd);
+
+ };
+ return SmooksUIUtils.createChoiceFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor, getModel(), items, processer, true);
}
- protected void createBooleanFieldEditor(final Composite propertyComposite,
- EAttribute feature, FormToolkit formToolkit,
+ protected void createBooleanFieldEditor(final Composite propertyComposite, EAttribute feature, FormToolkit formToolkit,
final IItemPropertyDescriptor itemPropertyDescriptor) {
- String displayName = itemPropertyDescriptor.getDisplayName(getModel());
- displayName += " :";
- if (feature.isRequired()) {
- displayName = "*" + displayName;
- }
- formToolkit.createLabel(propertyComposite, displayName + " :")
- .setForeground(
- formToolkit.getColors().getColor(IFormColors.TITLE));
- Object value = itemPropertyDescriptor.getPropertyValue(getModel());
- final Combo combo = new Combo(propertyComposite, SWT.BORDER
- | SWT.READ_ONLY);
- combo.add("TRUE");
- combo.add("FALSE");
- // combo.setEditable(false);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- combo.setLayoutData(gd);
- Object editValue = null;
- if (value != null && value instanceof PropertyValueWrapper) {
- editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
- if (editValue != null && editValue instanceof Boolean) {
- if ((Boolean) editValue) {
- combo.select(0);
- } else {
- combo.select(1);
+ IModelProcsser processer = new IModelProcsser() {
+
+ public Object unwrapValue(Object model) {
+ if (model instanceof Boolean) {
+ if ((Boolean) model) {
+ return "TRUE";
+ } else {
+ return "FALSE";
+ }
}
+ return "FALSE";
}
- }
- combo.addModifyListener(new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- boolean bv = Boolean.valueOf(combo.getText());
- itemPropertyDescriptor.setPropertyValue(getModel(), bv);
+ public Object wrapValue(Object model) {
+ try {
+ return Boolean.parseBoolean(model.toString());
+ } catch (Throwable t) {
+ }
+ return Boolean.FALSE;
}
- });
+ };
+ SmooksUIUtils.createChoiceFieldEditor(propertyComposite, formToolkit, itemPropertyDescriptor, getModel(), new String[] { "TRUE", "FALSE" },
+ processer, true);
}
- protected void createStringFieldEditor(final Composite propertyComposite,
- EAttribute feature, FormToolkit formToolKit,
+ protected Text createStringFieldEditor(final Composite propertyComposite, EAttribute feature, FormToolkit formToolKit,
final IItemPropertyDescriptor itemPropertyDescriptor) {
- String displayName = itemPropertyDescriptor.getDisplayName(getModel());
- if (feature.isRequired()) {
- displayName = "*" + displayName;
- }
- formToolKit.createLabel(propertyComposite, displayName + " :")
- .setForeground(
- formToolKit.getColors().getColor(IFormColors.TITLE));
- final Text text = formToolKit.createText(propertyComposite, "",
- SWT.NONE);
+ SmooksUIUtils.createFiledEditorLabel(propertyComposite, formToolKit, itemPropertyDescriptor, getModel(), false);
+ final Text text = formToolKit.createText(propertyComposite, "", SWT.NONE);
Object value = itemPropertyDescriptor.getPropertyValue(getModel());
if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
if (editValue != null)
text.setText(editValue.toString());
}
text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- Object value = itemPropertyDescriptor
- .getPropertyValue(getModel());
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
if (editValue != null) {
if (!editValue.equals(text.getText())) {
- itemPropertyDescriptor.setPropertyValue(getModel(),
- text.getText());
+ itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
}
} else {
- itemPropertyDescriptor.setPropertyValue(getModel(),
- text.getText());
+ itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
}
} else {
- itemPropertyDescriptor.setPropertyValue(getModel(), text
- .getText());
+ itemPropertyDescriptor.setPropertyValue(getModel(), text.getText());
}
}
});
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
text.setLayoutData(gd);
+ return text;
}
- protected void createIntegerFieldEditor(final Composite propertyComposite,
- EAttribute feature, FormToolkit formToolKit,
+ protected void createIntegerFieldEditor(final Composite propertyComposite, EAttribute feature, FormToolkit formToolKit,
final IItemPropertyDescriptor itemPropertyDescriptor) {
- String displayName = itemPropertyDescriptor.getDisplayName(getModel());
- if (feature.isRequired()) {
- displayName = "*" + displayName;
- }
- formToolKit.createLabel(propertyComposite, displayName + " :")
- .setForeground(
- formToolKit.getColors().getColor(IFormColors.TITLE));
+ SmooksUIUtils.createFiledEditorLabel(propertyComposite, formToolKit, itemPropertyDescriptor, getModel(), false);
final Spinner spinner = new Spinner(propertyComposite, SWT.BORDER);
Object value = itemPropertyDescriptor.getPropertyValue(getModel());
if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
if (editValue != null && editValue instanceof Integer)
spinner.setSelection((Integer) editValue);
}
spinner.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
- Object value = itemPropertyDescriptor
- .getPropertyValue(getModel());
+ Object value = itemPropertyDescriptor.getPropertyValue(getModel());
if (value != null && value instanceof PropertyValueWrapper) {
- Object editValue = ((PropertyValueWrapper) value)
- .getEditableValue(getModel());
+ Object editValue = ((PropertyValueWrapper) value).getEditableValue(getModel());
if (editValue != null) {
if (!editValue.equals(spinner.getSelection())) {
- itemPropertyDescriptor.setPropertyValue(getModel(),
- spinner.getSelection());
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
}
} else {
- itemPropertyDescriptor.setPropertyValue(getModel(),
- spinner.getSelection());
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
}
} else {
- itemPropertyDescriptor.setPropertyValue(getModel(), spinner
- .getSelection());
+ itemPropertyDescriptor.setPropertyValue(getModel(), spinner.getSelection());
}
}
});
@@ -397,16 +308,13 @@
setOldModel(oldModel);
this.selection = selection;
this.formPart = part;
- this.itemPropertySource = (IItemPropertySource) editingDomain
- .getAdapterFactory().adapt(getModel(),
- IItemPropertySource.class);
+ this.itemPropertySource = (IItemPropertySource) editingDomain.getAdapterFactory().adapt(getModel(), IItemPropertySource.class);
if (getOldModel() == getModel())
return;
if (getOldModel() != getModel()) {
if (propertyComposite != null) {
propertyComposite.dispose();
- propertyComposite = new Composite(propertyMainComposite,
- SWT.NONE);
+ propertyComposite = new Composite(propertyMainComposite, SWT.NONE);
}
createStuffDetailsComposite(propertyComposite);
}
@@ -469,9 +377,10 @@
protected void refreshWhenSelectionChanged() {
Object model = getModel();
if (model instanceof EObject) {
- String text = labelProvider.getText(model);
+ String text = ((EObject) model).eClass().getName();
section.setText(text);
- section.setDescription("Details of " + text);
+ section.setDescription("Details of " + text + ". Required fields are denoted by \"*\".");
+ section.layout();
}
}
Added: 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 (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/CounterUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.calc;
+
+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.calc.CalcPackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class CounterUICreator 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 == CalcPackage.eINSTANCE.getCounter_StartExpression()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_AmountExpression()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_ResetCondition()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_Amount()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_BeanId()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_CountOnElementNS()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_Direction()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_ExecuteAfter()) {
+ }
+ if (feature == CalcPackage.eINSTANCE.getCounter_Start()) {
+ }
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ }
+
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == CalcPackage.eINSTANCE.getCounter_CountOnElement()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
+
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/calc/CounterUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DataSourceJndiUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DataSourceJndiUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DataSourceJndiUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,58 @@
+/*******************************************************************************
+ * 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.datasource;
+
+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.datasource.DatasourcePackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class DataSourceJndiUICreator 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 == DatasourcePackage.eINSTANCE.getDataSourceJndi_AutoCommit()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDataSourceJndi_BindOnElement()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDataSourceJndi_Datasource()) {
+ }
+
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ }
+
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == DatasourcePackage.eINSTANCE.getDataSourceJndi_BindOnElement()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
+
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DataSourceJndiUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DirectUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DirectUICreator.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DirectUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * 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.datasource;
+
+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.datasource.DatasourcePackage;
+
+/**
+ * @author Dart Peng (dpeng(a)redhat.com) Date Apr 10, 2009
+ */
+public class DirectUICreator 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 == DatasourcePackage.eINSTANCE.getDirect_AutoCommit()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDirect_BindOnElementNS()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDirect_Datasource()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDirect_Password()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDirect_Url()) {
+ }
+ if (feature == DatasourcePackage.eINSTANCE.getDirect_Username()) {
+ }
+ return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
+ }
+
+ @Override
+ public boolean isJavaTypeFeature(EAttribute attribute) {
+ if (attribute == DatasourcePackage.eINSTANCE.getDirect_Driver()) {
+ return true;
+ }
+ return super.isJavaTypeFeature(attribute);
+ }
+
+ @Override
+ public boolean isSelectorFeature(EAttribute attribute) {
+ if (attribute == DatasourcePackage.eINSTANCE.getDirect_BindOnElement()) {
+ return true;
+ }
+ return super.isSelectorFeature(attribute);
+ }
+
+
+
+}
\ No newline at end of file
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/datasource/DirectUICreator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -48,8 +48,9 @@
@Override
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
Composite parent, Object model, SmooksMultiFormEditor formEditor) {
- SmooksUIUtils.createMixedTextFieldEditor("Value", editingdomain, toolkit, parent, model);
- SmooksUIUtils.createCDATAFieldEditor("Template Contents", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createMixedTextFieldEditor("Text Value", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createCDATAFieldEditor("Template Contents(CDATA)", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createCommentFieldEditor("Template Contents(Comment)", editingdomain, toolkit, parent, model);
}
@Override
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ParamTypeUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -46,7 +46,7 @@
@Override
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
Composite parent, Object model, SmooksMultiFormEditor formEditor) {
- SmooksUIUtils.createMixedTextFieldEditor("Value", editingdomain, toolkit, parent, model);
- SmooksUIUtils.createCDATAFieldEditor("CDATA", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createMixedTextFieldEditor("Text Value", editingdomain, toolkit, parent, model , false , 500);
+ SmooksUIUtils.createCDATAFieldEditor("CDATA Value", editingdomain, toolkit, parent, model);
}
}
\ 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-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/SmooksResourceListTypeUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -32,15 +32,13 @@
* 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) {
+ public Composite 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()) {
}
- if (feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultConditionRef()) {
- }
+
if (feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultSelectorNamespace()) {
}
if (feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultTargetProfile()) {
@@ -57,4 +55,12 @@
return super.isSelectorFeature(attribute);
}
+ @Override
+ protected boolean isConditionSelectionFeature(EAttribute feature) {
+ if (feature == SmooksPackage.eINSTANCE.getSmooksResourceListType_DefaultConditionRef()) {
+ return true;
+ }
+ return super.isConditionSelectionFeature(feature);
+ }
+
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/IModelProcsser.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/IModelProcsser.java 2009-04-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/IModelProcsser.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -8,5 +8,6 @@
*
*/
public interface IModelProcsser {
- Object processModel(Object model);
+ Object unwrapValue(Object model);
+ Object wrapValue(Object model);
}
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -14,6 +14,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IFile;
@@ -24,6 +25,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xml.type.AnyType;
@@ -43,7 +45,10 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
@@ -54,6 +59,7 @@
import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Hyperlink;
+import org.eclipse.ui.forms.widgets.Section;
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
import org.jboss.tools.smooks.configuration.editors.SelectorAttributes;
@@ -64,6 +70,8 @@
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl;
import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.model.smooks.ConditionType;
+import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
@@ -80,25 +88,50 @@
public static final String XSL_NAMESPACE = " xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" ";
- public static void createMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model) {
+ public static void createMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model) {
createMixedTextFieldEditor(label, editingdomain, toolkit, parent, model, false, 0);
}
- public static void createMultiMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model, int height) {
+ public static void createMultiMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
+ Composite parent, Object model, int height) {
createMixedTextFieldEditor(label, editingdomain, toolkit, parent, model, true, height);
}
- public static void createMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model, boolean multiText, int height) {
- toolkit.createLabel(parent, label + " :").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ public static void createMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model, boolean multiText, int height) {
+ GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
+ Section section = null;
+ Composite textContainer = null;
+ if (multiText) {
+ Composite space = toolkit.createComposite(parent);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ gd.heightHint = 10;
+ space.setLayoutData(gd);
+
+ section = toolkit.createSection(parent, Section.TITLE_BAR | Section.TWISTIE);
+ FillLayout layout = new FillLayout();
+ section.setLayout(layout);
+ section.setText(label);
+
+ Composite textComposite = toolkit.createComposite(section);
+ section.setClient(textComposite);
+ textComposite.setLayout(new GridLayout());
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ section.setLayoutData(gd);
+ textContainer = textComposite;
+ } else {
+ toolkit.createLabel(parent, label + " :").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ textContainer = parent;
+ }
+ gd = new GridData(GridData.FILL_HORIZONTAL);
int textType = SWT.FLAT;
if (multiText) {
- textType = SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL;
+ textType = SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL;
}
- final Text valueText = toolkit.createText(parent, "", textType);
+ final Text valueText = toolkit.createText(textContainer, "", textType);
gd = new GridData(GridData.FILL_HORIZONTAL);
if (multiText && height > 0) {
gd.heightHint = height;
@@ -108,6 +141,9 @@
String text = SmooksModelUtils.getAnyTypeText((AnyType) model);
if (text != null) {
valueText.setText(text);
+ if (text.length() > 0 && section != null) {
+ section.setExpanded(true);
+ }
}
}
final Object fm = model;
@@ -125,6 +161,23 @@
});
}
+ public static Control createFiledEditorLabel(Composite parent, FormToolkit formToolKit, IItemPropertyDescriptor itemPropertyDescriptor,
+ Object model, boolean isLink) {
+ String displayName = itemPropertyDescriptor.getDisplayName(model);
+ EAttribute feature = (EAttribute) itemPropertyDescriptor.getFeature(model);
+ if (feature.isRequired()) {
+ displayName = "*" + displayName;
+ }
+ if (!isLink) {
+ Label label = formToolKit.createLabel(parent, displayName + " :");
+ label.setForeground(formToolKit.getColors().getColor(IFormColors.TITLE));
+ return label;
+ } else {
+ Hyperlink link = formToolKit.createHyperlink(parent, displayName + " :", SWT.NONE);
+ return link;
+ }
+ }
+
/**
* Can't use
*
@@ -133,14 +186,12 @@
* @param parent
* @param model
*/
- public static void createFilePathFieldEditor(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model) {
+ public static void createFilePathFieldEditor(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent, Object model) {
// IHyperlinkListener link
}
- public static void createLinkMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model, boolean multiText, int height, boolean linkLabel,
- IHyperlinkListener listener) {
+ public static void createLinkMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model, boolean multiText, int height, boolean linkLabel, IHyperlinkListener listener) {
if (linkLabel) {
Hyperlink link = toolkit.createHyperlink(parent, label, SWT.NONE);
if (listener != null) {
@@ -184,8 +235,8 @@
}
public static void createLinkTextValueFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- IItemPropertyDescriptor propertyDescriptor, FormToolkit toolkit, Composite parent, Object model,
- boolean multiText, int height, boolean linkLabel, IHyperlinkListener listener) {
+ IItemPropertyDescriptor propertyDescriptor, FormToolkit toolkit, Composite parent, Object model, boolean multiText, int height,
+ boolean linkLabel, IHyperlinkListener listener) {
if (linkLabel) {
Hyperlink link = toolkit.createHyperlink(parent, label, SWT.NONE);
if (listener != null) {
@@ -247,8 +298,8 @@
return path;
}
- public static Composite createSelectorFieldEditor(FormToolkit toolkit, Composite parent,
- final IItemPropertyDescriptor propertyDescriptor, Object model, final SmooksGraphicsExtType extType) {
+ public static Composite createSelectorFieldEditor(FormToolkit toolkit, Composite parent, final IItemPropertyDescriptor propertyDescriptor,
+ Object model, final SmooksGraphicsExtType extType) {
return createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Browse", new IFieldDialog() {
public Object open(Shell shell) {
SelectoreSelectionDialog dialog = new SelectoreSelectionDialog(shell, extType);
@@ -275,8 +326,8 @@
}
public static SmooksGraphicsExtType loadSmooksGraphicsExt(IFile file) throws IOException {
- Resource resource = new SmooksGraphicsExtResourceFactoryImpl().createResource(URI.createPlatformResourceURI(
- file.getFullPath().toPortableString(), false));
+ Resource resource = new SmooksGraphicsExtResourceFactoryImpl().createResource(URI.createPlatformResourceURI(file.getFullPath()
+ .toPortableString(), false));
resource.load(Collections.emptyMap());
if (resource.getContents().size() > 0) {
Object obj = resource.getContents().get(0);
@@ -287,15 +338,29 @@
return null;
}
- public static void createCDATAFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model) {
- Label label1 = toolkit.createLabel(parent, label + " :");
- label1.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ public static void createCDATAFieldEditor(String label, AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model) {
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- label1.setLayoutData(gd);
+ Composite space = toolkit.createComposite(parent);
gd = new GridData(GridData.FILL_HORIZONTAL);
- final Text cdataText = toolkit.createText(parent, "", SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ gd.horizontalSpan = 2;
+ gd.heightHint = 10;
+ space.setLayoutData(gd);
+
+ Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.DESCRIPTION);
+ FillLayout layout = new FillLayout();
+ section.setLayout(layout);
+ section.setText(label);
+
+ Composite textComposite = toolkit.createComposite(section);
+ section.setClient(textComposite);
+ textComposite.setLayout(new GridLayout());
+ final Text cdataText = toolkit.createText(textComposite, "", SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ section.setLayoutData(gd);
+ toolkit.paintBordersFor(textComposite);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 300;
cdataText.setLayoutData(gd);
@@ -303,8 +368,12 @@
String cdata = SmooksModelUtils.getAnyTypeCDATA((AnyType) model);
if (cdata != null) {
cdataText.setText(cdata);
+ if (cdata.length() > 0) {
+ section.setExpanded(true);
+ }
}
}
+
final Object fm = model;
final AdapterFactoryEditingDomain fEditingDomain = editingdomain;
cdataText.addModifyListener(new ModifyListener() {
@@ -320,22 +389,37 @@
});
}
- public static void createCommentFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
- FormToolkit toolkit, Composite parent, Object model) {
- Label label1 = toolkit.createLabel(parent, label + " :");
- label1.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ public static void createCommentFieldEditor(String label, AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent,
+ Object model) {
GridData gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
- label1.setLayoutData(gd);
+ Composite space = toolkit.createComposite(parent);
gd = new GridData(GridData.FILL_HORIZONTAL);
- final Text cdataText = toolkit.createText(parent, "", SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ gd.horizontalSpan = 2;
+ gd.heightHint = 10;
+ space.setLayoutData(gd);
+
+ Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.DESCRIPTION);
+ FillLayout layout = new FillLayout();
+ section.setLayout(layout);
+ section.setText(label);
+
+ Composite textComposite = toolkit.createComposite(section);
+ section.setClient(textComposite);
+ textComposite.setLayout(new GridLayout());
+ final Text cdataText = toolkit.createText(textComposite, "", SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = 2;
+ section.setLayoutData(gd);
+ gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 300;
cdataText.setLayoutData(gd);
if (model instanceof AnyType) {
- String cdata = SmooksModelUtils.getAnyTypeComment((AnyType) model);
- if (cdata != null) {
- cdataText.setText(cdata);
+ String comment = SmooksModelUtils.getAnyTypeComment((AnyType) model);
+ if (comment != null) {
+ cdataText.setText(comment);
+ if (comment.length() > 0)
+ section.setExpanded(true);
}
}
final Object fm = model;
@@ -353,8 +437,8 @@
});
}
- public static Composite createJavaTypeSearchFieldEditor(Composite parent, FormToolkit toolkit,
- final IItemPropertyDescriptor propertyDescriptor, final EObject model) {
+ public static Composite createJavaTypeSearchFieldEditor(Composite parent, FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor,
+ final EObject model) {
if (model instanceof EObject) {
final Resource resource = ((EObject) model).eResource();
URI uri = resource.getURI();
@@ -363,8 +447,7 @@
String path = uri.toPlatformString(true);
workspaceResource = ResourcesPlugin.getWorkspace().getRoot().findMember(new Path(path));
JavaTypeFieldDialog dialog = new JavaTypeFieldDialog(workspaceResource);
- String displayName = propertyDescriptor.getDisplayName(model);
- Hyperlink link = toolkit.createHyperlink(parent, displayName + " :", SWT.NONE);
+ Hyperlink link = (Hyperlink) createFiledEditorLabel(parent, toolkit, propertyDescriptor, model, true);
final Composite classTextComposite = toolkit.createComposite(parent);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
classTextComposite.setLayoutData(gd);
@@ -372,8 +455,7 @@
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
classTextComposite.setLayout(fillLayout);
- final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit,
- "Search Class", dialog, SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit, "Search Class", dialog, SWT.NONE);
Object editValue = getEditValue(propertyDescriptor, model);
if (editValue != null) {
searchComposite.getText().setText(editValue.toString());
@@ -409,9 +491,8 @@
if (result != null)
JavaUI.openInEditor(result);
else {
- MessageDialog.openInformation(classTextComposite.getShell(), "Can't find type",
- "Can't find type \"" + typeName + "\" in \""
- + javaProject.getProject().getName() + "\" project.");
+ MessageDialog.openInformation(classTextComposite.getShell(), "Can't find type", "Can't find type \"" + typeName
+ + "\" in \"" + javaProject.getProject().getName() + "\" project.");
}
}
} catch (PartInitException ex) {
@@ -460,17 +541,15 @@
return null;
}
- public static Composite createJavaMethodSearchFieldEditor(BindingsType container, Composite parent,
- FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String buttonName,
- final EObject model) {
+ public static Composite createJavaMethodSearchFieldEditor(BindingsType container, Composite parent, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, String buttonName, final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
try {
ProjectClassLoader classLoader = new ProjectClassLoader(project);
Class<?> clazz = classLoader.loadClass(classString);
JavaMethodsSelectionDialog dialog = new JavaMethodsSelectionDialog(project, clazz);
- return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Select method", dialog,
- (EObject) model);
+ return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Select method", dialog, (EObject) model);
} catch (Exception e) {
// ignore
}
@@ -517,8 +596,7 @@
return generateFullPath(node, sperator);
}
- public static String generatePath(IXMLStructuredObject startNode, IXMLStructuredObject stopNode,
- final String sperator, boolean includeContext) {
+ public static String generatePath(IXMLStructuredObject startNode, IXMLStructuredObject stopNode, final String sperator, boolean includeContext) {
String name = "";
if (startNode == stopNode) {
return startNode.getNodeName();
@@ -546,17 +624,89 @@
return name.trim();
}
- public static Composite createJavaPropertySearchFieldEditor(BindingsType container, Composite parent,
- FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor, String buttonName,
- final EObject model) {
+ public static SmooksResourceListType getSmooks11ResourceListType(EObject model) {
+ if (model instanceof SmooksResourceListType)
+ return (SmooksResourceListType) model;
+ EObject parent = model;
+ while (parent != null) {
+ parent = parent.eContainer();
+ if (parent instanceof SmooksResourceListType)
+ return (SmooksResourceListType) parent;
+ }
+ return null;
+ }
+
+ public static Control createContionsChoiceFieldEditor(Composite parent, FormToolkit formToolkit, IItemPropertyDescriptor itemPropertyDescriptor,
+ Object model) {
+ SmooksResourceListType listType = getSmooks11ResourceListType((EObject) model);
+ List<String> names = new ArrayList<String>();
+ if (listType != null) {
+ List<ConditionType> conditions = SmooksModelUtils.collectConditionType(listType);
+ for (Iterator<ConditionType> iterator = conditions.iterator(); iterator.hasNext();) {
+ ConditionType conditionType = (ConditionType) iterator.next();
+ String id = conditionType.getId();
+ if (id != null && id.length() != 0) {
+ names.add(id);
+ }
+ }
+ }
+ return createChoiceFieldEditor(parent, formToolkit, itemPropertyDescriptor, model, names.toArray(new String[] {}), null, false);
+ }
+
+ public static Control createChoiceFieldEditor(Composite parent, FormToolkit formToolkit, IItemPropertyDescriptor itemPropertyDescriptor,
+ Object model, String[] items, IModelProcsser processer, boolean readOnly) {
+ SmooksUIUtils.createFiledEditorLabel(parent, formToolkit, itemPropertyDescriptor, model, false);
+ Object editValue = getEditValue(itemPropertyDescriptor, model);
+ if (processer != null) {
+ editValue = processer.unwrapValue(editValue);
+ }
+ int currentSelect = -1;
+ int style = SWT.BORDER;
+ if (readOnly) {
+ style = style | SWT.READ_ONLY;
+ }
+ final Combo combo = new Combo(parent, style);
+ if (items != null) {
+ for (int i = 0; i < items.length; i++) {
+ combo.add(items[i]);
+ if (items[i].equals(editValue)) {
+ currentSelect = i;
+ }
+ }
+ }
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ combo.setLayoutData(gd);
+ if (currentSelect != -1) {
+ combo.select(currentSelect);
+ }
+ final Object fm = model;
+ final IItemPropertyDescriptor fipd = itemPropertyDescriptor;
+ final IModelProcsser fp = processer;
+ combo.addModifyListener(new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ String text = combo.getText();
+ Object setValue = text;
+ if (fp != null) {
+ setValue = fp.wrapValue(text);
+ }
+ if (setValue.equals(getEditValue(fipd, fm))) {
+ return;
+ }
+ fipd.setPropertyValue(fm, setValue);
+ }
+ });
+ return combo;
+ }
+
+ public static Composite createJavaPropertySearchFieldEditor(BindingsType container, Composite parent, FormToolkit toolkit,
+ final IItemPropertyDescriptor propertyDescriptor, String buttonName, final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
try {
ProjectClassLoader classLoader = new ProjectClassLoader(project);
Class<?> clazz = classLoader.loadClass(classString);
JavaPropertiesSelectionDialog dialog = new JavaPropertiesSelectionDialog(project, clazz);
- return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Select property",
- dialog, (EObject) model);
+ return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Select property", dialog, (EObject) model);
} catch (Exception e) {
// ignore
}
@@ -572,25 +722,16 @@
return null;
}
- public static Composite createDialogFieldEditor(Composite parent, FormToolkit toolkit,
- final IItemPropertyDescriptor propertyDescriptor, String buttonName, IFieldDialog dialog,
- final EObject model) {
+ 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);
- if (labelLink) {
- Hyperlink link = toolkit.createHyperlink(parent, displayName + " :", SWT.NONE);
- if (listener != null) {
- link.addHyperlinkListener(listener);
- }
- } else {
- toolkit.createLabel(parent, displayName + " :").setForeground(
- toolkit.getColors().getColor(IFormColors.TITLE));
+ public static Composite createDialogFieldEditor(Composite parent, FormToolkit toolkit, final IItemPropertyDescriptor propertyDescriptor,
+ String buttonName, IFieldDialog dialog, final EObject model, boolean labelLink, IHyperlinkListener listener) {
+ Control label = createFiledEditorLabel(parent, toolkit, propertyDescriptor, model, labelLink);
+ if (label instanceof Hyperlink && listener != null) {
+ ((Hyperlink) label).addHyperlinkListener(listener);
}
final Composite classTextComposite = toolkit.createComposite(parent);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -599,8 +740,7 @@
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
classTextComposite.setLayout(fillLayout);
- final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit, buttonName, dialog,
- SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(classTextComposite, toolkit, buttonName, dialog, SWT.NONE);
Object editValue = getEditValue(propertyDescriptor, model);
if (editValue != null) {
searchComposite.getText().setText(editValue.toString());
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-15 09:49:21 UTC (rev 14753)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/TemplateUICreator.java 2009-04-15 10:22:15 UTC (rev 14754)
@@ -62,8 +62,9 @@
@Override
public void createExtendUI(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
Composite parent, Object model, SmooksMultiFormEditor formEditor) {
- SmooksUIUtils.createMixedTextFieldEditor("Value", editingdomain, toolkit, parent, model);
- SmooksUIUtils.createCDATAFieldEditor("Template Contents", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createMixedTextFieldEditor("Text Value", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createCDATAFieldEditor("Template Contents (CDATA)", editingdomain, toolkit, parent, model);
+ SmooksUIUtils.createCommentFieldEditor("Template Contents (Comment)", editingdomain, toolkit, parent, model);
}
}
\ No newline at end of file
15 years, 8 months