JBoss Tools SVN: r18903 - in trunk/smooks: tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-28 05:15:18 -0500 (Sat, 28 Nov 2009)
New Revision: 18903
Removed:
trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/WEB-INF_smooks-config.xml
trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/css_smooks-config.xml
trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-basic_smooks-config.xml
trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-to-xml_smooks-config.xml
trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/profiling_smooks-config.xml
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/jsonparse/smooks-config.xml
Log:
JBIDE-5249
Delete the smooks v1.0 config file from test project.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-28 10:15:18 UTC (rev 18903)
@@ -521,7 +521,7 @@
protected void createProcessGraphicalSection(FormToolkit toolkit, Composite parent) {
Section processGraphSection = toolkit.createSection(parent, Section.TITLE_BAR);
- processGraphSection.setText("Process Map");
+ processGraphSection.setText("Tasks Map");
Composite processGraphComposite = toolkit.createComposite(processGraphSection);
@@ -596,7 +596,7 @@
FormToolkit toolkit = managedForm.getToolkit();
toolkit.decorateFormHeading(form.getForm());
form.getBody().setLayout(new FillLayout());
- form.setText("Processing");
+ form.setText("Smooks Processing");
Composite mainComposite = toolkit.createComposite(form.getBody());
@@ -904,6 +904,7 @@
}
protected void showTaskControl(Object model) {
+ if(pageBook == null) return;
if (model == null)
pageBook.showEmptyPage();
FormToolkit toolkit = ((AbstractSmooksFormEditor) this.smooksModelProvider).getToolkit();
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/WEB-INF_smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/WEB-INF_smooks-config.xml 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/WEB-INF_smooks-config.xml 2009-11-28 10:15:18 UTC (rev 18903)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
- <profiles>
- <profile base-profile="MSIE" sub-profiles="windows,large" />
- <profile base-profile="Firefox" sub-profiles="windows,large" />
- </profiles>
-
- <!-- Will be applied to MS Internet Explorer only... -->
- <resource-config selector="b" target-profile="MSIE">
- <resource>org.milyn.cdres.trans.SetAttributeTU</resource>
- <param name="attributeName">style</param>
- <param name="attributeValue">color: red</param>
- </resource-config>
-
- <!-- Will be applied to all "large" useragents (browsers) i.e.
- both MSIE and Firefox... -->
- <resource-config selector="b" target-profile="large">
- <resource>org.milyn.cdres.trans.RenameElementTU</resource>
- <param name="replacementElement">i</param>
- </resource-config>
-
-</smooks-resource-list>
\ No newline at end of file
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/css_smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/css_smooks-config.xml 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/css_smooks-config.xml 2009-11-28 10:15:18 UTC (rev 18903)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
- <!--
- Gather externally linked CSS info...
- -->
- <resource-config selector="link">
- <resource>org.milyn.css.CSSStyleScraper</resource>
- </resource-config>
-
- <!--
- Gather inlined CSS info...
- -->
- <resource-config selector="style">
- <resource>org.milyn.css.CSSStyleScraper</resource>
- </resource-config>
-
-</smooks-resource-list>
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-basic_smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-basic_smooks-config.xml 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-basic_smooks-config.xml 2009-11-28 10:15:18 UTC (rev 18903)
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
- <resource-config selector="c b">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">xxx</param>
- </resource-config>
-
-</smooks-resource-list>
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-to-xml_smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-to-xml_smooks-config.xml 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/java-to-xml_smooks-config.xml 2009-11-28 10:15:18 UTC (rev 18903)
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
- <resource-config selector="global-parameters">
- <param name="stream.filter.type">SAX</param>
- </resource-config>
-
-</smooks-resource-list>
\ No newline at end of file
Deleted: trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/profiling_smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/profiling_smooks-config.xml 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/projects/smooks-all-config-files/smooks-config-files/profiling_smooks-config.xml 2009-11-28 10:15:18 UTC (rev 18903)
@@ -1,43 +0,0 @@
-<?xml version="1.0"?>
-<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
-
- <profiles>
- <profile base-profile="message-exchange-1" sub-profiles="from-a,to-b" />
- <profile base-profile="message-exchange-2" sub-profiles="from-a,to-c" />
- <profile base-profile="message-exchange-3" sub-profiles="from-a,to-d" />
-
- <profile base-profile="message-exchange-4" sub-profiles="from-c,to-b" />
- <profile base-profile="message-exchange-5" sub-profiles="from-d,to-b" />
- </profiles>
-
- <resource-config selector="a" target-profile="from-a">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">from-a</param>
- </resource-config>
-
- <resource-config selector="a b" target-profile="to-b">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">to-b</param>
- </resource-config>
-
- <resource-config selector="c b" target-profile="to-c">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">to-c</param>
- </resource-config>
-
- <resource-config selector="c" target-profile="to-d">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">to-d</param>
- </resource-config>
-
- <resource-config selector="b c" target-profile="message-exchange-5">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">message-exchange-5</param>
- </resource-config>
-
- <resource-config selector="c b" target-profile="to-b AND from-d">
- <resource>example.BasicJavaTransformer</resource>
- <param name="newName">d-to-b</param>
- </resource-config>
-
-</smooks-resource-list>
Modified: trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/jsonparse/smooks-config.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/jsonparse/smooks-config.xml 2009-11-28 10:12:23 UTC (rev 18902)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/jsonparse/smooks-config.xml 2009-11-28 10:15:18 UTC (rev 18903)
@@ -15,21 +15,4 @@
<json:key from="date&time" to="timeanddate" />
</json:keyMap>
</abstract-reader>
-
- <g:smooks-graphics-ext>
- <g:input type="json">
- <g:param name="path">Workspace://test/src/json.jsn</g:param>
- <g:param name="linkJSONReader">true</g:param>
- </g:input>
-
- <g:input type="json">
- <g:param name="path">Workspace://test/src/json.jsn</g:param>
- <g:param name="encoding">UTF-8</g:param>
- <g:param name="_key_date&time">date-time</g:param>
- <g:param name="spaceReplace">-</g:param>
- <g:param name="arrayElementName">element</g:param>
- <g:param name="rootName">root</g:param>
- </g:input>
- </g:smooks-graphics-ext>
-
</smooks-resource-list>
\ No newline at end of file
15 years, 1 month
JBoss Tools SVN: r18902 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-11-28 05:12:23 -0500 (Sat, 28 Nov 2009)
New Revision: 18902
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5282
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java 2009-11-28 09:34:25 UTC (rev 18901)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java 2009-11-28 10:12:23 UTC (rev 18902)
@@ -192,8 +192,6 @@
if (node instanceof JavaBeanGraphModel) {
Object parent = node.getData();
List<TreeNodeConnection> connections = ((JavaBeanGraphModel) node).getTargetConnections();
- if (connections.isEmpty())
- return false;
for (Iterator<?> iterator = connections.iterator(); iterator.hasNext();) {
TreeNodeConnection connection = (TreeNodeConnection) iterator.next();
AbstractSmooksGraphicalModel sourcenode = connection.getSourceNode();
15 years, 1 month
JBoss Tools SVN: r18901 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-28 04:34:25 -0500 (Sat, 28 Nov 2009)
New Revision: 18901
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
Log:
JBIDE-5290
Remove useless plug-in dependencies.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-11-28 09:14:37 UTC (rev 18900)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-11-28 09:34:25 UTC (rev 18901)
@@ -36,8 +36,7 @@
org.eclipse.debug.ui;bundle-version="3.5.1",
org.eclipse.jdt.debug.ui;bundle-version="3.4.1",
org.eclipse.jdt.junit;bundle-version="3.5.1",
- org.eclipse.ui.console;bundle-version="3.4.0",
- org.jboss.tools.common.model.ui;bundle-version="2.0.0"
+ org.eclipse.ui.console;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
@@ -56,7 +55,6 @@
org.jboss.tools.smooks.configuration.editors.javabean,
org.jboss.tools.smooks.configuration.editors.uitls,
org.jboss.tools.smooks.configuration.editors.xml,
- org.jboss.tools.smooks.configuration.editors_10,
org.jboss.tools.smooks.edimap.editor,
org.jboss.tools.smooks.editor,
org.jboss.tools.smooks.launch,
15 years, 1 month
JBoss Tools SVN: r18900 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical: editors and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-28 04:14:37 -0500 (Sat, 28 Nov 2009)
New Revision: 18900
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
Log:
JBIDE-5290
Fixed
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java 2009-11-28 09:12:26 UTC (rev 18899)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java 2009-11-28 09:14:37 UTC (rev 18900)
@@ -89,7 +89,13 @@
}
Command remove = null;
if (associatedElements.isEmpty()) {
- process.removeTask(currentTask);
+ Object parent = currentTask.getParent();
+ if (parent instanceof Process) {
+ ((ProcessType) parent).removeTask(currentTask);
+ }
+ if (parent instanceof TaskType) {
+ ((TaskType) parent).removeTask(currentTask);
+ }
} else {
associatedElements = getDeletedObjects(associatedElements);
CompoundCommand ccommand = new CompoundCommand();
@@ -100,12 +106,18 @@
// if (removeTaskCommand.canExecute()) {
// ccommand.append(removeTaskCommand);
// }
- process.removeTask(currentTask);
remove = RemoveCommand.create(this.provider.getEditingDomain(), listType,
SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
associatedElements);
if (remove.canExecute()) {
ccommand.append(remove);
+ Object parent = currentTask.getParent();
+ if (parent instanceof Process) {
+ ((ProcessType) parent).removeTask(currentTask);
+ }
+ if (parent instanceof TaskType) {
+ ((TaskType) parent).removeTask(currentTask);
+ }
}
provider.getEditingDomain().getCommandStack().execute(ccommand);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-28 09:12:26 UTC (rev 18899)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-28 09:14:37 UTC (rev 18900)
@@ -1120,11 +1120,19 @@
public void propertyChange(PropertyChangeEvent evt) {
String name = evt.getPropertyName();
+ Object newtask = evt.getNewValue();
if (ProcessType.PRO_ADD_CHILD.equals(name) || ProcessType.PRO_REMOVE_CHILD.equals(name)) {
if (getProcessGraphViewer() != null) {
getProcessGraphViewer().refresh();
getProcessGraphViewer().applyLayout();
}
}
+
+ if (ProcessType.PRO_ADD_CHILD.equals(name)) {
+ this.showTaskControl(newtask);
+ }
+ if (ProcessType.PRO_REMOVE_CHILD.equals(name)) {
+ this.showTaskControl(null);
+ }
}
}
15 years, 1 month
JBoss Tools SVN: r18899 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui: src/org/jboss/tools/smooks/configuration and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-28 04:12:26 -0500 (Sat, 28 Nov 2009)
New Revision: 18899
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigFileHandle.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigfileContentDescriber.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationOverviewPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationResourceConfigPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10InputFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationResourceConfigPage.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/SmooksReaderFormPage.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/validate/SelectorValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessType.java
Log:
JBIDE-5157
Record comment string for EObject , when save EObject , insert the comment string into the result contents.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/plugin.xml 2009-11-28 09:12:26 UTC (rev 18899)
@@ -23,16 +23,7 @@
contentTypeId="org.jboss.tools.smooks.ui.edimap.contentType">
</contentTypeBinding>
</editor>
- <editor
- class="org.jboss.tools.smooks.configuration.editors_10.Smooks10MultiFormEditor"
- contributorClass="org.jboss.tools.smooks.configuration.editors.SmooksActionBarContributor"
- icon="icons/smooks-sm.gif"
- id="org.jboss.tools.smooks.configuration.editors.MultiPageEditor_1_0"
- name="Smooks Configuration Editor">
- <contentTypeBinding
- contentTypeId="org.jboss.tools.smooks.ui.smooks1_0.contentType">
- </contentTypeBinding>
- </editor>
+
</extension>
<extension
point="org.eclipse.ui.newWizards">
@@ -74,14 +65,7 @@
name="EDI Map File"
priority="low">
</content-type>
- <content-type
- base-type="org.eclipse.core.runtime.xml"
- describer="org.jboss.tools.smooks.configuration.editors_10.Smooks10ConfigfileContentDescriber"
- file-extensions="xml"
- id="org.jboss.tools.smooks.ui.smooks1_0.contentType"
- name="Smooks Configuration File"
- priority="low">
- </content-type>
+
</extension>
<extension
point="org.eclipse.ui.startup">
@@ -113,9 +97,6 @@
name="org.eclipse.emf.ecore.util.FeatureMap$Entry">
</objectClass>
<objectClass
- name="org.jboss.tools.smooks10.model.smooks.AbstractType">
- </objectClass>
- <objectClass
name="org.eclipse.emf.ecore.EObject">
</objectClass>
</or>
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/SmooksConstants.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -22,13 +22,10 @@
public static final String SMOOKS_EXTENTION_NAME_WITHDOT = "." + SMOOKS_EXTENTION_NAME;
public static final String SMOOKS_GRAPHICSEXT_EXTENTION_NAME_WITHDOT = "." + SMOOKS_GRAPHICSEXT_EXTENTION_NAME;
-
- public static final String VERSION_1_0 = "1.0";
-
public static final String VERSION_1_1 = "1.1";
public static final String VERSION_1_2 = "1.2";
- public static final String[] SMOOKS_VERSIONS = new String[]{VERSION_1_0,VERSION_1_1,VERSION_1_2};
+ public static final String[] SMOOKS_VERSIONS = new String[]{VERSION_1_1,VERSION_1_2};
}
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-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksActionBarContributor.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -86,7 +86,7 @@
/**
* This is the action bar contributor for the Smooks model editor. <!--
* begin-user-doc --> <!-- end-user-doc -->
- *
+ * @deprecated
* @generated
*/
public class SmooksActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener {
@@ -138,7 +138,7 @@
@Override
public void run() {
- addSmooks10ResourceList();
+// addSmooks10ResourceList();
}
};
@@ -240,18 +240,18 @@
}
}
- protected void addSmooks10ResourceList() {
- ISmooksModelProvider formEditor = (ISmooksModelProvider) this.getActiveEditor();
- EObject model = formEditor.getSmooksModel();
- if (model instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- org.jboss.tools.smooks10.model.smooks.SmooksResourceListType resourceList = org.jboss.tools.smooks10.model.smooks.SmooksFactory.eINSTANCE
- .createSmooksResourceListType();
- Command command = AddCommand.create(formEditor.getEditingDomain(), model,
- org.jboss.tools.smooks10.model.smooks.SmooksPackage.eINSTANCE.getSmooksResourceListType(),
- resourceList);
- formEditor.getEditingDomain().getCommandStack().execute(command);
- }
- }
+// protected void addSmooks10ResourceList() {
+// ISmooksModelProvider formEditor = (ISmooksModelProvider) this.getActiveEditor();
+// EObject model = formEditor.getSmooksModel();
+// if (model instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+// org.jboss.tools.smooks10.model.smooks.SmooksResourceListType resourceList = org.jboss.tools.smooks10.model.smooks.SmooksFactory.eINSTANCE
+// .createSmooksResourceListType();
+// Command command = AddCommand.create(formEditor.getEditingDomain(), model,
+// org.jboss.tools.smooks10.model.smooks.SmooksPackage.eINSTANCE.getSmooksResourceListType(),
+// resourceList);
+// formEditor.getEditingDomain().getCommandStack().execute(command);
+// }
+// }
protected void addSmooks11ResourceList() {
ISmooksModelProvider formEditor = (ISmooksModelProvider) this.getActiveEditor();
@@ -770,14 +770,14 @@
MEdiPackage.eINSTANCE.getEdiMap(), mappingNode);
addMap10ResourceListAction.setEnabled(command.canExecute());
}
- if (model instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- org.jboss.tools.smooks10.model.smooks.SmooksResourceListType resourceList = org.jboss.tools.smooks10.model.smooks.SmooksFactory.eINSTANCE
- .createSmooksResourceListType();
- Command command = AddCommand.create(formEditor.getEditingDomain(), model,
- org.jboss.tools.smooks10.model.smooks.SmooksPackage.eINSTANCE.getSmooksResourceListType(),
- resourceList);
- addSmooks10ResourceListAction.setEnabled(command.canExecute());
- }
+// if (model instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+// org.jboss.tools.smooks10.model.smooks.SmooksResourceListType resourceList = org.jboss.tools.smooks10.model.smooks.SmooksFactory.eINSTANCE
+// .createSmooksResourceListType();
+// Command command = AddCommand.create(formEditor.getEditingDomain(), model,
+// org.jboss.tools.smooks10.model.smooks.SmooksPackage.eINSTANCE.getSmooksResourceListType(),
+// resourceList);
+// addSmooks10ResourceListAction.setEnabled(command.canExecute());
+// }
}
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -315,7 +315,7 @@
EObject resource = getSmooksResourceList();
if (resource == null)
return;
- if (getSmooksVersion() == null || getSmooksVersion().equals(SmooksConstants.VERSION_1_0)) {
+ if (getSmooksVersion() == null) {
return;
}
ParamsType parent = getParamsType();
@@ -584,9 +584,6 @@
if (smooksModelProvider != null) {
EObject m = null;
EObject smooksModel = smooksModelProvider.getSmooksModel();
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
- }
if (smooksModel instanceof DocumentRoot) {
m = ((DocumentRoot) smooksModel).getSmooksResourceList();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationResourceConfigPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationResourceConfigPage.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationResourceConfigPage.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -62,11 +62,6 @@
&& eObject instanceof AbstractResourceConfig) {
return eObject;
}
-
- if (smooksTreeViewerInput instanceof org.jboss.tools.smooks10.model.smooks.SmooksResourceListType
- && eObject instanceof org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig) {
- return eObject;
- }
}
return super.getEmptyDefaultSelection(smooksTreeViewerInput);
}
@@ -94,9 +89,6 @@
if (obj instanceof ProfilesType) {
return false;
}
- if (obj instanceof org.jboss.tools.smooks10.model.smooks.ProfilesType) {
- return false;
- }
ISmooksModelProvider provider = (ISmooksModelProvider) getAdapter(ISmooksModelProvider.class);
if (provider != null) {
if (SmooksUIUtils.isUnSupportElement(provider.getPlatformVersion(), (EObject) obj)) {
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-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMasterDetailBlock.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -311,11 +311,11 @@
private void setTreeViewerModel(Object smooksModel) {
boolean seted = false;
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- smooksTreeViewer.setInput(((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel)
- .getSmooksResourceList());
- seted = true;
- }
+// if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+// smooksTreeViewer.setInput(((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel)
+// .getSmooksResourceList());
+// seted = true;
+// }
if (smooksModel instanceof DocumentRoot) {
SmooksResourceListType list = ((DocumentRoot) smooksModel).getSmooksResourceList();
try {
@@ -332,9 +332,9 @@
private EObject getTreeViewerInput() {
EObject smooksModel = ((ISmooksModelProvider) this.formEditor).getSmooksModel();
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- return ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
- }
+// if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+// return ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
+// }
if (smooksModel instanceof DocumentRoot) {
return (((DocumentRoot) smooksModel).getSmooksResourceList());
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -669,6 +669,7 @@
}
AdapterFactoryEditingDomain editDomain = getEditingDomain();
+ Object obj = editDomain.getAdapterFactory().adapt(resourceList, IEditingDomainItemProvider.class);
IEditingDomainItemProvider provider = (IEditingDomainItemProvider) editDomain.getAdapterFactory().adapt(
resourceList, IEditingDomainItemProvider.class);
Collection<?> collections = provider.getNewChildDescriptors(resourceList, editDomain, null);
@@ -859,7 +860,7 @@
}
getEditingDomain().getCommandStack().execute(compoundCommand);
-// inputTypeChanged();
+ // inputTypeChanged();
refreshInputModelView();
}
@@ -970,8 +971,8 @@
InputType input = (InputType) iterator.next();
SmooksUIUtils.removeInputType(input, smooksModelProvider);
}
- if(!inputs.isEmpty()){
- List<?> viewerInput = (List<?>)inputDataViewer.getInput();
+ if (!inputs.isEmpty()) {
+ List<?> viewerInput = (List<?>) inputDataViewer.getInput();
viewerInput.removeAll(inputs);
inputTypeChanged();
}
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-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -195,7 +195,6 @@
import org.jboss.tools.smooks.model.validation10.Validation10Package;
import org.jboss.tools.smooks.model.xsl.Xsl;
import org.jboss.tools.smooks.model.xsl.XslPackage;
-import org.jboss.tools.smooks10.model.smooks.DocumentRoot;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
@@ -2998,9 +2997,6 @@
}
public static String judgeSmooksPlatformVersion(EObject smooksModel) {
- if (smooksModel instanceof DocumentRoot) {
- return SmooksConstants.VERSION_1_0;
- }
if (smooksModel instanceof org.jboss.tools.smooks.model.smooks.DocumentRoot) {
EMap<String, String> nsMap = ((org.jboss.tools.smooks.model.smooks.DocumentRoot) smooksModel)
@@ -3018,10 +3014,6 @@
public static String judgeInputType(EObject smooksModel) {
String inputType = null;
- if (smooksModel instanceof DocumentRoot) {
- return null;
- }
-
if (smooksModel instanceof org.jboss.tools.smooks.model.smooks.DocumentRoot) {
SmooksResourceListType rlist = ((org.jboss.tools.smooks.model.smooks.DocumentRoot) smooksModel)
.getSmooksResourceList();
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigFileHandle.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigFileHandle.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigFileHandle.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -1,152 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors_10;
-
-import java.io.IOException;
-import java.io.StringReader;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
-import org.jboss.tools.smooks10.model.smooks.SmooksPackage;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * @author Dart dpeng(a)redhat.com
- *
- */
-public class Smooks10ConfigFileHandle extends DefaultHandler {
- private boolean correctContentFile = false;
-
- // private static final String SMOOKS_RESOURCE_LIST = "smooks-resource-list"; //$NON-NLS-1$
-
- private String[] smooksSpportURI = null;
-
- private SAXParserFactory fFactory;
-
- public Smooks10ConfigFileHandle(){
- super();
- smooksSpportURI = createSupportURI();
- }
-
- protected String[] createSupportURI(){
- return new String[]{
- SmooksPackage.eNS_URI,
- };
- }
-
- private final SAXParser createParser(SAXParserFactory parserFactory) throws ParserConfigurationException,
- SAXException, SAXNotRecognizedException, SAXNotSupportedException {
- // Initialize the parser.
- final SAXParser parser = parserFactory.newSAXParser();
- final XMLReader reader = parser.getXMLReader();
- // disable DTD validation
- try {
- reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
- reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); //$NON-NLS-1$
- } catch (SAXNotRecognizedException e) {
- } catch (SAXNotSupportedException e) {
- }
- return parser;
- }
-
- private SAXParserFactory getFactory() {
- synchronized (this) {
- if (fFactory != null) {
- return fFactory;
- }
- fFactory = SAXParserFactory.newInstance();
- fFactory.setNamespaceAware(true);
- }
- return fFactory;
- }
-
- public boolean parseContents(InputSource contents) throws ParserConfigurationException, IOException {
- try {
- fFactory = getFactory();
- if (fFactory == null) {
- return false;
- }
- final SAXParser parser = createParser(fFactory);
- contents.setSystemId("/"); //$NON-NLS-1$
- parser.parse(contents, this);
- } catch (SAXException e) {
- // stop parsing
- }
- return true;
- }
-
- /*
- * Resolve external entity definitions to an empty string. This is to
- * speed up processing of files with external DTDs. Not resolving the
- * contents of the DTD is ok, as only the System ID of the DTD
- * declaration is used.
- *
- * @see
- * org.xml.sax.helpers.DefaultHandler#resolveEntity(java.lang.String,
- * java.lang.String)
- */
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
- return new InputSource(new StringReader("")); //$NON-NLS-1$
- }
-
- @Override
- public void startPrefixMapping(String prefix, String uri) throws SAXException {
- super.startPrefixMapping(prefix, uri);
- if (containtSmooksURI(uri)) {
- setCorrectContentFile(true);
- throw new SAXException("Stop parsing");
- }
- }
-
- private boolean containtSmooksURI(String uri) {
- for (int i = 0; i < smooksSpportURI.length; i++) {
- if (uri != null) {
- if (uri.trim().equalsIgnoreCase(smooksSpportURI[i])) {
- return true;
- }
- }
- }
- return false;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.xml.sax.ContentHandler#startElement(java.lang.String,
- * java.lang.String, java.lang.String, org.xml.sax.Attributes)
- */
- public final void startElement(final String uri, final String elementName, final String qualifiedName,
- final Attributes attributes) throws SAXException {
- if (isCorrectContentFile()) {
- throw new SAXException("Stop parsing");
- }
- if (containtSmooksURI(uri)) {
- setCorrectContentFile(true);
- throw new SAXException("Stop parsing");
- }
- }
-
- public boolean isCorrectContentFile() {
- return correctContentFile;
- }
-
- public void setCorrectContentFile(boolean correctContentFile) {
- this.correctContentFile = correctContentFile;
- }
-}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigfileContentDescriber.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigfileContentDescriber.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigfileContentDescriber.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors_10;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.Reader;
-
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExecutableExtension;
-import org.eclipse.core.runtime.QualifiedName;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.ITextContentDescriber;
-import org.xml.sax.InputSource;
-
-/**
- * @author Dart (dpeng(a)redhat.com) note : Many codes comes from
- * org.eclipse.core.internal.content.XMLConentDescriber
- */
-public class Smooks10ConfigfileContentDescriber implements ITextContentDescriber, IExecutableExtension {
-
- private static final QualifiedName[] SUPPORTED_OPTIONS = new QualifiedName[] { IContentDescription.CHARSET,
- IContentDescription.BYTE_ORDER_MARK };
-
- private static final String ENCODING = "encoding="; //$NON-NLS-1$
-
- private static final String XML_PREFIX = "<?xml "; //$NON-NLS-1$
-
- /**
- *
- */
- public Smooks10ConfigfileContentDescriber() {
- // TODO Auto-generated constructor stub
- }
-
- public void setInitializationData(IConfigurationElement config, String propertyName, Object data)
- throws CoreException {
-
- }
-
- public int describeXMLFile(InputStream input, IContentDescription description) throws IOException {
- byte[] bom = getByteOrderMark(input);
- String xmlDeclEncoding = "UTF-8"; //$NON-NLS-1$
- input.reset();
- if (bom != null) {
- if (bom == IContentDescription.BOM_UTF_16BE)
- xmlDeclEncoding = "UTF-16BE"; //$NON-NLS-1$
- else if (bom == IContentDescription.BOM_UTF_16LE)
- xmlDeclEncoding = "UTF-16LE"; //$NON-NLS-1$
- // skip BOM to make comparison simpler
- input.skip(bom.length);
- // set the BOM in the description if requested
- if (description != null && description.isRequested(IContentDescription.BYTE_ORDER_MARK))
- description.setProperty(IContentDescription.BYTE_ORDER_MARK, bom);
- }
- byte[] xmlPrefixBytes = XML_PREFIX.getBytes(xmlDeclEncoding);
- byte[] prefix = new byte[xmlPrefixBytes.length];
- if (input.read(prefix) < prefix.length)
- // there is not enough info to say anything
- return INDETERMINATE;
- for (int i = 0; i < prefix.length; i++)
- if (prefix[i] != xmlPrefixBytes[i])
- // we don't have a XMLDecl... there is not enough info to say
- // anything
- return INDETERMINATE;
- if (description == null)
- return VALID;
- // describe charset if requested
- if (description.isRequested(IContentDescription.CHARSET)) {
- String fullXMLDecl = readFullXMLDecl(input, xmlDeclEncoding);
- if (fullXMLDecl != null) {
- String charset = getCharset(fullXMLDecl);
- if (charset != null && !"UTF-8".equalsIgnoreCase(charset)) //$NON-NLS-1$
- // only set property if value is not default (avoid using a
- // non-default content description)
- description.setProperty(IContentDescription.CHARSET, getCharset(fullXMLDecl));
- }
- }
- return VALID;
- }
-
- public int describeXMLType(Reader input, IContentDescription description) throws IOException {
- BufferedReader reader = new BufferedReader(input);
- String line = reader.readLine();
- // end of stream
- if (line == null)
- return INDETERMINATE;
- // XMLDecl should be the first string (no blanks allowed)
- if (!line.startsWith(XML_PREFIX))
- return INDETERMINATE;
- if (description == null)
- return VALID;
- // describe charset if requested
- if ((description.isRequested(IContentDescription.CHARSET)))
- description.setProperty(IContentDescription.CHARSET, getCharset(line));
- return VALID;
- }
-
- public int describe(InputStream input, IContentDescription description) throws IOException {
- if (this.describeXMLFile(input, description) == INVALID) {
- return INVALID;
- }
- input.reset();
- return checkCriteria(new InputSource(input));
- }
-
- private String readFullXMLDecl(InputStream input, String unicodeEncoding) throws IOException {
- byte[] xmlDecl = new byte[100];
- int c = 0;
- // looks for XMLDecl ending char (?)
- int read = 0;
- while (read < xmlDecl.length && (c = input.read()) != -1 && c != '?')
- xmlDecl[read++] = (byte) c;
- return c == '?' ? new String(xmlDecl, 0, read, unicodeEncoding) : null;
- }
-
- public int describe(Reader input, IContentDescription description) throws IOException {
- if (this.describeXMLType(input, description) == INVALID) {
- return INVALID;
- }
- input.reset();
- return checkCriteria(new InputSource(input));
- }
-
- protected Smooks10ConfigFileHandle createHandle(){
- return new Smooks10ConfigFileHandle();
- }
-
- /**
- * To check the namespaces of the file
- *
- * @param contents
- * @return
- * @throws IOException
- */
- private int checkCriteria(InputSource contents) throws IOException {
- Smooks10ConfigFileHandle handle = createHandle();
- try {
- if (!handle.parseContents(contents)) {
- return INDETERMINATE;
- }
- } catch (ParserConfigurationException e) {
- return INDETERMINATE;
- }
- if (handle.isCorrectContentFile()) {
- return VALID;
- }
- return INDETERMINATE;
- }
-
- private String getCharset(String firstLine) {
- int encodingPos = firstLine.indexOf(ENCODING);
- if (encodingPos == -1)
- return null;
- char quoteChar = '"';
- int firstQuote = firstLine.indexOf(quoteChar, encodingPos);
- if (firstQuote == -1) {
- quoteChar = '\'';
- firstQuote = firstLine.indexOf(quoteChar, encodingPos);
- }
- if (firstQuote == -1 || firstLine.length() == firstQuote - 1)
- return null;
- int secondQuote = firstLine.indexOf(quoteChar, firstQuote + 1);
- if (secondQuote == -1)
- return null;
- return firstLine.substring(firstQuote + 1, secondQuote);
- }
-
- public QualifiedName[] getSupportedOptions() {
- return SUPPORTED_OPTIONS;
- }
-
- byte[] getByteOrderMark(InputStream input) throws IOException {
- int first = input.read();
- if (first == 0xEF) {
- // look for the UTF-8 Byte Order Mark (BOM)
- int second = input.read();
- int third = input.read();
- if (second == 0xBB && third == 0xBF)
- return IContentDescription.BOM_UTF_8;
- } else if (first == 0xFE) {
- // look for the UTF-16 BOM
- if (input.read() == 0xFF)
- return IContentDescription.BOM_UTF_16BE;
- } else if (first == 0xFF) {
- if (input.read() == 0xFE)
- return IContentDescription.BOM_UTF_16LE;
- }
- return null;
- }
-}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationOverviewPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationOverviewPage.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationOverviewPage.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -1,821 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors_10;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.List;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.edit.command.MoveCommand;
-import org.eclipse.emf.edit.command.RemoveCommand;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.emf.edit.provider.IItemPropertySource;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider;
-import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.viewers.DecoratingLabelProvider;
-import org.eclipse.jface.viewers.DoubleClickEvent;
-import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TableViewer;
-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.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.IFormColors;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.eclipse.ui.forms.events.HyperlinkAdapter;
-import org.eclipse.ui.forms.events.HyperlinkEvent;
-import org.eclipse.ui.forms.widgets.FormText;
-import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.ScrolledPageBook;
-import org.eclipse.ui.forms.widgets.Section;
-import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
-import org.jboss.tools.smooks.configuration.SmooksConstants;
-import org.jboss.tools.smooks.configuration.editors.ModelPanelCreator;
-import org.jboss.tools.smooks.configuration.editors.NewOrModifySmooksElementDialog;
-import org.jboss.tools.smooks.configuration.editors.SelectorCreationDialog;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.configuration.validate.ISmooksModelValidateListener;
-import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor;
-import org.jboss.tools.smooks.editor.ISmooksModelProvider;
-import org.jboss.tools.smooks.editor.ISourceSynchronizeListener;
-import org.jboss.tools.smooks10.model.smooks.DocumentRoot;
-import org.jboss.tools.smooks10.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks10.model.smooks.SmooksPackage;
-
-/**
- * @author Dart
- *
- */
-public class Smooks10ConfigurationOverviewPage extends FormPage implements ISmooksModelValidateListener,
- ISourceSynchronizeListener {
-
- private ISmooksModelProvider smooksModelProvider;
- private boolean lockEventFire = false;
- // private Button newParamButton;
- // private Button removeParamButton;
- // private Button upParamButton;
- // private Button downParamButton;
- // private Button paramPropertiesButton;
- // private TableViewer paramViewer;
- // private TableViewer conditionViewer;
- // private Button newConditionButton;
- // private Button removeConditionButton;
- // private Button upConditionButton;
- // private Button downConditionButton;
- // private Button conditionPropertiesButton;
- private Composite defaultSettingComposite;
- private Button newProfileButton;
- private Button removeProfileButton;
- private Button upProfileButton;
- private Button downProfileButton;
- private Button profilePropertiesButton;
- private TableViewer profileViewer;
- private ModelPanelCreator defaultSettingPanelCreator;
- private Section generalSettingSection;
- private Section globalParamSection;
- private Section conditionSection;
- private Section profilesSection;
- private Section settingSection;
- private Text smooksNameText;
- private Text smooksAuthorText;
-
- public Smooks10ConfigurationOverviewPage(FormEditor editor, String id, String title, ISmooksModelProvider provider) {
- super(editor, id, title);
- this.smooksModelProvider = provider;
- }
-
- public Smooks10ConfigurationOverviewPage(String id, String title, ISmooksModelProvider provider) {
- super(id, title);
- this.smooksModelProvider = provider;
- }
-
- protected void createFormContent(IManagedForm managedForm) {
- final ScrolledForm form = managedForm.getForm();
- FormToolkit toolkit = managedForm.getToolkit();
- toolkit.decorateFormHeading(form.getForm());
- String title = getTitle();
- form.setText(title);
- GridLayout gl = new GridLayout();
- gl.marginHeight = 0;
- gl.marginWidth = 0;
- form.getBody().setLayout(gl);
-
- ScrolledPageBook pageBook = new ScrolledPageBook(form.getBody());
- pageBook.setBackground(toolkit.getColors().getBackground());
- Composite mainComposite = pageBook.createPage(pageBook);
- pageBook.showPage(pageBook);
-
- GridData gd = new GridData(GridData.FILL_BOTH);
- pageBook.setLayoutData(gd);
-
- GridLayout mgl = new GridLayout();
- mgl.numColumns = 2;
- mgl.marginHeight = 13;
- mgl.horizontalSpacing = 20;
- mainComposite.setLayout(mgl);
-
- settingSection = toolkit.createSection(mainComposite, Section.DESCRIPTION | Section.TITLE_BAR);
- settingSection.setLayout(new FillLayout());
- settingSection.setText("Smooks configuration");
- settingSection.setDescription("Set the description for this Smooks configuration file.");
- Composite settingComposite = toolkit.createComposite(settingSection);
- settingSection.setClient(settingComposite);
- gd = new GridData();
- gd.widthHint = 500;
- settingSection.setLayoutData(gd);
-
- GridLayout sgl = new GridLayout();
- settingComposite.setLayout(sgl);
- sgl.numColumns = 2;
- // sgl.verticalSpacing = 8;
-
- createSettingSection(settingComposite, toolkit);
-
- createSmooksEditorNavigator(mainComposite, toolkit);
-
- generalSettingSection = toolkit.createSection(mainComposite, Section.DESCRIPTION | Section.TITLE_BAR
- | Section.TWISTIE | Section.EXPANDED);
- generalSettingSection.setLayout(new FillLayout());
- generalSettingSection.setText("Smooks Default Setting");
- generalSettingSection.setDescription("Define the Smooks configuration file default setting");
- defaultSettingComposite = toolkit.createComposite(generalSettingSection);
- generalSettingSection.setClient(defaultSettingComposite);
- gd = new GridData();
- gd.widthHint = 500;
- generalSettingSection.setLayoutData(gd);
-
- GridLayout ggl = new GridLayout();
- defaultSettingComposite.setLayout(ggl);
- ggl.numColumns = 2;
- ggl.verticalSpacing = 0;
-
- createDefaultSection(defaultSettingComposite, toolkit);
-
- profilesSection = toolkit.createSection(mainComposite, Section.DESCRIPTION | Section.TITLE_BAR
- | Section.TWISTIE);
- profilesSection.setDescription("Define the profiles");
- profilesSection.setText("Profiles");
- profilesSection.setLayout(new FillLayout());
- Composite profilesComposite = toolkit.createComposite(profilesSection);
- profilesSection.setClient(profilesComposite);
- gd = new GridData();
- gd.verticalAlignment = GridData.BEGINNING;
- gd.widthHint = 500;
- profilesSection.setLayoutData(gd);
-
- GridLayout pgl = new GridLayout();
- profilesComposite.setLayout(pgl);
- pgl.numColumns = 2;
-
- createProfilesSection(profilesComposite, toolkit);
-
- }
-
- private void createSettingSection(Composite settingComposite, FormToolkit toolkit) {
- toolkit.createLabel(settingComposite, "Smooks Platform Version : ").setForeground(
- toolkit.getColors().getColor(IFormColors.TITLE));
- int type = SWT.BORDER;
- if (SmooksUIUtils.isLinuxOS()) {
- type = SWT.BORDER;
- }
- final Combo combo = new Combo(settingComposite, type | SWT.READ_ONLY);
- combo.setEnabled(false);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- combo.setLayoutData(gd);
- for (int i = 0; i < SmooksConstants.SMOOKS_VERSIONS.length; i++) {
- String version = SmooksConstants.SMOOKS_VERSIONS[i];
- combo.add(version);
- }
-
- String version = getSmooksVersion();
- if (version != null)
- combo.setText(version);
- combo.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- if (lockEventFire)
- return;
- String v = combo.getText();
- if (smooksModelProvider != null) {
-// smooksModelProvider.setPlatformVersion(v);
- }
- }
- });
-
- toolkit.createLabel(settingComposite, "Name : ").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
- smooksNameText = toolkit.createText(settingComposite, "", SWT.NONE);
- smooksNameText.setLayoutData(gd);
- String name = null;// smooksModelProvider.getSmooksGraphicsExt().getName();
- if (name != null)
- smooksNameText.setText(name);
- smooksNameText.setEnabled(false);
- smooksNameText.addModifyListener(new ModifyListener() {
-
- public void modifyText(ModifyEvent e) {
- if (lockEventFire)
- return;
- if (smooksModelProvider != null) {
-// Command setCommand = SetCommand.create(smooksModelProvider.getEditingDomain(), smooksModelProvider
-// .getSmooksGraphicsExt(), GraphPackage.Literals.SMOOKS_GRAPHICS_EXT_TYPE__NAME,
-// smooksNameText.getText());
-// smooksModelProvider.getEditingDomain().getCommandStack().execute(setCommand);
- }
- }
- });
-
- toolkit.paintBordersFor(settingComposite);
-
- toolkit.createLabel(settingComposite, "Author : ").setForeground(
- toolkit.getColors().getColor(IFormColors.TITLE));
- smooksAuthorText = toolkit.createText(settingComposite, "", SWT.NONE);
- smooksAuthorText.setLayoutData(gd);
-
- String author = null;//smooksModelProvider.getSmooksGraphicsExt().getAuthor();
- if (author != null)
- smooksAuthorText.setText(author);
- smooksAuthorText.setEnabled(false);
-
- toolkit.createLabel(settingComposite, "");
-
- toolkit.paintBordersFor(settingComposite);
- }
-
- protected void createProfilesSection(Composite profilesComposite, FormToolkit toolkit) {
- if (smooksModelProvider != null) {
- AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain) smooksModelProvider
- .getEditingDomain();
- EObject profiles = getProfilesType();
- // if (m == null)
- // return;
-
- profileViewer = new TableViewer(profilesComposite);
- GridData gd = new GridData(GridData.FILL_BOTH);
- profileViewer.getControl().setLayoutData(gd);
- toolkit.paintBordersFor(profilesComposite);
- Composite buttonArea = toolkit.createComposite(profilesComposite);
- gd = new GridData(GridData.FILL_VERTICAL);
- gd.widthHint = 30;
- GridLayout bgl = new GridLayout();
- buttonArea.setLayout(bgl);
-
- newProfileButton = toolkit.createButton(buttonArea, "New", SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- newProfileButton.setLayoutData(gd);
-
- removeProfileButton = toolkit.createButton(buttonArea, "Remove", SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- removeProfileButton.setLayoutData(gd);
-
- upProfileButton = toolkit.createButton(buttonArea, "Up", SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- upProfileButton.setLayoutData(gd);
-
- downProfileButton = toolkit.createButton(buttonArea, "Down", SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- downProfileButton.setLayoutData(gd);
-
- profilePropertiesButton = toolkit.createButton(buttonArea, "Properties..", SWT.NONE);
- gd = new GridData(GridData.FILL_HORIZONTAL);
- profilePropertiesButton.setLayoutData(gd);
-
- profileViewer.setContentProvider(new AdapterFactoryContentProvider(editingDomain.getAdapterFactory()) {
-
- @Override
- public boolean hasChildren(Object object) {
- return false;
- }
-
- });
-
- profileViewer.setLabelProvider(new DecoratingLabelProvider(new AdapterFactoryLabelProvider(editingDomain
- .getAdapterFactory()) {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider
- * # getText(java.lang.Object)
- */
- @Override
- public String getText(Object object) {
- Object obj = AdapterFactoryEditingDomain.unwrap(object);
- if (obj instanceof EObject) {
- return super.getText(obj);
- }
- return super.getText(object);
- }
-
- }, SmooksConfigurationActivator.getDefault().getWorkbench().getDecoratorManager().getLabelDecorator()));
-
- if (profiles != null) {
- profileViewer.setInput(profiles);
- }
-
- profileViewer.addDoubleClickListener(new IDoubleClickListener() {
-
- public void doubleClick(DoubleClickEvent event) {
- openProfilePropertiesModifyDialog();
- }
- });
-
- profileViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-
- public void selectionChanged(SelectionChangedEvent event) {
- updateProfilesButtons();
- }
- });
-
- hookProfilesButtons();
- updateProfilesButtons();
- }
- }
-
- protected void openProfilePropertiesModifyDialog() {
- IStructuredSelection selection = (IStructuredSelection) profileViewer.getSelection();
- if (selection == null)
- return;
- Object obj = selection.getFirstElement();
- if (obj instanceof EObject) {
- EObject profile = (EObject) obj;
- EObject parent = getProfilesType();
- EStructuralFeature profileFeature = null;
- if (SmooksConstants.VERSION_1_0.equals(getSmooksVersion())) {
- profileFeature = org.jboss.tools.smooks10.model.smooks.SmooksPackage.Literals.PROFILES_TYPE__PROFILE;
- }
- if (SmooksConstants.VERSION_1_1.equals(getSmooksVersion())) {
- profileFeature = SmooksPackage.Literals.PROFILES_TYPE__PROFILE;
- }
-
- NewOrModifySmooksElementDialog dialog = new NewOrModifySmooksElementDialog(getEditorSite().getShell(),
- profileFeature, profile, parent, getManagedForm().getToolkit(), smooksModelProvider,
- Smooks10ConfigurationOverviewPage.this, true);
- dialog.open();
- }
- }
-
- protected void updateProfilesButtons() {
- if (getSmooksVersion() == null) {
- profilePropertiesButton.setEnabled(false);
- newProfileButton.setEnabled(false);
- removeProfileButton.setEnabled(false);
- upProfileButton.setEnabled(false);
- downProfileButton.setEnabled(false);
- return;
- }
- profilePropertiesButton.setEnabled(true);
- removeProfileButton.setEnabled(true);
- IStructuredSelection selection = (IStructuredSelection) profileViewer.getSelection();
- if (selection == null) {
- profilePropertiesButton.setEnabled(false);
- removeProfileButton.setEnabled(false);
- upProfileButton.setEnabled(false);
- downProfileButton.setEnabled(false);
- } else {
- if (selection.getFirstElement() == null) {
- profilePropertiesButton.setEnabled(false);
- removeProfileButton.setEnabled(false);
- upProfileButton.setEnabled(false);
- downProfileButton.setEnabled(false);
- return;
- }
-
- Object obj = selection.getFirstElement();
- if (obj instanceof EObject) {
- EObject profilesType = getProfilesType();
- if (profilesType == null)
- return;
- EObject v = (EObject) AdapterFactoryEditingDomain.unwrap(obj);
- EObject parent = v.eContainer();
- int index = parent.eContents().indexOf(v);
- Command command = MoveCommand.create(smooksModelProvider.getEditingDomain(), parent, null, obj,
- index - 1);
- upProfileButton.setEnabled(command.canExecute());
-
- Command command1 = MoveCommand.create(smooksModelProvider.getEditingDomain(), parent, null, obj,
- index + 1);
- downProfileButton.setEnabled(command1.canExecute());
- }
-
- if (selection.size() > 1) {
- profilePropertiesButton.setEnabled(false);
- removeProfileButton.setEnabled(false);
- }
- }
-
- }
-
- protected void hookProfilesButtons() {
- newProfileButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (getSmooksVersion() == null) {
- return;
- }
- EObject model = null;
- if (SmooksConstants.VERSION_1_0.equals(getSmooksVersion())) {
- model = org.jboss.tools.smooks10.model.smooks.SmooksFactory.eINSTANCE.createProfileType();
- }
- if (SmooksConstants.VERSION_1_1.equals(getSmooksVersion())) {
- model = SmooksFactory.eINSTANCE.createProfileType();
- }
- EObject parent = getProfilesType();
- boolean newParent = false;
- if (parent == null) {
- newParent = true;
- if (SmooksConstants.VERSION_1_0.equals(getSmooksVersion())) {
- parent = org.jboss.tools.smooks10.model.smooks.SmooksFactory.eINSTANCE.createProfilesType();
- }
- if (SmooksConstants.VERSION_1_1.equals(getSmooksVersion())) {
- parent = SmooksFactory.eINSTANCE.createProfilesType();
- }
- }
- EStructuralFeature profileFeature = null;
- if (SmooksConstants.VERSION_1_0.equals(getSmooksVersion())) {
- profileFeature = org.jboss.tools.smooks10.model.smooks.SmooksPackage.Literals.PROFILES_TYPE__PROFILE;
- }
- if (SmooksConstants.VERSION_1_1.equals(getSmooksVersion())) {
- profileFeature = SmooksPackage.Literals.PROFILES_TYPE__PROFILE;
- }
- NewOrModifySmooksElementDialog dialog = new NewOrModifySmooksElementDialog(getEditorSite().getShell(),
- profileFeature, model, parent, getManagedForm().getToolkit(), smooksModelProvider,
- Smooks10ConfigurationOverviewPage.this, false);
-
- EStructuralFeature profilesFeature = null;
- if (SmooksConstants.VERSION_1_0.equals(getSmooksVersion())) {
- profilesFeature = org.jboss.tools.smooks10.model.smooks.SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__PROFILES;
- }
- if (SmooksConstants.VERSION_1_1.equals(getSmooksVersion())) {
- profilesFeature = SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__PROFILES;
- }
- if (dialog.open() == Dialog.OK && newParent) {
- EObject resource = getSmooksResourceList();
- if (resource == null)
- return;
- Command command = SetCommand.create(smooksModelProvider.getEditingDomain(), resource,
- profilesFeature, parent);
- if (command.canExecute()) {
- smooksModelProvider.getEditingDomain().getCommandStack().execute(command);
- profileViewer.setInput(parent);
- }
- }
- super.widgetSelected(e);
- }
-
- });
- removeProfileButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- IStructuredSelection selection = (IStructuredSelection) profileViewer.getSelection();
- if (selection == null)
- return;
- Object obj = selection.getFirstElement();
- if (obj instanceof EObject) {
- EObject profile = (EObject) obj;
- EObject parent = getProfilesType();
- if (parent == null)
- return;
- CompoundCommand compoundCommand = new CompoundCommand();
- Command command = RemoveCommand.create(smooksModelProvider.getEditingDomain(), profile);
- compoundCommand.append(command);
- if (parent.eContents().size() == 1) {
- // remove parent;
- Command command1 = RemoveCommand.create(smooksModelProvider.getEditingDomain(), parent);
- compoundCommand.append(command1);
- }
- smooksModelProvider.getEditingDomain().getCommandStack().execute(compoundCommand);
- }
- }
-
- });
- upProfileButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- IStructuredSelection selection = (IStructuredSelection) profileViewer.getSelection();
- if (selection == null)
- return;
- Object obj = selection.getFirstElement();
- if (obj instanceof EObject) {
- EObject profilesType = getProfilesType();
- if (profilesType == null)
- return;
- EObject v = (EObject) AdapterFactoryEditingDomain.unwrap(obj);
- EObject parent = v.eContainer();
- int index = parent.eContents().indexOf(v);
- Command command = MoveCommand.create(smooksModelProvider.getEditingDomain(), parent, null, obj,
- index - 1);
- smooksModelProvider.getEditingDomain().getCommandStack().execute(command);
- }
- }
-
- });
- downProfileButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- IStructuredSelection selection = (IStructuredSelection) profileViewer.getSelection();
- if (selection == null)
- return;
- Object obj = selection.getFirstElement();
- if (obj instanceof EObject) {
- EObject profilesType = getProfilesType();
- if (profilesType == null)
- return;
- EObject v = (EObject) AdapterFactoryEditingDomain.unwrap(obj);
- EObject parent = v.eContainer();
- int index = parent.eContents().indexOf(v);
- Command command = MoveCommand.create(smooksModelProvider.getEditingDomain(), parent, null, obj,
- index + 1);
- smooksModelProvider.getEditingDomain().getCommandStack().execute(command);
- }
- }
-
- });
- profilePropertiesButton.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- openProfilePropertiesModifyDialog();
- super.widgetSelected(e);
- }
-
- });
-
- }
-
- private EObject getProfilesType() {
- if (smooksModelProvider != null) {
- EObject smooksModel = smooksModelProvider.getSmooksModel();
- if (smooksModel instanceof DocumentRoot) {
- EObject m = ((DocumentRoot) smooksModel).getSmooksResourceList().getProfiles();
- return m;
- }
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- EObject m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList()
- .getProfiles();
- return m;
- }
- }
- return null;
- }
-
- private String getSmooksVersion() {
- if (smooksModelProvider != null) {
- return smooksModelProvider.getPlatformVersion();
- }
- return null;
- }
-
- private void createNavigatorSection(Composite mainNavigatorComposite, FormToolkit toolkit, String title,
- String navigatorFilePath) {
- Section navigator = toolkit.createSection(mainNavigatorComposite, Section.TITLE_BAR);
- navigator.setText(title);
- navigator.setLayout(new FillLayout());
- Composite navigatorComposite = toolkit.createComposite(navigator);
- navigator.setClient(navigatorComposite);
-
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.verticalAlignment = GridData.BEGINNING;
- navigator.setLayoutData(gd);
-
- FormText formText = toolkit.createFormText(navigatorComposite, true);
- StringBuffer buf = new StringBuffer();
- InputStream inputStream = this.getClass().getResourceAsStream(navigatorFilePath);
- BufferedReader reader = null;
- if (inputStream != null) {
- try {
- reader = new BufferedReader(new InputStreamReader(inputStream));
- String line = reader.readLine();
- while (line != null) {
- buf.append(line);
- line = reader.readLine();
- }
- } catch (IOException e) {
-
- } finally {
- try {
- if (reader != null) {
- reader.close();
- }
- if (inputStream != null) {
- inputStream.close();
- }
- } catch (Throwable t) {
-
- }
- }
- }
- formText.setWhitespaceNormalized(true);
- String content = buf.toString();
- if (content != null) {
- try {
- formText.setText(content, true, false);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- formText.addHyperlinkListener(new HyperlinkAdapter() {
- public void linkActivated(HyperlinkEvent e) {
- Object href = e.getHref();
- if (href == null)
- return;
- activeNavigatorLink(href.toString());
- }
- });
- navigatorComposite.setLayout(new GridLayout());
- gd = new GridData(GridData.FILL_BOTH);
- formText.setLayoutData(gd);
-
- toolkit.createLabel(navigatorComposite, "");
- }
-
- private void createSmooksEditorNavigator(Composite mainComposite, FormToolkit toolkit) {
- Composite mainNavigatorComposite = toolkit.createComposite(mainComposite);
- GridData gd = new GridData(GridData.FILL_BOTH);
- gd.verticalSpan = 5;
- mainNavigatorComposite.setLayoutData(gd);
-
- GridLayout gl = new GridLayout();
- // gl.numColumns = 2;
- gl.marginWidth = 0;
- gl.marginHeight = 0;
- mainNavigatorComposite.setLayout(gl);
-
- createNavigatorSection(mainNavigatorComposite, toolkit, "Configuring Smooks Input",
- "/org/jboss/tools/smooks/configuration/navigator/DefaultSetting.htm");
- createNavigatorSection(mainNavigatorComposite, toolkit, "Configuring Message Filter(s)",
- "/org/jboss/tools/smooks/configuration/navigator/MessageFilterNavigator.htm");
- }
-
- protected void activeNavigatorLink(String href) {
- if (href == null)
- return;
- if (href.equals("reader_page")) {
- this.getEditor().setActivePage("reader_page");
- }
- if (href.equals("message_filter_page")) {
- this.getEditor().setActivePage("message_filter_page");
- }
- if (href.equals("source_page")) {
- this.getEditor().setActiveEditor(((AbstractSmooksFormEditor) getEditor()).getTextEditor());
- }
- if (href.equals("overview_default_setting")) {
- generalSettingSection.setFocus();
- }
- if (href.equals("overview_global_param")) {
- globalParamSection.setFocus();
- globalParamSection.setExpanded(true);
- }
- if (href.equals("overview_condition")) {
- conditionSection.setFocus();
- conditionSection.setExpanded(true);
- }
- if (href.equals("overview_profile")) {
- profilesSection.setFocus();
- profilesSection.setExpanded(true);
- }
- if (href.equals("selector_dialog")) {
- SelectorCreationDialog dialog = new SelectorCreationDialog(getEditorSite().getShell(), this.getEditor());
- try {
- dialog.open();
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- }
-
- private EObject getSmooksResourceList() {
- if (smooksModelProvider != null) {
- EObject m = null;
- EObject smooksModel = smooksModelProvider.getSmooksModel();
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
- }
- if (smooksModel instanceof DocumentRoot) {
- m = ((DocumentRoot) smooksModel).getSmooksResourceList();
- }
- return m;
- }
- return null;
- }
-
- private void createDefaultSection(Composite parent, FormToolkit toolkit) {
- ModelPanelCreator defaultSettingPanelCreator = getDefaultSettingPanelCreator();
- EObject model = getSmooksResourceList();
- if (model != null) {
- AdapterFactoryEditingDomain editingDomain = (AdapterFactoryEditingDomain) smooksModelProvider
- .getEditingDomain();
- IItemPropertySource itemPropertySource = (IItemPropertySource) editingDomain.getAdapterFactory().adapt(
- model, IItemPropertySource.class);
- if (model != null) {
- defaultSettingPanelCreator.createModelPanel(model, toolkit, parent, itemPropertySource,
- smooksModelProvider, getEditor());
- }
- }
-
- }
-
- public ModelPanelCreator getDefaultSettingPanelCreator() {
- if (defaultSettingPanelCreator == null) {
- defaultSettingPanelCreator = new ModelPanelCreator();
- }
- return defaultSettingPanelCreator;
- }
-
-// public void inputTypeChanged(SmooksGraphicsExtType extType) {
-//
-// }
-
- public void validateEnd(List<Diagnostic> diagnosticResult) {
- ModelPanelCreator creator = getDefaultSettingPanelCreator();
- creator.markPropertyUI(diagnosticResult, getSmooksResourceList());
- }
-
- public void validateStart() {
- }
-
- public void sourceChange(Object model) {
- lockEventFire = true;
-
-// String name = smooksModelProvider.getSmooksGraphicsExt().getName();
-// if (name != null)
-// smooksNameText.setText(name);
-//
-// String author = smooksModelProvider.getSmooksGraphicsExt().getAuthor();
-// if (author != null)
-// smooksAuthorText.setText(author);
-
- lockEventFire = false;
-
- disposeDefaultSettingCompositeControls();
- createDefaultSection(defaultSettingComposite, this.getManagedForm().getToolkit());
- defaultSettingComposite.getParent().layout();
- profileViewer.setInput(getProfilesType());
- }
-
- protected void disposeCompositeControls(Composite composite, Control[] ignoreControl) {
- if (composite != null) {
- Control[] children = composite.getChildren();
- for (int i = 0; i < children.length; i++) {
- Control child = children[i];
- if (ignoreControl != null) {
- for (int j = 0; j < ignoreControl.length; j++) {
- if (child == ignoreControl[j]) {
- continue;
- }
- }
- }
- child.dispose();
- child = null;
- }
- }
- }
-
- private void disposeDefaultSettingCompositeControls() {
- disposeCompositeControls(defaultSettingComposite, null);
- }
-
-// public void graphChanged(SmooksGraphicsExtType extType) {
-//
-// }
-
- public void graphPropertyChange(EStructuralFeature featre, Object value) {
-
- }
-
-}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationResourceConfigPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationResourceConfigPage.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10ConfigurationResourceConfigPage.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors_10;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.ui.forms.IManagedForm;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.jboss.tools.smooks.configuration.SmooksConstants;
-import org.jboss.tools.smooks.configuration.editors.SmooksConfigurationFormPage;
-import org.jboss.tools.smooks.configuration.editors.SmooksMasterDetailBlock;
-import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
-import org.jboss.tools.smooks.model.smooks.AbstractReader;
-import org.jboss.tools.smooks.model.smooks.ConditionsType;
-import org.jboss.tools.smooks.model.smooks.ParamsType;
-import org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig;
-import org.jboss.tools.smooks10.model.smooks.ProfilesType;
-import org.jboss.tools.smooks10.model.smooks.SmooksResourceListType;
-
-/**
- * @author Dart
- *
- */
-public class Smooks10ConfigurationResourceConfigPage extends SmooksConfigurationFormPage {
-
- public Smooks10ConfigurationResourceConfigPage(FormEditor editor, String id, String title) {
- super(editor, id, title);
- }
-
- public Smooks10ConfigurationResourceConfigPage(String id, String title) {
- super(id, title);
- }
-
- @Override
- protected void createMasterDetailBlock(IManagedForm managedForm) {
- // TODO Auto-generated method stub
- super.createMasterDetailBlock(managedForm);
- }
-
- @Override
- protected SmooksMasterDetailBlock createSmooksMasterDetailsBlock() {
- return new SmooksMasterDetailBlock(getEditor(),
- (AdapterFactoryEditingDomain) ((Smooks10MultiFormEditor) getEditor()).getEditingDomain()) {
- @Override
- protected Object getEmptyDefaultSelection(EObject smooksTreeViewerInput) {
- List<EObject> contents = smooksTreeViewerInput.eContents();
- for (Iterator<?> iterator = contents.iterator(); iterator.hasNext();) {
- EObject eObject = (EObject) iterator.next();
-
- if (smooksTreeViewerInput instanceof SmooksResourceListType
- && eObject instanceof AbstractResourceConfig) {
- return eObject;
- }
- }
- return super.getEmptyDefaultSelection(smooksTreeViewerInput);
- }
- };
- }
-
- @Override
- protected ViewerFilter[] createViewerFilters() {
- ViewerFilter filter = new ViewerFilter() {
-
- @Override
- public boolean select(Viewer viewer, Object parentElement, Object element) {
- Object obj = element;
- obj = AdapterFactoryEditingDomain.unwrap(obj);
- if (obj instanceof EObject) {
- if (obj instanceof ParamsType) {
- return false;
- }
- if (obj instanceof ConditionsType) {
- return false;
- }
- if (obj instanceof AbstractReader) {
- return false;
- }
- if (obj instanceof ProfilesType) {
- return false;
- }
- if (obj instanceof org.jboss.tools.smooks10.model.smooks.ProfilesType) {
- return false;
- }
- // SmooksGraphicsExtType extType =
- // getSmooksGraphicsExtType();
- String version = SmooksConstants.VERSION_1_0;
- if (SmooksUIUtils.isUnSupportElement(version, (EObject) obj)) {
- return false;
- }
- }
- return true;
- }
- };
-
- ViewerFilter[] filters = super.createViewerFilters();
- ViewerFilter[] newFilters = new ViewerFilter[filters.length + 1];
- newFilters[0] = filter;
- System.arraycopy(filters, 0, newFilters, 1, filters.length);
- return newFilters;
- }
-
- @Override
- protected void setPageTitle(ScrolledForm form) {
- // EObject smooksModel = ((ISmooksModelProvider)
- // getEditor()).getSmooksModel();
- // if (smooksModel != null) {
- // EObject parent = smooksModel;
- // while (parent != null) {
- // EObject old = parent;
- // parent = parent.eContainer();
- // if (parent == null) {
- // parent = old;
- // break;
- // }
- // }
- // if (parent instanceof DocumentRoot) {
- // title = "Smooks 1.1 - " + title;
- // }
- // if (parent instanceof
- // org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- // title = "Smooks 1.0 - " + title;
- // }
- // }
- form.setText("Message Filter");
- }
-
- @Override
- protected String getNewSmooksElementDescription() {
- return super.getNewSmooksElementDescription();
- }
-
- @Override
- protected String getNewSmooksElementTitle() {
- return super.getNewSmooksElementTitle();
- }
-
- @Override
- protected String getMainSectionDescription() {
- return super.getMainSectionDescription();
- }
-
- @Override
- protected String getMainSectionTitle() {
- return "Message Filtering Resources";
- }
-}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10InputFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10InputFormPage.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10InputFormPage.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -1,882 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors_10;
-
-import java.util.List;
-
-import org.eclipse.emf.common.util.Diagnostic;
-import org.eclipse.ui.forms.editor.FormEditor;
-import org.eclipse.ui.forms.editor.FormPage;
-import org.jboss.tools.smooks.configuration.validate.ISmooksModelValidateListener;
-import org.jboss.tools.smooks.editor.ISourceSynchronizeListener;
-
-/**
- * @author Dart
- *
- */
-public class Smooks10InputFormPage extends FormPage implements ISmooksModelValidateListener, ISourceSynchronizeListener {
-
-
-
- public Smooks10InputFormPage(FormEditor editor, String id, String title) {
- super(editor, id, title);
- // TODO Auto-generated constructor stub
- }
-
- public Smooks10InputFormPage(String id, String title) {
- super(id, title);
- // TODO Auto-generated constructor stub
- }
-
- public void validateEnd(List<Diagnostic> diagnosticResult) {
- // TODO Auto-generated method stub
-
- }
-
- public void validateStart() {
- // TODO Auto-generated method stub
-
- }
-
- public void sourceChange(Object model) {
- // TODO Auto-generated method stub
-
- }
-
-// private CheckboxTableViewer inputDataViewer;
-// private TreeViewer inputModelViewer;
-// private Combo readerCombo;
-// private List<Object> readerTypeList = new ArrayList<Object>();
-// private Composite readerConfigComposite;
-// private ModelPanelCreator modelPanelCreator;
-// protected boolean lockCheck = false;
-//
-// public Smooks10InputFormPage(FormEditor editor, String id, String title) {
-// super(editor, id, title);
-// }
-//
-// public Smooks10InputFormPage(String id, String title) {
-// super(id, title);
-// }
-//
-// @Override
-// protected void createFormContent(IManagedForm managedForm) {
-// final ScrolledForm form = managedForm.getForm();
-// FormToolkit toolkit = managedForm.getToolkit();
-// toolkit.decorateFormHeading(form.getForm());
-// form.setText("Input");
-// // // create master details UI
-// // createMasterDetailBlock(managedForm);
-// Composite leftComposite = toolkit.createComposite(form.getBody());
-// GridData gd = new GridData(GridData.FILL_BOTH);
-// gd.widthHint = 700;
-// leftComposite.setLayoutData(gd);
-//
-// Composite rightComposite = toolkit.createComposite(form.getBody());
-// gd = new GridData(GridData.FILL_BOTH);
-// rightComposite.setLayoutData(gd);
-//
-// GridLayout lgl = new GridLayout();
-// lgl.marginWidth = 0;
-// lgl.marginHeight = 0;
-// leftComposite.setLayout(lgl);
-//
-// GridLayout rgl = new GridLayout();
-// rgl.marginWidth = 0;
-// rgl.marginHeight = 0;
-// rightComposite.setLayout(rgl);
-//
-// createReaderSection(toolkit, leftComposite);
-// createInputDataSection(toolkit, rightComposite);
-// createReaderConfigSection(toolkit, leftComposite);
-// createInputModelViewerSection(toolkit, rightComposite);
-//
-// handleReaderCombo(readerCombo);
-//
-// GridLayout gridLayout = new GridLayout();
-// gridLayout.marginHeight = 13;
-// gridLayout.numColumns = 2;
-// gridLayout.horizontalSpacing = 20;
-// gridLayout.makeColumnsEqualWidth = true;
-// form.getBody().setLayout(gridLayout);
-// }
-//
-// private void createInputModelViewerSection(FormToolkit toolkit, Composite parent) {
-// Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.DESCRIPTION);
-// GridData gd = new GridData(GridData.FILL_BOTH);
-// // gd.verticalAlignment = GridData.BEGINNING;
-// section.setLayoutData(gd);
-// section.setText("Input Model View");
-// section.setDescription("View the XML structure model of the input data");
-// FillLayout flayout = new FillLayout();
-// section.setLayout(flayout);
-//
-// Composite mainContainer = toolkit.createComposite(section);
-// GridLayout gl = new GridLayout();
-// mainContainer.setLayout(gl);
-// section.setClient(mainContainer);
-//
-// Hyperlink refreshLink = toolkit.createHyperlink(mainContainer, "Refresh Input Model Viewer", SWT.NONE);
-// refreshLink.addHyperlinkListener(new IHyperlinkListener() {
-//
-// public void linkExited(HyperlinkEvent e) {
-// // TODO Auto-generated method stub
-//
-// }
-//
-// public void linkEntered(HyperlinkEvent e) {
-// // TODO Auto-generated method stub
-//
-// }
-//
-// public void linkActivated(HyperlinkEvent e) {
-// refreshInputModelView();
-// }
-// });
-//
-// Composite viewerContainer = toolkit.createComposite(mainContainer);
-// gd = new GridData(GridData.FILL_BOTH);
-// viewerContainer.setLayoutData(gd);
-//
-// FillLayout fillLayout = new FillLayout();
-// fillLayout.marginHeight = 1;
-// fillLayout.marginWidth = 1;
-// viewerContainer.setBackground(GraphicsConstants.BORDER_CORLOR);
-// viewerContainer.setLayout(fillLayout);
-// inputModelViewer = new TreeViewer(viewerContainer, SWT.NONE);
-// inputModelViewer.setContentProvider(new CompoundStructuredDataContentProvider());
-// inputModelViewer.setLabelProvider(new CompoundStructuredDataLabelProvider());
-// List<Object> inputList = generateInputData();
-// inputModelViewer.setInput(inputList);
-// inputModelViewer.addDoubleClickListener(new IDoubleClickListener() {
-// public void doubleClick(DoubleClickEvent event) {
-// }
-// });
-// inputModelViewer.addSelectionChangedListener(new ISelectionChangedListener() {
-// public void selectionChanged(SelectionChangedEvent event) {
-// // currentSelection = ((IStructuredSelection)
-// // event.getSelection()).getFirstElement();
-// }
-// });
-// SmooksUIUtils.expandSelectorViewer(inputList, inputModelViewer);
-//
-// }
-//
-// protected List<Object> generateInputData() {
-// return SelectorCreationDialog.generateInputDataForSmooks10();
-// }
-//
-// private void createReaderConfigSection(FormToolkit toolkit, Composite parent) {
-// Section section = toolkit.createSection(parent, Section.TITLE_BAR);
-// GridData gd = new GridData(GridData.FILL_BOTH);
-// section.setLayoutData(gd);
-// section.setText("Input Configuration");
-// section.setDescription("Configurate the input data");
-// FillLayout flayout = new FillLayout();
-// section.setLayout(flayout);
-//
-// ScrolledPageBook pageBook = new ScrolledPageBook(section);
-// pageBook.setBackground(toolkit.getColors().getBackground());
-// section.setClient(pageBook);
-//
-// readerConfigComposite = pageBook.createPage(pageBook);
-// pageBook.showPage(pageBook);
-//
-// GridLayout gl = new GridLayout();
-// gl.numColumns = 2;
-// readerConfigComposite.setLayout(gl);
-//
-// initReaderConfigSection();
-// }
-//
-// private void createReaderSection(FormToolkit toolkit, Composite parent) {
-// Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.DESCRIPTION);
-// GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-// gd.verticalAlignment = GridData.BEGINNING;
-// section.setLayoutData(gd);
-// section.setText("Input Type");
-// section.setDescription("Select the input type");
-// FillLayout flayout = new FillLayout();
-// section.setLayout(flayout);
-//
-// Composite mainComposite = toolkit.createComposite(section);
-// section.setClient(mainComposite);
-// GridLayout gl = new GridLayout();
-// gl.numColumns = 2;
-// mainComposite.setLayout(gl);
-//
-// toolkit.createLabel(mainComposite, "Input Type : ");
-//
-// readerCombo = new Combo(mainComposite, SWT.NONE | SWT.READ_ONLY);
-// gd = new GridData(GridData.FILL_HORIZONTAL);
-// readerCombo.setLayoutData(gd);
-//
-// toolkit.createLabel(mainComposite, " ");
-//
-// bindingReaderCombo();
-//
-// initReaderCombo();
-//
-// gd = new GridData(GridData.FILL_HORIZONTAL);
-// readerCombo.setLayoutData(gd);
-//
-// toolkit.paintBordersFor(mainComposite);
-// }
-//
-// private void initReaderConfigSection() {
-// Object reader = getCurrentReaderModel();
-// String type = getSmooksGraphicsExtType().getInputType();
-// if (reader instanceof EObject && type != null) {
-// // createReaderPanel((EObject) list.getAbstractReader().get(0));
-// } else {
-// disposeCompositeControls(readerConfigComposite, null);
-// }
-// }
-//
-// private String getCurrentReaderType() {
-// Object reader = getCurrentReaderModel();
-// return getReaderType(reader);
-// }
-//
-// private void initReaderCombo() {
-// if (readerCombo == null)
-// return;
-// SmooksResourceListType rlist = getSmooksConfigResourceList();
-// if (rlist == null) {
-// readerCombo.select(-1);
-// return;
-// }
-// SmooksGraphicsExtType ext = getSmooksGraphicsExtType();
-// String inputType = ext.getInputType();
-//
-// if (inputType == null) {
-// readerCombo.select(0);
-// return;
-// }
-// if (SmooksModelUtils.INPUT_TYPE_XML.equals(inputType)) {
-// readerCombo.select(1);
-// }
-// if (SmooksModelUtils.INPUT_TYPE_JAVA.equals(inputType)) {
-// readerCombo.select(2);
-// }
-// if (SmooksModelUtils.INPUT_TYPE_XSD.equals(inputType)) {
-// readerCombo.select(3);
-// }
-// return;
-// }
-//
-// private void handleReaderCombo(final Combo combo) {
-// combo.addSelectionListener(new SelectionListener() {
-//
-// public void widgetSelected(SelectionEvent e) {
-// Object newreader = getCurrentReaderModel();
-// if (newreader == null)
-// return;
-// // String type = getCurrentReaderType();
-// // if (type == null) {
-// // getSmooksGraphicsExtType().eUnset(GraphPackage.Literals.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE);
-// // } else {
-// // getSmooksGraphicsExtType().setInputType(type);
-// // }
-// readerChanged(newreader);
-// }
-//
-// public void widgetDefaultSelected(SelectionEvent e) {
-// // TODO Auto-generated method stub
-//
-// }
-// });
-// }
-//
-// // private Command createRemoveReaderCommand() {
-// // SmooksResourceListType rlist = getSmooksConfigResourceList();
-// // List<AbstractReader> readerList = rlist.getAbstractReader();
-// // CompoundCommand compoundCommand = new CompoundCommand();
-// // for (Iterator<?> iterator = readerList.iterator(); iterator.hasNext();) {
-// // AbstractReader abstractReader = (AbstractReader) iterator.next();
-// // Object readerEntry = createReaderEntry(abstractReader, false);
-// // if (readerEntry == null)
-// // continue;
-// // Command removeCommand = RemoveCommand.create(getEditingDomain(), rlist,
-// // SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_READER_GROUP,
-// // readerEntry);
-// // if (removeCommand.canExecute()) {
-// // compoundCommand.append(removeCommand);
-// // }
-// // }
-// // if (compoundCommand.isEmpty()) {
-// // return null;
-// // }
-// // return compoundCommand;
-// // }
-//
-// private String getReaderType(Object reader) {
-// if (reader instanceof XMLReader) {
-// return SmooksModelUtils.INPUT_TYPE_XML;
-// }
-// if (reader instanceof JavaReader) {
-// return SmooksModelUtils.INPUT_TYPE_JAVA;
-// }
-// if (reader instanceof XSDReader) {
-// return SmooksModelUtils.INPUT_TYPE_XSD;
-// }
-// return null;
-// }
-//
-// private void readerChanged(Object reader) {
-// String type = getCurrentReaderType();
-// String oldType = this.getSmooksGraphicsExtType().getInputType();
-//
-// if (type == null && oldType == null) {
-// return;
-// }
-// if (type != null && type.equals(oldType)) {
-// return;
-// }
-// if (oldType != null && oldType.equals(type)) {
-// return;
-// }
-//
-// Command setTypeCommand = SetCommand.create(getEditingDomain(), getSmooksGraphicsExtType(),
-// GraphPackage.Literals.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE, type);
-// CompoundCommand compoundCommand = new CompoundCommand();
-// compoundCommand.append(setTypeCommand);
-// if (readerConfigComposite != null) {
-// disposeCompositeControls(readerConfigComposite, null);
-// }
-// deactiveAllInputFile(compoundCommand);
-// if (!compoundCommand.isEmpty()) {
-// getEditingDomain().getCommandStack().execute(compoundCommand);
-// // createReaderPanel(((EObject) reader));
-// }
-//
-// if (inputDataViewer != null) {
-// inputDataViewer.refresh();
-// }
-// refreshInputModelView();
-// }
-//
-// private void deactiveAllInputFile(CompoundCommand command) {
-// SmooksGraphicsExtType ext = getSmooksGraphicsExtType();
-// List<InputType> inputList = ext.getInput();
-// for (Iterator<?> iterator = inputList.iterator(); iterator.hasNext();) {
-// InputType inputType = (InputType) iterator.next();
-// setInputDataActiveStatus(false, inputType, command);
-// }
-// }
-//
-// private void createReaderPanel(EObject reader) {
-// // disposeCompositeControls(readerConfigComposite, null);
-// // try {
-// // ModelPanelCreator modelPanelCreator = getModelPanelCreator();
-// // IItemPropertySource ps = (IItemPropertySource)
-// // getEditingDomain().getAdapterFactory().adapt(reader,
-// // IItemPropertySource.class);
-// // modelPanelCreator.createModelPanel(reader,
-// // getManagedForm().getToolkit(), readerConfigComposite, ps,
-// // (ISmooksModelProvider) getEditor(), getEditor());
-// // readerConfigComposite.getParent().layout();
-// // } catch (Exception e) {
-// // e.printStackTrace();
-// // }
-// }
-//
-// private ModelPanelCreator getModelPanelCreator() {
-// if (modelPanelCreator == null) {
-// modelPanelCreator = new ModelPanelCreator();
-// }
-// return modelPanelCreator;
-// }
-//
-// private void bindingReaderCombo() {
-// if (readerCombo == null)
-// return;
-//
-// readerCombo.removeAll();
-// readerTypeList.clear();
-//
-// readerCombo.add("No Input");
-// readerTypeList.add(new NullReader());
-// readerCombo.add("XML");
-// readerTypeList.add(new XMLReader());
-// readerCombo.add("Java");
-// readerTypeList.add(new JavaReader());
-// readerCombo.add("XSD/WSDL");
-// readerTypeList.add(new XSDReader());
-//
-// SmooksResourceListType resourceList = getSmooksConfigResourceList();
-//
-// if (resourceList == null) {
-// return;
-// }
-//
-// AdapterFactoryEditingDomain editDomain = getEditingDomain();
-// IEditingDomainItemProvider provider = (IEditingDomainItemProvider) editDomain.getAdapterFactory().adapt(
-// resourceList, IEditingDomainItemProvider.class);
-// Collection<?> collections = provider.getNewChildDescriptors(resourceList, editDomain, null);
-//
-// SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
-// String version = extType.getPlatformVersion();
-// OnlyReaderViewerFilter filter = new OnlyReaderViewerFilter();
-// for (Iterator<?> iterator = collections.iterator(); iterator.hasNext();) {
-// Object object = (Object) iterator.next();
-// if (object instanceof CommandParameter) {
-// Object value = ((CommandParameter) object).getValue();
-//
-// value = AdapterFactoryEditingDomain.unwrap(value);
-//
-// if (filter.select(null, null, value)) {
-// if (SmooksUIUtils.isUnSupportElement(version, (EObject) value)) {
-// continue;
-// }
-//
-// IItemLabelProvider lp = (IItemLabelProvider) editDomain.getAdapterFactory().adapt(value,
-// IItemLabelProvider.class);
-// String text = lp.getText(value);
-// readerCombo.add(text);
-// readerTypeList.add(value);
-// }
-// }
-// }
-// }
-//
-// private void setInputDataActiveStatus(boolean active, InputType inputType, final CompoundCommand command) {
-// List<ParamType> params = inputType.getParam();
-// boolean newOne = true;
-// for (Iterator<?> iterator = params.iterator(); iterator.hasNext();) {
-// ParamType paramType = (ParamType) iterator.next();
-// if (SmooksModelUtils.PARAM_NAME_ACTIVED.equals(paramType.getName())) {
-// Command setCommand = SetCommand.create(getEditingDomain(), paramType,
-// GraphPackage.Literals.PARAM_TYPE__VALUE, String.valueOf(active));
-// if (command != null) {
-// try {
-// command.append(setCommand);
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-// } else {
-// getEditingDomain().getCommandStack().execute(setCommand);
-// }
-// newOne = false;
-// break;
-// }
-// }
-// if (newOne) {
-// ParamType p = GraphFactory.eINSTANCE.createParamType();
-// p.setName(SmooksModelUtils.PARAM_NAME_ACTIVED);
-// p.setValue(String.valueOf(active));
-// inputType.getParam().add(p);
-// Command addCommand = AddCommand.create(getEditingDomain(), inputType,
-// GraphPackage.Literals.INPUT_TYPE__PARAM, p);
-// if (command != null) {
-// command.append(addCommand);
-// } else {
-// getEditingDomain().getCommandStack().execute(addCommand);
-// }
-// }
-// SmooksGraphicsExtType ext = getSmooksGraphicsExtType();
-// if (ext != null) {
-// List<ISmooksGraphChangeListener> listeners = ((SmooksGraphicsExtType) ext).getChangeListeners();
-// for (Iterator<?> iterator = listeners.iterator(); iterator.hasNext();) {
-// ISmooksGraphChangeListener smooksGraphChangeListener = (ISmooksGraphChangeListener) iterator.next();
-// smooksGraphChangeListener.inputTypeChanged((SmooksGraphicsExtType) ext);
-// }
-// }
-// }
-//
-// protected void createInputDataSection(FormToolkit toolkit, Composite parent) {
-// Section section = toolkit.createSection(parent, Section.TITLE_BAR | Section.DESCRIPTION);
-// GridData gd = new GridData(GridData.FILL_HORIZONTAL);
-// section.setLayoutData(gd);
-// section.setText("Input Data");
-// section.setDescription("Add a file to be the input data");
-// FillLayout flayout = new FillLayout();
-// section.setLayout(flayout);
-//
-// Composite mainComposite = toolkit.createComposite(section, SWT.NONE);
-// GridLayout gl = new GridLayout();
-// gl.numColumns = 2;
-// mainComposite.setLayout(gl);
-// section.setClient(mainComposite);
-//
-// Composite tableComposite = toolkit.createComposite(mainComposite, SWT.NONE);
-// FillLayout fillLayout = new FillLayout();
-// fillLayout.marginHeight = 1;
-// fillLayout.marginWidth = 1;
-// gd = new GridData(GridData.FILL_BOTH);
-// gd.heightHint = 200;
-// tableComposite.setLayoutData(gd);
-// tableComposite.setBackground(GraphicsConstants.BORDER_CORLOR);
-// tableComposite.setLayout(fillLayout);
-//
-// inputDataViewer = CheckboxTableViewer.newCheckList(tableComposite, SWT.MULTI | SWT.FULL_SELECTION);
-// // inputDataViewer.set
-// inputDataViewer.setCheckStateProvider(new ICheckStateProvider() {
-//
-// public boolean isGrayed(Object element) {
-// return isIncorrectInputType((InputType) element);
-// }
-//
-// public boolean isChecked(Object element) {
-// if (element instanceof InputType) {
-// List<ParamType> params = ((InputType) element).getParam();
-// for (Iterator<?> iterator = params.iterator(); iterator.hasNext();) {
-// ParamType paramType = (ParamType) iterator.next();
-// if (SmooksModelUtils.PARAM_NAME_ACTIVED.equals(paramType.getName())) {
-// String value = paramType.getValue();
-// if (value == null)
-// return false;
-// value = value.trim();
-// return "true".equalsIgnoreCase(value);
-// }
-// }
-// }
-// return false;
-// }
-// });
-//
-// // inputDataViewer.addDoubleClickListener(new IDoubleClickListener() {
-// // public void doubleClick(DoubleClickEvent event) {
-// // InputType inputType =(InputType)
-// // ((IStructuredSelection)inputDataViewer.getSelection()).getFirstElement();
-// // String path = SmooksModelUtils.getInputPath(inputType);
-// // }
-// // });
-//
-// // IFile file = File
-//
-// inputDataViewer.addCheckStateListener(new ICheckStateListener() {
-//
-// public void checkStateChanged(CheckStateChangedEvent event) {
-// if (lockCheck)
-// return;
-// boolean checked = event.getChecked();
-// InputType inputType = (InputType) event.getElement();
-// if (isIncorrectInputType(inputType)) {
-// lockCheck = true;
-// inputDataViewer.setChecked(inputType, false);
-// lockCheck = false;
-// return;
-// }
-// List<ParamType> params = inputType.getParam();
-//
-// if (checked) {
-// boolean newOne = true;
-// for (Iterator<?> iterator = params.iterator(); iterator.hasNext();) {
-// ParamType paramType = (ParamType) iterator.next();
-// if (SmooksModelUtils.PARAM_NAME_ACTIVED.equals(paramType.getName())) {
-// Command setCommand = SetCommand.create(getEditingDomain(), paramType,
-// GraphPackage.Literals.PARAM_TYPE__VALUE, String.valueOf(checked));
-// getEditingDomain().getCommandStack().execute(setCommand);
-// newOne = false;
-// break;
-// }
-// }
-// if (newOne) {
-// ParamType p = GraphFactory.eINSTANCE.createParamType();
-// p.setName(SmooksModelUtils.PARAM_NAME_ACTIVED);
-// p.setValue(String.valueOf(checked));
-// Command addCommand = AddCommand.create(getEditingDomain(), inputType,
-// GraphPackage.Literals.INPUT_TYPE__PARAM, p);
-// getEditingDomain().getCommandStack().execute(addCommand);
-// inputType.getParam().add(p);
-// }
-//
-// Object[] checkedObjects = inputDataViewer.getCheckedElements();
-// for (int i = 0; i < checkedObjects.length; i++) {
-// InputType type = (InputType) checkedObjects[i];
-// if (type == event.getElement())
-// continue;
-// List<ParamType> params1 = type.getParam();
-// for (Iterator<?> iterator = params1.iterator(); iterator.hasNext();) {
-// ParamType paramType = (ParamType) iterator.next();
-// if (SmooksModelUtils.PARAM_NAME_ACTIVED.equals(paramType.getName())) {
-// Command setCommand = SetCommand.create(getEditingDomain(), paramType,
-// GraphPackage.Literals.PARAM_TYPE__VALUE, String.valueOf(!checked));
-// getEditingDomain().getCommandStack().execute(setCommand);
-// break;
-// }
-// }
-// lockCheck = true;
-// inputDataViewer.setChecked(type, false);
-// lockCheck = false;
-// }
-//
-// } else {
-// for (Iterator<?> iterator = params.iterator(); iterator.hasNext();) {
-// ParamType paramType = (ParamType) iterator.next();
-// if (SmooksModelUtils.PARAM_NAME_ACTIVED.equals(paramType.getName())) {
-// Command setCommand = SetCommand.create(getEditingDomain(), paramType,
-// GraphPackage.Literals.PARAM_TYPE__VALUE, String.valueOf(checked));
-// getEditingDomain().getCommandStack().execute(setCommand);
-//
-// break;
-// }
-// }
-// }
-//
-// SmooksGraphicsExtType ext = getSmooksGraphicsExtType();
-// if (ext != null) {
-// List<ISmooksGraphChangeListener> listeners = ((SmooksGraphicsExtType) ext).getChangeListeners();
-// for (Iterator<?> iterator = listeners.iterator(); iterator.hasNext();) {
-// ISmooksGraphChangeListener smooksGraphChangeListener = (ISmooksGraphChangeListener) iterator
-// .next();
-// smooksGraphChangeListener.inputTypeChanged((SmooksGraphicsExtType) ext);
-// }
-// }
-//
-// }
-// });
-// TableColumn header = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
-// header.setText("Type");
-// header.setWidth(100);
-// TableColumn pathColumn = new TableColumn(inputDataViewer.getTable(), SWT.NONE);
-// pathColumn.setText("Path");
-// pathColumn.setWidth(300);
-//
-// // TableColumn extColumn = new TableColumn(inputDataViewer.getTable(),
-// // SWT.NONE);
-// // extColumn.setText("Extension Paramers");
-// // extColumn.setWidth(400);
-// inputDataViewer.setContentProvider(new ExtentionInputContentProvider());
-// inputDataViewer.setLabelProvider(new InputDataViewerLabelProvider());
-// inputDataViewer.getTable().setHeaderVisible(true);
-// inputDataViewer.getTable().setLinesVisible(true);
-// SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
-// if (extType != null) {
-// inputDataViewer.setInput(extType);
-// }
-// Composite buttonComposite = toolkit.createComposite(mainComposite, SWT.NONE);
-// gd = new GridData(GridData.FILL_VERTICAL);
-// buttonComposite.setLayoutData(gd);
-// GridLayout l = new GridLayout();
-// buttonComposite.setLayout(l);
-//
-// Button addButton = toolkit.createButton(buttonComposite, "Add", SWT.FLAT);
-// gd = new GridData(GridData.FILL_HORIZONTAL);
-// addButton.setLayoutData(gd);
-// addButton.addSelectionListener(new SelectionAdapter() {
-//
-// public void widgetSelected(SelectionEvent e) {
-// showInputDataWizard();
-// }
-//
-// });
-//
-// Button removeButton = toolkit.createButton(buttonComposite, "Delete", SWT.FLAT);
-// gd = new GridData(GridData.FILL_HORIZONTAL);
-// removeButton.setLayoutData(gd);
-// removeButton.addSelectionListener(new SelectionAdapter() {
-//
-// public void widgetSelected(SelectionEvent e) {
-// IStructuredSelection selection = (IStructuredSelection) inputDataViewer.getSelection();
-// if (selection != null) {
-// SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
-// if (extType != null) {
-// boolean canFireEvent = false;
-// Command rc = RemoveCommand.create(getEditingDomain(), selection.toList());
-// if (rc.canExecute()) {
-// getEditingDomain().getCommandStack().execute(rc);
-// canFireEvent = true;
-// }
-//
-// if (!canFireEvent)
-// return;
-//
-// List<ISmooksGraphChangeListener> listeners = extType.getChangeListeners();
-// for (Iterator<?> iterator = listeners.iterator(); iterator.hasNext();) {
-// ISmooksGraphChangeListener smooksGraphChangeListener = (ISmooksGraphChangeListener) iterator
-// .next();
-// smooksGraphChangeListener.inputTypeChanged(extType);
-// }
-// }
-// }
-// }
-// });
-// }
-//
-// protected SmooksGraphicsExtType getSmooksGraphicsExtType() {
-// SmooksGraphicsExtType extType = ((Smooks10MultiFormEditor) getEditor()).getSmooksGraphicsExt();
-// return extType;
-// }
-//
-// protected AdapterFactoryEditingDomain getEditingDomain() {
-// AdapterFactoryEditingDomain editDomain = (AdapterFactoryEditingDomain) ((Smooks10MultiFormEditor) this
-// .getEditor()).getEditingDomain();
-// return editDomain;
-// }
-//
-// protected SmooksResourceListType getSmooksConfigResourceList() {
-// EObject doc = ((Smooks10MultiFormEditor) this.getEditor()).getSmooksModel();
-// if (doc instanceof DocumentRoot) {
-// return ((DocumentRoot) doc).getSmooksResourceList();
-// }
-// return null;
-// }
-//
-// protected void showInputDataWizard() {
-// StructuredDataSelectionWizard wizard = new StructuredDataSelectionWizard();
-// wizard.setInput(getEditorInput());
-// wizard.setSite(getEditorSite());
-// wizard.setForcePreviousAndNextButtons(true);
-// StructuredDataSelectionWizardDailog dialog = new StructuredDataSelectionWizardDailog(
-// getEditorSite().getShell(), wizard, getSmooksGraphicsExtType());
-// if (dialog.show() == Dialog.OK) {
-// SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
-// String type = dialog.getType();
-// String path = dialog.getPath();
-// Properties pros = dialog.getProperties();
-// SmooksUIUtils.recordInputDataInfomation(getEditingDomain(), null, extType, type, path, pros);
-// }
-// }
-//
-// private void refreshInputModelView() {
-// if (inputModelViewer != null) {
-// List<Object> input = generateInputData();
-// inputModelViewer.setInput(input);
-// SmooksUIUtils.expandSelectorViewer(input, inputModelViewer);
-// }
-// }
-//
-// public void inputTypeChanged(SmooksGraphicsExtType extType) {
-// if (inputDataViewer != null)
-// inputDataViewer.refresh();
-// refreshInputModelView();
-// }
-//
-// protected void disposeCompositeControls(Composite composite, Control[] ignoreControl) {
-// if (composite != null) {
-// Control[] children = composite.getChildren();
-// for (int i = 0; i < children.length; i++) {
-// Control child = children[i];
-// if (ignoreControl != null) {
-// for (int j = 0; j < ignoreControl.length; j++) {
-// if (child == ignoreControl[j]) {
-// continue;
-// }
-// }
-// }
-// child.dispose();
-// child = null;
-// }
-// }
-// }
-//
-// private Object getCurrentReaderModel() {
-// if (readerCombo == null || readerCombo.isDisposed())
-// return null;
-// int index = readerCombo.getSelectionIndex();
-// if (index < 0)
-// return null;
-// return readerTypeList.get(index);
-// }
-//
-// public void sourceChange(Object model) {
-// bindingReaderCombo();
-// initReaderCombo();
-// initReaderConfigSection();
-// if (inputDataViewer != null) {
-// inputDataViewer.setInput(getSmooksGraphicsExtType());
-// inputDataViewer.refresh();
-// }
-// refreshInputModelView();
-// }
-//
-// public void graphChanged(SmooksGraphicsExtType extType) {
-// // TODO Auto-generated method stub
-//
-// }
-//
-// public void graphPropertyChange(EStructuralFeature featre, Object value) {
-// // TODO Auto-generated method stub
-//
-// }
-//
-// public void validateEnd(List<Diagnostic> diagnosticResult) {
-// Object model = getCurrentReaderModel();
-// if (model == null)
-// return;
-// if (model instanceof EObject) {
-// this.getModelPanelCreator().markPropertyUI(diagnosticResult, (EObject) model);
-// }
-// }
-//
-// public void validateStart() {
-//
-// }
-//
-// protected boolean isIncorrectInputType(InputType element) {
-// if (element == null)
-// return false;
-// if (element instanceof InputType) {
-// String type = ((InputType) element).getType();
-// int index = readerCombo.getSelectionIndex();
-// if (index == -1)
-// return true;
-//
-// Object reader = readerTypeList.get(index);
-// if (reader instanceof NullReader) {
-// return true;
-// }
-//
-// if (reader instanceof XMLReader) {
-// if (!SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
-// return true;
-// }
-// }
-// if (reader instanceof XSDReader) {
-// if (!SmooksModelUtils.INPUT_TYPE_XSD.equals(type)) {
-// return true;
-// }
-// }
-// if (reader instanceof JavaReader) {
-// if (!SmooksModelUtils.INPUT_TYPE_JAVA.equals(type)) {
-// return true;
-// }
-// }
-//
-// }
-// return false;
-// }
-//
-// private class NullReader {
-//
-// }
-//
-// private class XMLReader {
-//
-// }
-//
-// private class XSDReader {
-//
-// }
-//
-// private class JavaReader {
-//
-// }
-//
-// private class InputDataViewerLabelProvider extends ExtentionInputLabelProvider implements ITableColorProvider {
-//
-// public Color getBackground(Object element, int columnIndex) {
-// if (isIncorrectInputType((InputType) element)) {
-// // return ColorConstants.darkGray;
-// }
-// return null;
-// }
-//
-// public Color getForeground(Object element, int columnIndex) {
-// if (isIncorrectInputType((InputType) element)) {
-// return ColorConstants.lightGray;
-// }
-// return null;
-// }
-// }
-}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -1,208 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.smooks.configuration.editors_10;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.ui.PartInitException;
-import org.jboss.tools.smooks.configuration.editors.SmooksConfigurationFormPage;
-import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor;
-
-/**
- *
- * @author Dart Peng (dpeng(a)redhat.com) Date Apr 1, 2009
- */
-public class Smooks10MultiFormEditor extends AbstractSmooksFormEditor implements ISelectionProvider {
-
- public static final String EDITOR_ID = "org.jboss.tools.smooks.configuration.editors.MultiPageEditor_1_0";
-
- private SmooksConfigurationFormPage configurationPage;
-
- private Smooks10ConfigurationOverviewPage overViewPage;
-
- private Smooks10InputFormPage readerPage;
-
- private ISelection selection;
-
- private Collection<ISelectionChangedListener> selectionChangeListener = new ArrayList<ISelectionChangedListener>();
-
- /*
- * (non-Javadoc)
- *
- * @see org.jboss.tools.smooks.editor.AbstractSmooksFormEditor#addPages()
- */
- @Override
- protected void addPages() {
- overViewPage = createSmooksConfigurationOverviewPage();
- addValidateListener(overViewPage);
- addSourceSynchronizeListener(overViewPage);
- // addSmooksGraphExtetionListener(overViewPage);
- try {
- int index = this.addPage(overViewPage);
- setPageText(index, "Overview");
- } catch (PartInitException e) {
- e.printStackTrace();
- }
-
- // readerPage = new Smooks10InputFormPage(this, "reader_page", "Input");
- // addValidateListener(readerPage);
- // addSourceSynchronizeListener(readerPage);
- // // addSmooksGraphExtetionListener(readerPage);
- // try {
- // int index = this.addPage(readerPage);
- // setPageText(index, "Input");
- // } catch (PartInitException e) {
- // e.printStackTrace();
- // }
-
- configurationPage = createSmooksConfigurationFormPage();
- addValidateListener(configurationPage);
- addSourceSynchronizeListener(configurationPage);
- // addSmooksGraphExtetionListener(configurationPage);
- try {
- int index = this.addPage(configurationPage);
- setPageText(index, "Message Filter");
- } catch (PartInitException e) {
- e.printStackTrace();
- }
-
- super.addPages();
- }
-
- // @Override
- // protected SmooksGraphicsExtType createSmooksGraphcsExtType(Object
- // smooksModel) {
- // SmooksResourceListType resourceList = null;
- // if (smooksModel instanceof DocumentRoot) {
- // resourceList = ((DocumentRoot) smooksModel).getSmooksResourceList();
- // }
- //
- // if (resourceList == null) {
- // return null;
- // }
- //
- // FeatureMap map = resourceList.getMixed();
- // Object obj =
- // map.get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT,
- // true);
- // if(obj instanceof List<?>){
- // if(((List<?>)obj).isEmpty()){
- // ((List<Object>)obj).add(GraphFactory.eINSTANCE.createSmooksGraphicsExtType());
- // }
- // Object oooo = ((List<?>)obj).get(0);
- // if(oooo instanceof SmooksGraphicsExtType){
- // return ((SmooksGraphicsExtType)oooo);
- // }
- // }
- // return null;
- // }
- //
- // @Override
- // protected void generateSmooksGraphExtWithSave() {
- // super.generateSmooksGraphExtWithSave();
- // }
-
- private Smooks10ConfigurationOverviewPage createSmooksConfigurationOverviewPage() {
- return new Smooks10ConfigurationOverviewPage(this, "overview_page", "Overview", this);
- }
-
- @Override
- public void doSave(IProgressMonitor monitor) {
- super.doSave(monitor);
- }
-
- protected SmooksConfigurationFormPage createSmooksConfigurationFormPage() {
- return new Smooks10ConfigurationResourceConfigPage(this, "message_filter_page", "Design Page");
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.jboss.tools.smooks.editor.AbstractSmooksFormEditor#
- * activeRecentAffectedModel(java.util.Collection)
- */
- @Override
- public void activeRecentAffectedModel(Collection<?> collection) {
- final Collection<?> theSelection = collection;
- if (theSelection != null && !theSelection.isEmpty() && configurationPage != null) {
- List<Object> newList = new ArrayList<Object>();
- for (Iterator<?> iterator = theSelection.iterator(); iterator.hasNext();) {
- Object object = (Object) iterator.next();
- // if (object instanceof IWrapperItemProvider) {
- // newList.add(((IWrapperItemProvider) object).getValue());
- // }
- newList.add(object);
- }
- configurationPage.setSelectionToViewer(newList);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @seeorg.jboss.tools.smooks.editor.AbstractSmooksFormEditor#
- * createNewModelViaTextPage()
- */
- @Override
- protected void createNewModelViaTextPage() {
- super.createNewModelViaTextPage();
- }
-
- public void addSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangeListener.add(listener);
- }
-
- public ISelection getSelection() {
- return this.selection;
- }
-
- public void removeSelectionChangedListener(ISelectionChangedListener listener) {
- selectionChangeListener.remove(listener);
- }
-
- public void setSelection(ISelection selection) {
- if (selection != null) {
- if (selection.equals(this.selection)) {
- return;
- }
- }
- this.selection = selection;
-
- for (Iterator<?> iterator = this.selectionChangeListener.iterator(); iterator.hasNext();) {
- ISelectionChangedListener l = (ISelectionChangedListener) iterator.next();
- l.selectionChanged(new SelectionChangedEvent(this, getSelection()));
- }
- }
-
- // public void addSmooksGraphExtetionListener(ISmooksGraphChangeListener
- // listener) {
- // SmooksGraphicsExtType ex = getSmooksGraphicsExt();
- // if (ex != null) {
- // ex.addSmooksGraphChangeListener(listener);
- // }
- // }
- //
- // public void removeSmooksGraphExtetionListener(ISmooksGraphChangeListener
- // listener) {
- // SmooksGraphicsExtType ex = getSmooksGraphicsExt();
- // if (ex != null) {
- // ex.removeSmooksGraphChangeListener(listener);
- // }
- // }
-}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SelectorValidator.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -92,6 +92,9 @@
sperator = " ";
}
if (feature != null && path != null) {
+ if("#document".equals(path)){
+ return null;
+ }
Object node = null;
for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
Object obj = (Object) iterator.next();
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -61,8 +61,8 @@
import org.jboss.tools.smooks.model.json.provider.JsonItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.medi.provider.MEdiItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.smooks.provider.SmooksItemProviderAdapterFactory;
+import org.jboss.tools.smooks.model.smooks.util.SmooksResourceFactoryImpl;
import org.jboss.tools.smooks.model.xsl.provider.XslItemProviderAdapterFactory;
-import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
/**
* @author Dart (dpeng(a)redhat.com)
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -32,7 +32,6 @@
import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator;
import org.jboss.tools.smooks.configuration.SmooksConstants;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
-import org.jboss.tools.smooks.configuration.editors_10.Smooks10MultiFormEditor;
/**
*
@@ -139,9 +138,6 @@
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
FileEditorInput editorInput = new FileEditorInput(configFile);
try {
- if (fversion.equals(SmooksConstants.VERSION_1_0)) {
- page.openEditor(editorInput, Smooks10MultiFormEditor.EDITOR_ID, true);
- }
if (fversion.equals(SmooksConstants.VERSION_1_1) || fversion.equals(SmooksConstants.VERSION_1_2)) {
page.openEditor(editorInput, SmooksMultiFormEditor.EDITOR_ID, true);
}
@@ -191,15 +187,6 @@
private InputStream openContentStream(String version) {
String contents = "";
- if (SmooksConstants.VERSION_1_0.equals(version)) {
- contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
- + "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.0.xsd\" xmlns:graph = \"http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd\">\n"//$NON-NLS-1$
- + " <resource-config selector=\"global-parameters\">\n"//$NON-NLS-1$
- + " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
- + " </resource-config>\n"//$NON-NLS-1$
- + " <graph:smooks-graphics-ext platformVersion = \"1.0\"/>\n"//$NON-NLS-1$
- + "</smooks-resource-list>"; //$NON-NLS-1$
- }
if (SmooksConstants.VERSION_1_1.equals(version)) {
contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
+ "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\" xmlns:graph = \"http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd\">\n"//$NON-NLS-1$
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -92,9 +92,9 @@
import org.jboss.tools.smooks.model.smooks.DocumentRoot;
import org.jboss.tools.smooks.model.smooks.ParamType;
import org.jboss.tools.smooks.model.smooks.provider.SmooksItemProviderAdapterFactory;
+import org.jboss.tools.smooks.model.smooks.util.SmooksResourceFactoryImpl;
import org.jboss.tools.smooks.model.validation10.provider.Validation10ItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.xsl.provider.XslItemProviderAdapterFactory;
-import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
public class AbstractSmooksFormEditor extends FormEditor implements IEditingDomainProvider,
ISmooksModelValidateListener, ISmooksModelProvider {
@@ -239,14 +239,18 @@
}
protected void fillComments(Document document, EObject rootModel) {
- if (rootModel instanceof DocumentRoot) {
- EObject rootElementModel = ((DocumentRoot) rootModel).getSmooksResourceList();
- Element rootElement = document.getRootElement();
- try {
- fillComments(rootElementModel, rootElement);
- } catch (Exception e) {
- e.printStackTrace();
+ try {
+ if (rootModel instanceof DocumentRoot) {
+ EObject rootElementModel = ((DocumentRoot) rootModel).getSmooksResourceList();
+ Element rootElement = document.getRootElement();
+ try {
+ fillComments(rootElementModel, rootElement);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
+ } catch (Throwable t) {
+ // ignore exception;
}
}
@@ -362,10 +366,6 @@
protected void initEditingDomain() {
adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
- // add smooks 1.0 item provider model
- adapterFactory
- .addAdapterFactory(new org.jboss.tools.smooks10.model.smooks.provider.SmooksItemProviderAdapterFactory());
-
// add smooks 1.1.2 EMF item provider model
adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new XslItemProviderAdapterFactory());
@@ -662,9 +662,6 @@
public EObject getSmooksResourceList() {
EObject m = null;
EObject smooksModel = getSmooksModel();
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
- }
if (smooksModel instanceof DocumentRoot) {
m = ((DocumentRoot) smooksModel).getSmooksResourceList();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -385,7 +385,8 @@
mappingList.addAll(mappings);
}
} catch (Exception e) {
- e.printStackTrace();
+ // ignore exception
+// e.printStackTrace();
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -891,9 +891,6 @@
if (smooksModelProvider != null) {
EObject m = null;
EObject smooksModel = smooksModelProvider.getSmooksModel();
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
- }
if (smooksModel instanceof DocumentRoot) {
m = ((DocumentRoot) smooksModel).getSmooksResourceList();
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -94,8 +94,8 @@
*
*/
public class SmooksProcessGraphicalEditor extends FormPage implements ISelectionChangedListener,
- ISourceSynchronizeListener, IPropertyListener, ISmooksModelValidateListener,
- IProcessProvider, PropertyChangeListener {
+ ISourceSynchronizeListener, IPropertyListener, ISmooksModelValidateListener, IProcessProvider,
+ PropertyChangeListener {
private List<IAction> processPanelActions = new ArrayList<IAction>();
@@ -705,12 +705,12 @@
});
}
-// public SmooksGraphicsExtType getSmooksGraphicsExtType() {
-// if (smooksModelProvider != null) {
-// return smooksModelProvider.getSmooksGraphicsExt();
-// }
-// return null;
-// }
+ // public SmooksGraphicsExtType getSmooksGraphicsExtType() {
+ // if (smooksModelProvider != null) {
+ // return smooksModelProvider.getSmooksGraphicsExt();
+ // }
+ // return null;
+ // }
/**
* @return the smooksModelProvider
@@ -731,9 +731,6 @@
if (smooksModelProvider != null) {
EObject m = null;
EObject smooksModel = smooksModelProvider.getSmooksModel();
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
- }
if (smooksModel instanceof DocumentRoot) {
m = ((DocumentRoot) smooksModel).getSmooksResourceList();
}
@@ -915,7 +912,7 @@
if (!isSingltonEditor(id)) {
String idref = generateTaskSpecailID((TaskType) model);
if (idref != null) {
-// idref = id + "_" + idref;
+ // idref = id + "_" + idref;
if (getRegisteTaskPage(idref) == null) {
IEditorPart editor = createEditorPart(id);
this.registeTaskDetailsPage(editor, idref);
@@ -1039,35 +1036,36 @@
// }
}
-// public void graphChanged(SmooksGraphicsExtType extType) {
-// Collection<Object> editors = registedTaskPages.values();
-// for (Iterator<?> iterator = editors.iterator(); iterator.hasNext();) {
-// Object object = (Object) iterator.next();
-// if (object instanceof ISmooksGraphChangeListener) {
-// ((ISmooksGraphChangeListener) object).graphChanged(extType);
-// }
-// }
-// }
+ // public void graphChanged(SmooksGraphicsExtType extType) {
+ // Collection<Object> editors = registedTaskPages.values();
+ // for (Iterator<?> iterator = editors.iterator(); iterator.hasNext();) {
+ // Object object = (Object) iterator.next();
+ // if (object instanceof ISmooksGraphChangeListener) {
+ // ((ISmooksGraphChangeListener) object).graphChanged(extType);
+ // }
+ // }
+ // }
-// public void graphPropertyChange(EStructuralFeature featre, Object value) {
-// Collection<Object> editors = registedTaskPages.values();
-// for (Iterator<?> iterator = editors.iterator(); iterator.hasNext();) {
-// Object object = (Object) iterator.next();
-// if (object instanceof ISmooksGraphChangeListener) {
-// ((ISmooksGraphChangeListener) object).graphPropertyChange(featre, value);
-// }
-// }
-// }
+ // public void graphPropertyChange(EStructuralFeature featre, Object value)
+ // {
+ // Collection<Object> editors = registedTaskPages.values();
+ // for (Iterator<?> iterator = editors.iterator(); iterator.hasNext();) {
+ // Object object = (Object) iterator.next();
+ // if (object instanceof ISmooksGraphChangeListener) {
+ // ((ISmooksGraphChangeListener) object).graphPropertyChange(featre, value);
+ // }
+ // }
+ // }
-// public void inputTypeChanged(SmooksGraphicsExtType extType) {
-// Collection<Object> editors = registedTaskPages.values();
-// for (Iterator<?> iterator = editors.iterator(); iterator.hasNext();) {
-// Object object = (Object) iterator.next();
-// if (object instanceof ISmooksGraphChangeListener) {
-// ((ISmooksGraphChangeListener) object).inputTypeChanged(extType);
-// }
-// }
-// }
+ // public void inputTypeChanged(SmooksGraphicsExtType extType) {
+ // Collection<Object> editors = registedTaskPages.values();
+ // for (Iterator<?> iterator = editors.iterator(); iterator.hasNext();) {
+ // Object object = (Object) iterator.next();
+ // if (object instanceof ISmooksGraphChangeListener) {
+ // ((ISmooksGraphChangeListener) object).inputTypeChanged(extType);
+ // }
+ // }
+ // }
public void propertyChanged(Object source, int propId) {
this.firePropertyChange(propId);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessType.java 2009-11-28 08:59:12 UTC (rev 18898)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/process/ProcessType.java 2009-11-28 09:12:26 UTC (rev 18899)
@@ -36,7 +36,7 @@
public static final String PRO_ADD_CHILD = "pro_add_child";
- public static final String PRO_REMOVE_CHILD = "pro_add_child";
+ public static final String PRO_REMOVE_CHILD = "pro_remove_child";
public void addPropertyChangeListener(PropertyChangeListener listener);
15 years, 1 month
JBoss Tools SVN: r18898 - in trunk/smooks: plugins/org.jboss.tools.smooks.core/META-INF and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-28 03:59:12 -0500 (Sat, 28 Nov 2009)
New Revision: 18898
Removed:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractResourceConfig.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ConditionType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/DocumentRoot.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ImportType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ParamType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfileType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfilesType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceConfigType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksPackage.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksResourceListType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksAdapterFactory.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceFactoryImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksSwitch.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksXMLProcessor.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksSAXXMLHandler.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/AbstractAnyType.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/impl/AbstractAnyTypeImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/util/SmooksResourceImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java
trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/AbstractSmooks11ModelTestCase.java
trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/BaseTestCase.java
trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/ParseConfigFileTestCase.java
Log:
JBIDE-5249
Remove the EMF models codes and all codes associated them for Smooks v1.0
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-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/META-INF/MANIFEST.MF 2009-11-28 08:59:12 UTC (rev 18898)
@@ -113,9 +113,6 @@
org.jboss.tools.smooks.model.xsl.impl,
org.jboss.tools.smooks.model.xsl.provider,
org.jboss.tools.smooks.model.xsl.util,
- org.jboss.tools.smooks10.model.smooks,
- org.jboss.tools.smooks10.model.smooks.impl,
- org.jboss.tools.smooks10.model.smooks.provider,
org.jboss.tools.smooks10.model.smooks.util
Bundle-Vendor: %Bundle-Vendor.0
Bundle-Localization: plugin
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.xml 2009-11-28 08:59:12 UTC (rev 18898)
@@ -4,30 +4,6 @@
<extension
point="org.eclipse.core.contenttype.contentTypes">
</extension>
- <extension point="org.eclipse.emf.ecore.generated_package">
- <package
- uri="http://www.milyn.org/xsd/smooks-1.0.xsd"
- class="org.jboss.tools.smooks10.model.smooks.SmooksPackage"
- genModel="model/smooks_1_0.genmodel"/>
- </extension>
-
- <extension point="org.eclipse.emf.ecore.extension_parser">
- <parser
- type="smooks10"
- class="org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl"/>
- </extension>
- <extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
- <factory
- uri="http://www.milyn.org/xsd/smooks-1.0.xsd"
- class="org.jboss.tools.smooks10.model.smooks.provider.SmooksItemProviderAdapterFactory"
- supportedTypes=
- "org.eclipse.emf.edit.provider.IEditingDomainItemProvider
- org.eclipse.emf.edit.provider.IStructuredItemContentProvider
- org.eclipse.emf.edit.provider.ITreeItemContentProvider
- org.eclipse.emf.edit.provider.IItemLabelProvider
- org.eclipse.emf.edit.provider.IItemPropertySource"/>
- </extension>
-
<extension point="org.eclipse.emf.ecore.generated_package">
<package
uri="http://www.milyn.org/xsd/smooks/groovy-1.1.xsd"
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksSAXXMLHandler.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksSAXXMLHandler.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksSAXXMLHandler.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -12,6 +12,10 @@
import java.util.Map;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.xmi.XMLHelper;
import org.eclipse.emf.ecore.xmi.XMLResource;
@@ -32,6 +36,94 @@
/*
* (non-Javadoc)
*
+ * @see
+ * org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler#processObject(org.eclipse
+ * .emf.ecore.EObject)
+ */
+ @Override
+ protected void processObject(EObject object) {
+ if (object instanceof AbstractAnyType) {
+ ((AbstractAnyType) object).setLockCOmmentIndexChange(true);
+ }
+ super.processObject(object);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.emf.ecore.xmi.impl.XMLHandler#endElement(java.lang.String,
+ * java.lang.String, java.lang.String)
+ */
+ @Override
+ public void endElement(String uri, String localName, String name) {
+ elements.pop();
+ Object type = types.pop();
+ if (type == OBJECT_TYPE) {
+ if (text == null) {
+ Object object = objects.pop();
+ if (object instanceof AbstractAnyType) {
+ ((AbstractAnyType) object).setLockCOmmentIndexChange(false);
+ }
+ mixedTargets.pop();
+ } else {
+ EObject object = objects.popEObject();
+ if (object instanceof AbstractAnyType) {
+ ((AbstractAnyType) object).setLockCOmmentIndexChange(false);
+ }
+ if (mixedTargets.peek() != null
+ && (object.eContainer() != null || recordUnknownFeature
+ && (eObjectToExtensionMap.containsValue(object) || ((InternalEObject) object)
+ .eDirectResource() != null))) {
+ handleMixedText();
+ mixedTargets.pop();
+ } else {
+ if (text.length() != 0) {
+ handleProxy((InternalEObject) object, text.toString().trim());
+ }
+ mixedTargets.pop();
+ text = null;
+ }
+ }
+ } else if (isIDREF) {
+ Object object = objects.pop();
+ if (object instanceof AbstractAnyType) {
+ ((AbstractAnyType) object).setLockCOmmentIndexChange(false);
+ }
+ mixedTargets.pop();
+ if (text != null) {
+ setValueFromId(objects.peekEObject(), (EReference) type, text.toString());
+ text = null;
+ }
+ isIDREF = false;
+ } else if (isTextFeatureValue(type)) {
+ EObject eObject = objects.popEObject();
+ if (eObject instanceof AbstractAnyType) {
+ ((AbstractAnyType) eObject).setLockCOmmentIndexChange(false);
+ }
+ mixedTargets.pop();
+ if (eObject == null) {
+ eObject = objects.peekEObject();
+ }
+ setFeatureValue(eObject, (EStructuralFeature) type, text == null ? null : text.toString());
+ text = null;
+ }
+
+ if (isSimpleFeature) {
+ types.pop();
+ Object object = objects.pop();
+ if (object instanceof AbstractAnyType) {
+ ((AbstractAnyType) object).setLockCOmmentIndexChange(false);
+ }
+ mixedTargets.pop();
+ isSimpleFeature = false;
+ }
+ helper.popContext(prefixesToFactories);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.eclipse.emf.ecore.xmi.impl.XMLHandler#comment(char[], int, int)
*/
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/AbstractAnyType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/AbstractAnyType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/AbstractAnyType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -31,6 +31,10 @@
void addComment(String comment , Integer index);
+ boolean isLockCommentIndexChange();
+
+ void setLockCOmmentIndexChange(boolean lock);
+
List<String> getCommentList();
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/impl/AbstractAnyTypeImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/impl/AbstractAnyTypeImpl.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/common/impl/AbstractAnyTypeImpl.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -7,11 +7,18 @@
package org.jboss.tools.smooks.model.common.impl;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
+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.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl;
import org.jboss.tools.smooks.model.common.AbstractAnyType;
import org.jboss.tools.smooks.model.common.CommonPackage;
@@ -25,16 +32,185 @@
*
* @generated
*/
-public abstract class AbstractAnyTypeImpl extends AnyTypeImpl implements AbstractAnyType {
+public abstract class AbstractAnyTypeImpl extends AnyTypeImpl implements AbstractAnyType, Adapter {
protected List<String> commentsList = new ArrayList<String>();
protected Map<String, Integer> commentIndexMap = new HashMap<String, Integer>();
+ protected boolean lock = true;
+
+ protected List<Object> oldContents = null;
+
/*
* (non-Javadoc)
*
* @see
+ * org.jboss.tools.smooks.model.common.AbstractAnyType#isLockCommentIndexChange
+ * ()
+ */
+ public boolean isLockCommentIndexChange() {
+ return lock;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.model.common.AbstractAnyType#setLockCOmmentIndexChange
+ * ()
+ */
+ public void setLockCOmmentIndexChange(boolean lock) {
+ this.lock = lock;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.emf.common.notify.Adapter#getTarget()
+ */
+ public Notifier getTarget() {
+ return this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.emf.common.notify.Adapter#isAdapterForType(java.lang.Object)
+ */
+ public boolean isAdapterForType(Object type) {
+ return false;
+ }
+
+ protected void synchronizeOldObjects(Notification notification) {
+ int eventType = notification.getEventType();
+ Object feature = notification.getFeature();
+ if (EAttribute.class.isInstance(feature)) {
+ return;
+ }
+ switch (eventType) {
+ case Notification.ADD:
+ case Notification.ADD_MANY:
+ oldContents.clear();
+ oldContents.addAll(this.eContents());
+ break;
+ case Notification.SET:
+ if (notification.getNewValue() != null) {
+ oldContents.clear();
+ oldContents.addAll(this.eContents());
+ }
+ break;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.emf.common.notify.Adapter#notifyChanged(org.eclipse.emf.common
+ * .notify.Notification)
+ */
+ public void notifyChanged(Notification notification) {
+ synchronizeOldObjects(notification);
+ if (lock)
+ return;
+ int eventType = notification.getEventType();
+ Object feature = notification.getFeature();
+ if (EAttribute.class.isInstance(feature)) {
+ return;
+ }
+ switch (eventType) {
+ case Notification.ADD:
+ // case Notification.ADD_MANY:
+ Object addedValue = notification.getNewValue();
+ changeCommentIndex(true, addedValue);
+ break;
+ case Notification.ADD_MANY:
+ Object addedValues = notification.getOldValue();
+ if (addedValues instanceof Collection<?>) {
+ for (Iterator<?> iterator = ((Collection<?>) addedValues).iterator(); iterator.hasNext();) {
+ Object av = (Object) iterator.next();
+ changeCommentIndex(true, av);
+ }
+ }
+ break;
+ case Notification.REMOVE:
+ // case Notification.REMOVE_MANY:
+ Object removedValue = notification.getOldValue();
+ changeCommentIndex(false, removedValue);
+ break;
+ case Notification.REMOVE_MANY:
+ Object removedValues = notification.getOldValue();
+ if (removedValues instanceof Collection<?>) {
+ for (Iterator<?> iterator = ((Collection<?>) removedValues).iterator(); iterator.hasNext();) {
+ Object rv = (Object) iterator.next();
+ changeCommentIndex(false, rv);
+ }
+ }
+ break;
+ case Notification.SET:
+ Object value = notification.getNewValue();
+ Object oldValue = notification.getOldValue();
+ if (value != null) {
+ changeCommentIndex(true, value);
+ } else {
+ changeCommentIndex(false, oldValue);
+ }
+ break;
+ }
+ }
+
+ private void changeCommentIndex(boolean add, Object value) {
+ try {
+ List<EObject> contents = this.eContents();
+ int index = contents.indexOf(value);
+ if (!add) {
+ index = oldContents.indexOf(value);
+ oldContents.remove(value);
+ }
+ // ??? what happen?
+ if (index == -1)
+ return;
+ Iterator<String> key = commentIndexMap.keySet().iterator();
+ while (key.hasNext()) {
+ String k = key.next();
+ Integer i = getCommentIndex(k);
+ if (i.intValue() < index) {
+
+ } else {
+ if (add) {
+ i = new Integer(i.intValue() + 1);
+ } else {
+ if (i.intValue() > index) {
+ i = new Integer(i.intValue() - 1);
+ }
+ }
+ commentIndexMap.remove(key);
+ commentIndexMap.put(k, i);
+ }
+ }
+ } catch (Throwable t) {
+ // ignore exception
+ }
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.emf.common.notify.Adapter#setTarget(org.eclipse.emf.common
+ * .notify.Notifier)
+ */
+ public void setTarget(Notifier newTarget) {
+
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
* org.jboss.tools.smooks.model.common.AbstractAnyType#addComment(java.lang
* .String, java.lang.Object)
*/
@@ -79,6 +255,8 @@
*/
protected AbstractAnyTypeImpl() {
super();
+ eAdapters().add(this);
+ oldContents = new ArrayList<Object>();
}
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/util/SmooksResourceImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/util/SmooksResourceImpl.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/util/SmooksResourceImpl.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -7,16 +7,21 @@
package org.jboss.tools.smooks.model.smooks.util;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
import java.io.Writer;
+import java.util.Iterator;
+import java.util.List;
import java.util.Map;
-import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.xmi.DOMHandler;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+import org.jboss.tools.smooks.model.common.AbstractAnyType;
import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.xml.sax.InputSource;
/**
* <!-- begin-user-doc --> The <b>Resource </b> associated with the package.
@@ -37,7 +42,52 @@
public SmooksResourceImpl(URI uri) {
super(uri);
}
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(org.xml.sax.InputSource, java.util.Map)
+ */
+ @Override
+ public void doLoad(InputSource inputSource, Map<?, ?> options) throws IOException {
+ // TODO Auto-generated method stub
+ super.doLoad(inputSource, options);
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(java.io.InputStream, java.util.Map)
+ */
+ @Override
+ public void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException {
+ super.doLoad(inputStream, options);
+ unlockCommentIndexChange(getContents());
+ }
+
+ protected void unlockCommentIndexChange(List<EObject> objs){
+ for (Iterator<?> iterator = objs.iterator(); iterator.hasNext();) {
+ EObject eObject = (EObject) iterator.next();
+ if(eObject instanceof AbstractAnyType){
+ ((AbstractAnyType)eObject).setLockCOmmentIndexChange(false);
+ }
+ unlockCommentIndexChange(eObject.eContents());
+ }
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl#doLoad(org.w3c.dom.Node, java.util.Map)
+ */
+ @Override
+ public void doLoad(Node node, Map<?, ?> options) throws IOException {
+ // TODO Auto-generated method stub
+ super.doLoad(node, options);
+ }
+
+
+
/*
* (non-Javadoc)
*
@@ -62,7 +112,6 @@
return super.save(doc, options, handler);
}
-
/*
* (non-Javadoc)
*
@@ -70,19 +119,21 @@
*/
@Override
public void save(Map<?, ?> options) throws IOException {
-// IResource resource = getResource(this);
-// if (resource != null && resource.exists() && (resource instanceof IFile)) {
-// ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
-// doSave(outputStream, options);
-//
-// try {
-// ((IFile) resource).setContents(new ByteArrayInputStream(outputStream.toByteArray()), true, false, null);
-// } catch (CoreException e) {
-// throw new IOException(e.getMessage());
-// }
-// } else {
- super.save(options);
-// }
+ // IResource resource = getResource(this);
+ // if (resource != null && resource.exists() && (resource instanceof
+ // IFile)) {
+ // ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ // doSave(outputStream, options);
+ //
+ // try {
+ // ((IFile) resource).setContents(new
+ // ByteArrayInputStream(outputStream.toByteArray()), true, false, null);
+ // } catch (CoreException e) {
+ // throw new IOException(e.getMessage());
+ // }
+ // } else {
+ super.save(options);
+ // }
}
/*
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractResourceConfig.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractResourceConfig.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractResourceConfig.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,22 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Resource Config</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getAbstractResourceConfig()
- * @model abstract="true"
- * extendedMetaData="name='abstract-resource-config' kind='empty'"
- * @generated
- */
-public interface AbstractResourceConfig extends AbstractType {
-} // AbstractResourceConfig
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/AbstractType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,24 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.xml.type.AnyType;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Abstract Type</b></em>'.
- * <!-- end-user-doc -->
- *
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getAbstractType()
- * @model abstract="true"
- * @generated
- */
-public interface AbstractType extends EObject, AnyType {
-} // AbstractType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ConditionType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ConditionType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ConditionType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,114 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Condition Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Resource Targetting Condition
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getValue <em>Value</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getEvaluator <em>Evaluator</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getConditionType()
- * @model extendedMetaData="name='condition_._type' kind='simple'"
- * @generated
- */
-public interface ConditionType extends AbstractType {
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getConditionType_Value()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="name=':0' kind='simple'"
- * @generated
- */
- String getValue();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getValue <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- void setValue(String value);
-
- /**
- * Returns the value of the '<em><b>Evaluator</b></em>' attribute.
- * The default value is <code>"org.milyn.javabean.expression.BeanMapExpressionEvaluator"</code>.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Evaluator</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Evaluator</em>' attribute.
- * @see #isSetEvaluator()
- * @see #unsetEvaluator()
- * @see #setEvaluator(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getConditionType_Evaluator()
- * @model default="org.milyn.javabean.expression.BeanMapExpressionEvaluator" unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='evaluator'"
- * @generated
- */
- String getEvaluator();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getEvaluator <em>Evaluator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Evaluator</em>' attribute.
- * @see #isSetEvaluator()
- * @see #unsetEvaluator()
- * @see #getEvaluator()
- * @generated
- */
- void setEvaluator(String value);
-
- /**
- * Unsets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getEvaluator <em>Evaluator</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #isSetEvaluator()
- * @see #getEvaluator()
- * @see #setEvaluator(String)
- * @generated
- */
- void unsetEvaluator();
-
- /**
- * Returns whether the value of the '{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getEvaluator <em>Evaluator</em>}' attribute is set.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return whether the value of the '<em>Evaluator</em>' attribute is set.
- * @see #unsetEvaluator()
- * @see #getEvaluator()
- * @see #setEvaluator(String)
- * @generated
- */
- boolean isSetEvaluator();
-
-} // ConditionType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/DocumentRoot.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/DocumentRoot.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/DocumentRoot.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,328 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.common.util.EMap;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Smooks10 Document Root</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getMixed <em>Mixed</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getAbstractResourceConfig <em>Abstract Resource Config</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getCondition <em>Condition</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getImport <em>Import</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getParam <em>Param</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfile <em>Profile</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfiles <em>Profiles</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResource <em>Resource</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResourceConfig <em>Resource Config</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getSmooksResourceList <em>Smooks Resource List</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot()
- * @model extendedMetaData="name='' kind='mixed'"
- * @generated
- */
-public interface DocumentRoot extends EObject {
- /**
- * Returns the value of the '<em><b>Mixed</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mixed</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Mixed</em>' attribute list.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Mixed()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true"
- * extendedMetaData="kind='elementWildcard' name=':mixed'"
- * @generated
- */
- FeatureMap getMixed();
-
- /**
- * Returns the value of the '<em><b>XMLNS Prefix Map</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XMLNS Prefix Map</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XMLNS Prefix Map</em>' map.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_XMLNSPrefixMap()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xmlns:prefix'"
- * @generated
- */
- EMap<String, String> getXMLNSPrefixMap();
-
- /**
- * Returns the value of the '<em><b>XSI Schema Location</b></em>' map.
- * The key is of type {@link java.lang.String},
- * and the value is of type {@link java.lang.String},
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>XSI Schema Location</em>' map isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>XSI Schema Location</em>' map.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_XSISchemaLocation()
- * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry<org.eclipse.emf.ecore.EString, org.eclipse.emf.ecore.EString>" transient="true"
- * extendedMetaData="kind='attribute' name='xsi:schemaLocation'"
- * @generated
- */
- EMap<String, String> getXSISchemaLocation();
-
- /**
- * Returns the value of the '<em><b>Abstract Resource Config</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Abstract Resource Config</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Abstract Resource Config</em>' containment reference.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_AbstractResourceConfig()
- * @model containment="true" upper="-2" transient="true" changeable="false" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='abstract-resource-config' namespace='##targetNamespace'"
- * @generated
- */
- AbstractResourceConfig getAbstractResourceConfig();
-
- /**
- * Returns the value of the '<em><b>Condition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Condition</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Condition</em>' containment reference.
- * @see #setCondition(ConditionType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Condition()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='condition' namespace='##targetNamespace'"
- * @generated
- */
- ConditionType getCondition();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getCondition <em>Condition</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Condition</em>' containment reference.
- * @see #getCondition()
- * @generated
- */
- void setCondition(ConditionType value);
-
- /**
- * Returns the value of the '<em><b>Import</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Import</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Import</em>' containment reference.
- * @see #setImport(ImportType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Import()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='import' namespace='##targetNamespace' affiliation='abstract-resource-config'"
- * @generated
- */
- ImportType getImport();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getImport <em>Import</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Import</em>' containment reference.
- * @see #getImport()
- * @generated
- */
- void setImport(ImportType value);
-
- /**
- * Returns the value of the '<em><b>Param</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Param</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Param</em>' containment reference.
- * @see #setParam(ParamType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Param()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='param' namespace='##targetNamespace'"
- * @generated
- */
- ParamType getParam();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getParam <em>Param</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Param</em>' containment reference.
- * @see #getParam()
- * @generated
- */
- void setParam(ParamType value);
-
- /**
- * Returns the value of the '<em><b>Profile</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Profile</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Profile</em>' containment reference.
- * @see #setProfile(ProfileType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Profile()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='profile' namespace='##targetNamespace'"
- * @generated
- */
- ProfileType getProfile();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfile <em>Profile</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Profile</em>' containment reference.
- * @see #getProfile()
- * @generated
- */
- void setProfile(ProfileType value);
-
- /**
- * Returns the value of the '<em><b>Profiles</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Profiles</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Profiles</em>' containment reference.
- * @see #setProfiles(ProfilesType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Profiles()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='profiles' namespace='##targetNamespace'"
- * @generated
- */
- ProfilesType getProfiles();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfiles <em>Profiles</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Profiles</em>' containment reference.
- * @see #getProfiles()
- * @generated
- */
- void setProfiles(ProfilesType value);
-
- /**
- * Returns the value of the '<em><b>Resource</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Resource</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Resource</em>' containment reference.
- * @see #setResource(ResourceType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_Resource()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='resource' namespace='##targetNamespace'"
- * @generated
- */
- ResourceType getResource();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResource <em>Resource</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Resource</em>' containment reference.
- * @see #getResource()
- * @generated
- */
- void setResource(ResourceType value);
-
- /**
- * Returns the value of the '<em><b>Resource Config</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Resource Config</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Resource Config</em>' containment reference.
- * @see #setResourceConfig(ResourceConfigType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_ResourceConfig()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='resource-config' namespace='##targetNamespace' affiliation='abstract-resource-config'"
- * @generated
- */
- ResourceConfigType getResourceConfig();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResourceConfig <em>Resource Config</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Resource Config</em>' containment reference.
- * @see #getResourceConfig()
- * @generated
- */
- void setResourceConfig(ResourceConfigType value);
-
- /**
- * Returns the value of the '<em><b>Smooks Resource List</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Smooks Resource List</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Smooks Resource List</em>' containment reference.
- * @see #setSmooksResourceList(SmooksResourceListType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooks10DocumentRoot_SmooksResourceList()
- * @model containment="true" upper="-2" transient="true" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='smooks-resource-list' namespace='##targetNamespace'"
- * @generated
- */
- SmooksResourceListType getSmooksResourceList();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getSmooksResourceList <em>Smooks Resource List</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Smooks Resource List</em>' containment reference.
- * @see #getSmooksResourceList()
- * @generated
- */
- void setSmooksResourceList(SmooksResourceListType value);
-
-} // Smooks10DocumentRoot
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ImportType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ImportType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ImportType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,58 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Import Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Smooks Resource Configuration Import
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ImportType#getFile <em>File</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getImportType()
- * @model extendedMetaData="name='import_._type' kind='empty'"
- * @generated
- */
-public interface ImportType extends AbstractResourceConfig {
- /**
- * Returns the value of the '<em><b>File</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>File</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>File</em>' attribute.
- * @see #setFile(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getImportType_File()
- * @model dataType="org.eclipse.emf.ecore.xml.type.AnyURI" required="true"
- * extendedMetaData="kind='attribute' name='file'"
- * @generated
- */
- String getFile();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ImportType#getFile <em>File</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>File</em>' attribute.
- * @see #getFile()
- * @generated
- */
- void setFile(String value);
-
-} // ImportType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ParamType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ParamType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ParamType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,86 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Param Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Resource Parameter
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ParamType#getName <em>Name</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ParamType#getType <em>Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getParamType()
- * @model extendedMetaData="name='param_._type' kind='mixed'"
- * @generated
- */
-public interface ParamType extends AbstractType {
- /**
- * Returns the value of the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Name</em>' attribute.
- * @see #setName(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getParamType_Name()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='attribute' name='name'"
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ParamType#getName <em>Name</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getParamType_Type()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='type'"
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ParamType#getType <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- * @generated
- */
- void setType(String value);
-
-} // ParamType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfileType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfileType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfileType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,116 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Profile Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Profile Configuration. Basically allows you to specify the name of a
- * base profile along with a list of its sub-profiles.
- *
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getValue <em>Value</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getBaseProfile <em>Base Profile</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getSubProfiles <em>Sub Profiles</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getProfileType()
- * @model extendedMetaData="name='profile_._type' kind='simple'"
- * @generated
- */
-public interface ProfileType extends AbstractType {
- /**
- * Returns the value of the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Value</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Value</em>' attribute.
- * @see #setValue(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getProfileType_Value()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="name=':0' kind='simple'"
- * @generated
- */
- String getValue();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getValue <em>Value</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Value</em>' attribute.
- * @see #getValue()
- * @generated
- */
- void setValue(String value);
-
- /**
- * Returns the value of the '<em><b>Base Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Base Profile</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Base Profile</em>' attribute.
- * @see #setBaseProfile(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getProfileType_BaseProfile()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true"
- * extendedMetaData="kind='attribute' name='base-profile'"
- * @generated
- */
- String getBaseProfile();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getBaseProfile <em>Base Profile</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Base Profile</em>' attribute.
- * @see #getBaseProfile()
- * @generated
- */
- void setBaseProfile(String value);
-
- /**
- * Returns the value of the '<em><b>Sub Profiles</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Sub Profiles</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Sub Profiles</em>' attribute.
- * @see #setSubProfiles(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getProfileType_SubProfiles()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='sub-profiles'"
- * @generated
- */
- String getSubProfiles();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getSubProfiles <em>Sub Profiles</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Sub Profiles</em>' attribute.
- * @see #getSubProfiles()
- * @generated
- */
- void setSubProfiles(String value);
-
-} // ProfileType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfilesType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfilesType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ProfilesType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,49 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Profiles Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * List of Profiles
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ProfilesType#getProfile <em>Profile</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getProfilesType()
- * @model extendedMetaData="name='profiles_._type' kind='elementOnly'"
- * @generated
- */
-public interface ProfilesType extends AbstractType {
- /**
- * Returns the value of the '<em><b>Profile</b></em>' containment reference list.
- * The list contents are of type {@link org.jboss.tools.smooks10.model.smooks.ProfileType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Profile</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Profile</em>' containment reference list.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getProfilesType_Profile()
- * @model containment="true" required="true"
- * extendedMetaData="kind='element' name='profile' namespace='##targetNamespace'"
- * @generated
- */
- EList<ProfileType> getProfile();
-
-} // ProfilesType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceConfigType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceConfigType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceConfigType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,189 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Resource Config Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Smooks Resource Configuration
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getResource <em>Resource</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getCondition <em>Condition</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getParam <em>Param</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelector <em>Selector</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelectorNamespace <em>Selector Namespace</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getTargetProfile <em>Target Profile</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType()
- * @model extendedMetaData="name='resource-config_._type' kind='elementOnly'"
- * @generated
- */
-public interface ResourceConfigType extends AbstractResourceConfig {
- /**
- * Returns the value of the '<em><b>Resource</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Resource</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Resource</em>' containment reference.
- * @see #setResource(ResourceType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType_Resource()
- * @model containment="true"
- * extendedMetaData="kind='element' name='resource' namespace='##targetNamespace'"
- * @generated
- */
- ResourceType getResource();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getResource <em>Resource</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Resource</em>' containment reference.
- * @see #getResource()
- * @generated
- */
- void setResource(ResourceType value);
-
- /**
- * Returns the value of the '<em><b>Condition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Condition</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Condition</em>' containment reference.
- * @see #setCondition(ConditionType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType_Condition()
- * @model containment="true"
- * extendedMetaData="kind='element' name='condition' namespace='##targetNamespace'"
- * @generated
- */
- ConditionType getCondition();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getCondition <em>Condition</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Condition</em>' containment reference.
- * @see #getCondition()
- * @generated
- */
- void setCondition(ConditionType value);
-
- /**
- * Returns the value of the '<em><b>Param</b></em>' containment reference list.
- * The list contents are of type {@link org.jboss.tools.smooks10.model.smooks.ParamType}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Param</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Param</em>' containment reference list.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType_Param()
- * @model containment="true"
- * extendedMetaData="kind='element' name='param' namespace='##targetNamespace'"
- * @generated
- */
- EList<ParamType> getParam();
-
- /**
- * Returns the value of the '<em><b>Selector</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Selector</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Selector</em>' attribute.
- * @see #setSelector(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType_Selector()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='selector'"
- * @generated
- */
- String getSelector();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelector <em>Selector</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Selector</em>' attribute.
- * @see #getSelector()
- * @generated
- */
- void setSelector(String value);
-
- /**
- * Returns the value of the '<em><b>Selector Namespace</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Selector Namespace</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Selector Namespace</em>' attribute.
- * @see #setSelectorNamespace(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType_SelectorNamespace()
- * @model dataType="org.eclipse.emf.ecore.xml.type.AnyURI"
- * extendedMetaData="kind='attribute' name='selector-namespace'"
- * @generated
- */
- String getSelectorNamespace();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelectorNamespace <em>Selector Namespace</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Selector Namespace</em>' attribute.
- * @see #getSelectorNamespace()
- * @generated
- */
- void setSelectorNamespace(String value);
-
- /**
- * Returns the value of the '<em><b>Target Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Target Profile</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Target Profile</em>' attribute.
- * @see #setTargetProfile(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceConfigType_TargetProfile()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='target-profile'"
- * @generated
- */
- String getTargetProfile();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getTargetProfile <em>Target Profile</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Target Profile</em>' attribute.
- * @see #getTargetProfile()
- * @generated
- */
- void setTargetProfile(String value);
-
-} // ResourceConfigType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/ResourceType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,68 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Resource Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * Resource Configuration Resource Type (xsl, class etc)
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.ResourceType#getType <em>Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceType()
- * @model extendedMetaData="name='resource_._type' kind='mixed'"
- * @generated
- */
-public interface ResourceType extends AbstractType {
- /**
- * Returns the value of the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Type</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Type</em>' attribute.
- * @see #setType(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getResourceType_Type()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='type'"
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.ResourceType#getType <em>Type</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Type</em>' attribute.
- * @see #getType()
- * @generated
- */
- void setType(String value);
-
-
- String getStringValue();
-
- void setStringValue(String value);
-
- String getCDATAValue();
-
- void setCDATAValue(String value);
-
-
-} // ResourceType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksFactory.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksFactory.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,118 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage
- * @generated
- */
-public interface SmooksFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- SmooksFactory eINSTANCE = org.jboss.tools.smooks10.model.smooks.impl.SmooksFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>Condition Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Condition Type</em>'.
- * @generated
- */
- ConditionType createConditionType();
-
- /**
- * Returns a new object of class '<em>Smooks10 Document Root</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Smooks10 Document Root</em>'.
- * @generated
- */
- DocumentRoot createSmooks10DocumentRoot();
-
- /**
- * Returns a new object of class '<em>Import Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Import Type</em>'.
- * @generated
- */
- ImportType createImportType();
-
- /**
- * Returns a new object of class '<em>Param Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Param Type</em>'.
- * @generated
- */
- ParamType createParamType();
-
- /**
- * Returns a new object of class '<em>Profiles Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Profiles Type</em>'.
- * @generated
- */
- ProfilesType createProfilesType();
-
- /**
- * Returns a new object of class '<em>Profile Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Profile Type</em>'.
- * @generated
- */
- ProfileType createProfileType();
-
- /**
- * Returns a new object of class '<em>Resource Config Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Config Type</em>'.
- * @generated
- */
- ResourceConfigType createResourceConfigType();
-
- /**
- * Returns a new object of class '<em>Resource Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource Type</em>'.
- * @generated
- */
- ResourceType createResourceType();
-
- /**
- * Returns a new object of class '<em>Resource List Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>Resource List Type</em>'.
- * @generated
- */
- SmooksResourceListType createSmooksResourceListType();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- SmooksPackage getSmooksPackage();
-
-} //SmooksFactory
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksPackage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksPackage.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksPackage.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,1740 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Package</b> for the model.
- * It contains accessors for the meta objects to represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.SmooksFactory
- * @model kind="package"
- * @generated
- */
-public interface SmooksPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "smooks10";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.milyn.org/xsd/smooks-1.0.xsd";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "smooks10";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- SmooksPackage eINSTANCE = org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.AbstractTypeImpl <em>Abstract Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.AbstractTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getAbstractType()
- * @generated
- */
- int ABSTRACT_TYPE = 10;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_TYPE__MIXED = XMLTypePackage.ANY_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_TYPE__ANY = XMLTypePackage.ANY_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_TYPE__ANY_ATTRIBUTE = XMLTypePackage.ANY_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The number of structural features of the '<em>Abstract Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_TYPE_FEATURE_COUNT = XMLTypePackage.ANY_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.AbstractResourceConfigImpl <em>Abstract Resource Config</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.AbstractResourceConfigImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getAbstractResourceConfig()
- * @generated
- */
- int ABSTRACT_RESOURCE_CONFIG = 0;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RESOURCE_CONFIG__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RESOURCE_CONFIG__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RESOURCE_CONFIG__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The number of structural features of the '<em>Abstract Resource Config</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ConditionTypeImpl <em>Condition Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ConditionTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getConditionType()
- * @generated
- */
- int CONDITION_TYPE = 1;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONDITION_TYPE__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONDITION_TYPE__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONDITION_TYPE__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONDITION_TYPE__VALUE = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Evaluator</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONDITION_TYPE__EVALUATOR = ABSTRACT_TYPE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Condition Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int CONDITION_TYPE_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.DocumentRootImpl <em>Smooks10 Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.DocumentRootImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getSmooks10DocumentRoot()
- * @generated
- */
- int SMOOKS10_DOCUMENT_ROOT = 2;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__MIXED = 0;
-
- /**
- * The feature id for the '<em><b>XMLNS Prefix Map</b></em>' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
-
- /**
- * The feature id for the '<em><b>XSI Schema Location</b></em>' map.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
-
- /**
- * The feature id for the '<em><b>Abstract Resource Config</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__ABSTRACT_RESOURCE_CONFIG = 3;
-
- /**
- * The feature id for the '<em><b>Condition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__CONDITION = 4;
-
- /**
- * The feature id for the '<em><b>Import</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__IMPORT = 5;
-
- /**
- * The feature id for the '<em><b>Param</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__PARAM = 6;
-
- /**
- * The feature id for the '<em><b>Profile</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__PROFILE = 7;
-
- /**
- * The feature id for the '<em><b>Profiles</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__PROFILES = 8;
-
- /**
- * The feature id for the '<em><b>Resource</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__RESOURCE = 9;
-
- /**
- * The feature id for the '<em><b>Resource Config</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__RESOURCE_CONFIG = 10;
-
- /**
- * The feature id for the '<em><b>Smooks Resource List</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST = 11;
-
- /**
- * The number of structural features of the '<em>Smooks10 Document Root</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS10_DOCUMENT_ROOT_FEATURE_COUNT = 12;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ImportTypeImpl <em>Import Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ImportTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getImportType()
- * @generated
- */
- int IMPORT_TYPE = 3;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IMPORT_TYPE__MIXED = ABSTRACT_RESOURCE_CONFIG__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IMPORT_TYPE__ANY = ABSTRACT_RESOURCE_CONFIG__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IMPORT_TYPE__ANY_ATTRIBUTE = ABSTRACT_RESOURCE_CONFIG__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>File</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IMPORT_TYPE__FILE = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Import Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int IMPORT_TYPE_FEATURE_COUNT = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ParamTypeImpl <em>Param Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ParamTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getParamType()
- * @generated
- */
- int PARAM_TYPE = 4;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PARAM_TYPE__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PARAM_TYPE__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PARAM_TYPE__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Name</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PARAM_TYPE__NAME = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PARAM_TYPE__TYPE = ABSTRACT_TYPE_FEATURE_COUNT + 1;
-
- /**
- * The number of structural features of the '<em>Param Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PARAM_TYPE_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 2;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ProfilesTypeImpl <em>Profiles Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ProfilesTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getProfilesType()
- * @generated
- */
- int PROFILES_TYPE = 5;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILES_TYPE__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILES_TYPE__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILES_TYPE__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Profile</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILES_TYPE__PROFILE = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Profiles Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILES_TYPE_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ProfileTypeImpl <em>Profile Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ProfileTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getProfileType()
- * @generated
- */
- int PROFILE_TYPE = 6;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Value</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE__VALUE = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Base Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE__BASE_PROFILE = ABSTRACT_TYPE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Sub Profiles</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE__SUB_PROFILES = ABSTRACT_TYPE_FEATURE_COUNT + 2;
-
- /**
- * The number of structural features of the '<em>Profile Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PROFILE_TYPE_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 3;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ResourceConfigTypeImpl <em>Resource Config Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ResourceConfigTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getResourceConfigType()
- * @generated
- */
- int RESOURCE_CONFIG_TYPE = 7;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__MIXED = ABSTRACT_RESOURCE_CONFIG__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__ANY = ABSTRACT_RESOURCE_CONFIG__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__ANY_ATTRIBUTE = ABSTRACT_RESOURCE_CONFIG__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Resource</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__RESOURCE = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Condition</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__CONDITION = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Param</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__PARAM = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Selector</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__SELECTOR = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Selector Namespace</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__SELECTOR_NAMESPACE = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Target Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE__TARGET_PROFILE = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Resource Config Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_CONFIG_TYPE_FEATURE_COUNT = ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 6;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ResourceTypeImpl <em>Resource Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ResourceTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getResourceType()
- * @generated
- */
- int RESOURCE_TYPE = 8;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_TYPE__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_TYPE__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_TYPE__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Type</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_TYPE__TYPE = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The number of structural features of the '<em>Resource Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int RESOURCE_TYPE_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 1;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks10.model.smooks.impl.SmooksResourceListTypeImpl <em>Resource List Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksResourceListTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getSmooksResourceListType()
- * @generated
- */
- int SMOOKS_RESOURCE_LIST_TYPE = 9;
-
- /**
- * The feature id for the '<em><b>Mixed</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__MIXED = ABSTRACT_TYPE__MIXED;
-
- /**
- * The feature id for the '<em><b>Any</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__ANY = ABSTRACT_TYPE__ANY;
-
- /**
- * The feature id for the '<em><b>Any Attribute</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__ANY_ATTRIBUTE = ABSTRACT_TYPE__ANY_ATTRIBUTE;
-
- /**
- * The feature id for the '<em><b>Profiles</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__PROFILES = ABSTRACT_TYPE_FEATURE_COUNT + 0;
-
- /**
- * The feature id for the '<em><b>Abstract Resource Config Group</b></em>' attribute list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP = ABSTRACT_TYPE_FEATURE_COUNT + 1;
-
- /**
- * The feature id for the '<em><b>Abstract Resource Config</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG = ABSTRACT_TYPE_FEATURE_COUNT + 2;
-
- /**
- * The feature id for the '<em><b>Default Selector</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR = ABSTRACT_TYPE_FEATURE_COUNT + 3;
-
- /**
- * The feature id for the '<em><b>Default Selector Namespace</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR_NAMESPACE = ABSTRACT_TYPE_FEATURE_COUNT + 4;
-
- /**
- * The feature id for the '<em><b>Default Target Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_TARGET_PROFILE = ABSTRACT_TYPE_FEATURE_COUNT + 5;
-
- /**
- * The number of structural features of the '<em>Resource List Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int SMOOKS_RESOURCE_LIST_TYPE_FEATURE_COUNT = ABSTRACT_TYPE_FEATURE_COUNT + 6;
-
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig <em>Abstract Resource Config</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Resource Config</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig
- * @generated
- */
- EClass getAbstractResourceConfig();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ConditionType <em>Condition Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Condition Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ConditionType
- * @generated
- */
- EClass getConditionType();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getValue <em>Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Value</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ConditionType#getValue()
- * @see #getConditionType()
- * @generated
- */
- EAttribute getConditionType_Value();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ConditionType#getEvaluator <em>Evaluator</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Evaluator</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ConditionType#getEvaluator()
- * @see #getConditionType()
- * @generated
- */
- EAttribute getConditionType_Evaluator();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot <em>Smooks10 Document Root</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Smooks10 Document Root</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot
- * @generated
- */
- EClass getSmooks10DocumentRoot();
-
- /**
- * Returns the meta object for the attribute list '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getMixed <em>Mixed</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Mixed</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getMixed()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EAttribute getSmooks10DocumentRoot_Mixed();
-
- /**
- * Returns the meta object for the map '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getXMLNSPrefixMap <em>XMLNS Prefix Map</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the map '<em>XMLNS Prefix Map</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getXMLNSPrefixMap()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_XMLNSPrefixMap();
-
- /**
- * Returns the meta object for the map '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getXSISchemaLocation <em>XSI Schema Location</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the map '<em>XSI Schema Location</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getXSISchemaLocation()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_XSISchemaLocation();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getAbstractResourceConfig <em>Abstract Resource Config</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Abstract Resource Config</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getAbstractResourceConfig()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_AbstractResourceConfig();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getCondition <em>Condition</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Condition</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getCondition()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_Condition();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getImport <em>Import</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Import</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getImport()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_Import();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getParam <em>Param</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Param</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getParam()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_Param();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfile <em>Profile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Profile</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfile()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_Profile();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfiles <em>Profiles</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Profiles</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getProfiles()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_Profiles();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResource <em>Resource</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Resource</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResource()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_Resource();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResourceConfig <em>Resource Config</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Resource Config</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getResourceConfig()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_ResourceConfig();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot#getSmooksResourceList <em>Smooks Resource List</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Smooks Resource List</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot#getSmooksResourceList()
- * @see #getSmooks10DocumentRoot()
- * @generated
- */
- EReference getSmooks10DocumentRoot_SmooksResourceList();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ImportType <em>Import Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Import Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ImportType
- * @generated
- */
- EClass getImportType();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ImportType#getFile <em>File</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>File</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ImportType#getFile()
- * @see #getImportType()
- * @generated
- */
- EAttribute getImportType_File();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ParamType <em>Param Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Param Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ParamType
- * @generated
- */
- EClass getParamType();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ParamType#getName <em>Name</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Name</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ParamType#getName()
- * @see #getParamType()
- * @generated
- */
- EAttribute getParamType_Name();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ParamType#getType <em>Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ParamType#getType()
- * @see #getParamType()
- * @generated
- */
- EAttribute getParamType_Type();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ProfilesType <em>Profiles Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Profiles Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ProfilesType
- * @generated
- */
- EClass getProfilesType();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks10.model.smooks.ProfilesType#getProfile <em>Profile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Profile</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ProfilesType#getProfile()
- * @see #getProfilesType()
- * @generated
- */
- EReference getProfilesType_Profile();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ProfileType <em>Profile Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Profile Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ProfileType
- * @generated
- */
- EClass getProfileType();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getValue <em>Value</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Value</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ProfileType#getValue()
- * @see #getProfileType()
- * @generated
- */
- EAttribute getProfileType_Value();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getBaseProfile <em>Base Profile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Base Profile</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ProfileType#getBaseProfile()
- * @see #getProfileType()
- * @generated
- */
- EAttribute getProfileType_BaseProfile();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ProfileType#getSubProfiles <em>Sub Profiles</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Sub Profiles</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ProfileType#getSubProfiles()
- * @see #getProfileType()
- * @generated
- */
- EAttribute getProfileType_SubProfiles();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType <em>Resource Config Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Config Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType
- * @generated
- */
- EClass getResourceConfigType();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getResource <em>Resource</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Resource</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getResource()
- * @see #getResourceConfigType()
- * @generated
- */
- EReference getResourceConfigType_Resource();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getCondition <em>Condition</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Condition</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getCondition()
- * @see #getResourceConfigType()
- * @generated
- */
- EReference getResourceConfigType_Condition();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getParam <em>Param</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Param</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getParam()
- * @see #getResourceConfigType()
- * @generated
- */
- EReference getResourceConfigType_Param();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelector <em>Selector</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Selector</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelector()
- * @see #getResourceConfigType()
- * @generated
- */
- EAttribute getResourceConfigType_Selector();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelectorNamespace <em>Selector Namespace</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Selector Namespace</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getSelectorNamespace()
- * @see #getResourceConfigType()
- * @generated
- */
- EAttribute getResourceConfigType_SelectorNamespace();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getTargetProfile <em>Target Profile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Target Profile</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType#getTargetProfile()
- * @see #getResourceConfigType()
- * @generated
- */
- EAttribute getResourceConfigType_TargetProfile();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.ResourceType <em>Resource Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceType
- * @generated
- */
- EClass getResourceType();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.ResourceType#getType <em>Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceType#getType()
- * @see #getResourceType()
- * @generated
- */
- EAttribute getResourceType_Type();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType <em>Resource List Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Resource List Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType
- * @generated
- */
- EClass getSmooksResourceListType();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getProfiles <em>Profiles</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Profiles</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getProfiles()
- * @see #getSmooksResourceListType()
- * @generated
- */
- EReference getSmooksResourceListType_Profiles();
-
- /**
- * Returns the meta object for the attribute list '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getAbstractResourceConfigGroup <em>Abstract Resource Config Group</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute list '<em>Abstract Resource Config Group</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getAbstractResourceConfigGroup()
- * @see #getSmooksResourceListType()
- * @generated
- */
- EAttribute getSmooksResourceListType_AbstractResourceConfigGroup();
-
- /**
- * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getAbstractResourceConfig <em>Abstract Resource Config</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Abstract Resource Config</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getAbstractResourceConfig()
- * @see #getSmooksResourceListType()
- * @generated
- */
- EReference getSmooksResourceListType_AbstractResourceConfig();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelector <em>Default Selector</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Default Selector</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelector()
- * @see #getSmooksResourceListType()
- * @generated
- */
- EAttribute getSmooksResourceListType_DefaultSelector();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelectorNamespace <em>Default Selector Namespace</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Default Selector Namespace</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelectorNamespace()
- * @see #getSmooksResourceListType()
- * @generated
- */
- EAttribute getSmooksResourceListType_DefaultSelectorNamespace();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultTargetProfile <em>Default Target Profile</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Default Target Profile</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultTargetProfile()
- * @see #getSmooksResourceListType()
- * @generated
- */
- EAttribute getSmooksResourceListType_DefaultTargetProfile();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks10.model.smooks.AbstractType <em>Abstract Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>Abstract Type</em>'.
- * @see org.jboss.tools.smooks10.model.smooks.AbstractType
- * @generated
- */
- EClass getAbstractType();
-
- /**
- * Returns the factory that creates the instances of the model.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the factory that creates the instances of the model.
- * @generated
- */
- SmooksFactory getSmooksFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.AbstractResourceConfigImpl <em>Abstract Resource Config</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.AbstractResourceConfigImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getAbstractResourceConfig()
- * @generated
- */
- EClass ABSTRACT_RESOURCE_CONFIG = eINSTANCE.getAbstractResourceConfig();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ConditionTypeImpl <em>Condition Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ConditionTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getConditionType()
- * @generated
- */
- EClass CONDITION_TYPE = eINSTANCE.getConditionType();
-
- /**
- * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute CONDITION_TYPE__VALUE = eINSTANCE.getConditionType_Value();
-
- /**
- * The meta object literal for the '<em><b>Evaluator</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute CONDITION_TYPE__EVALUATOR = eINSTANCE.getConditionType_Evaluator();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.DocumentRootImpl <em>Smooks10 Document Root</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.DocumentRootImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getSmooks10DocumentRoot()
- * @generated
- */
- EClass SMOOKS10_DOCUMENT_ROOT = eINSTANCE.getSmooks10DocumentRoot();
-
- /**
- * The meta object literal for the '<em><b>Mixed</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute SMOOKS10_DOCUMENT_ROOT__MIXED = eINSTANCE.getSmooks10DocumentRoot_Mixed();
-
- /**
- * The meta object literal for the '<em><b>XMLNS Prefix Map</b></em>' map feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getSmooks10DocumentRoot_XMLNSPrefixMap();
-
- /**
- * The meta object literal for the '<em><b>XSI Schema Location</b></em>' map feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getSmooks10DocumentRoot_XSISchemaLocation();
-
- /**
- * The meta object literal for the '<em><b>Abstract Resource Config</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__ABSTRACT_RESOURCE_CONFIG = eINSTANCE.getSmooks10DocumentRoot_AbstractResourceConfig();
-
- /**
- * The meta object literal for the '<em><b>Condition</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__CONDITION = eINSTANCE.getSmooks10DocumentRoot_Condition();
-
- /**
- * The meta object literal for the '<em><b>Import</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__IMPORT = eINSTANCE.getSmooks10DocumentRoot_Import();
-
- /**
- * The meta object literal for the '<em><b>Param</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__PARAM = eINSTANCE.getSmooks10DocumentRoot_Param();
-
- /**
- * The meta object literal for the '<em><b>Profile</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__PROFILE = eINSTANCE.getSmooks10DocumentRoot_Profile();
-
- /**
- * The meta object literal for the '<em><b>Profiles</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__PROFILES = eINSTANCE.getSmooks10DocumentRoot_Profiles();
-
- /**
- * The meta object literal for the '<em><b>Resource</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__RESOURCE = eINSTANCE.getSmooks10DocumentRoot_Resource();
-
- /**
- * The meta object literal for the '<em><b>Resource Config</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__RESOURCE_CONFIG = eINSTANCE.getSmooks10DocumentRoot_ResourceConfig();
-
- /**
- * The meta object literal for the '<em><b>Smooks Resource List</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS10_DOCUMENT_ROOT__SMOOKS_RESOURCE_LIST = eINSTANCE.getSmooks10DocumentRoot_SmooksResourceList();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ImportTypeImpl <em>Import Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ImportTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getImportType()
- * @generated
- */
- EClass IMPORT_TYPE = eINSTANCE.getImportType();
-
- /**
- * The meta object literal for the '<em><b>File</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute IMPORT_TYPE__FILE = eINSTANCE.getImportType_File();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ParamTypeImpl <em>Param Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ParamTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getParamType()
- * @generated
- */
- EClass PARAM_TYPE = eINSTANCE.getParamType();
-
- /**
- * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PARAM_TYPE__NAME = eINSTANCE.getParamType_Name();
-
- /**
- * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PARAM_TYPE__TYPE = eINSTANCE.getParamType_Type();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ProfilesTypeImpl <em>Profiles Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ProfilesTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getProfilesType()
- * @generated
- */
- EClass PROFILES_TYPE = eINSTANCE.getProfilesType();
-
- /**
- * The meta object literal for the '<em><b>Profile</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference PROFILES_TYPE__PROFILE = eINSTANCE.getProfilesType_Profile();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ProfileTypeImpl <em>Profile Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ProfileTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getProfileType()
- * @generated
- */
- EClass PROFILE_TYPE = eINSTANCE.getProfileType();
-
- /**
- * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PROFILE_TYPE__VALUE = eINSTANCE.getProfileType_Value();
-
- /**
- * The meta object literal for the '<em><b>Base Profile</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PROFILE_TYPE__BASE_PROFILE = eINSTANCE.getProfileType_BaseProfile();
-
- /**
- * The meta object literal for the '<em><b>Sub Profiles</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute PROFILE_TYPE__SUB_PROFILES = eINSTANCE.getProfileType_SubProfiles();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ResourceConfigTypeImpl <em>Resource Config Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ResourceConfigTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getResourceConfigType()
- * @generated
- */
- EClass RESOURCE_CONFIG_TYPE = eINSTANCE.getResourceConfigType();
-
- /**
- * The meta object literal for the '<em><b>Resource</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference RESOURCE_CONFIG_TYPE__RESOURCE = eINSTANCE.getResourceConfigType_Resource();
-
- /**
- * The meta object literal for the '<em><b>Condition</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference RESOURCE_CONFIG_TYPE__CONDITION = eINSTANCE.getResourceConfigType_Condition();
-
- /**
- * The meta object literal for the '<em><b>Param</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference RESOURCE_CONFIG_TYPE__PARAM = eINSTANCE.getResourceConfigType_Param();
-
- /**
- * The meta object literal for the '<em><b>Selector</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute RESOURCE_CONFIG_TYPE__SELECTOR = eINSTANCE.getResourceConfigType_Selector();
-
- /**
- * The meta object literal for the '<em><b>Selector Namespace</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute RESOURCE_CONFIG_TYPE__SELECTOR_NAMESPACE = eINSTANCE.getResourceConfigType_SelectorNamespace();
-
- /**
- * The meta object literal for the '<em><b>Target Profile</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute RESOURCE_CONFIG_TYPE__TARGET_PROFILE = eINSTANCE.getResourceConfigType_TargetProfile();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.ResourceTypeImpl <em>Resource Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.ResourceTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getResourceType()
- * @generated
- */
- EClass RESOURCE_TYPE = eINSTANCE.getResourceType();
-
- /**
- * The meta object literal for the '<em><b>Type</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute RESOURCE_TYPE__TYPE = eINSTANCE.getResourceType_Type();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.SmooksResourceListTypeImpl <em>Resource List Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksResourceListTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getSmooksResourceListType()
- * @generated
- */
- EClass SMOOKS_RESOURCE_LIST_TYPE = eINSTANCE.getSmooksResourceListType();
-
- /**
- * The meta object literal for the '<em><b>Profiles</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS_RESOURCE_LIST_TYPE__PROFILES = eINSTANCE.getSmooksResourceListType_Profiles();
-
- /**
- * The meta object literal for the '<em><b>Abstract Resource Config Group</b></em>' attribute list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP = eINSTANCE.getSmooksResourceListType_AbstractResourceConfigGroup();
-
- /**
- * The meta object literal for the '<em><b>Abstract Resource Config</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG = eINSTANCE.getSmooksResourceListType_AbstractResourceConfig();
-
- /**
- * The meta object literal for the '<em><b>Default Selector</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR = eINSTANCE.getSmooksResourceListType_DefaultSelector();
-
- /**
- * The meta object literal for the '<em><b>Default Selector Namespace</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_SELECTOR_NAMESPACE = eINSTANCE.getSmooksResourceListType_DefaultSelectorNamespace();
-
- /**
- * The meta object literal for the '<em><b>Default Target Profile</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute SMOOKS_RESOURCE_LIST_TYPE__DEFAULT_TARGET_PROFILE = eINSTANCE.getSmooksResourceListType_DefaultTargetProfile();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks10.model.smooks.impl.AbstractTypeImpl <em>Abstract Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.impl.AbstractTypeImpl
- * @see org.jboss.tools.smooks10.model.smooks.impl.SmooksPackageImpl#getAbstractType()
- * @generated
- */
- EClass ABSTRACT_TYPE = eINSTANCE.getAbstractType();
-
- }
-
-} //SmooksPackage
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksResourceListType.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksResourceListType.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/SmooksResourceListType.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,181 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks;
-
-import org.eclipse.emf.common.util.EList;
-
-import org.eclipse.emf.ecore.util.FeatureMap;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Resource List Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <!-- begin-model-doc -->
- * List of Smooks Resource Configuration.
- * <!-- end-model-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getProfiles <em>Profiles</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getAbstractResourceConfigGroup <em>Abstract Resource Config Group</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getAbstractResourceConfig <em>Abstract Resource Config</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelector <em>Default Selector</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelectorNamespace <em>Default Selector Namespace</em>}</li>
- * <li>{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultTargetProfile <em>Default Target Profile</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType()
- * @model extendedMetaData="name='smooks-resource-list_._type' kind='elementOnly'"
- * @generated
- */
-public interface SmooksResourceListType extends AbstractType {
- /**
- * Returns the value of the '<em><b>Profiles</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Profiles</em>' containment reference isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Profiles</em>' containment reference.
- * @see #setProfiles(ProfilesType)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType_Profiles()
- * @model containment="true"
- * extendedMetaData="kind='element' name='profiles' namespace='##targetNamespace'"
- * @generated
- */
- ProfilesType getProfiles();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getProfiles <em>Profiles</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Profiles</em>' containment reference.
- * @see #getProfiles()
- * @generated
- */
- void setProfiles(ProfilesType value);
-
- /**
- * Returns the value of the '<em><b>Abstract Resource Config Group</b></em>' attribute list.
- * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Abstract Resource Config Group</em>' attribute list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Abstract Resource Config Group</em>' attribute list.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType_AbstractResourceConfigGroup()
- * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" required="true" many="true"
- * extendedMetaData="kind='group' name='abstract-resource-config:group' namespace='##targetNamespace'"
- * @generated
- */
- FeatureMap getAbstractResourceConfigGroup();
-
- /**
- * Returns the value of the '<em><b>Abstract Resource Config</b></em>' containment reference list.
- * The list contents are of type {@link org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Abstract Resource Config</em>' containment reference list isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Abstract Resource Config</em>' containment reference list.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType_AbstractResourceConfig()
- * @model containment="true" required="true" transient="true" changeable="false" volatile="true" derived="true"
- * extendedMetaData="kind='element' name='abstract-resource-config' namespace='##targetNamespace' group='abstract-resource-config:group'"
- * @generated
- */
- EList<AbstractResourceConfig> getAbstractResourceConfig();
-
- /**
- * Returns the value of the '<em><b>Default Selector</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Selector</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default Selector</em>' attribute.
- * @see #setDefaultSelector(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType_DefaultSelector()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='default-selector'"
- * @generated
- */
- String getDefaultSelector();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelector <em>Default Selector</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Selector</em>' attribute.
- * @see #getDefaultSelector()
- * @generated
- */
- void setDefaultSelector(String value);
-
- /**
- * Returns the value of the '<em><b>Default Selector Namespace</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Selector Namespace</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default Selector Namespace</em>' attribute.
- * @see #setDefaultSelectorNamespace(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType_DefaultSelectorNamespace()
- * @model dataType="org.eclipse.emf.ecore.xml.type.AnyURI"
- * extendedMetaData="kind='attribute' name='default-selector-namespace'"
- * @generated
- */
- String getDefaultSelectorNamespace();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultSelectorNamespace <em>Default Selector Namespace</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Selector Namespace</em>' attribute.
- * @see #getDefaultSelectorNamespace()
- * @generated
- */
- void setDefaultSelectorNamespace(String value);
-
- /**
- * Returns the value of the '<em><b>Default Target Profile</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Default Target Profile</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Default Target Profile</em>' attribute.
- * @see #setDefaultTargetProfile(String)
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage#getSmooksResourceListType_DefaultTargetProfile()
- * @model dataType="org.eclipse.emf.ecore.xml.type.String"
- * extendedMetaData="kind='attribute' name='default-target-profile'"
- * @generated
- */
- String getDefaultTargetProfile();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType#getDefaultTargetProfile <em>Default Target Profile</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Default Target Profile</em>' attribute.
- * @see #getDefaultTargetProfile()
- * @generated
- */
- void setDefaultTargetProfile(String value);
-
-} // SmooksResourceListType
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksAdapterFactory.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksAdapterFactory.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksAdapterFactory.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,324 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks.util;
-
-import org.eclipse.emf.common.notify.Adapter;
-import org.eclipse.emf.common.notify.Notifier;
-
-import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
-
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.jboss.tools.smooks10.model.smooks.*;
-
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage
- * @generated
- */
-public class SmooksAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static SmooksPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SmooksAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = SmooksPackage.eINSTANCE;
- }
- }
-
- /**
- * Returns whether this factory is applicable for the type of the object.
- * <!-- begin-user-doc -->
- * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
- * <!-- end-user-doc -->
- * @return whether this factory is applicable for the type of the object.
- * @generated
- */
- @Override
- public boolean isFactoryForType(Object object) {
- if (object == modelPackage) {
- return true;
- }
- if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
- }
- return false;
- }
-
- /**
- * The switch that delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected SmooksSwitch<Adapter> modelSwitch =
- new SmooksSwitch<Adapter>() {
- @Override
- public Adapter caseAbstractResourceConfig(AbstractResourceConfig object) {
- return createAbstractResourceConfigAdapter();
- }
- @Override
- public Adapter caseConditionType(ConditionType object) {
- return createConditionTypeAdapter();
- }
- @Override
- public Adapter caseSmooks10DocumentRoot(DocumentRoot object) {
- return createSmooks10DocumentRootAdapter();
- }
- @Override
- public Adapter caseImportType(ImportType object) {
- return createImportTypeAdapter();
- }
- @Override
- public Adapter caseParamType(ParamType object) {
- return createParamTypeAdapter();
- }
- @Override
- public Adapter caseProfilesType(ProfilesType object) {
- return createProfilesTypeAdapter();
- }
- @Override
- public Adapter caseProfileType(ProfileType object) {
- return createProfileTypeAdapter();
- }
- @Override
- public Adapter caseResourceConfigType(ResourceConfigType object) {
- return createResourceConfigTypeAdapter();
- }
- @Override
- public Adapter caseResourceType(ResourceType object) {
- return createResourceTypeAdapter();
- }
- @Override
- public Adapter caseSmooksResourceListType(SmooksResourceListType object) {
- return createSmooksResourceListTypeAdapter();
- }
- @Override
- public Adapter caseAbstractType(AbstractType object) {
- return createAbstractTypeAdapter();
- }
- @Override
- public Adapter caseAnyType(AnyType object) {
- return createAnyTypeAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig <em>Abstract Resource Config</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.AbstractResourceConfig
- * @generated
- */
- public Adapter createAbstractResourceConfigAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ConditionType <em>Condition Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ConditionType
- * @generated
- */
- public Adapter createConditionTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.DocumentRoot <em>Smooks10 Document Root</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.DocumentRoot
- * @generated
- */
- public Adapter createSmooks10DocumentRootAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ImportType <em>Import Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ImportType
- * @generated
- */
- public Adapter createImportTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ParamType <em>Param Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ParamType
- * @generated
- */
- public Adapter createParamTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ProfilesType <em>Profiles Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ProfilesType
- * @generated
- */
- public Adapter createProfilesTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ProfileType <em>Profile Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ProfileType
- * @generated
- */
- public Adapter createProfileTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ResourceConfigType <em>Resource Config Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceConfigType
- * @generated
- */
- public Adapter createResourceConfigTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.ResourceType <em>Resource Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.ResourceType
- * @generated
- */
- public Adapter createResourceTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.SmooksResourceListType <em>Resource List Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.SmooksResourceListType
- * @generated
- */
- public Adapter createSmooksResourceListTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks10.model.smooks.AbstractType <em>Abstract Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks10.model.smooks.AbstractType
- * @generated
- */
- public Adapter createAbstractTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.xml.type.AnyType <em>Any Type</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.eclipse.emf.ecore.xml.type.AnyType
- * @generated
- */
- public Adapter createAnyTypeAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for the default case.
- * <!-- begin-user-doc -->
- * This default implementation returns null.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @generated
- */
- public Adapter createEObjectAdapter() {
- return null;
- }
-
-} //SmooksAdapterFactory
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-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -20,7 +20,6 @@
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.ExtendedMetaData;
import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.emf.ecore.xml.type.AnyType;
@@ -31,16 +30,10 @@
import org.eclipse.emf.edit.domain.EditingDomain;
import org.jboss.tools.smooks.core.SmooksInputType;
import org.jboss.tools.smooks.model.freemarker.Freemarker;
-import org.jboss.tools.smooks.model.freemarker.Template;
import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
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;
-import org.jboss.tools.smooks10.model.smooks.SmooksFactory;
-import org.jboss.tools.smooks10.model.smooks.SmooksPackage;
/**
* @author Dart Peng
@@ -116,205 +109,205 @@
public static EStructuralFeature ELEMENT_BINDING = ExtendedMetaData.INSTANCE.demandFeature(
"http://www.milyn.org/xsd/smooks-1.0.xsd", "binding", true);
- public static AnyType addBindingTypeToParamType(ParamType param, String property, String selector, String type,
- String uri) {
- AnyType binding = createBindingType(property, selector, type, uri);
- param.getMixed().add(ELEMENT_BINDING, binding);
- return binding;
- }
+// public static AnyType addBindingTypeToParamType(ParamType param, String property, String selector, String type,
+// String uri) {
+// AnyType binding = createBindingType(property, selector, type, uri);
+// param.getMixed().add(ELEMENT_BINDING, binding);
+// return binding;
+// }
+//
+// public static List<Object> getBindingListFromResourceConfigType(ResourceConfigType resourceConfig) {
+// List<ParamType> paramList = resourceConfig.getParam();
+// for (Iterator<ParamType> iterator = paramList.iterator(); iterator.hasNext();) {
+// ParamType param = iterator.next();
+// if ("bindings".equals(param.getName())) {
+// if (param.eContents().isEmpty())
+// continue;
+// List<Object> bindingList = (List<Object>) param.getMixed().list(SmooksModelUtils.ELEMENT_BINDING);
+// return bindingList;
+// }
+// }
+// return Collections.emptyList();
+// }
+//
+// public static boolean isBeanPopulatorResource(ResourceConfigType type) {
+// ResourceType resource = type.getResource();
+// if (resource == null)
+// return false;
+// String value = resource.getStringValue();
+// if (value != null)
+// value = value.trim();
+// if (SmooksModelConstants.BEAN_POPULATOR.equals(value)) {
+// return true;
+// }
+// return false;
+// }
- public static List<Object> getBindingListFromResourceConfigType(ResourceConfigType resourceConfig) {
- List<ParamType> paramList = resourceConfig.getParam();
- for (Iterator<ParamType> iterator = paramList.iterator(); iterator.hasNext();) {
- ParamType param = iterator.next();
- if ("bindings".equals(param.getName())) {
- if (param.eContents().isEmpty())
- continue;
- List<Object> bindingList = (List<Object>) param.getMixed().list(SmooksModelUtils.ELEMENT_BINDING);
- return bindingList;
- }
- }
- return Collections.emptyList();
- }
-
- public static boolean isBeanPopulatorResource(ResourceConfigType type) {
- ResourceType resource = type.getResource();
- if (resource == null)
- return false;
- String value = resource.getStringValue();
- if (value != null)
- value = value.trim();
- if (SmooksModelConstants.BEAN_POPULATOR.equals(value)) {
- return true;
- }
- return false;
- }
-
public static void setPropertyValueToAnyType(Object value, EStructuralFeature attribute, AnyType anyType) {
anyType.getAnyAttribute().set(attribute, value);
}
- public static AnyType getBindingViaProperty(ResourceConfigType resourceConfig, String property) {
- List bindingList = getBindingListFromResourceConfigType(resourceConfig);
- for (Iterator iterator = bindingList.iterator(); iterator.hasNext();) {
- AnyType binding = (AnyType) iterator.next();
- String pro = getAttributeValueFromAnyType(binding, ATTRIBUTE_PROPERTY);
- if (pro != null)
- pro = pro.trim();
- if (property.equals(pro)) {
- return binding;
- }
- }
- return null;
- }
+// public static AnyType getBindingViaProperty(ResourceConfigType resourceConfig, String property) {
+// List bindingList = getBindingListFromResourceConfigType(resourceConfig);
+// for (Iterator iterator = bindingList.iterator(); iterator.hasNext();) {
+// AnyType binding = (AnyType) iterator.next();
+// String pro = getAttributeValueFromAnyType(binding, ATTRIBUTE_PROPERTY);
+// if (pro != null)
+// pro = pro.trim();
+// if (property.equals(pro)) {
+// return binding;
+// }
+// }
+// return null;
+// }
+//
+// public static boolean isInnerFileContents(ResourceConfigType resourceConfig) {
+// ResourceType resource = resourceConfig.getResource();
+// if (resource == null)
+// return false;
+// String type = resource.getType();
+// if (type != null)
+// type = type.trim();
+// for (int i = 0; i < TEMPLATE_TYPES.length; i++) {
+// String type1 = TEMPLATE_TYPES[i];
+// if (type1.equalsIgnoreCase(type))
+// return true;
+// }
+// return false;
+// }
+//
+// public static boolean isDateTypeSelector(ResourceConfigType type) {
+// ResourceType resource = type.getResource();
+// if (resource == null)
+// return false;
+// String value = resource.getStringValue();
+// if (value != null)
+// value = value.trim();
+// for (int i = 0; i < SmooksModelConstants.DECODER_CLASSES.length; i++) {
+// String decoderClass = SmooksModelConstants.DECODER_CLASSES[i];
+// if (decoderClass.equals(value)) {
+// return true;
+// }
+// }
+// return false;
+// }
+//
+// public static String getTransformType(ResourceConfigType resourceConfig) {
+// ParamType typeParam = null;
+// if (resourceConfig == null)
+// return "";
+// if (isTransformTypeResourceConfig(resourceConfig)) {
+// List paramList = resourceConfig.getParam();
+// for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+// ParamType param = (ParamType) iterator.next();
+// String name = param.getName();
+// if (name != null)
+// name = name.trim();
+// if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(name)) {
+// typeParam = param;
+// break;
+// }
+// }
+// if (typeParam != null) {
+// return SmooksModelUtils.getAnyTypeText(typeParam);
+// }
+// }
+// return "";
+// }
+//
+// public static void setTransformType(ResourceConfigType resourceConfig, String type) {
+// if (type == null)
+// type = "";
+// if (isTransformTypeResourceConfig(resourceConfig)) {
+// List paramList = resourceConfig.getParam();
+// for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+// ParamType param = (ParamType) iterator.next();
+// if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(param.getName())) {
+// cleanTextToSmooksType(param);
+// setTextToAnyType(param, type);
+// }
+// }
+// }
+// }
+//
+// public static boolean isFilePathResourceConfig(ResourceConfigType resourceConfig) {
+// ResourceType resource = resourceConfig.getResource();
+// if (resource != null) {
+// String value = resource.getStringValue();
+// if (value != null) {
+// if (value.startsWith("\\")) {
+// return true;
+// }
+// if (value.startsWith("/")) {
+// return true;
+// }
+// }
+// }
+// return false;
+// }
+//
+// public static boolean isTransformTypeResourceConfig(ResourceConfigType resourceConfig) {
+// String selector = resourceConfig.getSelector();
+// if (selector != null)
+// selector = selector.trim();
+// if (!SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector)) {
+// return false;
+// }
+//
+// if (resourceConfig.getParam().isEmpty()) {
+// return false;
+// } else {
+// List paramList = resourceConfig.getParam();
+// for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+// ParamType p = (ParamType) iterator.next();
+// String paramName = p.getName();
+// if (paramName != null)
+// paramName = paramName.trim();
+// if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(paramName)) {
+// return true;
+// }
+// }
+// return false;
+// }
+// }
+//
+// public static void setParamText(String paramName, String value, ResourceConfigType resourceConfigType) {
+// List<ParamType> list = resourceConfigType.getParam();
+// ParamType param = null;
+// for (Iterator<ParamType> iterator = list.iterator(); iterator.hasNext();) {
+// ParamType paramType = (ParamType) iterator.next();
+// String n = paramType.getName();
+// if (n == null)
+// continue;
+// n = n.trim();
+// if (n.equalsIgnoreCase(paramName)) {
+// param = paramType;
+// break;
+// }
+// }
+// if (param == null) {
+// param = SmooksFactory.eINSTANCE.createParamType();
+// param.setName(paramName);
+// resourceConfigType.getParam().add(param);
+// }
+// setTextToAnyType(param, value);
+// }
+//
+// public static String getParmaText(String paramName, ResourceConfigType resourceConfigType) {
+// List plist = resourceConfigType.getParam();
+// for (Iterator iterator = plist.iterator(); iterator.hasNext();) {
+// ParamType p = (ParamType) iterator.next();
+// String n = p.getName();
+// if (n == null)
+// continue;
+// n = n.trim();
+// if (paramName.equalsIgnoreCase(n)) {
+// return getAnyTypeText(p);
+// }
+// }
+// return null;
+// }
- public static boolean isInnerFileContents(ResourceConfigType resourceConfig) {
- ResourceType resource = resourceConfig.getResource();
- if (resource == null)
- return false;
- String type = resource.getType();
- if (type != null)
- type = type.trim();
- for (int i = 0; i < TEMPLATE_TYPES.length; i++) {
- String type1 = TEMPLATE_TYPES[i];
- if (type1.equalsIgnoreCase(type))
- return true;
- }
- return false;
- }
-
- public static boolean isDateTypeSelector(ResourceConfigType type) {
- ResourceType resource = type.getResource();
- if (resource == null)
- return false;
- String value = resource.getStringValue();
- if (value != null)
- value = value.trim();
- for (int i = 0; i < SmooksModelConstants.DECODER_CLASSES.length; i++) {
- String decoderClass = SmooksModelConstants.DECODER_CLASSES[i];
- if (decoderClass.equals(value)) {
- return true;
- }
- }
- return false;
- }
-
- public static String getTransformType(ResourceConfigType resourceConfig) {
- ParamType typeParam = null;
- if (resourceConfig == null)
- return "";
- if (isTransformTypeResourceConfig(resourceConfig)) {
- List paramList = resourceConfig.getParam();
- for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
- ParamType param = (ParamType) iterator.next();
- String name = param.getName();
- if (name != null)
- name = name.trim();
- if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(name)) {
- typeParam = param;
- break;
- }
- }
- if (typeParam != null) {
- return SmooksModelUtils.getAnyTypeText(typeParam);
- }
- }
- return "";
- }
-
- public static void setTransformType(ResourceConfigType resourceConfig, String type) {
- if (type == null)
- type = "";
- if (isTransformTypeResourceConfig(resourceConfig)) {
- List paramList = resourceConfig.getParam();
- for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
- ParamType param = (ParamType) iterator.next();
- if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(param.getName())) {
- cleanTextToSmooksType(param);
- setTextToAnyType(param, type);
- }
- }
- }
- }
-
- public static boolean isFilePathResourceConfig(ResourceConfigType resourceConfig) {
- ResourceType resource = resourceConfig.getResource();
- if (resource != null) {
- String value = resource.getStringValue();
- if (value != null) {
- if (value.startsWith("\\")) {
- return true;
- }
- if (value.startsWith("/")) {
- return true;
- }
- }
- }
- return false;
- }
-
- public static boolean isTransformTypeResourceConfig(ResourceConfigType resourceConfig) {
- String selector = resourceConfig.getSelector();
- if (selector != null)
- selector = selector.trim();
- if (!SmooksModelConstants.GLOBAL_PARAMETERS.equals(selector)) {
- return false;
- }
-
- if (resourceConfig.getParam().isEmpty()) {
- return false;
- } else {
- List paramList = resourceConfig.getParam();
- for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
- ParamType p = (ParamType) iterator.next();
- String paramName = p.getName();
- if (paramName != null)
- paramName = paramName.trim();
- if (SmooksModelConstants.STREAM_FILTER_TYPE.equals(paramName)) {
- return true;
- }
- }
- return false;
- }
- }
-
- public static void setParamText(String paramName, String value, ResourceConfigType resourceConfigType) {
- List<ParamType> list = resourceConfigType.getParam();
- ParamType param = null;
- for (Iterator<ParamType> iterator = list.iterator(); iterator.hasNext();) {
- ParamType paramType = (ParamType) iterator.next();
- String n = paramType.getName();
- if (n == null)
- continue;
- n = n.trim();
- if (n.equalsIgnoreCase(paramName)) {
- param = paramType;
- break;
- }
- }
- if (param == null) {
- param = SmooksFactory.eINSTANCE.createParamType();
- param.setName(paramName);
- resourceConfigType.getParam().add(param);
- }
- setTextToAnyType(param, value);
- }
-
- public static String getParmaText(String paramName, ResourceConfigType resourceConfigType) {
- List plist = resourceConfigType.getParam();
- for (Iterator iterator = plist.iterator(); iterator.hasNext();) {
- ParamType p = (ParamType) iterator.next();
- String n = p.getName();
- if (n == null)
- continue;
- n = n.trim();
- if (paramName.equalsIgnoreCase(n)) {
- return getAnyTypeText(p);
- }
- }
- return null;
- }
-
public static String getAttributeValueFromAnyType(AnyType anyType, EStructuralFeature attribute) {
String value = (String) anyType.getAnyAttribute().get(attribute, false);
return value;
@@ -360,25 +353,25 @@
return null;
}
- public static AnyType createBindingType(String property, String selector, String type, String uri) {
- if (uri == null) {
- uri = SmooksPackage.eNS_URI;
- }
+// public static AnyType createBindingType(String property, String selector, String type, String uri) {
+// if (uri == null) {
+// uri = SmooksPackage.eNS_URI;
+// }
+//
+// AnyType binding = (AnyType) EcoreUtil.create(XMLTypePackage.Literals.ANY_TYPE);
+// if (property != null) {
+// binding.getAnyAttribute().add(ATTRIBUTE_PROPERTY, property);
+// }
+//
+// if (selector != null) {
+// binding.getAnyAttribute().add(ATTRIBUTE_SELECTOR, selector);
+// }
+// if (type != null) {
+// binding.getAnyAttribute().add(ATTRIBUTE_TYPE, false);
+// }
+// return binding;
+// }
- AnyType binding = (AnyType) EcoreUtil.create(XMLTypePackage.Literals.ANY_TYPE);
- if (property != null) {
- binding.getAnyAttribute().add(ATTRIBUTE_PROPERTY, property);
- }
-
- if (selector != null) {
- binding.getAnyAttribute().add(ATTRIBUTE_SELECTOR, selector);
- }
- if (type != null) {
- binding.getAnyAttribute().add(ATTRIBUTE_TYPE, false);
- }
- return binding;
- }
-
public static void appendTextToSmooksType(AnyType smooksModel, String text) {
smooksModel.getMixed().add(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT, text);
}
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceFactoryImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceFactoryImpl.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceFactoryImpl.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,58 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
-
-import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.jboss.tools.smooks.core.SmooksXMLParserPool;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource Factory</b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.util.SmooksResourceImpl
- * @generated
- */
-public class SmooksResourceFactoryImpl extends ResourceFactoryImpl {
- /**
- * Creates an instance of the resource factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SmooksResourceFactoryImpl() {
- super();
- }
-
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Resource createResource(URI uri) {
- XMLResource result = new SmooksResourceImpl(uri);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
-
- result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
- result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
-
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
- result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_PARSER_POOL, new SmooksXMLParserPool());
- return result;
- }
-
-} //SmooksResourceFactoryImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceImpl.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksResourceImpl.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,32 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks.util;
-
-import org.eclipse.emf.common.util.URI;
-
-import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Resource </b> associated with the package.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl
- * @generated
- */
-public class SmooksResourceImpl extends XMLResourceImpl {
- /**
- * Creates an instance of the resource.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param uri the URI of the new resource.
- * @generated
- */
- public SmooksResourceImpl(URI uri) {
- super(uri);
- }
-
-} //SmooksResourceImpl
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksSwitch.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksSwitch.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksSwitch.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,378 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.eclipse.emf.ecore.xml.type.AnyType;
-import org.jboss.tools.smooks10.model.smooks.*;
-
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks10.model.smooks.SmooksPackage
- * @generated
- */
-public class SmooksSwitch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static SmooksPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SmooksSwitch() {
- if (modelPackage == null) {
- modelPackage = SmooksPackage.eINSTANCE;
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- public T doSwitch(EObject theEObject) {
- return doSwitch(theEObject.eClass(), theEObject);
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(EClass theEClass, EObject theEObject) {
- if (theEClass.eContainer() == modelPackage) {
- return doSwitch(theEClass.getClassifierID(), theEObject);
- }
- else {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
- defaultCase(theEObject) :
- doSwitch(eSuperTypes.get(0), theEObject);
- }
- }
-
- /**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the first non-null result returned by a <code>caseXXX</code> call.
- * @generated
- */
- protected T doSwitch(int classifierID, EObject theEObject) {
- switch (classifierID) {
- case SmooksPackage.ABSTRACT_RESOURCE_CONFIG: {
- AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig)theEObject;
- T result = caseAbstractResourceConfig(abstractResourceConfig);
- if (result == null) result = caseAbstractType(abstractResourceConfig);
- if (result == null) result = caseAnyType(abstractResourceConfig);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.CONDITION_TYPE: {
- ConditionType conditionType = (ConditionType)theEObject;
- T result = caseConditionType(conditionType);
- if (result == null) result = caseAbstractType(conditionType);
- if (result == null) result = caseAnyType(conditionType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.SMOOKS10_DOCUMENT_ROOT: {
- DocumentRoot smooks10DocumentRoot = (DocumentRoot)theEObject;
- T result = caseSmooks10DocumentRoot(smooks10DocumentRoot);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.IMPORT_TYPE: {
- ImportType importType = (ImportType)theEObject;
- T result = caseImportType(importType);
- if (result == null) result = caseAbstractResourceConfig(importType);
- if (result == null) result = caseAbstractType(importType);
- if (result == null) result = caseAnyType(importType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.PARAM_TYPE: {
- ParamType paramType = (ParamType)theEObject;
- T result = caseParamType(paramType);
- if (result == null) result = caseAbstractType(paramType);
- if (result == null) result = caseAnyType(paramType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.PROFILES_TYPE: {
- ProfilesType profilesType = (ProfilesType)theEObject;
- T result = caseProfilesType(profilesType);
- if (result == null) result = caseAbstractType(profilesType);
- if (result == null) result = caseAnyType(profilesType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.PROFILE_TYPE: {
- ProfileType profileType = (ProfileType)theEObject;
- T result = caseProfileType(profileType);
- if (result == null) result = caseAbstractType(profileType);
- if (result == null) result = caseAnyType(profileType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.RESOURCE_CONFIG_TYPE: {
- ResourceConfigType resourceConfigType = (ResourceConfigType)theEObject;
- T result = caseResourceConfigType(resourceConfigType);
- if (result == null) result = caseAbstractResourceConfig(resourceConfigType);
- if (result == null) result = caseAbstractType(resourceConfigType);
- if (result == null) result = caseAnyType(resourceConfigType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.RESOURCE_TYPE: {
- ResourceType resourceType = (ResourceType)theEObject;
- T result = caseResourceType(resourceType);
- if (result == null) result = caseAbstractType(resourceType);
- if (result == null) result = caseAnyType(resourceType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.SMOOKS_RESOURCE_LIST_TYPE: {
- SmooksResourceListType smooksResourceListType = (SmooksResourceListType)theEObject;
- T result = caseSmooksResourceListType(smooksResourceListType);
- if (result == null) result = caseAbstractType(smooksResourceListType);
- if (result == null) result = caseAnyType(smooksResourceListType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case SmooksPackage.ABSTRACT_TYPE: {
- AbstractType abstractType = (AbstractType)theEObject;
- T result = caseAbstractType(abstractType);
- if (result == null) result = caseAnyType(abstractType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Resource Config</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Resource Config</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractResourceConfig(AbstractResourceConfig object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Condition Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Condition Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseConditionType(ConditionType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Smooks10 Document Root</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Smooks10 Document Root</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseSmooks10DocumentRoot(DocumentRoot object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Import Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Import Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseImportType(ImportType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Param Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Param Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseParamType(ParamType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Profiles Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Profiles Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseProfilesType(ProfilesType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Profile Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Profile Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseProfileType(ProfileType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Config Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Config Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseResourceConfigType(ResourceConfigType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseResourceType(ResourceType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Resource List Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Resource List Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseSmooksResourceListType(SmooksResourceListType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Abstract Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Abstract Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAbstractType(AbstractType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>Any Type</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Any Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T caseAnyType(AnyType object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
- * This implementation returns null;
- * returning a non-null result will terminate the switch, but this is the last case anyway.
- * <!-- end-user-doc -->
- * @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject)
- * @generated
- */
- public T defaultCase(EObject object) {
- return null;
- }
-
-} //SmooksSwitch
Deleted: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksXMLProcessor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksXMLProcessor.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks10/model/smooks/util/SmooksXMLProcessor.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -1,54 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks10.model.smooks.util;
-
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EPackage;
-
-import org.eclipse.emf.ecore.resource.Resource;
-
-import org.eclipse.emf.ecore.xmi.util.XMLProcessor;
-import org.jboss.tools.smooks10.model.smooks.SmooksPackage;
-
-
-/**
- * This class contains helper methods to serialize and deserialize XML documents
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
-public class SmooksXMLProcessor extends XMLProcessor {
-
- /**
- * Public constructor to instantiate the helper.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public SmooksXMLProcessor() {
- super((EPackage.Registry.INSTANCE));
- SmooksPackage.eINSTANCE.eClass();
- }
-
- /**
- * Register for "*" and "xml" file extensions the SmooksResourceFactoryImpl factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected Map<String, Resource.Factory> getRegistrations() {
- if (registrations == null) {
- super.getRegistrations();
- registrations.put(XML_EXTENSION, new SmooksResourceFactoryImpl());
- registrations.put(STAR_EXTENSION, new SmooksResourceFactoryImpl());
- }
- return registrations;
- }
-
-} //SmooksXMLProcessor
Modified: trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/AbstractSmooks11ModelTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/AbstractSmooks11ModelTestCase.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/AbstractSmooks11ModelTestCase.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -40,8 +40,8 @@
import org.jboss.tools.smooks.model.medi.provider.MEdiItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
import org.jboss.tools.smooks.model.smooks.provider.SmooksItemProviderAdapterFactory;
+import org.jboss.tools.smooks.model.smooks.util.SmooksResourceFactoryImpl;
import org.jboss.tools.smooks.model.xsl.provider.XslItemProviderAdapterFactory;
-import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
/**
*
@@ -71,8 +71,6 @@
adapterFactory.addAdapterFactory(new CommonItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new SmooksItemProviderAdapterFactory());
- adapterFactory
- .addAdapterFactory(new org.jboss.tools.smooks10.model.smooks.provider.SmooksItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new MEdiItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EdiItemProviderAdapterFactory());
@@ -155,14 +153,14 @@
return null;
}
- public org.jboss.tools.smooks10.model.smooks.SmooksResourceListType getSmooksResourceList10() {
- EObject root = this.getSmooksModel();
- if (root instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- org.jboss.tools.smooks10.model.smooks.DocumentRoot documentRoot = (org.jboss.tools.smooks10.model.smooks.DocumentRoot) root;
- org.jboss.tools.smooks10.model.smooks.SmooksResourceListType resourceConfig = (org.jboss.tools.smooks10.model.smooks.SmooksResourceListType) documentRoot.eContents().get(0);
- return resourceConfig;
- }
- return null;
- }
+// public org.jboss.tools.smooks10.model.smooks.SmooksResourceListType getSmooksResourceList10() {
+// EObject root = this.getSmooksModel();
+// if (root instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+// org.jboss.tools.smooks10.model.smooks.DocumentRoot documentRoot = (org.jboss.tools.smooks10.model.smooks.DocumentRoot) root;
+// org.jboss.tools.smooks10.model.smooks.SmooksResourceListType resourceConfig = (org.jboss.tools.smooks10.model.smooks.SmooksResourceListType) documentRoot.eContents().get(0);
+// return resourceConfig;
+// }
+// return null;
+// }
}
Modified: trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/BaseTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/BaseTestCase.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/BaseTestCase.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -68,8 +68,6 @@
Registry.INSTANCE.put(MEdiPackage.eNS_URI, MEdiPackage.eINSTANCE);
Registry.INSTANCE.put(XslPackage.eNS_URI, XslPackage.eINSTANCE);
Registry.INSTANCE.put(EsbroutingPackage.eNS_URI, EsbroutingPackage.eINSTANCE);
- Registry.INSTANCE.put(org.jboss.tools.smooks10.model.smooks.SmooksPackage.eNS_URI,
- org.jboss.tools.smooks10.model.smooks.SmooksPackage.eINSTANCE);
}
public void testNull(){//ignore
}
Modified: trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/ParseConfigFileTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/ParseConfigFileTestCase.java 2009-11-28 08:55:42 UTC (rev 18897)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/model11/ParseConfigFileTestCase.java 2009-11-28 08:59:12 UTC (rev 18898)
@@ -21,7 +21,7 @@
import org.eclipse.emf.ecore.resource.Resource;
import org.jboss.tools.smooks.model.smooks.DocumentRoot;
-import org.jboss.tools.smooks10.model.smooks.util.SmooksResourceFactoryImpl;
+import org.jboss.tools.smooks.model.smooks.util.SmooksResourceFactoryImpl;
/**
* @author Dart (dpeng(a)redhat.com)
@@ -58,20 +58,21 @@
smooksModel = smooksResource.getContents().get(0);
Assert.assertNotNull(smooksModel);
Assert.assertTrue(smooksModel instanceof org.jboss.tools.smooks.model.medi.DocumentRoot
- || smooksModel instanceof DocumentRoot
- || smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot);
+ || smooksModel instanceof DocumentRoot);
if (smooksModel instanceof DocumentRoot) {
- System.out.println("load smooks 1.1.2 config file : \"" + file.getName() +"/"+ configFile.getName()
- + "\" success.");
+ System.out.println("load smooks 1.1.2 config file : \"" + file.getName() + "/"
+ + configFile.getName() + "\" success.");
}
- if (smooksModel instanceof org.jboss.tools.smooks.model.medi.DocumentRoot) {
- System.out.println("load edi-message-mapping-1.0 file config file : \"" + file.getName() +"/"+ configFile.getName()
- + "\" success.");
+ if (smooksModel instanceof org.jboss.tools.smooks.model.medi.DocumentRoot) {
+ System.out.println("load edi-message-mapping-1.0 file config file : \"" + file.getName()
+ + "/" + configFile.getName() + "\" success.");
}
- if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
- System.out.println("load smooks 1.0 config file : \"" + file.getName() +"/"+ configFile.getName()
- + "\" success.");
- }
+ // if (smooksModel instanceof
+ // org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+ // System.out.println("load smooks 1.0 config file : \""
+ // + file.getName() +"/"+ configFile.getName()
+ // + "\" success.");
+ // }
}
}
15 years, 1 month
JBoss Tools SVN: r18896 - in trunk: common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-27 21:32:29 -0500 (Fri, 27 Nov 2009)
New Revision: 18896
Added:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReference.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELReference.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/messagesValidation.jsp
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/Messages.properties
Removed:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ELReference.java
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/RefactorSearcher.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolver.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/SimpleELContext.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IXmlContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidatorContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ProjectValidationContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidationContext.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5089
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReference.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReference.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReference.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -0,0 +1,309 @@
+/*******************************************************************************
+ * 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.common.el.core;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.jboss.tools.common.el.core.model.ELExpression;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
+import org.jboss.tools.common.el.core.parser.SyntaxError;
+import org.jboss.tools.common.text.ITextSourceReference;
+import org.jboss.tools.common.util.FileUtil;
+import org.w3c.dom.Element;
+
+/**
+ * Represents a reference to EL in a resource
+ * @author Alexey Kazakov
+ */
+public abstract class ELReference implements ITextSourceReference {
+
+ private IFile resource;
+ private IPath path;
+ private int length;
+ private int startPosition;
+ private ELExpression[] el;
+ private Set<IMarker> markers;
+ private IMarker[] markerArray;
+ private boolean needToInitMarkers = false;
+ private List<SyntaxError> syntaxErrors;
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.core.ISeamTextSourceReference#getLength()
+ */
+ public int getLength() {
+ return length;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.seam.core.ISeamTextSourceReference#getStartPosition()
+ */
+ public int getStartPosition() {
+ return startPosition;
+ }
+
+ /**
+ * @param length
+ */
+ public void setLength(int length) {
+ this.length = length;
+ }
+
+ /**
+ * @param startPosition
+ */
+ public void setStartPosition(int startPosition) {
+ this.startPosition = startPosition;
+ }
+
+ /**
+ * @return the resource
+ */
+ public IFile getResource() {
+ if(resource==null) {
+ IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
+ resource = wsRoot.getFile(path);
+ }
+ return resource;
+ }
+
+ /**
+ * @param resource the resource to set
+ */
+ public void setResource(IFile resource) {
+ this.resource = resource;
+ if(resource!=null) {
+ this.path = resource.getFullPath();
+ }
+ }
+
+ /**
+ * @return the path
+ */
+ public IPath getPath() {
+ return path;
+ }
+
+ /**
+ * @param path the path to set
+ */
+ public void setPath(IPath path) {
+ this.path = path;
+ }
+
+ /**
+ * @return the el
+ */
+ public ELExpression[] getEl() {
+ if(el==null) {
+ Set<ELExpression> exps = new HashSet<ELExpression>();
+ String content = null;
+ try {
+ content = FileUtil.readStream(getResource());
+ } catch (CoreException e) {
+ ELCorePlugin.getDefault().logError(e);
+ }
+ String elText = content.substring(startPosition, startPosition + length);
+ int startEl = elText.indexOf("#{"); //$NON-NLS-1$
+ if(startEl>-1) {
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ ELModel model = parser.parse(elText);
+ List<SyntaxError> errors = model.getSyntaxErrors();
+ if(!errors.isEmpty()) {
+ ELCorePlugin.getDefault().logWarning("ELObject hold incorrect information. Maybe resource " + getResource() + " has been changed.");
+ return null;
+ }
+ List<ELInstance> is = model.getInstances();
+ for (ELInstance i : is) {
+ if(!i.getErrors().isEmpty()) {
+ ELCorePlugin.getDefault().logWarning("ELObject hold incorrect information. Maybe resource " + getResource() + " has been changed.");
+ continue;
+ }
+ exps.add(i.getExpression());
+ }
+ }
+ el = exps.toArray(new ELExpression[0]);
+ }
+ return el;
+ }
+
+ /**
+ * @param el the el to set
+ */
+ public void setEl(ELExpression[] el) {
+ this.el = el;
+ }
+
+ /**
+ * @param insts
+ */
+ public void setEl(List<ELInstance> insts) {
+ Set<ELExpression> exps = new HashSet<ELExpression>();
+ for (ELInstance el : insts) {
+ exps.add(el.getExpression());
+ }
+ el = exps.toArray(new ELExpression[0]);
+ }
+
+ private IMarker[] EMPTY_MARKER_ARRAY = new IMarker[0];
+
+ private void initMarkers() {
+ if(markers==null) {
+ markers = new HashSet<IMarker>();
+ if(needToInitMarkers) {
+ IFile file = getResource();
+ if(file!=null) {
+ IMarker[] markers = null;
+ try {
+ markers = file.findMarkers(null, true, IResource.DEPTH_INFINITE);
+ } catch (CoreException e) {
+ ELCorePlugin.getDefault().logError(e);
+ }
+ for(int i=0; i<markers.length; i++){
+ String groupName = markers[i].getAttribute("groupName", null); //$NON-NLS-1$
+ if(groupName!=null && (groupName.equals(getMarkerGroupId()))) {
+ int start = markers[i].getAttribute(IMarker.CHAR_START, -1);
+ int end = markers[i].getAttribute(IMarker.CHAR_END, -1);
+ if(start>=startPosition && end<=startPosition+length) {
+ addMarker(markers[i]);
+ }
+ }
+ }
+ }
+ }
+ needToInitMarkers = false;
+ }
+ }
+
+ /**
+ * @return the syntaxErrors
+ */
+ public List<SyntaxError> getSyntaxErrors() {
+ return syntaxErrors;
+ }
+
+ /**
+ * @param syntaxErrors the syntaxErrors to set
+ */
+ public void setSyntaxErrors(List<SyntaxError> syntaxErrors) {
+ this.syntaxErrors = syntaxErrors;
+ }
+
+ protected abstract String getMarkerGroupId();
+
+ /**
+ * @param needToInitMarkers the needToInitMarkers to set
+ */
+ public synchronized void setNeedToInitMarkers(boolean needToInitMarkers) {
+ this.needToInitMarkers = needToInitMarkers;
+ }
+
+ public synchronized void setMarkers(Set<IMarker> markers) {
+ this.markers = markers;
+ }
+
+ /**
+ * @return the markers
+ */
+ public synchronized IMarker[] getMarkers() {
+ initMarkers();
+ if(markerArray==null) {
+ if(markers.isEmpty()) {
+ markerArray = EMPTY_MARKER_ARRAY;
+ } else {
+ markerArray = markers.toArray(new IMarker[0]);
+ }
+ }
+ return markerArray;
+ }
+
+ /**
+ * @param markers the markers to set
+ */
+ public synchronized void addMarker(IMarker marker) {
+ if(marker==null) {
+ return;
+ }
+ markerArray = null;
+ if(markers==null) {
+ markers = new HashSet<IMarker>();
+ }
+ markers.add(marker);
+ }
+
+ /**
+ * Removes all markers from this EL.
+ */
+ public synchronized void deleteMarkers() {
+ initMarkers();
+ for (IMarker marker : markers) {
+ try {
+ marker.delete();
+ } catch (CoreException e) {
+ ELCorePlugin.getDefault().logError(e);
+ }
+ }
+ markers.clear();
+ markerArray = null;
+ }
+
+ /**
+ * Store this EL into XML element.
+ * @param element
+ */
+ public synchronized void store(Element element) {
+ element.setAttribute("path", path.toString()); //$NON-NLS-1$
+ element.setAttribute("offset", "" + startPosition); //$NON-NLS-1$ //$NON-NLS-2$
+ element.setAttribute("length", "" + length); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Load this EL from XML element.
+ * @param element
+ */
+ public synchronized void load(Element element) {
+ path = new Path(element.getAttribute("path")); //$NON-NLS-1$
+ startPosition = new Integer(element.getAttribute("offset")); //$NON-NLS-1$
+ length = new Integer(element.getAttribute("length")); //$NON-NLS-1$
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if(this == obj) {
+ return true;
+ }
+ ELReference el = (ELReference)obj;
+ return this.path.equals(el.path) && this.startPosition == el.startPosition;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return path.hashCode() + startPosition;
+ }
+}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/RefactorSearcher.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/RefactorSearcher.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/RefactorSearcher.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -447,7 +447,7 @@
context.setVars(vars);
- ELResolution resolution = resolver.resolve(context, operand);
+ ELResolution resolution = resolver.resolve(context, operand, offset);
List<ELSegment> segments = resolution.findSegmentsByJavaElement(javaElement);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -13,6 +13,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.el.core.ELReference;
/**
* @author Alexey Kazakov
@@ -26,12 +27,21 @@
IFile getResource();
/**
- * Returns "var" attributes
+ * Returns "var" attributes which are available in particular offset or the all "var"s if offset == -1
+ *
+ * @param offset
* @return
*/
- Var[] getVars();
+ Var[] getVars(int offset);
/**
+ * Returns all EL references of the file of this context.
+ *
+ * @return
+ */
+ ELReference[] getELReferences();
+
+ /**
* Returns EL Resolvers which are declared for this resource
* @return
*/
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELContextImpl.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -11,11 +11,10 @@
package org.jboss.tools.common.el.core.resolver;
import java.util.ArrayList;
-import java.util.HashMap;
import java.util.List;
-import java.util.Map;
import org.eclipse.jface.text.Region;
+import org.jboss.tools.common.el.core.ELReference;
/**
* EL context
@@ -23,8 +22,9 @@
*/
public class ELContextImpl extends SimpleELContext {
- protected Map<Region, List<Var>> vars = new HashMap<Region, List<Var>>();
protected List<Var> allVars = new ArrayList<Var>();
+ protected ELReference[] elReferences;
+ protected List<ELReference> elReferenceSet;
/*
* (non-Javadoc)
@@ -40,10 +40,63 @@
* @param vars
*/
public void addVar(Region region, Var var) {
- if (this.vars.get(region) == null) {
- this.vars.put(region, new ArrayList<Var>());
- }
- this.vars.get(region).add(var);
+ var.setRegion(region);
allVars.add(var);
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.resolver.ELContext#getVars(int)
+ */
+ public Var[] getVars(int offset) {
+ if(offset<0) {
+ return getVars();
+ }
+ List<Var> result = new ArrayList<Var>();
+ for (Var var : allVars) {
+ Region region = var.getRegion();
+ if(offset>=region.getOffset() && offset<=region.getOffset() + region.getLength()) {
+ result.add(var);
+ }
+ }
+ return result.toArray(new Var[result.size()]);
+ }
+
+ /**
+ * @return the allVars
+ */
+ public List<Var> getAllVars() {
+ return allVars;
+ }
+
+ /**
+ * @param allVars the allVars to set
+ */
+ public void setAllVars(List<Var> allVars) {
+ this.allVars = allVars;
+ }
+
+ private static final ELReference[] EMPTY_ARRAY = new ELReference[0];
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.IXmlContext#getELReferences()
+ */
+ public ELReference[] getELReferences() {
+ if(elReferences==null) {
+ if(elReferenceSet==null || elReferenceSet.isEmpty()) {
+ return EMPTY_ARRAY;
+ }
+ elReferences = elReferenceSet.toArray(new ELReference[0]);
+ }
+ return elReferences;
+ }
+
+ public void addELReference(ELReference reference) {
+ if(elReferenceSet==null) {
+ elReferenceSet = new ArrayList<ELReference>();
+ }
+ elReferenceSet.add(reference);
+ elReferences = null;
+ }
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolver.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolver.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolver.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -27,7 +27,7 @@
* @param el
* @return proposal list
*/
- List<TextProposal> getProposals(ELContext context, String el);
+ List<TextProposal> getProposals(ELContext context, String el, int offset);
/**
* Resolves EL operand.
@@ -35,7 +35,7 @@
* @param operand
* @return
*/
- ELResolution resolve(ELContext context, ELExpression operand);
+ ELResolution resolve(ELContext context, ELExpression operand, int offset);
/**
* @return EL parser factory
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/SimpleELContext.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/SimpleELContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/SimpleELContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -14,6 +14,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.jboss.tools.common.el.core.ELReference;
/**
* @author Alexey Kazakov
@@ -70,4 +71,13 @@
public void addVar(Var var) {
vars.add(var);
}
-}
+
+ public ELReference[] getELReferences() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public Var[] getVars(int offset) {
+ return getVars();
+ }
+}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -12,6 +12,7 @@
import java.util.List;
+import org.eclipse.jface.text.Region;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInstance;
import org.jboss.tools.common.el.core.model.ELModel;
@@ -31,6 +32,7 @@
int declOffset;
int declLength;
ELParserFactory factory;
+ Region region;
/**
* Constructor
@@ -144,4 +146,18 @@
}
return false;
}
+
+ /**
+ * @return the region
+ */
+ public Region getRegion() {
+ return region;
+ }
+
+ /**
+ * @param region the region to set
+ */
+ public void setRegion(Region region) {
+ this.region = region;
+ }
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -69,7 +69,7 @@
* (non-Javadoc)
* @see org.jboss.tools.common.el.core.resolver.ELResolver2#getProposals(org.jboss.tools.common.el.core.resolver.ELContext, java.lang.String)
*/
- public List<TextProposal> getProposals(ELContext context, String el) {
+ public List<TextProposal> getProposals(ELContext context, String el, int offset) {
return getCompletions(el, false, 0, context);
}
@@ -98,7 +98,7 @@
* (non-Javadoc)
* @see org.jboss.tools.common.el.core.resolver.ELResolver2#resolve(org.jboss.tools.common.el.core.resolver.ELContext, org.jboss.tools.common.el.core.model.ELExpression)
*/
- public ELResolution resolve(ELContext context, ELExpression operand) {
+ public ELResolution resolve(ELContext context, ELExpression operand, int offset) {
ELResolutionImpl resolution = resolveELOperand(operand, context, true);
resolution.setContext(context);
return resolution;
@@ -176,6 +176,12 @@
if (resolvedVars != null && !resolvedVars.isEmpty()) {
resolvedVariables = resolvedVars;
resolution.setLastResolvedToken(left);
+
+ ELSegmentImpl segment = new ELSegmentImpl();
+ segment.setToken(left.getFirstToken());
+ segment.setResolved(true);
+ resolution.addSegment(segment);
+
break;
}
left = (ELInvocationExpression)left.getLeft();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -10,10 +10,10 @@
******************************************************************************/
package org.jboss.tools.jsf.web.validation;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import java.util.Map;
import java.util.Set;
import org.eclipse.core.resources.IContainer;
@@ -31,6 +31,7 @@
import org.eclipse.jdt.ui.text.IJavaPartitions;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
@@ -39,18 +40,9 @@
import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.sse.core.StructuredModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
-import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
-import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
import org.eclipse.wst.validation.internal.core.ValidationException;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
-import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.model.ELExpression;
import org.jboss.tools.common.el.core.model.ELInstance;
import org.jboss.tools.common.el.core.model.ELInvocationExpression;
@@ -62,11 +54,11 @@
import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.el.core.parser.SyntaxError;
import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.el.core.resolver.ELContextImpl;
import org.jboss.tools.common.el.core.resolver.ELResolution;
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.el.core.resolver.ELResolverFactoryManager;
import org.jboss.tools.common.el.core.resolver.ELSegment;
-import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
import org.jboss.tools.common.el.core.resolver.IVariable;
import org.jboss.tools.common.el.core.resolver.JavaMemberELSegmentImpl;
import org.jboss.tools.common.el.core.resolver.SimpleELContext;
@@ -78,18 +70,18 @@
import org.jboss.tools.jsf.preferences.JSFSeverityPreferences;
import org.jboss.tools.jsf.project.JSFNature;
import org.jboss.tools.jst.web.kb.IKbProject;
+import org.jboss.tools.jst.web.kb.IXmlContext;
import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.PageContextFactory;
+import org.jboss.tools.jst.web.kb.el.KbELReference;
import org.jboss.tools.jst.web.kb.internal.KbProject;
import org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper;
import org.jboss.tools.jst.web.kb.internal.validation.ValidatingProjectSet;
import org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager;
import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
-import org.jboss.tools.jst.web.kb.validation.ELReference;
import org.jboss.tools.jst.web.kb.validation.IValidatingProjectSet;
import org.jboss.tools.jst.web.kb.validation.IValidationContext;
import org.jboss.tools.jst.web.kb.validation.IValidator;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* EL Validator
@@ -107,6 +99,7 @@
private IResource[] currentSources;
private IContainer webRootFolder;
private boolean revalidateUnresolvedELs = false;
+ private boolean validateVars = true;
public ELValidator() {
}
@@ -124,6 +117,7 @@
super.init(project, validationHelper, manager, reporter);
resolvers = ELResolverFactoryManager.getInstance().getResolvers(project);
mainFactory = ELParserUtil.getDefaultFactory();
+ validateVars = JSFSeverityPreferences.ENABLE.equals(JSFSeverityPreferences.getInstance().getProjectPreference(rootProject, JSFSeverityPreferences.CHECK_VARS));
}
/*
@@ -313,70 +307,25 @@
}
private void validateDom(IFile file, String content) {
- varListForCurentValidatedNode.clear();
- IModelManager manager = StructuredModelManager.getModelManager();
- if(manager == null) {
- // this can happen if plugin org.eclipse.wst.sse.core
- // is stopping or uninstalled, that is Eclipse is shutting down.
- // there is no need to report it, just stop validation.
+ ELContext context = PageContextFactory.createPageContext(file);
+ if(context==null) {
return;
}
- IStructuredModel model = null;
- try {
- model = manager.getModelForRead(file);
- if (model instanceof IDOMModel) {
- IDOMModel domModel = (IDOMModel) model;
- IDOMDocument document = domModel.getDocument();
- validateChildNodes(file, document);
- }
- } catch (CoreException e) {
- JSFModelPlugin.getDefault().logError(JSFValidationMessages.EL_VALIDATOR_ERROR_VALIDATING, e);
- } catch (IOException e) {
- JSFModelPlugin.getDefault().logError(JSFValidationMessages.EL_VALIDATOR_ERROR_VALIDATING, e);
- } finally {
- if (model != null) {
- model.releaseFromRead();
- }
- }
- return;
- }
-
- private void validateChildNodes(IFile file, Node parent) {
- String preferenceValue = JSFSeverityPreferences.getInstance().getProjectPreference(rootProject, JSFSeverityPreferences.CHECK_VARS);
- NodeList children = parent.getChildNodes();
- for(int i=0; i<children.getLength() && !reporter.isCancelled(); i++) {
- Node curentValidatedNode = children.item(i);
- Var var = null;
- if(Node.ELEMENT_NODE == curentValidatedNode.getNodeType()) {
- if (JSFSeverityPreferences.ENABLE.equals(preferenceValue)) {
- var = ElVarSearcher.findVar(curentValidatedNode, mainFactory);
+ if(context instanceof IXmlContext) {
+ IXmlContext xmlContext = (IXmlContext)context;
+ ELReference[] references = xmlContext.getELReferences();
+ for (int i = 0; i < references.length; i++) {
+ if(!references[i].getSyntaxErrors().isEmpty()) {
+ for (SyntaxError error: references[i].getSyntaxErrors()) {
+ IMarker marker = addError(JSFValidationMessages.EL_SYNTAX_ERROR, JSFSeverityPreferences.EL_SYNTAX_ERROR, new String[]{"" + error.getProblem()}, 1, references[i].getStartPosition() + error.getPosition(), file);
+ references[i].addMarker(marker);
+ }
}
- if(var!=null) {
- varListForCurentValidatedNode.add(var);
- }
- validateNodeContent(file, ((IDOMNode)curentValidatedNode).getFirstStructuredDocumentRegion(), DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE);
- } else if(Node.TEXT_NODE == curentValidatedNode.getNodeType()) {
- validateNodeContent(file, ((IDOMNode)curentValidatedNode).getFirstStructuredDocumentRegion(), DOMRegionContext.XML_CONTENT);
- }
- validateChildNodes(file, curentValidatedNode);
- if(var!=null) {
- varListForCurentValidatedNode.remove(var);
- }
- }
- }
- private void validateNodeContent(IFile file, IStructuredDocumentRegion node, String regionType) {
- ITextRegionList regions = node.getRegions();
- for(int i=0; i<regions.size(); i++) {
- ITextRegion region = regions.get(i);
- if(region.getType() == regionType) {
- String text = node.getFullText(region);
- if(text.indexOf("{")>-1) { //$NON-NLS-1$
- int offset = node.getStartOffset() + region.getStart();
- validateString(file, text, offset);
- }
+ validateEL(references[i]);
}
}
+ return;
}
/**
@@ -393,7 +342,7 @@
ELModel model = parser.parse(string);
List<ELInstance> is = model.getInstances();
- ELReference elReference = new ELReference();
+ ELReference elReference = new KbELReference();
elReference.setResource(file);
elReference.setEl(is);
elReference.setLength(string.length());
@@ -430,7 +379,7 @@
private void validateElOperand(ELReference elReference, ELInvocationExpression operandToken) {
IFile file = elReference.getResource();
- int documnetOffset = elReference.getStartPosition();
+ int documnetOffset = elReference.getStartPosition();
String operand = operandToken.getText();
if(operand.trim().length()==0) {
return;
@@ -441,13 +390,24 @@
boolean unresolvedTokenIsVariable = false;
if (!operand.endsWith(".")) { //$NON-NLS-1$
ELResolution resolution = null;
- ELContext context = new SimpleELContext();
- context.setVars(varListForCurentValidatedNode);
- context.setElResolvers(resolvers);
- context.setResource(file);
+ ELContext context = PageContextFactory.createPageContext(file);
+ if(context==null) {
+ context = new SimpleELContext();
+ context.setResource(file);
+ context.setElResolvers(resolvers);
+ }
int maxNumberOfResolvedSegments = -1;
+ List<Var> vars = null;
+ Map<Region, List<Var>> varMap = null;
+ ELContextImpl c = null;
+ if(!validateVars && context instanceof ELContextImpl) {
+ c = (ELContextImpl)context;
+ vars = c.getAllVars();
+ c.setAllVars(new ArrayList<Var>());
+ }
+
for (int i = 0; i < resolvers.length; i++) {
- ELResolution elResolution = resolvers[i].resolve(context, operandToken);
+ ELResolution elResolution = resolvers[i].resolve(context, operandToken, documnetOffset);
if(elResolution.isResolved()) {
resolution = elResolution;
break;
@@ -459,6 +419,10 @@
}
}
+ if(c!=null) {
+ c.setAllVars(vars);
+ }
+
if(!resolution.isResolved()) {
Set<String> names = findVariableNames(operandToken);
for (String name : names) {
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -206,11 +206,11 @@
return ELParserUtil.getJbossFactory();
}
- public List<TextProposal> getProposals(ELContext context, String el) {
+ public List<TextProposal> getProposals(ELContext context, String el, int offset) {
return Collections.emptyList();
}
- public ELResolution resolve(ELContext context, ELExpression operand) {
+ public ELResolution resolve(ELContext context, ELExpression operand, int offset) {
return new ELResolutionImpl(operand);
}
};
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IXmlContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IXmlContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IXmlContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -7,25 +7,33 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.jst.web.kb;
+import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.Var;
/**
*
* @author Victor Rubezhny
- *
+ *
*/
public interface IXmlContext extends ELContext {
/**
* Returns "var" attributes which are available in particular offset.
+ *
* @param offset
* @return
*/
Var[] getVars(int offset);
-}
+ /**
+ * Returns all EL references of the file of this context.
+ *
+ * @return
+ */
+ ELReference[] getELReferences();
+}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -35,7 +35,6 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IDocumentListener;
@@ -57,20 +56,28 @@
import org.eclipse.wst.sse.core.internal.provisional.INodeNotifier;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.el.core.GlobalELReferenceList;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELContextImpl;
import org.jboss.tools.common.el.core.resolver.ELResolverFactoryManager;
import org.jboss.tools.common.el.core.resolver.ElVarSearcher;
-import org.jboss.tools.common.el.core.resolver.SimpleELContext;
import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.common.resref.core.ResourceReference;
import org.jboss.tools.common.text.ext.util.Utils;
+import org.jboss.tools.jst.web.kb.el.KbELReference;
import org.jboss.tools.jst.web.kb.include.IncludeContextBuilder;
import org.jboss.tools.jst.web.kb.internal.FaceletPageContextImpl;
import org.jboss.tools.jst.web.kb.internal.JspContextImpl;
@@ -305,16 +312,12 @@
private ELContext createPageContextInstance(String contentType) {
String contextType = IncludeContextBuilder.getContextType(contentType);
- if (XML_PAGE_CONTEXT_TYPE.equals(contextType)) {
- return new XmlContextImpl();
- } else if (JSP_PAGE_CONTEXT_TYPE.equals(contextType)) {
+ if (JSP_PAGE_CONTEXT_TYPE.equals(contextType)) {
return new JspContextImpl();
} else if (FACELETS_PAGE_CONTEXT_TYPE.equals(contextType)) {
return new FaceletPageContextImpl();
- } else {
- WebKbPlugin.getDefault().logError(Messages.format(KbMessages.ILLEGAL_CONTENTTYPE, contentType));
}
- return new SimpleELContext();
+ return new XmlContextImpl();
}
/**
@@ -356,15 +359,19 @@
}
private void fillContextForNode(IDOMNode node, ELContext context, List<String> parents) {
- if (context instanceof JspContextImpl && !(node instanceof IDOMElement)) {
+ if (!(context instanceof FaceletPageContextImpl) && !(node instanceof IDOMElement)) {
// There is no any useful info for JSP in text nodes
return;
}
- if (context instanceof XmlContextImpl && node instanceof IDOMElement) {
- fillXMLNamespacesForNode((IDOMElement)node, (XmlContextImpl)context);
+ if (context instanceof XmlContextImpl) {
+ XmlContextImpl xmlContext = (XmlContextImpl)context;
+ fillElReferencesForNode(node, xmlContext);
+ if (node instanceof IDOMElement) {
+ fillXMLNamespacesForNode((IDOMElement)node, xmlContext);
+ }
}
-
+
if ((context instanceof JspContextImpl ||
context instanceof FaceletPageContextImpl) &&
node instanceof IDOMElement) {
@@ -374,14 +381,14 @@
if (context instanceof FaceletPageContextImpl) {
// Insert here the initialization code for FaceletPage context elements which may exist in Text nodes
}
-
+
if (context instanceof JspContextImpl && node instanceof IDOMElement) {
fillResourceBundlesForNode((IDOMElement)node, (JspContextImpl)context);
}
// There could be some context type to be initialized somehow that is different from JSP or FaceletPage context
// Insert its on-node initialization code here
-
+
// The only Elements may have include/CSS Stylesheet links and other additional info
if (context instanceof IPageContext && node instanceof IDOMElement) {
fillAdditionalInfoForNode((IDOMElement)node, (IPageContext)context, parents);
@@ -403,7 +410,41 @@
}
}
-
+ private void fillElReferencesForNode(IDOMNode node, XmlContextImpl context) {
+ if(Node.ELEMENT_NODE == node.getNodeType() || Node.TEXT_NODE == node.getNodeType()) {
+ IStructuredDocumentRegion regionNode = node.getFirstStructuredDocumentRegion();
+ ITextRegionList regions = regionNode.getRegions();
+ for(int i=0; i<regions.size(); i++) {
+ ITextRegion region = regions.get(i);
+ if(region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE || region.getType() == DOMRegionContext.XML_CONTENT) {
+ String text = regionNode.getFullText(region);
+ if(text.indexOf("{")>-1) { //$NON-NLS-1$
+ int offset = regionNode.getStartOffset() + region.getStart();
+ int startEl = text.indexOf("#{"); //$NON-NLS-1$
+ if(startEl==-1) {
+ startEl = text.indexOf("${"); //$NON-NLS-1$
+ }
+ if(startEl>-1) {
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ ELModel model = parser.parse(text);
+ List<ELInstance> is = model.getInstances();
+
+ ELReference elReference = new KbELReference();
+ elReference.setResource(context.getResource());
+ elReference.setEl(is);
+ elReference.setLength(text.length());
+ elReference.setStartPosition(offset);
+
+ elReference.setSyntaxErrors(model.getSyntaxErrors());
+
+ context.addELReference(elReference);
+ }
+ }
+ }
+ }
+ }
+ }
+
private void fillAdditionalInfoForNode(IDOMElement node, IPageContext context, List<String> parents) {
String prefix = node.getPrefix() == null ? "" : node.getPrefix(); //$NON-NLS-1$
String tagName = node.getLocalName();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -102,7 +102,7 @@
String elString = value;
ELResolver[] resolvers = context.getElResolvers();
for (int i = 0; resolvers != null && i < resolvers.length; i++) {
- proposals.addAll(resolvers[i].getProposals(context, elString));
+ proposals.addAll(resolvers[i].getProposals(context, elString, query.getOffset()));
}
}
return proposals.toArray(new TextProposal[proposals.size()]);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -67,11 +67,11 @@
* (non-Javadoc)
* @see org.jboss.tools.common.el.core.resolver.ELResolver2#getProposals(org.jboss.tools.common.el.core.resolver.ELContext, java.lang.String)
*/
- public List<TextProposal> getProposals(ELContext context, String el) {
+ public List<TextProposal> getProposals(ELContext context, String el, int offset) {
List<TextProposal> completions = new ArrayList<TextProposal>();
List<Var> vars = new ArrayList<Var>();
- Var[] array = context.getVars();
+ Var[] array = context.getVars(offset);
for (int i = 0; i < array.length; i++) {
vars.add(array[i]);
}
@@ -93,9 +93,9 @@
* (non-Javadoc)
* @see org.jboss.tools.common.el.core.resolver.ELResolver#resolve(org.jboss.tools.common.el.core.resolver.ELContext, org.jboss.tools.common.el.core.model.ELExpression)
*/
- public ELResolution resolve(ELContext context, ELExpression operand) {
+ public ELResolution resolve(ELContext context, ELExpression operand, int offset) {
List<Var> vars = new ArrayList<Var>();
- Var[] array = context.getVars();
+ Var[] array = context.getVars(offset);
for (int i = 0; i < array.length; i++) {
vars.add(array[i]);
}
@@ -119,9 +119,9 @@
* @param returnEqualedVariablesOnly
* @return
*/
- public ELResolution resolveELOperand(ELExpression operand, ELContext context, boolean returnEqualedVariablesOnly) {
+ public ELResolution resolveELOperand(ELExpression operand, ELContext context, boolean returnEqualedVariablesOnly, int offset) {
List<Var> vars = new ArrayList<Var>();
- Var[] array = context.getVars();
+ Var[] array = context.getVars(offset);
for (int i = 0; i < array.length; i++) {
vars.add(array[i]);
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELReference.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELReference.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELReference.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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.jst.web.kb.el;
+
+import org.jboss.tools.common.el.core.ELReference;
+import org.jboss.tools.jst.web.kb.validation.IValidator;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class KbELReference extends ELReference {
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.common.el.core.ELReference#getMarkerGroupId()
+ */
+ @Override
+ protected String getMarkerGroupId() {
+ return IValidator.MARKED_RESOURCE_MESSAGE_GROUP;
+ }
+}
\ No newline at end of file
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/KbELReference.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -59,36 +59,7 @@
return superNameSpaces;
}
-
@Override
- public Var[] getVars() {
- Var[] thisVars = super.getVars();
-
- List<Var> includedVars = new ArrayList<Var>();
- List<ELContext> includedContexts = getIncludedContexts();
- if (includedContexts != null) {
- for (ELContext includedContext : includedContexts) {
- Var[] vars = includedContext.getVars();
- if (vars != null) {
- for (Var b : vars) {
- includedVars.add(b);
- }
- }
- }
- }
-
- Var[] result = new Var[thisVars == null ? 0 : thisVars.length + includedVars.size()];
- if (thisVars != null && thisVars.length > 0) {
- System.arraycopy(thisVars, 0, result, 0, thisVars.length);
- }
- if (!includedVars.isEmpty()) {
- System.arraycopy(includedVars.toArray(new ITagLibrary[includedVars.size()]), 0,
- result, thisVars == null ? 0 : thisVars.length, includedVars.size());
- }
- return result;
- }
-
- @Override
public Var[] getVars(int offset) {
Var[] thisVars = super.getVars(offset);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/XmlContextImpl.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -10,13 +10,11 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
-import org.eclipse.jface.text.Region;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.DocumentProviderRegistry;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.jboss.tools.common.el.core.resolver.ELContextImpl;
-import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.jst.web.kb.IXmlContext;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
import org.jboss.tools.jst.web.kb.taglib.INameSpace;
@@ -24,7 +22,7 @@
public class XmlContextImpl extends ELContextImpl implements IXmlContext {
protected IDocument document;
private FileEditorInput editorInput;
-
+
// Fix for JBIDE-5097: It must be a map of <IRegion to Map of <NS-Prefix to NS>>
protected Map<IRegion, Map<String, INameSpace>> nameSpaces = new HashMap<IRegion, Map<String, INameSpace>>();
@@ -54,21 +52,6 @@
return document;
}
- /*
- * (non-Javadoc)
- * @see org.jboss.tools.jst.web.kb.IXmlContext#getVars(int)
- */
- public Var[] getVars(int offset) {
- List<Var> result = new ArrayList<Var>();
- for (Region region : vars.keySet()) {
- if(offset>=region.getOffset() && offset<=region.getOffset() + region.getLength()) {
- result.addAll(vars.get(region));
- }
- }
- return result.toArray(new Var[result.size()]);
- }
-
-
/*
* TODO: the visibility must differ between 'include'-like and 'template'-like inclusion
*
@@ -163,4 +146,4 @@
IDocumentProvider provider= DocumentProviderRegistry.getDefault().getDocumentProvider(input);
provider.disconnect(input);
}
-}
+}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidatorContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidatorContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidatorContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -17,8 +17,9 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.xml.XMLUtilities;
-import org.jboss.tools.jst.web.kb.validation.ELReference;
+import org.jboss.tools.jst.web.kb.el.KbELReference;
import org.w3c.dom.Element;
/**
@@ -182,7 +183,7 @@
if(name == null || name.trim().length() == 0) {
continue;
}
- ELReference el = new ELReference();
+ ELReference el = new KbELReference();
el.load(linkedEls[i]);
el.setNeedToInitMarkers(true);
addLinkedEl(name, el);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ProjectValidationContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ProjectValidationContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ProjectValidationContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -18,8 +18,8 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.common.xml.XMLUtilities;
-import org.jboss.tools.jst.web.kb.validation.ELReference;
import org.jboss.tools.jst.web.kb.validation.IValidationContext;
import org.jboss.tools.jst.web.kb.validation.IValidator;
import org.w3c.dom.Element;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -26,8 +26,8 @@
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.el.core.ELReference;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
-import org.jboss.tools.jst.web.kb.validation.ELReference;
import org.jboss.tools.jst.web.kb.validation.IValidatingProjectSet;
import org.jboss.tools.jst.web.kb.validation.IValidationContext;
import org.jboss.tools.jst.web.kb.validation.IValidator;
Deleted: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ELReference.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ELReference.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/ELReference.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -1,293 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jst.web.kb.validation;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.jboss.tools.common.el.core.model.ELExpression;
-import org.jboss.tools.common.el.core.model.ELInstance;
-import org.jboss.tools.common.el.core.model.ELModel;
-import org.jboss.tools.common.el.core.parser.ELParser;
-import org.jboss.tools.common.el.core.parser.ELParserUtil;
-import org.jboss.tools.common.el.core.parser.SyntaxError;
-import org.jboss.tools.common.text.ITextSourceReference;
-import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.jst.web.kb.WebKbPlugin;
-import org.w3c.dom.Element;
-
-/**
- * Represents a reference to EL in a resource
- * @author Alexey Kazakov
- */
-public class ELReference implements ITextSourceReference {
-
- private IFile resource;
- private IPath path;
- private int length;
- private int startPosition;
- private ELExpression[] el;
- private Set<IMarker> markers;
- private IMarker[] markerArray;
- private boolean needToInitMarkers = false;
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.core.ISeamTextSourceReference#getLength()
- */
- public int getLength() {
- return length;
- }
-
- /* (non-Javadoc)
- * @see org.jboss.tools.seam.core.ISeamTextSourceReference#getStartPosition()
- */
- public int getStartPosition() {
- return startPosition;
- }
-
- /**
- * @param length
- */
- public void setLength(int length) {
- this.length = length;
- }
-
- /**
- * @param startPosition
- */
- public void setStartPosition(int startPosition) {
- this.startPosition = startPosition;
- }
-
- /**
- * @return the resource
- */
- public IFile getResource() {
- if(resource==null) {
- IWorkspaceRoot wsRoot = ResourcesPlugin.getWorkspace().getRoot();
- resource = wsRoot.getFile(path);
- }
- return resource;
- }
-
- /**
- * @param resource the resource to set
- */
- public void setResource(IFile resource) {
- this.resource = resource;
- if(resource!=null) {
- this.path = resource.getFullPath();
- }
- }
-
- /**
- * @return the path
- */
- public IPath getPath() {
- return path;
- }
-
- /**
- * @param path the path to set
- */
- public void setPath(IPath path) {
- this.path = path;
- }
-
- /**
- * @return the el
- */
- public ELExpression[] getEl() {
- if(el==null) {
- Set<ELExpression> exps = new HashSet<ELExpression>();
- String content = null;
- try {
- content = FileUtil.readStream(getResource());
- } catch (CoreException e) {
- WebKbPlugin.getDefault().logError(e);
- }
- String elText = content.substring(startPosition, startPosition + length);
- int startEl = elText.indexOf("#{"); //$NON-NLS-1$
- if(startEl>-1) {
- ELParser parser = ELParserUtil.getJbossFactory().createParser();
- ELModel model = parser.parse(elText);
- List<SyntaxError> errors = model.getSyntaxErrors();
- if(!errors.isEmpty()) {
- WebKbPlugin.getDefault().logWarning("ELObject hold incorrect information. Maybe resource " + getResource() + " has been changed.");
- return null;
- }
- List<ELInstance> is = model.getInstances();
- for (ELInstance i : is) {
- if(!i.getErrors().isEmpty()) {
- WebKbPlugin.getDefault().logWarning("ELObject hold incorrect information. Maybe resource " + getResource() + " has been changed.");
- continue;
- }
- exps.add(i.getExpression());
- }
- }
- el = exps.toArray(new ELExpression[0]);
- }
- return el;
- }
-
- /**
- * @param el the el to set
- */
- public void setEl(ELExpression[] el) {
- this.el = el;
- }
-
- /**
- * @param insts
- */
- public void setEl(List<ELInstance> insts) {
- Set<ELExpression> exps = new HashSet<ELExpression>();
- for (ELInstance el : insts) {
- exps.add(el.getExpression());
- }
- el = exps.toArray(new ELExpression[0]);
- }
-
- private IMarker[] EMPTY_MARKER_ARRAY = new IMarker[0];
-
- private void initMarkers() {
- if(markers==null) {
- markers = new HashSet<IMarker>();
- if(needToInitMarkers) {
- IFile file = getResource();
- if(file!=null) {
- IMarker[] markers = null;
- try {
- markers = file.findMarkers(null, true, IResource.DEPTH_INFINITE);
- } catch (CoreException e) {
- WebKbPlugin.getDefault().logError(e);
- }
- for(int i=0; i<markers.length; i++){
- String groupName = markers[i].getAttribute("groupName", null); //$NON-NLS-1$
- if(groupName!=null && (groupName.equals(groupName.equals(IValidator.MARKED_RESOURCE_MESSAGE_GROUP)))) {
- int start = markers[i].getAttribute(IMarker.CHAR_START, -1);
- int end = markers[i].getAttribute(IMarker.CHAR_END, -1);
- if(start>=startPosition && end<=startPosition+length) {
- addMarker(markers[i]);
- }
- }
- }
- }
- }
- needToInitMarkers = false;
- }
- }
-
- /**
- * @param needToInitMarkers the needToInitMarkers to set
- */
- public synchronized void setNeedToInitMarkers(boolean needToInitMarkers) {
- this.needToInitMarkers = needToInitMarkers;
- }
-
- public synchronized void setMarkers(Set<IMarker> markers) {
- this.markers = markers;
- }
-
- /**
- * @return the markers
- */
- public synchronized IMarker[] getMarkers() {
- initMarkers();
- if(markerArray==null) {
- if(markers.isEmpty()) {
- markerArray = EMPTY_MARKER_ARRAY;
- } else {
- markerArray = markers.toArray(new IMarker[0]);
- }
- }
- return markerArray;
- }
-
- /**
- * @param markers the markers to set
- */
- public synchronized void addMarker(IMarker marker) {
- if(marker==null) {
- return;
- }
- markerArray = null;
- if(markers==null) {
- markers = new HashSet<IMarker>();
- }
- markers.add(marker);
- }
-
- /**
- * Removes all markers from this EL.
- */
- public synchronized void deleteMarkers() {
- initMarkers();
- for (IMarker marker : markers) {
- try {
- marker.delete();
- } catch (CoreException e) {
- WebKbPlugin.getDefault().logError(e);
- }
- }
- markers.clear();
- markerArray = null;
- }
-
- /**
- * Store this EL into XML element.
- * @param element
- */
- public synchronized void store(Element element) {
- element.setAttribute("path", path.toString()); //$NON-NLS-1$
- element.setAttribute("offset", "" + startPosition); //$NON-NLS-1$ //$NON-NLS-2$
- element.setAttribute("length", "" + length); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * Load this EL from XML element.
- * @param element
- */
- public synchronized void load(Element element) {
- path = new Path(element.getAttribute("path")); //$NON-NLS-1$
- startPosition = new Integer(element.getAttribute("offset")); //$NON-NLS-1$
- length = new Integer(element.getAttribute("length")); //$NON-NLS-1$
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj) {
- if(this == obj) {
- return true;
- }
- ELReference el = (ELReference)obj;
- return this.path.equals(el.path) && this.startPosition == el.startPosition;
- }
-
- /* (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode() {
- return path.hashCode() + startPosition;
- }
-}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidationContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidationContext.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/validation/IValidationContext.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -16,6 +16,7 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.common.el.core.ELReference;
import org.w3c.dom.Element;
/**
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/el/SeamPromptingProvider.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -59,7 +59,7 @@
} else if(MEMBERS.equals(id)) {
SimpleELContext context = new SimpleELContext();
context.setResource(f);
- List<TextProposal> proposals = engine.getProposals(context, prefix);
+ List<TextProposal> proposals = engine.getProposals(context, prefix, -1);
List<String> suggestions = new ArrayList<String>();
if(proposals != null) for (TextProposal proposal: proposals) {
suggestions.add(proposal.getReplacementString());
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamRefactorSearcher.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -138,7 +138,7 @@
context.setVars(vars);
- ELResolution resolution = resolver.resolve(context, operand);
+ ELResolution resolution = resolver.resolve(context, operand, offset);
List<ELSegment> segments = resolution.findSegmentsByVariable(seamComponent);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -440,7 +440,7 @@
SimpleELContext elContext = new SimpleELContext();
elContext.setResource(file);
elContext.setVars(vars);
- List<TextProposal> suggestions = fEngine.getProposals(elContext, prefix);
+ List<TextProposal> suggestions = fEngine.getProposals(elContext, prefix, offset);
List<TextProposal> uniqueSuggestions = fEngine.makeKbUnique(suggestions);
List<ICompletionProposal> result= new ArrayList<ICompletionProposal>();
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/properties/SeamELAttributeContentProposalProvider.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -112,7 +112,7 @@
List<TextProposal> suggestions = null;
SimpleELContext context = new SimpleELContext();
context.setResource(file);
- suggestions = engine.getProposals(context, prefix);
+ suggestions = engine.getProposals(context, prefix, -1);
if(suggestions == null) {
return EMPTY;
}
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/messagesValidation.jsp
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/messagesValidation.jsp (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/messagesValidation.jsp 2009-11-28 02:32:29 UTC (rev 18896)
@@ -0,0 +1,6 @@
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<f:loadBundle var="Message" basename="Messages"/>
+
+<h:outputText value="#{Message.header}"/>
\ No newline at end of file
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/WebContent/messagesValidation.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/Messages.properties
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/Messages.properties (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/Messages.properties 2009-11-28 02:32:29 UTC (rev 18896)
@@ -0,0 +1,3 @@
+header=Hello Demo Application
+prompt_message=Name:
+hello_message=Hello
\ No newline at end of file
Property changes on: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/Messages.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/TestComponentForVarAttributes.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -4,6 +4,7 @@
import java.util.Map;
import java.util.Set;
+import org.jboss.seam.annotations.Factory;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.datamodel.DataModel;
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-11-27 21:34:25 UTC (rev 18895)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-11-28 02:32:29 UTC (rev 18896)
@@ -184,9 +184,16 @@
assertEquals("Problem marker was found in varAttributes.xhtml file. Validator did not recognize 'var' attribute.", 0, number);
}
+ public void testMessageBundles() throws CoreException {
+ // Test for https://jira.jboss.org/jira/browse/JBIDE-5089
+ IFile file = project.getFile("WebContent/messagesValidation.jsp");
+ int number = getMarkersNumber(file);
+ assertEquals("Problem marker was found in messagesValidation.jsp file. Validator did not recognize a message bundle.", 0, number);
+ }
+
public void testJiraJbide1696() throws CoreException {
//getSeamProject(project);
-
+
// Test for http://jira.jboss.com/jira/browse/JBIDE-1696
IFile subclassComponentFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SubclassTestComponent.java");
assertMarkerIsCreated(subclassComponentFile, MARKER_TYPE, "Stateful component \"testComponentJBIDE1696\" must have a method marked @Remove", 25);
15 years, 1 month
JBoss Tools SVN: r18895 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui: src/org/jboss/tools/smooks/launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-11-27 16:34:25 -0500 (Fri, 27 Nov 2009)
New Revision: 18895
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchConfigurationDelegate.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchMetadata.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLauncher.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5285
Launch Configuration Delegate using stale into from Launch Config
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-11-27 17:26:32 UTC (rev 18894)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2009-11-27 21:34:25 UTC (rev 18895)
@@ -36,7 +36,8 @@
org.eclipse.debug.ui;bundle-version="3.5.1",
org.eclipse.jdt.debug.ui;bundle-version="3.4.1",
org.eclipse.jdt.junit;bundle-version="3.5.1",
- org.eclipse.ui.console;bundle-version="3.4.0"
+ org.eclipse.ui.console;bundle-version="3.4.0",
+ org.jboss.tools.common.model.ui;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchConfigurationDelegate.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchConfigurationDelegate.java 2009-11-27 17:26:32 UTC (rev 18894)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchConfigurationDelegate.java 2009-11-27 21:34:25 UTC (rev 18895)
@@ -28,7 +28,7 @@
import java.util.Arrays;
import java.util.List;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -38,41 +38,58 @@
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate;
import org.eclipse.jdt.launching.ExecutionArguments;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IVMRunner;
import org.eclipse.jdt.launching.VMRunnerConfiguration;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.jboss.tools.smooks.core.SmooksInputType;
/**
+ * Smooks Launch Configuration Delegate.
+ *
* @author <a href="mailto:tom.fennelly@jboss.com">tom.fennelly(a)jboss.com</a>
*/
public class SmooksLaunchConfigurationDelegate extends JUnitLaunchConfigurationDelegate {
private static final String PLUGIN_ID = "org.jboss.tools.smooks.ui.smooksLauncher";
- public static final String SMOOKS_INPUT = "SmooksInput";
- public static final String SMOOKS_INPUT_TYPE = "SmooksInputType";
- public static final String SMOOKS_PROCESS_TYPES = "SmooksProcessTypes";
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate#launch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String, org.eclipse.debug.core.ILaunch, org.eclipse.core.runtime.IProgressMonitor)
*/
public void launch(ILaunchConfiguration launchConfig, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
- IVMRunner runner= getVMRunner(launchConfig, mode);
- VMRunnerConfiguration runConfig = buildRunnerConfig(launchConfig);
+ IProject project = getJavaProject(launchConfig).getProject();
+ final String smooksConfigName = launchConfig.getAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, "");
+ final SmooksLaunchMetadata launchMetadata = new SmooksLaunchMetadata();
+
+ launchMetadata.setSmooksConfig(project.findMember(smooksConfigName));
- // check for cancellation
- if (monitor.isCanceled()) {
- return;
- }
-
- IResource smooksConfig = SmooksRunTab.getSmooksConfig(launchConfig);
- if(smooksConfig != null) {
- String inputType = launchConfig.getAttribute(SMOOKS_INPUT_TYPE, "");
- String inputPath = launchConfig.getAttribute(SMOOKS_INPUT, "");
- String nodeTypes = launchConfig.getAttribute(SMOOKS_PROCESS_TYPES, "");
+ if(launchMetadata.isValidSmooksConfig()) {
+ IVMRunner runner= getVMRunner(launchConfig, mode);
+ VMRunnerConfiguration runConfig = buildRunnerConfig(launchConfig);
+
+ // check for cancellation
+ if (monitor.isCanceled()) {
+ return;
+ }
- runConfig.setProgramArguments(new String[] {smooksConfig.getRawLocation().toOSString(), inputType, inputPath, nodeTypes});
+ String inputType = launchMetadata.getInputType();
+ String inputPath = launchMetadata.getInputFile().getAbsolutePath();
+ String nodeTypes = launchMetadata.getNodeTypesString();
+
+ runConfig.setProgramArguments(new String[] {launchMetadata.getConfigFile().getAbsolutePath(), inputType, inputPath, nodeTypes});
runner.run(runConfig, launch, monitor);
+ } else {
+ final Display display = PlatformUI.getWorkbench().getDisplay();
+ display.syncExec(new Runnable() {
+ public void run(){
+ Shell shell = display.getActiveShell();
+ ErrorDialog.openError(shell, "Error", "Error Launching Smooks Configuration '" + smooksConfigName + "'.", new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, launchMetadata.getErrorMessage(), new Exception()));
+ }
+ });
}
}
@@ -148,7 +165,7 @@
}
}
} catch (IOException e) {
- new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.OK, "Error copying SmooksLauncher to classpath.", e));
+ new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, IStatus.ERROR, "Error copying SmooksLauncher to classpath.", e));
}
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchMetadata.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchMetadata.java 2009-11-27 17:26:32 UTC (rev 18894)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLaunchMetadata.java 2009-11-27 21:34:25 UTC (rev 18895)
@@ -49,6 +49,7 @@
public class SmooksLaunchMetadata {
private Smooks inputParamExtractor;
+ private boolean isSmooksConfig;
private boolean isValidSmooksConfig;
private File configFile;
private String inputType;
@@ -57,11 +58,16 @@
public SmooksLaunchMetadata() {
inputParamExtractor = new Smooks();
+ inputParamExtractor.addVisitor(new SmooksConfigAsserter(), "/smooks-resource-list", "http://www.milyn.org/xsd/smooks-1.1.xsd");
inputParamExtractor.addVisitor(new InputParamExtractor(), "/smooks-resource-list/params/param", "http://www.milyn.org/xsd/smooks-1.1.xsd");
inputParamExtractor.addVisitor(new ConfigTypeTracker().setNodeType(ProcessNodeType.TEMPLATING), "/smooks-resource-list/freemarker");
inputParamExtractor.addVisitor(new ConfigTypeTracker().setNodeType(ProcessNodeType.JAVA_BINDING), "/smooks-resource-list/bean");
}
+ public boolean isSmooksConfig() {
+ return isSmooksConfig;
+ }
+
public boolean isValidSmooksConfig() {
return isValidSmooksConfig;
}
@@ -72,17 +78,19 @@
}
if(configFile == null) {
- return "Smooks configuration file not configured.";
+ return "Smooks configuration file not configured, or does not exist.";
} else if(!configFile.exists()) {
return "Specified Smooks configuration file not found.";
} else if(!configFile.isFile()) {
return "Specified Smooks configuration file is not a readable file.";
+ } else if(!isSmooksConfig) {
+ return "Specified Smooks configuration file is not a valid Smooks Configuration.";
} else if(inputFile == null) {
- return "Specified Smooks configuration file 'Input' task is not configured with a sample input file. Please configure the 'Input' task in the Process flow.";
+ return "Specified Smooks configuration 'Input' task is not configured with a sample input file. Please configure the 'Input' task in the Process flow.";
} else if(!inputFile.exists()) {
- return "Specified Smooks configuration file 'Input' task is configured with a sample input file, but the file cannot be found. Please reconfigure the 'Input' task in the Process flow.";
+ return "Specified Smooks configuration 'Input' task is configured with a sample input file, but the file cannot be found. Please reconfigure the 'Input' task in the Process flow.";
} else if(!inputFile.isFile()) {
- return "Specified Smooks configuration file 'Input' task is configured with a sample input file, but the file cannot be read. Please reconfigure the 'Input' task in the Process flow.";
+ return "Specified Smooks configuration 'Input' task is configured with a sample input file, but the file cannot be read. Please reconfigure the 'Input' task in the Process flow.";
}
return "";
@@ -158,6 +166,7 @@
}
private void reset() {
+ isSmooksConfig = false;
isValidSmooksConfig = false;
configFile = null;
inputType = null;
@@ -165,6 +174,13 @@
processNodeTypes.clear();
}
+ private static class SmooksConfigAsserter implements SAXVisitBefore {
+ public void visitBefore(SAXElement paramElement, ExecutionContext execContext) throws SmooksException, IOException {
+ SmooksLaunchMetadata metadata = (SmooksLaunchMetadata) execContext.getAttribute(SmooksLaunchMetadata.class);
+ metadata.isSmooksConfig = true;
+ }
+ }
+
private static class InputParamExtractor implements SAXVisitBefore, SAXVisitAfter {
public void visitBefore(SAXElement paramElement, ExecutionContext execContext) throws SmooksException, IOException {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLauncher.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLauncher.java 2009-11-27 17:26:32 UTC (rev 18894)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksLauncher.java 2009-11-27 21:34:25 UTC (rev 18895)
@@ -19,9 +19,12 @@
*/
package org.jboss.tools.smooks.launch;
+import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.io.StringReader;
+import java.io.StringWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.Map.Entry;
@@ -32,6 +35,7 @@
import org.jboss.tools.smooks.core.SmooksInputType;
import org.milyn.Smooks;
import org.milyn.payload.JavaResult;
+import org.milyn.payload.StringResult;
import org.xml.sax.SAXException;
import com.thoughtworks.xstream.XStream;
@@ -67,18 +71,26 @@
JavaResult javaResult = new JavaResult();
if(processNodeTypes.contains(ProcessNodeType.TEMPLATING)) {
- smooks.filterSource(new StreamSource(new FileInputStream(input)), new StreamResult(System.out), javaResult);
+ StringResult stringResult = new StringResult();
+
+ smooks.filterSource(new StreamSource(new FileInputStream(input)), stringResult, javaResult);
+ System.out.println("[StreamResult ...]\n");
+ System.out.println(" |--");
+ System.out.println(indent(stringResult.toString()));
+ System.out.println(" |--\n");
} else {
smooks.filterSource(new StreamSource(new FileInputStream(input)), javaResult);
- if(processNodeTypes.contains(ProcessNodeType.JAVA_BINDING)) {
- System.out.println("[Java Bindings (XML Serialized)...]");
- Set<Entry<String, Object>> bindings = javaResult.getResultMap().entrySet();
-
- for(Entry<String, Object> binding : bindings) {
- System.out.println("\n" + binding.getKey() + ":");
- System.out.println("\n" + (new XStream()).toXML(binding.getValue()));
- System.out.println("=============================================");
- }
+ }
+
+ Set<Entry<String, Object>> bindings = javaResult.getResultMap().entrySet();
+ if(!bindings.isEmpty()) {
+ System.out.println("[JavaResult Objects (XML Serialized)...]");
+
+ for(Entry<String, Object> binding : bindings) {
+ System.out.println("\n" + binding.getKey() + ":");
+ System.out.println(" |--");
+ System.out.println(indent((new XStream()).toXML(binding.getValue())));
+ System.out.println(" |--");
}
}
@@ -107,4 +119,20 @@
return nodeTypes;
}
+
+ private static String indent(String in) throws IOException {
+ BufferedReader lineReader = new BufferedReader(new StringReader(in));
+ StringBuilder indentBuf = new StringBuilder();
+
+ String line = lineReader.readLine();
+ while(line != null) {
+ indentBuf.append(" |").append(line);
+ line = lineReader.readLine();
+ if(line != null) {
+ indentBuf.append('\n');
+ }
+ }
+
+ return indentBuf.toString();
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java 2009-11-27 17:26:32 UTC (rev 18894)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java 2009-11-27 21:34:25 UTC (rev 18895)
@@ -173,8 +173,6 @@
launchConfigWC.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""); //$NON-NLS-1$
launchConfigWC.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, ""); //$NON-NLS-1$
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_INPUT, ""); //$NON-NLS-1$
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_INPUT_TYPE, ""); //$NON-NLS-1$
if(activePage != null) {
IEditorPart editor = activePage.getActiveEditor();
@@ -218,15 +216,6 @@
public void performApply(ILaunchConfigurationWorkingCopy launchConfigWC) {
launchConfigWC.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjText.getText());
launchConfigWC.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, fConfigurationText.getText());
- if(launchMetaData.isValidSmooksConfig()) {
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_INPUT, launchMetaData.getInputFile().getAbsolutePath()); //$NON-NLS-1$
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_INPUT_TYPE, launchMetaData.getInputType()); //$NON-NLS-1$
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_PROCESS_TYPES, launchMetaData.getNodeTypesString()); //$NON-NLS-1$
- } else {
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_INPUT, ""); //$NON-NLS-1$
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_INPUT_TYPE, ""); //$NON-NLS-1$
- launchConfigWC.setAttribute(SmooksLaunchConfigurationDelegate.SMOOKS_PROCESS_TYPES, ""); //$NON-NLS-1$
- }
}
/*
15 years, 1 month
JBoss Tools SVN: r18894 - in trunk/cdi/plugins/org.jboss.tools.cdi.ui: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-11-27 12:26:32 -0500 (Fri, 27 Nov 2009)
New Revision: 18894
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/AddCDISupportAction.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDISettingsPreferencePage.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/RemoveCDISupportAction.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.ui/build.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5276
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2009-11-27 17:24:20 UTC (rev 18893)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2009-11-27 17:26:32 UTC (rev 18894)
@@ -1,13 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Context and Dependency Injection UI
-Bundle-SymbolicName: org.jboss.tools.cdi.ui
-Bundle-Version: 1.0.0
+Bundle-Name: %Bundle-Name.0
+Bundle-SymbolicName: org.jboss.tools.cdi.ui;singleton:=true
+Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.jboss.tools.cdi.ui.CDIUIPlugin
+Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.cdi.core,
- org.jboss.tools.common
+ org.jboss.tools.common,
+ org.eclipse.core.resources
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Vendor: JBoss by Red Hat
+Bundle-Vendor: %Bundle-Vendor.0
+Export-Package: org.jboss.tools.cdi.ui
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/build.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/build.properties 2009-11-27 17:24:20 UTC (rev 18893)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/build.properties 2009-11-27 17:26:32 UTC (rev 18894)
@@ -1,7 +1,9 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml,\
+ plugin.properties
src.includes = src/,\
build.properties,\
META-INF/,\
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties 2009-11-27 17:26:32 UTC (rev 18894)
@@ -0,0 +1,7 @@
+# Menus
+PreferencePage_CDISettings=CDI Settings
+ConfigureMenu_AddCDISupport=Add CDI support...
+ConfigureMenu_RemoveCDISupport=Remove CDI support...
+
+Bundle-Vendor.0 = JBoss by Red Hat
+Bundle-Name.0 = Context and Dependency Injection UI
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml 2009-11-27 17:26:32 UTC (rev 18894)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.propertyPages">
+ <page
+ name="%PreferencePage_CDISettings"
+ class="org.jboss.tools.cdi.ui.preferences.CDISettingsPreferencePage"
+ id="org.jboss.tools.cdi.ui.propertyPages.CDISettingsPreferencePage">
+ <enabledWhen>
+ <adapt type="org.eclipse.core.resources.IProject">
+ <test property="org.eclipse.core.resources.projectNature" value="org.eclipse.jdt.core.javanature"/>
+ </adapt>
+ </enabledWhen>
+ </page>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.popupMenus">
+
+ <objectContribution
+ id="org.jboss.tools.cdi.ui.project.configure.enable"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <visibility>
+ <and>
+ <objectState
+ name="projectNature"
+ value="org.eclipse.jdt.core.javanature"/>
+ <not>
+ <objectState
+ name="projectNature"
+ value="org.jboss.tools.cdi.core.cdinature"/>
+ </not>
+ </and>
+ </visibility>
+
+ <action
+ id="org.jboss.tools.cdi.ui.AddCDISupport"
+ label="%ConfigureMenu_AddCDISupport"
+ class="org.jboss.tools.cdi.ui.preferences.AddCDISupportAction"
+ enablesFor="1"
+ menubarPath="org.eclipse.ui.projectConfigure/additions"/>
+
+ </objectContribution>
+
+ <objectContribution
+ id="org.jboss.tools.cdi.ui.project.configure.disable"
+ objectClass="org.eclipse.core.resources.IProject"
+ adaptable="true">
+ <visibility>
+ <objectState
+ name="projectNature"
+ value="org.jboss.tools.cdi.core.cdinature"/>
+ </visibility>
+
+ <action
+ id="org.jboss.tools.cdi.ui.RemoveCDISupport"
+ label="%ConfigureMenu_RemoveCDISupport"
+ class="org.jboss.tools.cdi.ui.preferences.RemoveCDISupportAction"
+ enablesFor="1"
+ menubarPath="org.eclipse.ui.projectConfigure/additions"/>
+
+ </objectContribution>
+
+ </extension>
+
+</plugin>
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/AddCDISupportAction.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/AddCDISupportAction.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/AddCDISupportAction.java 2009-11-27 17:26:32 UTC (rev 18894)
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * 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.cdi.ui.preferences;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class AddCDISupportAction implements IObjectActionDelegate {
+
+ private ISelection currentSelection;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
+ */
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ public void run(IAction action) {
+ IProject project = (IProject) ((IStructuredSelection) currentSelection).getFirstElement();
+ PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), project, CDISettingsPreferencePage.ID, new String[] {CDISettingsPreferencePage.ID}, null);
+ CDISettingsPreferencePage page = (CDISettingsPreferencePage)dialog.getSelectedPage();
+ page.setEnabledCDISuport(shouldEnable());
+ dialog.open();
+ }
+
+ protected boolean shouldEnable() {
+ return true;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ public void selectionChanged(IAction action, ISelection selection) {
+ this.currentSelection = selection;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/AddCDISupportAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDISettingsPreferencePage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDISettingsPreferencePage.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDISettingsPreferencePage.java 2009-11-27 17:26:32 UTC (rev 18894)
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.cdi.ui.preferences;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbenchPropertyPage;
+import org.eclipse.ui.dialogs.PropertyPage;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDISettingsPreferencePage extends PropertyPage implements IWorkbenchPropertyPage {
+
+ public static final String ID = "org.jboss.tools.cdi.ui.propertyPages.CDISettingsPreferencePage";
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+ return null;
+ }
+
+ public void setEnabledCDISuport(boolean shouldEnable) {
+ // TODO
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDISettingsPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/RemoveCDISupportAction.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/RemoveCDISupportAction.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/RemoveCDISupportAction.java 2009-11-27 17:26:32 UTC (rev 18894)
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * 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.cdi.ui.preferences;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class RemoveCDISupportAction extends AddCDISupportAction {
+
+ /* (non-Javadoc)
+ * @see org.jboss.tools.cdi.ui.preferences.AddCDISupportAction#shouldEnable()
+ */
+ @Override
+ protected boolean shouldEnable() {
+ return false;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/RemoveCDISupportAction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month