JBoss Tools SVN: r9960 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: selbar and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-08-29 07:54:52 -0400 (Fri, 29 Aug 2008)
New Revision: 9960
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1972
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-08-29 11:49:07 UTC (rev 9959)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-08-29 11:54:52 UTC (rev 9960)
@@ -62,7 +62,24 @@
}
return null;
}
+
+ /**
+ * select node completely
+ * @param pageContext
+ * @param node
+ */
+ public static void setSourceSelection(VpePageContext pageContext, Node node) {
+ int start = NodesManagingUtil.getStartOffsetNode(node);
+ int length = NodesManagingUtil.getNodeLength(node);
+
+ pageContext.getSourceBuilder().getStructuredTextViewer()
+ .setSelectedRange(start, length);
+ pageContext.getSourceBuilder().getStructuredTextViewer().revealRange(
+ start, length);
+
+ }
+
/**
*
* @param pageContext
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2008-08-29 11:49:07 UTC (rev 9959)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2008-08-29 11:54:52 UTC (rev 9960)
@@ -31,7 +31,6 @@
import org.eclipse.swt.widgets.ToolItem;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.wst.xml.core.internal.document.ElementImpl;
import org.jboss.tools.common.meta.XAttribute;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.attribute.adapter.AdapterFactory;
@@ -42,6 +41,7 @@
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.selection.VpeSourceSelection;
import org.jboss.tools.vpe.editor.selection.VpeSourceSelectionBuilder;
+import org.jboss.tools.vpe.editor.util.SelectionUtil;
import org.jboss.tools.vpe.messages.VpeUIMessages;
import org.w3c.dom.Node;
@@ -248,7 +248,7 @@
return;
}
Rectangle r = selBar.getItem(allItems - 1).getBounds();
- int width = r.x + r.width;
+ int width = r.x + r.width +1;
int height = r.height;
if (allItems >= itemCount) {
@@ -300,20 +300,14 @@
public void widgetSelected(SelectionEvent e) {
ToolItem toolItem = (ToolItem) e.widget;
- int offset = ((ElementImpl) toolItem.getData()).getStartOffset();
- setSourceFocus(offset);
+
+ SelectionUtil.setSourceSelection(vpeController.getPageContext(),
+ (Node) toolItem.getData());
}
public void widgetDefaultSelected(SelectionEvent e) {
}
- private void setSourceFocus(int offset) {
- vpeController.getPageContext().getSourceBuilder()
- .getStructuredTextViewer().setSelectedRange(offset, 0);
- vpeController.getPageContext().getSourceBuilder()
- .getStructuredTextViewer().revealRange(offset, 0);
- }
-
/**
* Performs storing model object in the model and xml file.
*
16 years, 3 months
JBoss Tools SVN: r9959 - in trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common: model/ui/editors/dnd and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-08-29 07:49:07 -0400 (Fri, 29 Aug 2008)
New Revision: 9959
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/DropUtils.java
Log:
JBIDE-2302, JBIDE-2573, JBIDE-2355, JBIDE-2407 - Key binding issues in Ganymede
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-08-29 11:04:38 UTC (rev 9958)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/editor/ObjectMultiPageEditor.java 2008-08-29 11:49:07 UTC (rev 9959)
@@ -837,6 +837,7 @@
}
protected void pageChange(int newPageIndex) {
+ deactivateSite(false, false);
selectedPageIndex = newPageIndex;
Control control = getControl(newPageIndex);
if (control != null) {
@@ -854,6 +855,7 @@
if(postponedTextSelection.selected != null) {
Display.getDefault().asyncExec(postponedTextSelection);
}
+ activateSite();
}
protected void updateSelectionProvider() {
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/DropUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/DropUtils.java 2008-08-29 11:04:38 UTC (rev 9958)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/editors/dnd/DropUtils.java 2008-08-29 11:49:07 UTC (rev 9959)
@@ -117,6 +117,12 @@
}
} catch (KbException ex) {
ModelUIPlugin.getPluginLog().logError(ex);
+ } catch (InstantiationException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ } catch (IllegalAccessException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ } catch (ClassNotFoundException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
}
if(attributes==null)return new AttributeDescriptorValue[0];
List<AttributeDescriptorValue> attributesValues = new ArrayList<AttributeDescriptorValue>();
@@ -146,6 +152,12 @@
tagInfo = wtpKbConnector.getTagInformation("/"+(tagPrefix==TagProposal.EMPTY_PREFIX?"":tagPrefix+":")+tagName);
} catch (KbException ex) {
ModelUIPlugin.getPluginLog().logError(ex);
+ } catch (InstantiationException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ } catch (IllegalAccessException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
+ } catch (ClassNotFoundException ex) {
+ ModelUIPlugin.getPluginLog().logError(ex);
}
return tagInfo;
}
16 years, 3 months
JBoss Tools SVN: r9958 - workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-29 07:04:38 -0400 (Fri, 29 Aug 2008)
New Revision: 9958
Modified:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF
Log:
add a reference
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF 2008-08-29 11:04:10 UTC (rev 9957)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/META-INF/MANIFEST.MF 2008-08-29 11:04:38 UTC (rev 9958)
@@ -16,7 +16,8 @@
org.eclipse.emf.ecore,
org.jboss.tools.smooks.model,
org.jboss.tools.smooks.model.edit,
- org.eclipse.ui.ide
+ org.eclipse.ui.ide,
+ org.jboss.tools.smooks.graphicalInfo
Eclipse-LazyStart: true
Bundle-ClassPath: libs/commons-beanutils-1.8.0-BETA.jar,
libs/commons-beanutils-1.8.0-BETA-javadoc.jar,
16 years, 3 months
JBoss Tools SVN: r9957 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-08-29 07:04:10 -0400 (Fri, 29 Aug 2008)
New Revision: 9957
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
Log:
https://jira.jboss.org/jira/browse/JBIDE-1601
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-08-29 09:11:24 UTC (rev 9956)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/templates/vpe-templates-jsf.xml 2008-08-29 11:04:10 UTC (rev 9957)
@@ -796,4 +796,10 @@
</vpe:textFormatting>
</vpe:template>
</vpe:tag>
+
+ <!-- Default template -->
+ <vpe:template children="yes" modify="no">
+ <vpe:any value="{name()}" title="{tagstring()}"/>
+ </vpe:template>
+
</vpe:templates>
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-08-29 09:11:24 UTC (rev 9956)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2008-08-29 11:04:10 UTC (rev 9957)
@@ -660,7 +660,7 @@
</vpe:template>
</vpe:tag>
<vpe:tag name="rich:dropListener" case-sensitive="yes">
- <vpe:template children="no" modify="yes" invisisble="yes">
+ <vpe:template children="no" modify="yes" invisible="yes">
</vpe:template>
</vpe:tag>
Modified: trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2008-08-29 09:11:24 UTC (rev 9956)
+++ trunk/vpe/tests/org.jboss.tools.vpe.test/scheme/scheme.xsd 2008-08-29 11:04:10 UTC (rev 9957)
@@ -23,10 +23,11 @@
<!-- -->
<xsd:complexType name="TEMPLATES">
- <xsd:sequence>
- <xsd:element minOccurs="0" maxOccurs="unbounded" name="template-taglib" type="vpe:TEMPLATE-TAGLIB"/>
- <xsd:element maxOccurs="unbounded" name="tag" type="vpe:TAG"/>
- </xsd:sequence>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element minOccurs="0" name="template-taglib" type="vpe:TEMPLATE-TAGLIB"/>
+ <xsd:element minOccurs="0" name="tag" type="vpe:TAG"/>
+ <xsd:element minOccurs="0" name="template" type="vpe:DEFAULT_TEMPLATE" />
+ </xsd:choice>
</xsd:complexType>
<!-- -->
<xsd:complexType name="TAG">
@@ -529,7 +530,15 @@
<!-- -->
<xsd:complexType name="HTML_UL"/>
<!-- -->
- <xsd:complexType name="HTML_P"/>
+ <xsd:complexType name="HTML_P"/>
+<!-- -->
+ <xsd:complexType name="DEFAULT_TEMPLATE">
+ <xsd:sequence>
+ <xsd:element name="any" type="vpe:ANY" />
+ </xsd:sequence>
+ <xsd:attribute name="children" type="vpe:VPE-BOOLEAN" use="required"/>
+ <xsd:attribute name="modify" type="vpe:VPE-BOOLEAN" use="required"/>
+ </xsd:complexType>
<!-- VPE types -->
<xsd:simpleType name="CHILDREN-FORMAT">
16 years, 3 months
JBoss Tools SVN: r9956 - in workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-29 05:11:24 -0400 (Fri, 29 Aug 2008)
New Revision: 9956
Modified:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
Log:
add some function for analyze smooks config file to graphical model
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-08-29 09:09:48 UTC (rev 9955)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-08-29 09:11:24 UTC (rev 9956)
@@ -10,30 +10,42 @@
******************************************************************************/
package org.jboss.tools.smooks.javabean.analyzer;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.emf.common.command.BasicCommandStack;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandStack;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.emf.ecore.xml.type.XMLTypePackage;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.smooks.analyzer.IAnalyzer;
import org.jboss.tools.smooks.analyzer.SmooksAnalyzerException;
+import org.jboss.tools.smooks.graphical.GraphInformations;
import org.jboss.tools.smooks.javabean.model.JavaBeanModel;
+import org.jboss.tools.smooks.javabean.model.JavaBeanModelFactory;
import org.jboss.tools.smooks.ui.gef.model.AbstractStructuredDataModel;
import org.jboss.tools.smooks.ui.gef.model.GraphRootModel;
import org.jboss.tools.smooks.ui.gef.model.IConnectableModel;
import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
import org.jboss.tools.smooks.ui.gef.model.TreeItemRelationModel;
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
+import org.jboss.tools.smooks.utils.ProjectClassLoader;
import org.jboss.tools.smooks.utils.UIUtils;
+import org.milyn.xsd.smooks.AbstractResourceConfig;
import org.milyn.xsd.smooks.ParamType;
import org.milyn.xsd.smooks.ResourceConfigType;
import org.milyn.xsd.smooks.ResourceType;
@@ -51,12 +63,20 @@
public static final String BEANPOPULATOR = "org.milyn.javabean.BeanPopulator";
+ public static final String PRO_CLASS_NAME = "__pro_class_name_";
+
+ public static final Object PRO_PROJECT_NAME = "__pro_project_name_";
+
private List usedConnectionList = new ArrayList();
private ComposedAdapterFactory adapterFactory;
private AdapterFactoryEditingDomain editingDomain;
+ private HashMap userdResourceTypeMap = new HashMap();
+
+ private HashMap usedBeanIDMap = new HashMap();
+
public JavaBeanAnalyzer() {
adapterFactory = new ComposedAdapterFactory(
@@ -75,26 +95,37 @@
return new BasicCommandStack();
}
- public SmooksResourceListType analyzeGraphicalModel(
- AbstractStructuredDataModel root) {
+ public void analyzeGraphicalModel(AbstractStructuredDataModel root,
+ SmooksResourceListType resouceList) {
- SmooksResourceListType resourceList = SmooksFactory.eINSTANCE
- .createSmooksResourceListType();
-
List children = root.getChildren();
for (Iterator iterator = children.iterator(); iterator.hasNext();) {
TreeItemRelationModel dataModel = (TreeItemRelationModel) iterator
.next();
List targetConnections = dataModel.getModelTargetConnections();
if (targetConnections != null && !targetConnections.isEmpty()) {
- this.analyzeStructuredDataModel(resourceList, root, dataModel,
+ this.analyzeStructuredDataModel(resouceList, root, dataModel,
null, null);
}
}
+ }
- return resourceList;
+ protected void setSelectorIsUsed(String selector) {
+ userdResourceTypeMap.put(selector, new Object());
}
+ protected boolean beanIDIsUsed(String beanID) {
+ return (usedBeanIDMap.get(beanID) != null);
+ }
+
+ protected void setBeanIDIsUsed(String beanID) {
+ usedBeanIDMap.put(beanID, new Object());
+ }
+
+ protected boolean isSelectorIsUsed(String resourceType) {
+ return (userdResourceTypeMap.get(resourceType) != null);
+ }
+
private boolean connectionIsUsed(Object connection) {
return (usedConnectionList.indexOf(connection) != -1);
}
@@ -252,7 +283,8 @@
.getReferenceEntityModel();
JavaBeanModel currentbean = (JavaBeanModel) target
.getReferenceEntityModel();
- if (sourcebean.getParent() == currentRootModel.getReferenceEntityModel()) {
+ if (sourcebean.getParent() == currentRootModel
+ .getReferenceEntityModel()) {
if (!currentbean.isPrimitive()) {
return "${" + currentbean.getName() + "}";
} else {
@@ -260,17 +292,21 @@
+ sourcebean.getName();
}
} else {
- JavaBeanModel jbParent = ((JavaBeanModel)source.getReferenceEntityModel()).getParent();
- AbstractStructuredDataModel parent = UIUtils.findGraphModel(currentRootModel.getParent(), jbParent);
+ JavaBeanModel jbParent = ((JavaBeanModel) source
+ .getReferenceEntityModel()).getParent();
+ AbstractStructuredDataModel parent = UIUtils.findGraphModel(
+ currentRootModel.getParent(), jbParent);
String returnString = sourcebean.getName();
while (parent != currentRootModel && parent != null) {
JavaBeanModel jbm = (JavaBeanModel) parent
.getReferenceEntityModel();
if (jbm != null)
returnString = jbm.getName() + " " + returnString;
-
- JavaBeanModel jb = ((JavaBeanModel)parent.getReferenceEntityModel()).getParent();
- parent = UIUtils.findGraphModel(currentRootModel.getParent(), jb);
+
+ JavaBeanModel jb = ((JavaBeanModel) parent
+ .getReferenceEntityModel()).getParent();
+ parent = UIUtils.findGraphModel(currentRootModel.getParent(),
+ jb);
}
// if no property
if (returnString.equals(sourcebean.getName())) {
@@ -293,11 +329,151 @@
}
- public SmooksResourceListType analyzeMappingGraphModel(
+ public void analyzeMappingGraphModel(
SmooksConfigurationFileGenerateContext context)
throws SmooksAnalyzerException {
GraphRootModel root = context.getDataMappingRootModel();
- SmooksResourceListType listType = this.analyzeGraphicalModel(root);
- return listType;
+ SmooksResourceListType listType = context.getSmooksResourceListModel();
+ this.analyzeGraphicalModel(root, listType);
}
+
+ public List<LineConnectionModel> analyzeMappingSmooksModel(
+ SmooksResourceListType listType) {
+ return null;
+ }
+
+ public Object buildSourceInputObjects(GraphInformations graphInfo,
+ SmooksResourceListType listType, IFile sourceFile)
+ throws InvocationTargetException {
+ List resourceConfigList = listType.getAbstractResourceConfig();
+ String rootClassName = null;
+ ResourceConfigType current = null;
+ for (Iterator iterator = resourceConfigList.iterator(); iterator
+ .hasNext();) {
+ AbstractResourceConfig ar = (AbstractResourceConfig) iterator
+ .next();
+ if (ar instanceof ResourceConfigType) {
+ ResourceConfigType rc = (ResourceConfigType) ar;
+ ResourceType resourceType = rc.getResource();
+ String resource = resourceType.getValue();
+ if (BEANPOPULATOR.equals(resource)) {
+ // create root beanmodel
+ rootClassName = rc.getSelector();
+ current = rc;
+ break;
+ }
+ }
+ }
+
+ if (rootClassName == null)
+ return null;
+ IProject project = sourceFile.getProject();
+ boolean isWarning = false;
+ boolean isError = false;
+ Class clazz = null;
+ try {
+ ProjectClassLoader loader = new ProjectClassLoader(JavaCore
+ .create(project));
+ clazz = loader.loadClass(rootClassName);
+ } catch (Exception e) {
+ // ignore
+ }
+ JavaBeanModel model = null;
+ if (clazz != null) {
+ model = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz);
+ } else {
+ model = new JavaBeanModel(null, rootClassName);
+ model.setRootClassModel(true);
+ model.setError(true);
+ isError = true;
+ }
+ if (model != null) {
+ this.setSelectorIsUsed(rootClassName);
+ buildSourceInputProperties(listType, model, false, isError, current);
+ }
+ return null;
+ }
+
+ protected void buildSourceInputProperties(SmooksResourceListType listType,
+ JavaBeanModel beanModel, boolean rootIsWarning,
+ boolean rootIsError, ResourceConfigType currentResourceConfigType) {
+ if (currentResourceConfigType != null) {
+ List paramList = currentResourceConfigType.getParam();
+ for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
+ ParamType param = (ParamType) iterator.next();
+ if ("bindings".equals(param.getName())) {
+ if (param.eContents().isEmpty())
+ continue;
+ List bindingList = (List) param.getMixed().get(
+ SmooksModelUtils.ELEMENT_BINDING, false);
+ for (Iterator iterator2 = bindingList.iterator(); iterator2
+ .hasNext();) {
+ AnyType binding = (AnyType) iterator2.next();
+ String selector = (String) binding
+ .getAnyAttribute()
+ .get(SmooksModelUtils.ATTRIBUTE_SELECTOR, false);
+ }
+ }
+ }
+ }
+ }
+
+ protected void analyzeBindingSelector(String selector,
+ JavaBeanModel currentModel, SmooksResourceListType listType) {
+ if (selector.startsWith("${") && selector.endsWith("}")) {
+ // should get the bean properties
+ // memory out???
+ currentModel.setProperties(null);
+ currentModel.getProperties();
+ selector = selector.substring(2, selector.length() - 1);
+ JavaBeanModel model = findTheChildJavaBeanModel(selector,
+ currentModel);
+ // something wrong
+ if (model == null) {
+ JavaBeanModel errorModel = new JavaBeanModel(null, selector);
+ currentModel.addProperty(errorModel);
+ errorModel.setError("don't exist");
+ List rl = listType.getAbstractResourceConfig();
+ for (Iterator iterator = rl.iterator(); iterator.hasNext();) {
+ ResourceConfigType rct = (ResourceConfigType) iterator
+ .next();
+ if (this.isSelectorIsUsed(rct.getSelector()))
+ continue;
+ String beanId = getBeanIDFromParam(rct);
+ if (selector.equals(beanId)) {
+ buildSourceInputProperties(listType, errorModel, false,
+ true, rct);
+ }
+ }
+ }
+ }
+ }
+
+ protected String getBeanIDFromParam(ResourceConfigType config) {
+ List list = config.getParam();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ ParamType p = (ParamType) iterator.next();
+ if ("beanId".equals(p.getName())) {
+ Object obj = p.getMixed().get(
+ XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__TEXT,
+ true);
+ if (obj != null)
+ return obj.toString().trim();
+ }
+
+ }
+ return null;
+ }
+
+ protected JavaBeanModel findTheChildJavaBeanModel(String name,
+ JavaBeanModel parentModel) {
+ List list = parentModel.getProperties();
+ for (Iterator iterator = list.iterator(); iterator.hasNext();) {
+ JavaBeanModel child = (JavaBeanModel) iterator.next();
+ if (name.equals(child.getName())) {
+ return child;
+ }
+ }
+ return null;
+ }
}
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-08-29 09:09:48 UTC (rev 9955)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-08-29 09:11:24 UTC (rev 9956)
@@ -19,13 +19,18 @@
import java.util.List;
import org.apache.commons.beanutils.PropertyUtils;
+import org.jboss.tools.smooks.analyzer.IValidatable;
/**
* @author Dart Peng
*
*/
-public class JavaBeanModel {
+public class JavaBeanModel implements IValidatable {
+ private Object waring = null;
+
+ private Object error = null;
+
private String name = "";
private Class typeRef = null;
@@ -37,7 +42,7 @@
private boolean isPrimitive = false;
private Class<? extends Object> beanClass = null;
-
+
private JavaBeanModel parent = null;
public Class getBeanClass() {
@@ -122,6 +127,8 @@
boolean lazyLoadProperties) {
this.lazyLoadProperties = lazyLoadProperties;
this.beanClass = beanClass;
+ if (beanClass == null)
+ return;
if (beanName == null) {
beanName = beanClass.getSimpleName();
}
@@ -177,6 +184,10 @@
this(beanClass, null, null, null, true);
}
+ public JavaBeanModel(Class beanClass, String name) {
+ this(beanClass, name, null, null, true);
+ }
+
JavaBeanModel(Class beanClass, boolean lazyLoadProperties) {
this(beanClass, null, null, null, lazyLoadProperties);
}
@@ -222,7 +233,7 @@
}
public void addProperty(JavaBeanModel property) {
- if(properties != null){
+ if (properties != null) {
properties.add(property);
property.setParent(this);
}
@@ -279,10 +290,27 @@
}
/**
- * @param parent the parent to set
+ * @param parent
+ * the parent to set
*/
public void setParent(JavaBeanModel parent) {
this.parent = parent;
}
+ public Object getWarning() {
+ return waring;
+ }
+
+ public void setWarning(Object waring) {
+ this.waring = waring;
+ }
+
+ public Object getError() {
+ return error;
+ }
+
+ public void setError(Object error) {
+ this.error = error;
+ }
+
}
16 years, 3 months
JBoss Tools SVN: r9955 - workspace/dart/plugins/trunk/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-29 05:09:48 -0400 (Fri, 29 Aug 2008)
New Revision: 9955
Modified:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksModelUtils.java
Log:
make the EReference to be constants field
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksModelUtils.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksModelUtils.java 2008-08-29 09:08:39 UTC (rev 9954)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.model/src/org/milyn/xsd/smooks/util/SmooksModelUtils.java 2008-08-29 09:09:48 UTC (rev 9955)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.milyn.xsd.smooks.util;
+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.xml.type.AnyType;
@@ -24,12 +25,22 @@
public class SmooksModelUtils {
+ public static EStructuralFeature ATTRIBUTE_PROPERTY = ExtendedMetaData.INSTANCE
+ .demandFeature(null, "property", false);
+
+ public static EStructuralFeature ATTRIBUTE_SELECTOR = ExtendedMetaData.INSTANCE
+ .demandFeature(null, "selector", false);
+
+ public static EStructuralFeature ATTRIBUTE_TYPE = ExtendedMetaData.INSTANCE
+ .demandFeature(null, "type", false);
+
+ public static EStructuralFeature ELEMENT_BINDING = ExtendedMetaData.INSTANCE
+ .demandFeature("http://www.milyn.org/xsd/smooks-1.0.xsd", "binding", true);
+
public static void addBindingTypeToParamType(ParamType param,
String property, String selector, String type, String uri) {
AnyType binding = createBindingType(property, selector, type, uri);
- param.getMixed().add(
- ExtendedMetaData.INSTANCE.demandFeature(uri, "binding", true),
- binding);
+ param.getMixed().add(ELEMENT_BINDING, binding);
}
public static AnyType createBindingType(String property, String selector,
@@ -41,21 +52,14 @@
AnyType binding = (AnyType) EcoreUtil
.create(XMLTypePackage.Literals.ANY_TYPE);
if (property != null) {
- binding.getAnyAttribute().add(
- ExtendedMetaData.INSTANCE.demandFeature(null, "property",
- false), property);
+ binding.getAnyAttribute().add(ATTRIBUTE_PROPERTY, property);
}
if (selector != null) {
- binding.getAnyAttribute().add(
- ExtendedMetaData.INSTANCE.demandFeature(null, "selector",
- false), selector);
+ binding.getAnyAttribute().add(ATTRIBUTE_SELECTOR, selector);
}
if (type != null) {
- binding.getAnyAttribute()
- .add(
- ExtendedMetaData.INSTANCE.demandFeature(null,
- "type", true), false);
+ binding.getAnyAttribute().add(ATTRIBUTE_TYPE, false);
}
return binding;
}
16 years, 3 months
JBoss Tools SVN: r9954 - in workspace/dart/plugins/org.jboss.tools.smooks.ui: META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-29 05:08:39 -0400 (Fri, 29 Aug 2008)
New Revision: 9954
Added:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IValidatable.java
Removed:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/graphInfor.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/impl/
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/mappingType.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.ecore
workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.genmodel
workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IAnalyzer.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/Test.java
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
Log:
Delete old graphical model,
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/META-INF/MANIFEST.MF 2008-08-29 09:08:39 UTC (rev 9954)
@@ -19,7 +19,8 @@
org.jboss.tools.smooks.model,
org.eclipse.emf,
org.eclipse.emf.edit,
- org.jboss.tools.smooks.model.edit
+ org.jboss.tools.smooks.model.edit,
+ org.jboss.tools.smooks.graphicalInfo
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.ecore
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.ecore 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.ecore 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,14 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="graphical"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="org.jboss.tools.smooks.graphical"
nsURI="http://www.jboss.org/tools/smooks" nsPrefix="">
- <eClassifiers xsi:type="ecore:EClass" name="graphInfor">
- <eStructuralFeatures xsi:type="ecore:EReference" name="mappingType" eType="#//mappingType"
+ <eClassifiers xsi:type="ecore:EClass" name="GraphInformations">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="mappingType" eType="#//MappingDataType"
containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="params" eType="#//Params"
+ containment="true"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="mappingType">
+ <eClassifiers xsi:type="ecore:EClass" name="MappingDataType">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="targetTypeID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceTypeID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Params">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="param" upperBound="-1"
+ eType="#//Param" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Param">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
</ecore:EPackage>
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.genmodel
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.genmodel 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/graphical/graphical.genmodel 2008-08-29 09:08:39 UTC (rev 9954)
@@ -7,12 +7,20 @@
<foreignModel>graphical.ecore</foreignModel>
<genPackages prefix="Graphical" basePackage="org.jboss.tools.smooks" disposableProviderFactory="true"
ecorePackage="graphical.ecore#/">
- <genClasses ecoreClass="graphical.ecore#//graphInfor">
- <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//graphInfor/mappingType"/>
+ <genClasses ecoreClass="graphical.ecore#//GraphInformations">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//GraphInformations/mappingType"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//GraphInformations/params"/>
</genClasses>
- <genClasses ecoreClass="graphical.ecore#//mappingType">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//mappingType/targetTypeID"/>
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//mappingType/sourceTypeID"/>
+ <genClasses ecoreClass="graphical.ecore#//MappingDataType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//MappingDataType/targetTypeID"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//MappingDataType/sourceTypeID"/>
</genClasses>
+ <genClasses ecoreClass="graphical.ecore#//Params">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//Params/param"/>
+ </genClasses>
+ <genClasses ecoreClass="graphical.ecore#//Param">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//Param/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//Param/value"/>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/plugin.xml 2008-08-29 09:08:39 UTC (rev 9954)
@@ -14,4 +14,12 @@
id="org.jboss.tools.smooks.ui.editors.SmooksFormEditor">
</editor>
</extension>
+ <extension
+ point="org.eclipse.emf.ecore.generated_package">
+ <package
+ class="org.milyn.xsd.smooks.SmooksPackage"
+ genModel="graphical/graphical.genmodel"
+ uri="http://www.jboss.org/tools/smooks">
+ </package>
+ </extension>
</plugin>
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/AnalyzerFactory.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -93,7 +93,7 @@
return instance;
}
- public IAnalyzer getAnalyzer(String sourceDataTypeID,
+ public IAnalyzer getGraphModelAnalyzer(String sourceDataTypeID,
String targetDataTypeID) throws CoreException {
if (this.analyzerMap != null) {
AnalyzerMapper mapper = (AnalyzerMapper) this.analyzerMap
@@ -107,6 +107,16 @@
return null;
}
+ public IAnalyzer getSmooksModelAnalyzer(String datatypeID)
+ throws CoreException {
+ if (this.analyzerMap != null) {
+ AnalyzerMapper mapper = (AnalyzerMapper) this.analyzerMap
+ .get(datatypeID);
+ return (IAnalyzer) createAnalyzer(mapper);
+ }
+ return null;
+ }
+
protected Object createAnalyzer(AnalyzerMapper mapper) throws CoreException {
return mapper.getElement().createExecutableExtension(
SmooksExtensionPointConstants.EXTENTION_POINT_ATTRIBUTE_CLASS);
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IAnalyzer.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IAnalyzer.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IAnalyzer.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -10,6 +10,12 @@
******************************************************************************/
package org.jboss.tools.smooks.analyzer;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.ui.gef.model.LineConnectionModel;
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
import org.milyn.xsd.smooks.SmooksResourceListType;
@@ -18,7 +24,13 @@
*
*/
public interface IAnalyzer {
- public SmooksResourceListType analyzeMappingGraphModel(
+ public void analyzeMappingGraphModel(
SmooksConfigurationFileGenerateContext context)
throws SmooksAnalyzerException;
+
+ public List<LineConnectionModel> analyzeMappingSmooksModel(
+ SmooksResourceListType listType);
+
+ public Object buildSourceInputObjects(GraphInformations graphInfo,
+ SmooksResourceListType listType, IFile sourceFile) throws InvocationTargetException;
}
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IValidatable.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IValidatable.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IValidatable.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -0,0 +1,18 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.analyzer;
+
+/**
+ * @author root
+ *
+ */
+public interface IValidatable {
+ public void setWarning(Object warning);
+
+ public Object getWarning();
+
+ public void setError(Object error);
+
+ public Object getError();
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/IValidatable.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/analyzer/SmooksFileBuilder.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -26,22 +26,24 @@
IProgressMonitor monitor) throws SmooksAnalyzerException,
IOException, CoreException {
AnalyzerFactory factory = AnalyzerFactory.getInstance();
- IAnalyzer analyzer = factory.getAnalyzer(context.getSourceDataTypeID(),
+ IAnalyzer analyzer = factory.getGraphModelAnalyzer(context.getSourceDataTypeID(),
context.getTargetDataTypeID());
-
+
if (analyzer == null)
throw new SmooksAnalyzerException(
"can't find the Analyzer for sourceID : "
+ context.getSourceDataTypeID()
+ " and the targetID : "
+ context.getTargetDataTypeID());
-
- SmooksResourceListType listType = analyzer
- .analyzeMappingGraphModel(context);
-
+
+ SmooksResourceListType listType = SmooksFactory.eINSTANCE
+ .createSmooksResourceListType();
+ context.setSmooksResourceListModel(listType);
+ analyzer.analyzeMappingGraphModel(context);
+
// init the smooksresourcelist
- initSmooksParseStyle(context,listType);
-
+ initSmooksParseStyle(context, listType);
+
// serialize model to stream
Resource resource = new SmooksResourceFactoryImpl()
.createResource(null);
@@ -55,25 +57,30 @@
resource.save(outputStream, Collections.EMPTY_MAP);
return new ByteArrayInputStream(outputStream.toByteArray());
}
+
/**
*
- * <code> <resource-config selector="global-parameters">
- * <param name="stream.filter.type">SAX< /param>
- * </resource-config> </code>
- * @param context
+ * <code> <resource-config selector="global-parameters">
+ * <param name="stream.filter.type">SAX< /param>
+ * </resource-config> </code>
+ *
+ * @param context
* @param resourceList
*/
- protected void initSmooksParseStyle(SmooksConfigurationFileGenerateContext context,SmooksResourceListType resourceList){
-// String type = context.getSmooksType();
-// if(type == null) return;
-// ResourceConfigType config = SmooksFactory.eINSTANCE.createResourceConfigType();
-// config.setSelector(SmooksConstants.GLOBAL_PARAMETERS);
-// ParamType param = SmooksFactory.eINSTANCE.createParamType();
-// param.setName(SmooksConstants.STREAM_FILTER_TYPE);
-// SmooksModelUtils.appendTextToSmooksType(param, SmooksConstants.SAX);
-//
-// config.getParam().add(param);
-
-// resourceList.getAbstractResourceConfig().add(0,config);
+ protected void initSmooksParseStyle(
+ SmooksConfigurationFileGenerateContext context,
+ SmooksResourceListType resourceList) {
+ // String type = context.getSmooksType();
+ // if(type == null) return;
+ // ResourceConfigType config =
+ // SmooksFactory.eINSTANCE.createResourceConfigType();
+ // config.setSelector(SmooksConstants.GLOBAL_PARAMETERS);
+ // ParamType param = SmooksFactory.eINSTANCE.createParamType();
+ // param.setName(SmooksConstants.STREAM_FILTER_TYPE);
+ // SmooksModelUtils.appendTextToSmooksType(param, SmooksConstants.SAX);
+ //
+ // config.getParam().add(param);
+
+ // resourceList.getAbstractResourceConfig().add(0,config);
}
}
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,55 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.graphical;
-
-import org.eclipse.emf.ecore.EFactory;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Factory</b> for the model.
- * It provides a create method for each non-abstract class of the model.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage
- * @generated
- */
-public interface GraphicalFactory extends EFactory {
- /**
- * The singleton instance of the factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- GraphicalFactory eINSTANCE = org.jboss.tools.smooks.graphical.impl.GraphicalFactoryImpl.init();
-
- /**
- * Returns a new object of class '<em>graph Infor</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>graph Infor</em>'.
- * @generated
- */
- graphInfor creategraphInfor();
-
- /**
- * Returns a new object of class '<em>mapping Type</em>'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return a new object of class '<em>mapping Type</em>'.
- * @generated
- */
- mappingType createmappingType();
-
- /**
- * Returns the package supported by this factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the package supported by this factory.
- * @generated
- */
- GraphicalPackage getGraphicalPackage();
-
-} //GraphicalFactory
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,249 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.graphical;
-
-import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EReference;
-
-/**
- * <!-- 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.smooks.graphical.GraphicalFactory
- * @model kind="package"
- * @generated
- */
-public interface GraphicalPackage extends EPackage {
- /**
- * The package name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNAME = "graphical";
-
- /**
- * The package namespace URI.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_URI = "http://www.jboss.org/tools/smooks";
-
- /**
- * The package namespace name.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- String eNS_PREFIX = "";
-
- /**
- * The singleton instance of the package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- GraphicalPackage eINSTANCE = org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl.init();
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks.graphical.impl.graphInforImpl <em>graph Infor</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.impl.graphInforImpl
- * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getgraphInfor()
- * @generated
- */
- int GRAPH_INFOR = 0;
-
- /**
- * The feature id for the '<em><b>Mapping Type</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GRAPH_INFOR__MAPPING_TYPE = 0;
-
- /**
- * The number of structural features of the '<em>graph Infor</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int GRAPH_INFOR_FEATURE_COUNT = 1;
-
- /**
- * The meta object id for the '{@link org.jboss.tools.smooks.graphical.impl.mappingTypeImpl <em>mapping Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.impl.mappingTypeImpl
- * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getmappingType()
- * @generated
- */
- int MAPPING_TYPE = 1;
-
- /**
- * The feature id for the '<em><b>Target Type ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MAPPING_TYPE__TARGET_TYPE_ID = 0;
-
- /**
- * The feature id for the '<em><b>Source Type ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MAPPING_TYPE__SOURCE_TYPE_ID = 1;
-
- /**
- * The number of structural features of the '<em>mapping Type</em>' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MAPPING_TYPE_FEATURE_COUNT = 2;
-
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks.graphical.graphInfor <em>graph Infor</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>graph Infor</em>'.
- * @see org.jboss.tools.smooks.graphical.graphInfor
- * @generated
- */
- EClass getgraphInfor();
-
- /**
- * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.graphical.graphInfor#getMappingType <em>Mapping Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference '<em>Mapping Type</em>'.
- * @see org.jboss.tools.smooks.graphical.graphInfor#getMappingType()
- * @see #getgraphInfor()
- * @generated
- */
- EReference getgraphInfor_MappingType();
-
- /**
- * Returns the meta object for class '{@link org.jboss.tools.smooks.graphical.mappingType <em>mapping Type</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for class '<em>mapping Type</em>'.
- * @see org.jboss.tools.smooks.graphical.mappingType
- * @generated
- */
- EClass getmappingType();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.graphical.mappingType#getTargetTypeID <em>Target Type ID</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Target Type ID</em>'.
- * @see org.jboss.tools.smooks.graphical.mappingType#getTargetTypeID()
- * @see #getmappingType()
- * @generated
- */
- EAttribute getmappingType_TargetTypeID();
-
- /**
- * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.graphical.mappingType#getSourceTypeID <em>Source Type ID</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the attribute '<em>Source Type ID</em>'.
- * @see org.jboss.tools.smooks.graphical.mappingType#getSourceTypeID()
- * @see #getmappingType()
- * @generated
- */
- EAttribute getmappingType_SourceTypeID();
-
- /**
- * 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
- */
- GraphicalFactory getGraphicalFactory();
-
- /**
- * <!-- begin-user-doc -->
- * Defines literals for the meta objects that represent
- * <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
- * </ul>
- * <!-- end-user-doc -->
- * @generated
- */
- interface Literals {
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks.graphical.impl.graphInforImpl <em>graph Infor</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.impl.graphInforImpl
- * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getgraphInfor()
- * @generated
- */
- EClass GRAPH_INFOR = eINSTANCE.getgraphInfor();
-
- /**
- * The meta object literal for the '<em><b>Mapping Type</b></em>' containment reference feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference GRAPH_INFOR__MAPPING_TYPE = eINSTANCE.getgraphInfor_MappingType();
-
- /**
- * The meta object literal for the '{@link org.jboss.tools.smooks.graphical.impl.mappingTypeImpl <em>mapping Type</em>}' class.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.impl.mappingTypeImpl
- * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getmappingType()
- * @generated
- */
- EClass MAPPING_TYPE = eINSTANCE.getmappingType();
-
- /**
- * The meta object literal for the '<em><b>Target Type ID</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MAPPING_TYPE__TARGET_TYPE_ID = eINSTANCE.getmappingType_TargetTypeID();
-
- /**
- * The meta object literal for the '<em><b>Source Type ID</b></em>' attribute feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EAttribute MAPPING_TYPE__SOURCE_TYPE_ID = eINSTANCE.getmappingType_SourceTypeID();
-
- }
-
-} //GraphicalPackage
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/graphInfor.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/graphInfor.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/graphInfor.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,54 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.graphical;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>graph Infor</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks.graphical.graphInfor#getMappingType <em>Mapping Type</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getgraphInfor()
- * @model
- * @generated
- */
-public interface graphInfor extends EObject {
- /**
- * Returns the value of the '<em><b>Mapping Type</b></em>' containment reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Mapping Type</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>Mapping Type</em>' containment reference.
- * @see #setMappingType(mappingType)
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getgraphInfor_MappingType()
- * @model containment="true"
- * @generated
- */
- mappingType getMappingType();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.graphical.graphInfor#getMappingType <em>Mapping Type</em>}' containment reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Mapping Type</em>' containment reference.
- * @see #getMappingType()
- * @generated
- */
- void setMappingType(mappingType value);
-
-} // graphInfor
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/mappingType.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/mappingType.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/mappingType.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,81 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.graphical;
-
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>mapping Type</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.jboss.tools.smooks.graphical.mappingType#getTargetTypeID <em>Target Type ID</em>}</li>
- * <li>{@link org.jboss.tools.smooks.graphical.mappingType#getSourceTypeID <em>Source Type ID</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getmappingType()
- * @model
- * @generated
- */
-public interface mappingType extends EObject {
- /**
- * Returns the value of the '<em><b>Target Type ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Target Type ID</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 Type ID</em>' attribute.
- * @see #setTargetTypeID(String)
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getmappingType_TargetTypeID()
- * @model
- * @generated
- */
- String getTargetTypeID();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.graphical.mappingType#getTargetTypeID <em>Target Type ID</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Target Type ID</em>' attribute.
- * @see #getTargetTypeID()
- * @generated
- */
- void setTargetTypeID(String value);
-
- /**
- * Returns the value of the '<em><b>Source Type ID</b></em>' attribute.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Source Type ID</em>' attribute isn't clear,
- * there really should be more of a description here...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Source Type ID</em>' attribute.
- * @see #setSourceTypeID(String)
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getmappingType_SourceTypeID()
- * @model
- * @generated
- */
- String getSourceTypeID();
-
- /**
- * Sets the value of the '{@link org.jboss.tools.smooks.graphical.mappingType#getSourceTypeID <em>Source Type ID</em>}' attribute.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Source Type ID</em>' attribute.
- * @see #getSourceTypeID()
- * @generated
- */
- void setSourceTypeID(String value);
-
-} // mappingType
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,142 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.graphical.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.jboss.tools.smooks.graphical.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Adapter Factory</b> for the model.
- * It provides an adapter <code>createXXX</code> method for each class of the model.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage
- * @generated
- */
-public class GraphicalAdapterFactory extends AdapterFactoryImpl {
- /**
- * The cached model package.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static GraphicalPackage modelPackage;
-
- /**
- * Creates an instance of the adapter factory.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GraphicalAdapterFactory() {
- if (modelPackage == null) {
- modelPackage = GraphicalPackage.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 the delegates to the <code>createXXX</code> methods.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected GraphicalSwitch<Adapter> modelSwitch =
- new GraphicalSwitch<Adapter>() {
- @Override
- public Adapter casegraphInfor(graphInfor object) {
- return creategraphInforAdapter();
- }
- @Override
- public Adapter casemappingType(mappingType object) {
- return createmappingTypeAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
-
- /**
- * Creates an adapter for the <code>target</code>.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param target the object to adapt.
- * @return the adapter for the <code>target</code>.
- * @generated
- */
- @Override
- public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
- }
-
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.graphical.graphInfor <em>graph Infor</em>}'.
- * <!-- begin-user-doc -->
- * This default implementation returns null so that we can easily ignore cases;
- * it's useful to ignore a case when inheritance will catch all the cases anyway.
- * <!-- end-user-doc -->
- * @return the new adapter.
- * @see org.jboss.tools.smooks.graphical.graphInfor
- * @generated
- */
- public Adapter creategraphInforAdapter() {
- return null;
- }
-
- /**
- * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.graphical.mappingType <em>mapping 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.smooks.graphical.mappingType
- * @generated
- */
- public Adapter createmappingTypeAdapter() {
- 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;
- }
-
-} //GraphicalAdapterFactory
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalInformationSaver.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -11,23 +11,26 @@
package org.jboss.tools.smooks.graphical.util;
import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Collections;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
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.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
+import org.jboss.tools.smooks.graphical.GraphInformations;
import org.jboss.tools.smooks.graphical.GraphicalFactory;
-import org.jboss.tools.smooks.graphical.graphInfor;
-import org.jboss.tools.smooks.graphical.mappingType;
+import org.jboss.tools.smooks.graphical.MappingDataType;
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
/**
@@ -35,9 +38,10 @@
* @Date Aug 25, 2008
*/
public class GraphicalInformationSaver {
- private IFile graphicalFile = null;
private IEditorInput input;
+ protected Resource graphicalFileResource;
+
/**
* Create the instance during init step
*
@@ -53,43 +57,65 @@
String gfileName = fileName + ".graph";
if (container != null) {
IFile gfile = container.getFile(new Path(gfileName));
- graphicalFile = gfile;
+ if(!gfile.exists()){
+ try {
+ gfile.create(new ByteArrayInputStream("".getBytes()), true, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ }
+ }
+ IPath rootPath = ResourcesPlugin.getWorkspace().getRoot().getLocation();
+ String path = rootPath.append(gfile.getFullPath()).toString();
+ graphicalFileResource = new XMLResourceFactoryImpl()
+ .createResource(URI.createFileURI(path));
}
}
}
}
+ public GraphInformations doLoad() throws IOException {
+ // throw new IOException("can't find the file");
+ if (graphicalFileResource != null) {
+ graphicalFileResource.load(Collections.EMPTY_MAP);
+ GraphInformations graph = (GraphInformations) graphicalFileResource
+ .getContents().get(0);
+ return graph;
+ }
+ return null;
+ }
+
public void doSave(IProgressMonitor monitor,
SmooksConfigurationFileGenerateContext context) throws IOException,
CoreException {
- if (graphicalFile == null)
- throw new IOException("can't find the file");
String sourceID = context.getSourceDataTypeID();
String targetID = context.getTargetDataTypeID();
+ GraphInformations graph = null;
+ if (graphicalFileResource != null) {
+ if (graphicalFileResource.getContents().isEmpty()) {
+ graph = GraphicalFactory.eINSTANCE.createGraphInformations();
+ graphicalFileResource.getContents().add(graph);
+ } else {
+ graph = (GraphInformations) graphicalFileResource.getContents()
+ .get(0);
+ }
+ if (graph != null) {
+ initMappingTypes(graph, sourceID, targetID);
+ }
+ graphicalFileResource.save(Collections.EMPTY_MAP);
+ }
- graphInfor infor = GraphicalFactory.eINSTANCE.creategraphInfor();
- initMappingTypes(infor, sourceID, targetID);
- XMLResource re = new XMLResourceImpl();
- re.getContents().add(infor);
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- re.save(outputStream, Collections.EMPTY_MAP);
+ }
- if (graphicalFile.exists()) {
- graphicalFile.setContents(new ByteArrayInputStream(outputStream
- .toByteArray()), IResource.FORCE, monitor);
- } else {
- graphicalFile.create(new ByteArrayInputStream(outputStream
- .toByteArray()), IResource.FORCE, monitor);
+ protected void initMappingTypes(GraphInformations infor, String sourceID,
+ String targetID) {
+ MappingDataType mapping = infor.getMappingType();
+ if (mapping == null) {
+ mapping = GraphicalFactory.eINSTANCE.createMappingDataType();
+ infor.setMappingType(mapping);
}
- }
- protected void initMappingTypes(graphInfor infor, String sourceID,
- String targetID) {
- mappingType mapping = GraphicalFactory.eINSTANCE.createmappingType();
mapping.setSourceTypeID(sourceID);
mapping.setTargetTypeID(targetID);
-
- infor.setMappingType(mapping);
}
}
Deleted: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -1,151 +0,0 @@
-/**
- * <copyright>
- * </copyright>
- *
- * $Id$
- */
-package org.jboss.tools.smooks.graphical.util;
-
-import java.util.List;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-import org.jboss.tools.smooks.graphical.*;
-
-/**
- * <!-- begin-user-doc -->
- * The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
- * starting with the actual class of the object
- * and proceeding up the inheritance hierarchy
- * until a non-null result is returned,
- * which is the result of the switch.
- * <!-- end-user-doc -->
- * @see org.jboss.tools.smooks.graphical.GraphicalPackage
- * @generated
- */
-public class GraphicalSwitch<T> {
- /**
- * The cached model package
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected static GraphicalPackage modelPackage;
-
- /**
- * Creates an instance of the switch.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public GraphicalSwitch() {
- if (modelPackage == null) {
- modelPackage = GraphicalPackage.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 GraphicalPackage.GRAPH_INFOR: {
- graphInfor graphInfor = (graphInfor)theEObject;
- T result = casegraphInfor(graphInfor);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case GraphicalPackage.MAPPING_TYPE: {
- mappingType mappingType = (mappingType)theEObject;
- T result = casemappingType(mappingType);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
- }
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>graph Infor</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>graph Infor</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T casegraphInfor(graphInfor object) {
- return null;
- }
-
- /**
- * Returns the result of interpreting the object as an instance of '<em>mapping 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>mapping Type</em>'.
- * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
- * @generated
- */
- public T casemappingType(mappingType 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;
- }
-
-} //GraphicalSwitch
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/Test.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/Test.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/util/Test.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -14,12 +14,15 @@
import java.util.Collections;
import org.eclipse.emf.ecore.EPackage.Registry;
-import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl;
+import org.jboss.tools.smooks.graphical.GraphInformations;
import org.jboss.tools.smooks.graphical.GraphicalFactory;
import org.jboss.tools.smooks.graphical.GraphicalPackage;
-import org.jboss.tools.smooks.graphical.graphInfor;
-import org.jboss.tools.smooks.graphical.mappingType;
+import org.jboss.tools.smooks.graphical.MappingDataType;
+import org.jboss.tools.smooks.graphical.Param;
+import org.jboss.tools.smooks.graphical.Params;
/**
* @author Dart Peng
@@ -27,22 +30,32 @@
*/
public class Test {
public static void main(String[] args) {
-
- Registry.INSTANCE.put(GraphicalPackage.eNS_URI, GraphicalPackage.eINSTANCE);
-
- graphInfor graph = GraphicalFactory.eINSTANCE.creategraphInfor();
- mappingType t = GraphicalFactory.eINSTANCE.createmappingType();
-
+
+ Registry.INSTANCE.put(GraphicalPackage.eNS_URI,
+ GraphicalPackage.eINSTANCE);
+
+ GraphInformations graph = GraphicalFactory.eINSTANCE
+ .createGraphInformations();
+ MappingDataType t = GraphicalFactory.eINSTANCE.createMappingDataType();
+
t.setSourceTypeID("adfada");
-
+
graph.setMappingType(t);
+
+ Params params = GraphicalFactory.eINSTANCE.createParams();
+ Param p = GraphicalFactory.eINSTANCE.createParam();
+ p.setName("classname");
+ p.setValue("dfafdafa");
+ params.getParam().add(p);
- XMLResource resource= new XMLResourceImpl();
+ graph.setParams(params);
+
+ Resource resource = new XMLResourceFactoryImpl().createResource(null);
resource.getContents().add(graph);
-
+
try {
- resource.save(System.out,Collections.EMPTY_MAP);
+ resource.save(System.out, Collections.EMPTY_MAP);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-29 09:07:03 UTC (rev 9953)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-08-29 09:08:39 UTC (rev 9954)
@@ -23,6 +23,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.draw2d.ConnectionLayer;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage.Registry;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.gef.DefaultEditDomain;
import org.eclipse.gef.GraphicalViewer;
@@ -84,6 +85,7 @@
import org.jboss.tools.smooks.analyzer.SmooksAnalyzerException;
import org.jboss.tools.smooks.analyzer.SmooksFileBuilder;
import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
import org.jboss.tools.smooks.graphical.MappingDataType;
import org.jboss.tools.smooks.graphical.util.GraphicalInformationSaver;
import org.jboss.tools.smooks.ui.IStrucutredDataCreationWizard;
@@ -102,6 +104,7 @@
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
import org.jboss.tools.smooks.ui.wizards.TransformDataSelectionWizard;
import org.jboss.tools.smooks.utils.UIUtils;
+import org.milyn.xsd.smooks.DocumentRoot;
import org.milyn.xsd.smooks.SmooksResourceListType;
import org.milyn.xsd.smooks.util.SmooksConstants;
import org.milyn.xsd.smooks.util.SmooksResourceFactoryImpl;
@@ -585,22 +588,25 @@
*/
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
+ Registry.INSTANCE.put(GraphicalPackage.eNS_URI,
+ GraphicalPackage.eINSTANCE);
graphicalInformationSaver = new GraphicalInformationSaver(input);
try {
GraphInformations graph = graphicalInformationSaver.doLoad();
initFormEditorWithGraphInfo(graph);
- String path = ResourcesPlugin.getWorkspace().getRoot().getLocation().append(
- ((IFileEditorInput) input).getFile().getFullPath()).toString();
+ String path = ResourcesPlugin.getWorkspace().getRoot()
+ .getLocation().append(
+ ((IFileEditorInput) input).getFile().getFullPath())
+ .toString();
Resource resource = new SmooksResourceFactoryImpl()
.createResource(URI.createFileURI(path));
resource.load(Collections.EMPTY_MAP);
- IAnalyzer analyzer = AnalyzerFactory.getInstance().getAnalyzer(
- sourceDataTypeID, targetDataTypeID);
-
-
- Object obj = analyzer.buildSourceInputObjects(graph,
- (SmooksResourceListType) resource.getContents().get(0),
+ IAnalyzer sourceModelAnalyzer = AnalyzerFactory.getInstance().getSmooksModelAnalyzer(sourceDataTypeID);
+
+ SmooksResourceListType listType = ((DocumentRoot) resource
+ .getContents().get(0)).getSmooksResourceList();
+ Object obj = sourceModelAnalyzer.buildSourceInputObjects(graph, listType,
((IFileEditorInput) input).getFile());
} catch (IOException e) {
e.printStackTrace();
16 years, 3 months
JBoss Tools SVN: r9953 - in workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-08-29 05:07:03 -0400 (Fri, 29 Aug 2008)
New Revision: 9953
Added:
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.classpath
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.project
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/META-INF/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/META-INF/MANIFEST.MF
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/build.properties
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.ecore
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.genmodel
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.properties
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.xml
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphInformations.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/MappingDataType.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Param.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Params.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphInformationsImpl.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalFactoryImpl.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalPackageImpl.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/MappingDataTypeImpl.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamImpl.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamsImpl.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java
workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java
Log:
new project.this is an EMF project for record graphical informations of Smooks tools
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.classpath
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.classpath (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.classpath 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.project
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.project (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.project 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.smooks.graphicalInfo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/META-INF/MANIFEST.MF
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/META-INF/MANIFEST.MF (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/META-INF/MANIFEST.MF 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.jboss.tools.smooks.graphicalInfo; singleton:=true
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Export-Package: org.jboss.tools.smooks.graphical,
+ org.jboss.tools.smooks.graphical.impl,
+ org.jboss.tools.smooks.graphical.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport
+Eclipse-LazyStart: true
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/build.properties
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/build.properties (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/build.properties 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,14 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties
+jars.compile.order = .
+source.. = src/
+output.. = bin/
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.ecore
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.ecore (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.ecore 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="graphical"
+ nsURI="http://www.jboss.org/tools/smooks" nsPrefix="">
+ <eClassifiers xsi:type="ecore:EClass" name="GraphInformations">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="mappingType" eType="#//MappingDataType"
+ containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="params" eType="#//Params"
+ containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="MappingDataType">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="targetTypeID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceTypeID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Params">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="param" upperBound="-1"
+ eType="#//Param" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Param">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ </eClassifiers>
+</ecore:EPackage>
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.ecore
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.genmodel
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.genmodel (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.genmodel 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.jboss.tools.smooks.graphicalInfo/src"
+ modelPluginID="org.jboss.tools.smooks.graphicalInfo" modelName="Graphical" importerID="org.eclipse.emf.importer.ecore"
+ complianceLevel="5.0" copyrightFields="false">
+ <foreignModel>../../org.jboss.tools.smooks.ui/graphical/graphical.ecore</foreignModel>
+ <genPackages prefix="Graphical" basePackage="org.jboss.tools.smooks" disposableProviderFactory="true"
+ ecorePackage="graphical.ecore#/">
+ <genClasses ecoreClass="graphical.ecore#//GraphInformations">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//GraphInformations/mappingType"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//GraphInformations/params"/>
+ </genClasses>
+ <genClasses ecoreClass="graphical.ecore#//MappingDataType">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//MappingDataType/targetTypeID"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//MappingDataType/sourceTypeID"/>
+ </genClasses>
+ <genClasses ecoreClass="graphical.ecore#//Params">
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference graphical.ecore#//Params/param"/>
+ </genClasses>
+ <genClasses ecoreClass="graphical.ecore#//Param">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//Param/name"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute graphical.ecore#//Param/value"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/model/graphical.genmodel
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.properties
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.properties (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.properties 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,20 @@
+
+# <copyright>
+# </copyright>
+#
+# $Id$
+
+# ====================================================================
+# To code developer:
+# Do NOT change the properties between this line and the
+# "%%% END OF TRANSLATED PROPERTIES %%%" line.
+# Make a new property name, append to the end of the file and change
+# the code to use the new property.
+# ====================================================================
+
+# ====================================================================
+# %%% END OF TRANSLATED PROPERTIES %%%
+# ====================================================================
+
+pluginName = Graphical Model
+providerName = www.example.org
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.xml
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.xml (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.xml 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ <copyright>
+ </copyright>
+
+ $Id$
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri = "http://www.jboss.org/tools/smooks"
+ class = "org.jboss.tools.smooks.graphical.GraphicalPackage"
+ genModel = "model/graphical.genmodel" />
+ </extension>
+
+</plugin>
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/plugin.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphInformations.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphInformations.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphInformations.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Graph Informations</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.GraphInformations#getMappingType <em>Mapping Type</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.graphical.GraphInformations#getParams <em>Params</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getGraphInformations()
+ * @model
+ * @generated
+ */
+public interface GraphInformations extends EObject {
+ /**
+ * Returns the value of the '<em><b>Mapping Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Mapping Type</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>Mapping Type</em>' containment reference.
+ * @see #setMappingType(MappingDataType)
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getGraphInformations_MappingType()
+ * @model containment="true"
+ * @generated
+ */
+ MappingDataType getMappingType();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.graphical.GraphInformations#getMappingType <em>Mapping Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Mapping Type</em>' containment reference.
+ * @see #getMappingType()
+ * @generated
+ */
+ void setMappingType(MappingDataType value);
+
+ /**
+ * Returns the value of the '<em><b>Params</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Params</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>Params</em>' containment reference.
+ * @see #setParams(Params)
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getGraphInformations_Params()
+ * @model containment="true"
+ * @generated
+ */
+ Params getParams();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.graphical.GraphInformations#getParams <em>Params</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Params</em>' containment reference.
+ * @see #getParams()
+ * @generated
+ */
+ void setParams(Params value);
+
+} // GraphInformations
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphInformations.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,73 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage
+ * @generated
+ */
+public interface GraphicalFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GraphicalFactory eINSTANCE = org.jboss.tools.smooks.graphical.impl.GraphicalFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Graph Informations</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Graph Informations</em>'.
+ * @generated
+ */
+ GraphInformations createGraphInformations();
+
+ /**
+ * Returns a new object of class '<em>Mapping Data Type</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Mapping Data Type</em>'.
+ * @generated
+ */
+ MappingDataType createMappingDataType();
+
+ /**
+ * Returns a new object of class '<em>Params</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Params</em>'.
+ * @generated
+ */
+ Params createParams();
+
+ /**
+ * Returns a new object of class '<em>Param</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Param</em>'.
+ * @generated
+ */
+ Param createParam();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ GraphicalPackage getGraphicalPackage();
+
+} //GraphicalFactory
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,439 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- 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.smooks.graphical.GraphicalFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface GraphicalPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "graphical";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.jboss.org/tools/smooks";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ GraphicalPackage eINSTANCE = org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.graphical.impl.GraphInformationsImpl <em>Graph Informations</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.GraphInformationsImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getGraphInformations()
+ * @generated
+ */
+ int GRAPH_INFORMATIONS = 0;
+
+ /**
+ * The feature id for the '<em><b>Mapping Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_INFORMATIONS__MAPPING_TYPE = 0;
+
+ /**
+ * The feature id for the '<em><b>Params</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_INFORMATIONS__PARAMS = 1;
+
+ /**
+ * The number of structural features of the '<em>Graph Informations</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int GRAPH_INFORMATIONS_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.graphical.impl.MappingDataTypeImpl <em>Mapping Data Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.MappingDataTypeImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getMappingDataType()
+ * @generated
+ */
+ int MAPPING_DATA_TYPE = 1;
+
+ /**
+ * The feature id for the '<em><b>Target Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DATA_TYPE__TARGET_TYPE_ID = 0;
+
+ /**
+ * The feature id for the '<em><b>Source Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DATA_TYPE__SOURCE_TYPE_ID = 1;
+
+ /**
+ * The number of structural features of the '<em>Mapping Data Type</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MAPPING_DATA_TYPE_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.graphical.impl.ParamsImpl <em>Params</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.ParamsImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getParams()
+ * @generated
+ */
+ int PARAMS = 2;
+
+ /**
+ * The feature id for the '<em><b>Param</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMS__PARAM = 0;
+
+ /**
+ * The number of structural features of the '<em>Params</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAMS_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.jboss.tools.smooks.graphical.impl.ParamImpl <em>Param</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.ParamImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getParam()
+ * @generated
+ */
+ int PARAM = 3;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM__NAME = 0;
+
+ /**
+ * The feature id for the '<em><b>Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM__VALUE = 1;
+
+ /**
+ * The number of structural features of the '<em>Param</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PARAM_FEATURE_COUNT = 2;
+
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.graphical.GraphInformations <em>Graph Informations</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Graph Informations</em>'.
+ * @see org.jboss.tools.smooks.graphical.GraphInformations
+ * @generated
+ */
+ EClass getGraphInformations();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.graphical.GraphInformations#getMappingType <em>Mapping Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Mapping Type</em>'.
+ * @see org.jboss.tools.smooks.graphical.GraphInformations#getMappingType()
+ * @see #getGraphInformations()
+ * @generated
+ */
+ EReference getGraphInformations_MappingType();
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.graphical.GraphInformations#getParams <em>Params</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference '<em>Params</em>'.
+ * @see org.jboss.tools.smooks.graphical.GraphInformations#getParams()
+ * @see #getGraphInformations()
+ * @generated
+ */
+ EReference getGraphInformations_Params();
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.graphical.MappingDataType <em>Mapping Data Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Mapping Data Type</em>'.
+ * @see org.jboss.tools.smooks.graphical.MappingDataType
+ * @generated
+ */
+ EClass getMappingDataType();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.graphical.MappingDataType#getTargetTypeID <em>Target Type ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Target Type ID</em>'.
+ * @see org.jboss.tools.smooks.graphical.MappingDataType#getTargetTypeID()
+ * @see #getMappingDataType()
+ * @generated
+ */
+ EAttribute getMappingDataType_TargetTypeID();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.graphical.MappingDataType#getSourceTypeID <em>Source Type ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Source Type ID</em>'.
+ * @see org.jboss.tools.smooks.graphical.MappingDataType#getSourceTypeID()
+ * @see #getMappingDataType()
+ * @generated
+ */
+ EAttribute getMappingDataType_SourceTypeID();
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.graphical.Params <em>Params</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Params</em>'.
+ * @see org.jboss.tools.smooks.graphical.Params
+ * @generated
+ */
+ EClass getParams();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.graphical.Params#getParam <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Param</em>'.
+ * @see org.jboss.tools.smooks.graphical.Params#getParam()
+ * @see #getParams()
+ * @generated
+ */
+ EReference getParams_Param();
+
+ /**
+ * Returns the meta object for class '{@link org.jboss.tools.smooks.graphical.Param <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Param</em>'.
+ * @see org.jboss.tools.smooks.graphical.Param
+ * @generated
+ */
+ EClass getParam();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.graphical.Param#getName <em>Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Name</em>'.
+ * @see org.jboss.tools.smooks.graphical.Param#getName()
+ * @see #getParam()
+ * @generated
+ */
+ EAttribute getParam_Name();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.graphical.Param#getValue <em>Value</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Value</em>'.
+ * @see org.jboss.tools.smooks.graphical.Param#getValue()
+ * @see #getParam()
+ * @generated
+ */
+ EAttribute getParam_Value();
+
+ /**
+ * 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
+ */
+ GraphicalFactory getGraphicalFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.graphical.impl.GraphInformationsImpl <em>Graph Informations</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.GraphInformationsImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getGraphInformations()
+ * @generated
+ */
+ EClass GRAPH_INFORMATIONS = eINSTANCE.getGraphInformations();
+
+ /**
+ * The meta object literal for the '<em><b>Mapping Type</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH_INFORMATIONS__MAPPING_TYPE = eINSTANCE.getGraphInformations_MappingType();
+
+ /**
+ * The meta object literal for the '<em><b>Params</b></em>' containment reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference GRAPH_INFORMATIONS__PARAMS = eINSTANCE.getGraphInformations_Params();
+
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.graphical.impl.MappingDataTypeImpl <em>Mapping Data Type</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.MappingDataTypeImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getMappingDataType()
+ * @generated
+ */
+ EClass MAPPING_DATA_TYPE = eINSTANCE.getMappingDataType();
+
+ /**
+ * The meta object literal for the '<em><b>Target Type ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAPPING_DATA_TYPE__TARGET_TYPE_ID = eINSTANCE.getMappingDataType_TargetTypeID();
+
+ /**
+ * The meta object literal for the '<em><b>Source Type ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute MAPPING_DATA_TYPE__SOURCE_TYPE_ID = eINSTANCE.getMappingDataType_SourceTypeID();
+
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.graphical.impl.ParamsImpl <em>Params</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.ParamsImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getParams()
+ * @generated
+ */
+ EClass PARAMS = eINSTANCE.getParams();
+
+ /**
+ * The meta object literal for the '<em><b>Param</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PARAMS__PARAM = eINSTANCE.getParams_Param();
+
+ /**
+ * The meta object literal for the '{@link org.jboss.tools.smooks.graphical.impl.ParamImpl <em>Param</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.impl.ParamImpl
+ * @see org.jboss.tools.smooks.graphical.impl.GraphicalPackageImpl#getParam()
+ * @generated
+ */
+ EClass PARAM = eINSTANCE.getParam();
+
+ /**
+ * The meta object literal for the '<em><b>Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARAM__NAME = eINSTANCE.getParam_Name();
+
+ /**
+ * The meta object literal for the '<em><b>Value</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PARAM__VALUE = eINSTANCE.getParam_Value();
+
+ }
+
+} //GraphicalPackage
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/GraphicalPackage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/MappingDataType.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/MappingDataType.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/MappingDataType.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Mapping Data Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.MappingDataType#getTargetTypeID <em>Target Type ID</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.graphical.MappingDataType#getSourceTypeID <em>Source Type ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getMappingDataType()
+ * @model
+ * @generated
+ */
+public interface MappingDataType extends EObject {
+ /**
+ * Returns the value of the '<em><b>Target Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Target Type ID</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 Type ID</em>' attribute.
+ * @see #setTargetTypeID(String)
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getMappingDataType_TargetTypeID()
+ * @model
+ * @generated
+ */
+ String getTargetTypeID();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.graphical.MappingDataType#getTargetTypeID <em>Target Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Target Type ID</em>' attribute.
+ * @see #getTargetTypeID()
+ * @generated
+ */
+ void setTargetTypeID(String value);
+
+ /**
+ * Returns the value of the '<em><b>Source Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Source Type ID</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Source Type ID</em>' attribute.
+ * @see #setSourceTypeID(String)
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getMappingDataType_SourceTypeID()
+ * @model
+ * @generated
+ */
+ String getSourceTypeID();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.graphical.MappingDataType#getSourceTypeID <em>Source Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Source Type ID</em>' attribute.
+ * @see #getSourceTypeID()
+ * @generated
+ */
+ void setSourceTypeID(String value);
+
+} // MappingDataType
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/MappingDataType.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Param.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Param.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Param.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,81 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Param</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.Param#getName <em>Name</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.graphical.Param#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getParam()
+ * @model
+ * @generated
+ */
+public interface Param extends EObject {
+ /**
+ * 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.smooks.graphical.GraphicalPackage#getParam_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.graphical.Param#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>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.smooks.graphical.GraphicalPackage#getParam_Value()
+ * @model
+ * @generated
+ */
+ String getValue();
+
+ /**
+ * Sets the value of the '{@link org.jboss.tools.smooks.graphical.Param#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);
+
+} // Param
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Param.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Params.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Params.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Params.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,46 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Params</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.Params#getParam <em>Param</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getParams()
+ * @model
+ * @generated
+ */
+public interface Params extends EObject {
+ /**
+ * Returns the value of the '<em><b>Param</b></em>' containment reference list.
+ * The list contents are of type {@link org.jboss.tools.smooks.graphical.Param}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Param</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Param</em>' containment reference list.
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#getParams_Param()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Param> getParam();
+
+} // Params
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/Params.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphInformationsImpl.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphInformationsImpl.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphInformationsImpl.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,247 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
+import org.jboss.tools.smooks.graphical.MappingDataType;
+import org.jboss.tools.smooks.graphical.Params;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Graph Informations</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.GraphInformationsImpl#getMappingType <em>Mapping Type</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.GraphInformationsImpl#getParams <em>Params</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class GraphInformationsImpl extends EObjectImpl implements GraphInformations {
+ /**
+ * The cached value of the '{@link #getMappingType() <em>Mapping Type</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getMappingType()
+ * @generated
+ * @ordered
+ */
+ protected MappingDataType mappingType;
+
+ /**
+ * The cached value of the '{@link #getParams() <em>Params</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParams()
+ * @generated
+ * @ordered
+ */
+ protected Params params;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GraphInformationsImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GraphicalPackage.Literals.GRAPH_INFORMATIONS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingDataType getMappingType() {
+ return mappingType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetMappingType(MappingDataType newMappingType, NotificationChain msgs) {
+ MappingDataType oldMappingType = mappingType;
+ mappingType = newMappingType;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE, oldMappingType, newMappingType);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setMappingType(MappingDataType newMappingType) {
+ if (newMappingType != mappingType) {
+ NotificationChain msgs = null;
+ if (mappingType != null)
+ msgs = ((InternalEObject)mappingType).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE, null, msgs);
+ if (newMappingType != null)
+ msgs = ((InternalEObject)newMappingType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE, null, msgs);
+ msgs = basicSetMappingType(newMappingType, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE, newMappingType, newMappingType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Params getParams() {
+ return params;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetParams(Params newParams, NotificationChain msgs) {
+ Params oldParams = params;
+ params = newParams;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GraphicalPackage.GRAPH_INFORMATIONS__PARAMS, oldParams, newParams);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setParams(Params newParams) {
+ if (newParams != params) {
+ NotificationChain msgs = null;
+ if (params != null)
+ msgs = ((InternalEObject)params).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphicalPackage.GRAPH_INFORMATIONS__PARAMS, null, msgs);
+ if (newParams != null)
+ msgs = ((InternalEObject)newParams).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphicalPackage.GRAPH_INFORMATIONS__PARAMS, null, msgs);
+ msgs = basicSetParams(newParams, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GraphicalPackage.GRAPH_INFORMATIONS__PARAMS, newParams, newParams));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE:
+ return basicSetMappingType(null, msgs);
+ case GraphicalPackage.GRAPH_INFORMATIONS__PARAMS:
+ return basicSetParams(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE:
+ return getMappingType();
+ case GraphicalPackage.GRAPH_INFORMATIONS__PARAMS:
+ return getParams();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE:
+ setMappingType((MappingDataType)newValue);
+ return;
+ case GraphicalPackage.GRAPH_INFORMATIONS__PARAMS:
+ setParams((Params)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE:
+ setMappingType((MappingDataType)null);
+ return;
+ case GraphicalPackage.GRAPH_INFORMATIONS__PARAMS:
+ setParams((Params)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.GRAPH_INFORMATIONS__MAPPING_TYPE:
+ return mappingType != null;
+ case GraphicalPackage.GRAPH_INFORMATIONS__PARAMS:
+ return params != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //GraphInformationsImpl
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphInformationsImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalFactoryImpl.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalFactoryImpl.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalFactoryImpl.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,132 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+import org.jboss.tools.smooks.graphical.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GraphicalFactoryImpl extends EFactoryImpl implements GraphicalFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static GraphicalFactory init() {
+ try {
+ GraphicalFactory theGraphicalFactory = (GraphicalFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.jboss.org/tools/smooks");
+ if (theGraphicalFactory != null) {
+ return theGraphicalFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new GraphicalFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GraphicalFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case GraphicalPackage.GRAPH_INFORMATIONS: return createGraphInformations();
+ case GraphicalPackage.MAPPING_DATA_TYPE: return createMappingDataType();
+ case GraphicalPackage.PARAMS: return createParams();
+ case GraphicalPackage.PARAM: return createParam();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GraphInformations createGraphInformations() {
+ GraphInformationsImpl graphInformations = new GraphInformationsImpl();
+ return graphInformations;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public MappingDataType createMappingDataType() {
+ MappingDataTypeImpl mappingDataType = new MappingDataTypeImpl();
+ return mappingDataType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Params createParams() {
+ ParamsImpl params = new ParamsImpl();
+ return params;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Param createParam() {
+ ParamImpl param = new ParamImpl();
+ return param;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GraphicalPackage getGraphicalPackage() {
+ return (GraphicalPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static GraphicalPackage getPackage() {
+ return GraphicalPackage.eINSTANCE;
+ }
+
+} //GraphicalFactoryImpl
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalFactoryImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalPackageImpl.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalPackageImpl.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalPackageImpl.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,318 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+import org.jboss.tools.smooks.graphical.GraphInformations;
+import org.jboss.tools.smooks.graphical.GraphicalFactory;
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
+import org.jboss.tools.smooks.graphical.MappingDataType;
+import org.jboss.tools.smooks.graphical.Param;
+import org.jboss.tools.smooks.graphical.Params;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class GraphicalPackageImpl extends EPackageImpl implements GraphicalPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass graphInformationsEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass mappingDataTypeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paramsEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass paramEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private GraphicalPackageImpl() {
+ super(eNS_URI, GraphicalFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ * <p>Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ * <p>Invocation of this method will not affect any packages that have
+ * already been initialized.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static GraphicalPackage init() {
+ if (isInited) return (GraphicalPackage)EPackage.Registry.INSTANCE.getEPackage(GraphicalPackage.eNS_URI);
+
+ // Obtain or create and register package
+ GraphicalPackageImpl theGraphicalPackage = (GraphicalPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof GraphicalPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new GraphicalPackageImpl());
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theGraphicalPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theGraphicalPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theGraphicalPackage.freeze();
+
+ return theGraphicalPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getGraphInformations() {
+ return graphInformationsEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraphInformations_MappingType() {
+ return (EReference)graphInformationsEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getGraphInformations_Params() {
+ return (EReference)graphInformationsEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getMappingDataType() {
+ return mappingDataTypeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMappingDataType_TargetTypeID() {
+ return (EAttribute)mappingDataTypeEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getMappingDataType_SourceTypeID() {
+ return (EAttribute)mappingDataTypeEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParams() {
+ return paramsEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getParams_Param() {
+ return (EReference)paramsEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getParam() {
+ return paramEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParam_Name() {
+ return (EAttribute)paramEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getParam_Value() {
+ return (EAttribute)paramEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GraphicalFactory getGraphicalFactory() {
+ return (GraphicalFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ graphInformationsEClass = createEClass(GRAPH_INFORMATIONS);
+ createEReference(graphInformationsEClass, GRAPH_INFORMATIONS__MAPPING_TYPE);
+ createEReference(graphInformationsEClass, GRAPH_INFORMATIONS__PARAMS);
+
+ mappingDataTypeEClass = createEClass(MAPPING_DATA_TYPE);
+ createEAttribute(mappingDataTypeEClass, MAPPING_DATA_TYPE__TARGET_TYPE_ID);
+ createEAttribute(mappingDataTypeEClass, MAPPING_DATA_TYPE__SOURCE_TYPE_ID);
+
+ paramsEClass = createEClass(PARAMS);
+ createEReference(paramsEClass, PARAMS__PARAM);
+
+ paramEClass = createEClass(PARAM);
+ createEAttribute(paramEClass, PARAM__NAME);
+ createEAttribute(paramEClass, PARAM__VALUE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(graphInformationsEClass, GraphInformations.class, "GraphInformations", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getGraphInformations_MappingType(), this.getMappingDataType(), null, "mappingType", null, 0, 1, GraphInformations.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGraphInformations_Params(), this.getParams(), null, "params", null, 0, 1, GraphInformations.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(mappingDataTypeEClass, MappingDataType.class, "MappingDataType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getMappingDataType_TargetTypeID(), ecorePackage.getEString(), "targetTypeID", null, 0, 1, MappingDataType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getMappingDataType_SourceTypeID(), ecorePackage.getEString(), "sourceTypeID", null, 0, 1, MappingDataType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(paramsEClass, Params.class, "Params", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getParams_Param(), this.getParam(), null, "param", null, 0, -1, Params.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(paramEClass, Param.class, "Param", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getParam_Name(), ecorePackage.getEString(), "name", null, 0, 1, Param.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getParam_Value(), ecorePackage.getEString(), "value", null, 0, 1, Param.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //GraphicalPackageImpl
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/GraphicalPackageImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/MappingDataTypeImpl.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/MappingDataTypeImpl.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/MappingDataTypeImpl.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,221 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
+import org.jboss.tools.smooks.graphical.MappingDataType;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Mapping Data Type</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.MappingDataTypeImpl#getTargetTypeID <em>Target Type ID</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.MappingDataTypeImpl#getSourceTypeID <em>Source Type ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class MappingDataTypeImpl extends EObjectImpl implements MappingDataType {
+ /**
+ * The default value of the '{@link #getTargetTypeID() <em>Target Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetTypeID()
+ * @generated
+ * @ordered
+ */
+ protected static final String TARGET_TYPE_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getTargetTypeID() <em>Target Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getTargetTypeID()
+ * @generated
+ * @ordered
+ */
+ protected String targetTypeID = TARGET_TYPE_ID_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getSourceTypeID() <em>Source Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSourceTypeID()
+ * @generated
+ * @ordered
+ */
+ protected static final String SOURCE_TYPE_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSourceTypeID() <em>Source Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSourceTypeID()
+ * @generated
+ * @ordered
+ */
+ protected String sourceTypeID = SOURCE_TYPE_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected MappingDataTypeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GraphicalPackage.Literals.MAPPING_DATA_TYPE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getTargetTypeID() {
+ return targetTypeID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setTargetTypeID(String newTargetTypeID) {
+ String oldTargetTypeID = targetTypeID;
+ targetTypeID = newTargetTypeID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GraphicalPackage.MAPPING_DATA_TYPE__TARGET_TYPE_ID, oldTargetTypeID, targetTypeID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getSourceTypeID() {
+ return sourceTypeID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSourceTypeID(String newSourceTypeID) {
+ String oldSourceTypeID = sourceTypeID;
+ sourceTypeID = newSourceTypeID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GraphicalPackage.MAPPING_DATA_TYPE__SOURCE_TYPE_ID, oldSourceTypeID, sourceTypeID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GraphicalPackage.MAPPING_DATA_TYPE__TARGET_TYPE_ID:
+ return getTargetTypeID();
+ case GraphicalPackage.MAPPING_DATA_TYPE__SOURCE_TYPE_ID:
+ return getSourceTypeID();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GraphicalPackage.MAPPING_DATA_TYPE__TARGET_TYPE_ID:
+ setTargetTypeID((String)newValue);
+ return;
+ case GraphicalPackage.MAPPING_DATA_TYPE__SOURCE_TYPE_ID:
+ setSourceTypeID((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.MAPPING_DATA_TYPE__TARGET_TYPE_ID:
+ setTargetTypeID(TARGET_TYPE_ID_EDEFAULT);
+ return;
+ case GraphicalPackage.MAPPING_DATA_TYPE__SOURCE_TYPE_ID:
+ setSourceTypeID(SOURCE_TYPE_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.MAPPING_DATA_TYPE__TARGET_TYPE_ID:
+ return TARGET_TYPE_ID_EDEFAULT == null ? targetTypeID != null : !TARGET_TYPE_ID_EDEFAULT.equals(targetTypeID);
+ case GraphicalPackage.MAPPING_DATA_TYPE__SOURCE_TYPE_ID:
+ return SOURCE_TYPE_ID_EDEFAULT == null ? sourceTypeID != null : !SOURCE_TYPE_ID_EDEFAULT.equals(sourceTypeID);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (targetTypeID: ");
+ result.append(targetTypeID);
+ result.append(", sourceTypeID: ");
+ result.append(sourceTypeID);
+ result.append(')');
+ return result.toString();
+ }
+
+} //MappingDataTypeImpl
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/MappingDataTypeImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamImpl.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamImpl.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamImpl.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,221 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
+import org.jboss.tools.smooks.graphical.Param;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Param</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.ParamImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.ParamImpl#getValue <em>Value</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParamImpl extends EObjectImpl implements Param {
+ /**
+ * The default value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected static final String VALUE_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValue()
+ * @generated
+ * @ordered
+ */
+ protected String value = VALUE_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ParamImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GraphicalPackage.Literals.PARAM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GraphicalPackage.PARAM__NAME, oldName, name));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValue(String newValue) {
+ String oldValue = value;
+ value = newValue;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, GraphicalPackage.PARAM__VALUE, oldValue, value));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GraphicalPackage.PARAM__NAME:
+ return getName();
+ case GraphicalPackage.PARAM__VALUE:
+ return getValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GraphicalPackage.PARAM__NAME:
+ setName((String)newValue);
+ return;
+ case GraphicalPackage.PARAM__VALUE:
+ setValue((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.PARAM__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case GraphicalPackage.PARAM__VALUE:
+ setValue(VALUE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.PARAM__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case GraphicalPackage.PARAM__VALUE:
+ return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(", value: ");
+ result.append(value);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ParamImpl
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamsImpl.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamsImpl.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamsImpl.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,156 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+
+import org.jboss.tools.smooks.graphical.GraphicalPackage;
+import org.jboss.tools.smooks.graphical.Param;
+import org.jboss.tools.smooks.graphical.Params;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Params</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.jboss.tools.smooks.graphical.impl.ParamsImpl#getParam <em>Param</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ParamsImpl extends EObjectImpl implements Params {
+ /**
+ * The cached value of the '{@link #getParam() <em>Param</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getParam()
+ * @generated
+ * @ordered
+ */
+ protected EList<Param> param;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ParamsImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return GraphicalPackage.Literals.PARAMS;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Param> getParam() {
+ if (param == null) {
+ param = new EObjectContainmentEList<Param>(Param.class, this, GraphicalPackage.PARAMS__PARAM);
+ }
+ return param;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case GraphicalPackage.PARAMS__PARAM:
+ return ((InternalEList<?>)getParam()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case GraphicalPackage.PARAMS__PARAM:
+ return getParam();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case GraphicalPackage.PARAMS__PARAM:
+ getParam().clear();
+ getParam().addAll((Collection<? extends Param>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.PARAMS__PARAM:
+ getParam().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case GraphicalPackage.PARAMS__PARAM:
+ return param != null && !param.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ParamsImpl
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/impl/ParamsImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,178 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.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.jboss.tools.smooks.graphical.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage
+ * @generated
+ */
+public class GraphicalAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GraphicalPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GraphicalAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = GraphicalPackage.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 the delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected GraphicalSwitch<Adapter> modelSwitch =
+ new GraphicalSwitch<Adapter>() {
+ @Override
+ public Adapter caseGraphInformations(GraphInformations object) {
+ return createGraphInformationsAdapter();
+ }
+ @Override
+ public Adapter caseMappingDataType(MappingDataType object) {
+ return createMappingDataTypeAdapter();
+ }
+ @Override
+ public Adapter caseParams(Params object) {
+ return createParamsAdapter();
+ }
+ @Override
+ public Adapter caseParam(Param object) {
+ return createParamAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.graphical.GraphInformations <em>Graph Informations</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.smooks.graphical.GraphInformations
+ * @generated
+ */
+ public Adapter createGraphInformationsAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.graphical.MappingDataType <em>Mapping Data 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.smooks.graphical.MappingDataType
+ * @generated
+ */
+ public Adapter createMappingDataTypeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.graphical.Params <em>Params</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.smooks.graphical.Params
+ * @generated
+ */
+ public Adapter createParamsAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.graphical.Param <em>Param</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.jboss.tools.smooks.graphical.Param
+ * @generated
+ */
+ public Adapter createParamAdapter() {
+ 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;
+ }
+
+} //GraphicalAdapterFactory
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalAdapterFactory.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java 2008-08-29 09:07:03 UTC (rev 9953)
@@ -0,0 +1,193 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.jboss.tools.smooks.graphical.util;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+
+import org.jboss.tools.smooks.graphical.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.jboss.tools.smooks.graphical.GraphicalPackage
+ * @generated
+ */
+public class GraphicalSwitch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static GraphicalPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public GraphicalSwitch() {
+ if (modelPackage == null) {
+ modelPackage = GraphicalPackage.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 GraphicalPackage.GRAPH_INFORMATIONS: {
+ GraphInformations graphInformations = (GraphInformations)theEObject;
+ T result = caseGraphInformations(graphInformations);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GraphicalPackage.MAPPING_DATA_TYPE: {
+ MappingDataType mappingDataType = (MappingDataType)theEObject;
+ T result = caseMappingDataType(mappingDataType);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GraphicalPackage.PARAMS: {
+ Params params = (Params)theEObject;
+ T result = caseParams(params);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case GraphicalPackage.PARAM: {
+ Param param = (Param)theEObject;
+ T result = caseParam(param);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Graph Informations</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>Graph Informations</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseGraphInformations(GraphInformations object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Mapping Data 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>Mapping Data Type</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseMappingDataType(MappingDataType object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Params</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>Params</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParams(Params object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Param</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</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseParam(Param 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;
+ }
+
+} //GraphicalSwitch
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.graphicalInfo/src/org/jboss/tools/smooks/graphical/util/GraphicalSwitch.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
16 years, 3 months
JBoss Tools SVN: r9951 - in trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools: jst/jsp/preferences/xpl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-08-29 02:41:31 -0400 (Fri, 29 Aug 2008)
New Revision: 9951
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/jst/jsp/preferences/xpl/XMLOccurrencesPreferencePage.java
Log:
Fix PMD Violations
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2008-08-29 06:36:13 UTC (rev 9950)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XMLTextViewerConfiguration.java 2008-08-29 06:41:31 UTC (rev 9951)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.text.xml;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
@@ -126,8 +127,14 @@
Method m = initial.getClass().getDeclaredMethod("getContentAssistProcessors", new Class[]{ISourceViewer.class, String.class});
m.setAccessible(true);
return (IContentAssistProcessor[])m.invoke(initial, new Object[]{sourceViewer, partitionType});
- } catch (Exception e) {
+ } catch (NoSuchMethodException e) {
XmlEditorPlugin.getPluginLog().logError(e);
+ } catch (IllegalArgumentException e) {
+ XmlEditorPlugin.getPluginLog().logError(e);
+ } catch (IllegalAccessException e) {
+ XmlEditorPlugin.getPluginLog().logError(e);
+ } catch (InvocationTargetException e) {
+ XmlEditorPlugin.getPluginLog().logError(e);
}
return null;
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java 2008-08-29 06:36:13 UTC (rev 9950)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/XmlEditorPlugin.java 2008-08-29 06:41:31 UTC (rev 9951)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.text.xml;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@@ -96,14 +97,18 @@
// XmlPreferenceConstants.initializeDefaultValues(getPreferenceStore());
- try {
- Method m = AbstractUIPlugin.class.getDeclaredMethod("initializeDefaultPluginPreferences", new Class[0]);
- m.setAccessible(true);
- m.invoke(JavaPlugin.getDefault(), new Object[0]);
- } catch (Exception e) {
- //ignore
- }
+ Method m;
+ try {
+ m = AbstractUIPlugin.class.getDeclaredMethod("initializeDefaultPluginPreferences", new Class[0]);
+ m.setAccessible(true);
+ m.invoke(JavaPlugin.getDefault(), new Object[0]);
+ } catch (NoSuchMethodException e) {
+ } catch (IllegalArgumentException e) {
+ } catch (IllegalAccessException e) {
+ } catch (InvocationTargetException e) {
+ }
+
IPreferenceStore store = getPreferenceStore();
PreferenceConstants.initializeDefaultValues(store);
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/jst/jsp/preferences/xpl/XMLOccurrencesPreferencePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/jst/jsp/preferences/xpl/XMLOccurrencesPreferencePage.java 2008-08-29 06:36:13 UTC (rev 9950)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/jst/jsp/preferences/xpl/XMLOccurrencesPreferencePage.java 2008-08-29 06:41:31 UTC (rev 9951)
@@ -79,75 +79,71 @@
*/
protected void createFieldEditors() {
// Initialize all field editors.
- try {
- mark = new BooleanFieldEditor(
- PreferenceKeyGenerator
- .generateKey(
- XMLOccurrencePreferenceConstants.EDITOR_MARK_OCCURRENCES,
- fEditorID),
- Messages
- .getString("OccurrencesPreferencePage.Mark.occurrences.in.file"),
- getFieldEditorParent()); //$NON-NLS-1$
- addField(mark);
+ mark = new BooleanFieldEditor(
+ PreferenceKeyGenerator
+ .generateKey(
+ XMLOccurrencePreferenceConstants.EDITOR_MARK_OCCURRENCES,
+ fEditorID),
+ Messages
+ .getString("OccurrencesPreferencePage.Mark.occurrences.in.file"),
+ getFieldEditorParent()); //$NON-NLS-1$
+ addField(mark);
- markNode = new VarBooleanFieldEditor(
- PreferenceKeyGenerator
- .generateKey(
- XMLOccurrencePreferenceConstants.EDITOR_MARK_NODE_OCCURRENCES,
- fEditorID), Messages
- .getString("OccurrencesPreferencePage.Mark.Tags"),
- getFieldEditorParent()); //$NON-NLS-1$
- markNode.offset(getFieldEditorParent(), 10); // offset 10
- addField(markNode);
+ markNode = new VarBooleanFieldEditor(
+ PreferenceKeyGenerator
+ .generateKey(
+ XMLOccurrencePreferenceConstants.EDITOR_MARK_NODE_OCCURRENCES,
+ fEditorID), Messages
+ .getString("OccurrencesPreferencePage.Mark.Tags"),
+ getFieldEditorParent()); //$NON-NLS-1$
+ markNode.offset(getFieldEditorParent(), 10); // offset 10
+ addField(markNode);
- markAttribute = new VarBooleanFieldEditor(
- PreferenceKeyGenerator
- .generateKey(
- XMLOccurrencePreferenceConstants.EDITOR_MARK_ATTRIBUTE_OCCURRENCES,
- fEditorID),
- Messages
- .getString("OccurrencesPreferencePage.Mark.Attribute.Names"),
- getFieldEditorParent()); //$NON-NLS-1$
- markAttribute.offset(getFieldEditorParent(), 10); // offset 10
- addField(markAttribute);
+ markAttribute = new VarBooleanFieldEditor(
+ PreferenceKeyGenerator
+ .generateKey(
+ XMLOccurrencePreferenceConstants.EDITOR_MARK_ATTRIBUTE_OCCURRENCES,
+ fEditorID),
+ Messages
+ .getString("OccurrencesPreferencePage.Mark.Attribute.Names"),
+ getFieldEditorParent()); //$NON-NLS-1$
+ markAttribute.offset(getFieldEditorParent(), 10); // offset 10
+ addField(markAttribute);
- markAttributeValue = new VarBooleanFieldEditor(
- PreferenceKeyGenerator
- .generateKey(
- XMLOccurrencePreferenceConstants.EDITOR_MARK_ATTRIBUTE_VALUE_OCCURRENCES,
- fEditorID),
- Messages
- .getString("OccurrencesPreferencePage.Mark.Attribute.Values"),
- getFieldEditorParent()); //$NON-NLS-1$
- markAttributeValue.offset(getFieldEditorParent(), 10); // offset 10
- addField(markAttributeValue);
+ markAttributeValue = new VarBooleanFieldEditor(
+ PreferenceKeyGenerator
+ .generateKey(
+ XMLOccurrencePreferenceConstants.EDITOR_MARK_ATTRIBUTE_VALUE_OCCURRENCES,
+ fEditorID),
+ Messages
+ .getString("OccurrencesPreferencePage.Mark.Attribute.Values"),
+ getFieldEditorParent()); //$NON-NLS-1$
+ markAttributeValue.offset(getFieldEditorParent(), 10); // offset 10
+ addField(markAttributeValue);
- markText = new VarBooleanFieldEditor(
- PreferenceKeyGenerator
- .generateKey(
- XMLOccurrencePreferenceConstants.EDITOR_MARK_TEXT_OCCURRENCES,
- fEditorID), Messages
- .getString("OccurrencesPreferencePage.Mark.Text"),
- getFieldEditorParent());
- markText.offset(getFieldEditorParent(), 10); // offset 10
- addField(markText);
+ markText = new VarBooleanFieldEditor(
+ PreferenceKeyGenerator
+ .generateKey(
+ XMLOccurrencePreferenceConstants.EDITOR_MARK_TEXT_OCCURRENCES,
+ fEditorID), Messages
+ .getString("OccurrencesPreferencePage.Mark.Text"),
+ getFieldEditorParent());
+ markText.offset(getFieldEditorParent(), 10); // offset 10
+ addField(markText);
- FieldEditor spacer1 = new LabelFieldEditor(
- "", getFieldEditorParent()); //$NON-NLS-1$
- addField(spacer1);
+ FieldEditor spacer1 = new LabelFieldEditor(
+ "", getFieldEditorParent()); //$NON-NLS-1$
+ addField(spacer1);
- sticky = new VarBooleanFieldEditor(
- PreferenceKeyGenerator
- .generateKey(
- XMLOccurrencePreferenceConstants.EDITOR_STICKY_OCCURRENCES,
- fEditorID), Messages
- .getString("OccurrencesPreferencePage.Sticky"),
- getFieldEditorParent()); //$NON-NLS-1$
- sticky.offset(getFieldEditorParent(), 10); // offset 10
- addField(sticky);
- } catch (Exception x) {
- XmlEditorPlugin.getPluginLog().logError(x);
- }
+ sticky = new VarBooleanFieldEditor(
+ PreferenceKeyGenerator
+ .generateKey(
+ XMLOccurrencePreferenceConstants.EDITOR_STICKY_OCCURRENCES,
+ fEditorID), Messages
+ .getString("OccurrencesPreferencePage.Sticky"),
+ getFieldEditorParent()); //$NON-NLS-1$
+ sticky.offset(getFieldEditorParent(), 10); // offset 10
+ addField(sticky);
}
/*
16 years, 3 months