### Eclipse Workspace Patch 1.0 #P org.jboss.tools.smooks.ui Index: plugin.xml =================================================================== --- plugin.xml (revision 18773) +++ plugin.xml (working copy) @@ -191,6 +191,12 @@ id="org.jboss.tools.smooks.ui.propertySection.decodeParam" tab="org.jboss.tools.smooks.ui.propertySection.decodeParamTab"> + + @@ -213,10 +220,17 @@ label="Rule Bases"> + + getJavaBeanModelList() { + if (getJavaBeanModel() != null) { + List list = new ArrayList(); + list.add(javaBeanModel); + return list; + } + return Collections.emptyList(); + } + + /** + * @return the javaBeanModel + */ + public JavaBeanModel getJavaBeanModel() { + return javaBeanModel; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets + * .Composite) + */ + public void createControl(Composite parent) { + Composite mainComposite = new Composite(parent, SWT.NONE); + GridData gd = new GridData(GridData.FILL_BOTH); + + GridLayout gl = new GridLayout(); + gl.numColumns = 2; + mainComposite.setLayout(gl); + mainComposite.setLayoutData(gd); + + // createBeanIDControls(mainComposite); + + createBeanClassControls(mainComposite); + + createBeanTypeControls(mainComposite); + + Label seperator = new Label(mainComposite, SWT.HORIZONTAL | SWT.SEPARATOR); + gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = 2; + gd.heightHint = 18; + seperator.setLayoutData(gd); + + setControl(mainComposite); + + this.setPageComplete(false); + + } + + private void createBeanTypeControls(Composite mainComposite) { + + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + + Label beanTypeLabel = new Label(mainComposite, SWT.NONE); + beanTypeLabel.setText("Bean Type :"); + + Composite composite = new Composite(mainComposite, SWT.NONE); + gd = new GridData(GridData.FILL_HORIZONTAL); + composite.setLayoutData(gd); + + GridLayout gl = new GridLayout(); + gl.numColumns = 2; + gl.marginHeight = 0; + gl.marginWidth = 0; + gl.makeColumnsEqualWidth = false; + composite.setLayout(gl); + + arrayButton = new Button(composite, SWT.CHECK); + arrayButton.setText("Array"); + + final Button collectionButton = new Button(composite, SWT.CHECK); + collectionButton.setText("Collection"); + + Label beanClassLabel = new Label(mainComposite, SWT.NONE); + beanClassLabel.setText("Collection Class :"); + + Composite beanClassComposite = new Composite(mainComposite, SWT.NONE); + GridLayout gl1 = new GridLayout(); + gl1.numColumns = 2; + gl1.marginHeight = 0; + gl1.marginWidth = 0; + + gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = 2; + beanClassComposite.setLayoutData(gd); + + beanClassComposite.setLayout(gl); + + colllectionClassText = new Text(beanClassComposite, SWT.BORDER); + gd = new GridData(GridData.FILL_HORIZONTAL); + colllectionClassText.setLayoutData(gd); + colllectionClassText.addModifyListener(new ModifyListener() { + + public void modifyText(ModifyEvent e) { + Text t = (Text) e.getSource(); + collectionClass = t.getText(); + refreshJavaBeanModel(); + updateWizardPageStatus(); + } + + }); + colllectionClassText.setEnabled(false); + + beanClassComposite.setLayoutData(gd); + + collectionClassBrowseButton = new Button(beanClassComposite, SWT.NONE); + collectionClassBrowseButton.setText("Browse..."); + collectionClassBrowseButton.addSelectionListener(new SelectionAdapter() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse + * .swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(SelectionEvent e) { + String classString = JavaTypeFieldDialog.openJavaTypeDialog(getShell(), project); + colllectionClassText.setText(classString); + } + + }); + collectionClassBrowseButton.setEnabled(false); + + arrayButton.addSelectionListener(new SelectionAdapter() { + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse + * .swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(SelectionEvent e) { + Button button = (Button) e.getSource(); + if (button.getSelection()) { + isArray = true; + collectionButton.setSelection(false); + isCollection = false; + collectionClassBrowseButton.setEnabled(false); + colllectionClassText.setEnabled(false); + } else { + isArray = false; + } + refreshJavaBeanModel(); + updateWizardPageStatus(); + } + }); + + collectionButton.addSelectionListener(new SelectionAdapter() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse + * .swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(SelectionEvent e) { + Button button = (Button) e.getSource(); + if (button.getSelection()) { + isCollection = true; + arrayButton.setSelection(false); + isArray = false; + collectionClassBrowseButton.setEnabled(true); + colllectionClassText.setEnabled(true); + } else { + isCollection = false; + collectionClassBrowseButton.setEnabled(false); + colllectionClassText.setEnabled(false); + } + updateWizardPageStatus(); + } + + }); + collectionButton.setVisible(false); + beanClassComposite.setVisible(false); + beanClassLabel.setVisible(false); + } + + protected void refreshJavaBeanModel() { + if (beanClass == null || "".equals(beanClass.trim())) { + } else { + try { + ProjectClassLoader loader = new ProjectClassLoader(project); + javaBeanModel = null; + isCollection = isCollectionClass(beanClass); + isCollection = false; + if (isCollection) { + if (collectionClass != null) { + Class clazz = loader.loadClass(beanClass); + Class cclazz = loader.loadClass(collectionClass); + javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz); + javaBeanModel.setComponentClass(cclazz); + } else { + } + } else { + Class clazz = loader.loadClass(beanClass); + if (isArray) { + Object arrayInstance = Array.newInstance(clazz, 0); + clazz = arrayInstance.getClass(); + } + javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz); + } + if (javaBeanModel != null) { + if (beanID != null) { + javaBeanModel.setName(beanID); + } + } else { + } + } catch (JavaModelException e1) { + } catch (ClassNotFoundException e1) { + } + } + } + + private void createBeanClassControls(Composite mainComposite) { + Label beanClassLabel = new Label(mainComposite, SWT.NONE); + beanClassLabel.setText("Bean Class :"); + + Composite beanClassComposite = new Composite(mainComposite, SWT.NONE); + GridLayout gl = new GridLayout(); + gl.numColumns = 2; + gl.marginHeight = 0; + gl.marginWidth = 0; + + beanClassComposite.setLayout(gl); + + final Text beanClassText = new Text(beanClassComposite, SWT.BORDER); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + beanClassText.setLayoutData(gd); + beanClassText.addModifyListener(new ModifyListener() { + + public void modifyText(ModifyEvent e) { + Text t = (Text) e.getSource(); + arrayButton.setEnabled(true); + beanClass = t.getText(); + if (beanClass != null) { + beanClass = beanClass.trim(); + } + isCollection = isCollectionClass(beanClass); +// if (isCollection) { +// isArray = false; +// arrayButton.setSelection(false); +// arrayButton.setEnabled(false); +// collectionClassBrowseButton.setEnabled(true); +// colllectionClassText.setEnabled(true); +// } else { +// collectionClassBrowseButton.setEnabled(false); +// colllectionClassText.setEnabled(false); +// colllectionClassText.setText(""); +// } + refreshJavaBeanModel(); + updateWizardPageStatus(); + } + }); + + beanClassComposite.setLayoutData(gd); + + Button javaTypeBrowseButton = new Button(beanClassComposite, SWT.NONE); + javaTypeBrowseButton.setText("Browse..."); + javaTypeBrowseButton.addSelectionListener(new SelectionAdapter() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse + * .swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(SelectionEvent e) { + String classString = JavaTypeFieldDialog.openJavaTypeDialog(getShell(), project); + beanClassText.setText(classString); + } + + }); + } + + private boolean isCollectionClass(String classString) { + if (project != null) { + try { + ProjectClassLoader loader = new ProjectClassLoader(project); + Class clazz = loader.loadClass(classString); + if (Collection.class.isAssignableFrom(clazz)) { + return true; + } + } catch (Throwable t) { + + } + } + return false; + } + + // private void createBeanIDControls(Composite mainComposite) { + // Label beanIDLabel = new Label(mainComposite, SWT.NONE); + // beanIDLabel.setText("Bean ID :"); + // + // Text beanIDText = new Text(mainComposite, SWT.BORDER); + // GridData gd = new GridData(GridData.FILL_HORIZONTAL); + // beanIDText.setLayoutData(gd); + // beanIDText.addModifyListener(new ModifyListener() { + // + // public void modifyText(ModifyEvent e) { + // Text t = (Text) e.getSource(); + // beanID = t.getText(); + // updateWizardPageStatus(); + // } + // + // }); + // } + + protected void updateWizardPageStatus() { + String error = null; + if (beanClass == null || "".equals(beanClass.trim())) { + error = "Bean Class is empty"; + } else { + try { + beanClass = beanClass.trim(); + ProjectClassLoader loader = new ProjectClassLoader(project); + loader.loadClass(beanClass); + } catch (JavaModelException e) { + e.printStackTrace(); + } catch (ClassNotFoundException e) { + error = "Can't find the class \"" + beanClass + "\""; + } + } + + if (isCollection) { + if (collectionClass == null || "".equals(collectionClass.trim())) { + error = "Colletion component class is empty"; + } else { + try { + ProjectClassLoader loader = new ProjectClassLoader(project); + loader.loadClass(collectionClass); + } catch (JavaModelException e) { + e.printStackTrace(); + } catch (ClassNotFoundException e) { + error = "Can't find the class \"" + beanClass; + } + } + } + + this.setErrorMessage(error); + this.setPageComplete(error == null); + } + +} Index: src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java =================================================================== --- src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java (revision 18773) +++ src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanConfigWizardPage.java (working copy) @@ -25,7 +25,7 @@ /** * @author Dart Peng - * + * @deprecated * @CreateTime Jul 21, 2008 */ public class JavaBeanConfigWizardPage extends WizardPage implements Index: src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java =================================================================== --- src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java (revision 18773) +++ src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanStrucutredDataWizard.java (working copy) @@ -38,7 +38,7 @@ */ public class JavabeanStrucutredDataWizard extends Wizard implements IStructuredDataSelectionWizard, INewWizard { - JavaBeanConfigWizardPage page = null; + JavaBeanSelectionWizardPage page = null; IJavaProject project = null; @@ -67,7 +67,7 @@ public void addPages() { super.addPages(); if (page == null) { - page = new JavaBeanConfigWizardPage(project); + page = new JavaBeanSelectionWizardPage("javaclass",project); this.addPage(page); } } @@ -85,7 +85,7 @@ public JavaBeanList getJavaBeanList() { JavaBeanList list = new JavaBeanList(); - if (result != null && result instanceof List) { + if (result != null && result instanceof List) { for (Iterator iterator = ((List) result).iterator(); iterator .hasNext();) { JavaBeanModel javabean = (JavaBeanModel) iterator.next(); @@ -176,12 +176,12 @@ JavaBeanModel javaBeanModel = (JavaBeanModel) iterator.next(); Class clazz = javaBeanModel.getBeanClass(); if (clazz != null) { - boolean isArray = "array".equals(javaBeanModel - .getExtendProperty("many")); + boolean isArray = clazz.isArray(); // boolean isList = "list".equals(javaBeanModel // .getExtendProperty("many")); String cname = clazz.getName(); if(isArray){ + cname = clazz.getComponentType().getName(); cname = cname+ "[]"; } buffer.append(cname); Index: src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java =================================================================== --- src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java (revision 18773) +++ src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java (working copy) @@ -1079,6 +1079,16 @@ arrayInstance = null; return clazz; } + if(className.endsWith("]") && !className.endsWith("[]")){ +// int index = className.indexOf("["); +// String collectionName = className.substring(0,index); +// String componentName = className.substring(index + 1 , className.length() - 1); +// Class clazz = loader.loadClass(className); +// Object arrayInstance = Array.newInstance(clazz, 0); +// clazz = arrayInstance.getClass(); +// arrayInstance = null; +// return clazz; + } return loader.loadClass(className); } @@ -1283,7 +1293,7 @@ final Resource resource = ((EObject) model).eResource(); return getResource(resource); } - + public static IResource getResource(Resource resource) { if (resource == null) return null; @@ -2949,8 +2959,8 @@ } return false; } - - public static boolean isCollectionJavaGraphModel(EObject parent){ + + public static boolean isCollectionJavaGraphModel(EObject parent) { String classString = null; if (parent instanceof BeanType) { classString = ((BeanType) parent).getClass_(); @@ -2973,11 +2983,11 @@ } } - + return false; } - - public static boolean isArrayJavaGraphModel(EObject parent){ + + public static boolean isArrayJavaGraphModel(EObject parent) { String classString = null; if (parent instanceof BeanType) { classString = ((BeanType) parent).getClass_(); @@ -3003,10 +3013,10 @@ if (model instanceof Xsl) { return XslPackage.Literals.DOCUMENT_ROOT__XSL; } - if(model instanceof Freemarker){ + if (model instanceof Freemarker) { return FreemarkerPackage.Literals.DOCUMENT_ROOT__FREEMARKER; } - if(model instanceof RuleBasesType){ + if (model instanceof RuleBasesType) { return Rules10Package.Literals.RULES10_DOCUMENT_ROOT__RULE_BASES; } return null; Index: src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java =================================================================== --- src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java (revision 18773) +++ src/org/jboss/tools/smooks/configuration/editors/GraphicsConstants.java (working copy) @@ -106,6 +106,8 @@ public static final String IMAGE_UNKNOWN_OBJ = "icons/full/obj16/unknown_obj.gif"; public static final String IMAGE_JAVA_FILE = "icons/full/obj16/jcu_obj.gif"; + + public static final String IMAGE_CSV_FILE = "icons/full/obj16/csvfile.gif"; public static final String IMAGE_XML_FILE = "icons/full/obj16/XMLFile.gif"; Index: src/org/jboss/tools/smooks/gef/tree/editpolicy/FigureHighlightEditPolicy.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/editpolicy/FigureHighlightEditPolicy.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/editpolicy/FigureHighlightEditPolicy.java (working copy) @@ -1,5 +1,6 @@ package org.jboss.tools.smooks.gef.tree.editpolicy; +import org.eclipse.draw2d.FigureUtilities; import org.eclipse.draw2d.IFigure; import org.eclipse.gef.EditPart; import org.eclipse.gef.GraphicalEditPart; @@ -13,7 +14,7 @@ private Color revertColor; - public static Color highLightColor = GraphicsConstants.TB_BG_CORLOR; + public static Color highLightColor = FigureUtilities.darker(GraphicsConstants.TB_BG_CORLOR); public FigureHighlightEditPolicy() { super(); Index: src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeGraphicalNodeEditPolicy.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeGraphicalNodeEditPolicy.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeGraphicalNodeEditPolicy.java (working copy) @@ -3,6 +3,7 @@ */ package org.jboss.tools.smooks.gef.tree.editpolicy; +import org.eclipse.draw2d.FigureUtilities; import org.eclipse.draw2d.IFigure; import org.eclipse.gef.EditPart; import org.eclipse.gef.GraphicalEditPart; @@ -173,7 +174,7 @@ protected void showHighlight() { if (revertColor == null) { revertColor = getContainerBackground(); - setContainerBackground(highLightColor); + setContainerBackground(FigureUtilities.darker(revertColor)); } } Index: src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeConnectionEditPolicy.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeConnectionEditPolicy.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/editpolicy/TreeNodeConnectionEditPolicy.java (working copy) @@ -10,10 +10,12 @@ ******************************************************************************/ package org.jboss.tools.smooks.gef.tree.editpolicy; +import org.eclipse.gef.EditPart; import org.eclipse.gef.commands.Command; import org.eclipse.gef.editpolicies.ConnectionEditPolicy; import org.eclipse.gef.requests.GroupRequest; import org.jboss.tools.smooks.gef.tree.command.DeleteConnectionCommand; +import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart; import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection; /** @@ -37,7 +39,13 @@ @Override protected Command getDeleteCommand(GroupRequest request) { Object connection = getHost().getModel(); + EditPart host = getHost(); if (connection != null && connection instanceof TreeNodeConnection) { + if(host instanceof TreeNodeConnectionEditPart){ + if(!((TreeNodeConnectionEditPart)host).isCanDelete()){ + return null; + } + } DeleteConnectionCommand command = new DeleteConnectionCommand((TreeNodeConnection) connection); return command; } Index: src/org/jboss/tools/smooks/gef/tree/figures/GraphAnimation.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/figures/GraphAnimation.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/figures/GraphAnimation.java (working copy) @@ -122,7 +122,7 @@ } try { - Thread.sleep(5); + Thread.sleep(20); Thread.yield(); } catch (InterruptedException e) { e.printStackTrace(); Index: src/org/jboss/tools/smooks/gef/tree/figures/TreeNodeFigure.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/figures/TreeNodeFigure.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/figures/TreeNodeFigure.java (working copy) @@ -54,7 +54,7 @@ private boolean mouseEnter = false; - private boolean expand = false; + protected boolean expand = false; private TreeNodeModel model; Index: src/org/jboss/tools/smooks/gef/tree/figures/TreeContainerFigure.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/figures/TreeContainerFigure.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/figures/TreeContainerFigure.java (working copy) @@ -37,9 +37,13 @@ private TreeContainerModel model; - private Color headerColor = ColorConstants.button; + private Color targetHeaderColor = GraphicsConstants.TB_BG_CORLOR; + + private Color sourceHeaderColor = ColorConstants.orange; - protected Color headerSelectedColor = GraphicsConstants.TB_BG_CORLOR; + protected Color targetHeaderSelectedColor = FigureUtilities.lighter(targetHeaderColor); + + protected Color sourceHeaderSelectedColor = FigureUtilities.lighter(sourceHeaderColor); private boolean focus; @@ -53,6 +57,8 @@ private boolean showDragLink = false; + private boolean isSource = true; + public TreeContainerFigure(TreeContainerModel model) { super(); this.model = model; @@ -60,6 +66,21 @@ hookFigure(); } + /** + * @return the isSource + */ + public boolean isSource() { + return isSource; + } + + /** + * @param isSource + * the isSource to set + */ + public void setSource(boolean isSource) { + this.isSource = isSource; + } + protected void hookFigure() { this.addMouseMotionListener(new MouseMotionListener() { @@ -263,9 +284,13 @@ protected void drawHeaderFigure(Graphics graphics) { try { graphics.pushState(); - Color currentColor = headerColor; + Color currentColor = sourceHeaderColor; + if (!isSource) + currentColor = targetHeaderColor; if (isSelected() || isFocus()) { - currentColor = headerSelectedColor; + currentColor = sourceHeaderSelectedColor; + if (!isSource) + currentColor = targetHeaderSelectedColor; } if (showHightlight && highlightColor != null) { currentColor = highlightColor; @@ -302,11 +327,11 @@ } public Color getHeaderColor() { - return headerColor; + return targetHeaderColor; } public void setHeaderColor(Color headerColor) { - this.headerColor = headerColor; + this.targetHeaderColor = headerColor; } public Rectangle getBounds() { Index: src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeEditPart.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeEditPart.java (working copy) @@ -28,6 +28,8 @@ import org.eclipse.gef.tools.DirectEditManager; import org.eclipse.jface.viewers.TextCellEditor; import org.eclipse.swt.graphics.Image; +import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator; +import org.jboss.tools.smooks.configuration.editors.GraphicsConstants; import org.jboss.tools.smooks.gef.tree.editpolicy.FigureHighlightEditPolicy; import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeGraphicalNodeEditPolicy; import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeSelectEditPolicy; @@ -41,6 +43,7 @@ import org.jboss.tools.smooks.gef.tree.model.IConnectableNode; import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; import org.jboss.tools.smooks.graphical.editors.editparts.SmooksGraphUtil; +import org.jboss.tools.smooks.graphical.editors.model.IValidatableModel; import org.jboss.tools.smooks.model.graphics.ext.FigureType; import org.jboss.tools.smooks.model.graphics.ext.GraphFactory; import org.jboss.tools.smooks.model.graphics.ext.GraphType; @@ -59,6 +62,10 @@ protected DirectEditManager editManager = null; + protected Label errorLabel = new Label(); + + protected Label warningLabel = new Label(); + @Override protected IFigure createFigure() { TreeNodeModel model = (TreeNodeModel) getModel(); @@ -190,10 +197,28 @@ if (text != null) { ((TreeNodeFigure) getFigure()).setLabelText(text); } + Label tooltip = null; + int serverity = node.getSeverity(); + String message = getSeverityMessage(node); Image image = node.getImage(); + if (serverity == IValidatableModel.NONE) { + image = node.getImage(); + + } + if (serverity == IValidatableModel.ERROR) { + image = SmooksConfigurationActivator.getDefault().getImageRegistry().get(GraphicsConstants.IMAGE_ERROR); + tooltip = errorLabel; + tooltip.setText(message); + } + if (serverity == IValidatableModel.WARNING) { + image = SmooksConfigurationActivator.getDefault().getImageRegistry().get(GraphicsConstants.IMAGE_WARNING); + tooltip = warningLabel; + tooltip.setText(message); + } if (image != null) { ((TreeNodeFigure) getFigure()).setLabelImage(image); } + ((TreeNodeFigure) getFigure()).setToolTip(tooltip); super.refreshVisuals(); // Dimension size = getFigure().getPreferredSize(-1, -1); @@ -203,12 +228,26 @@ // this.getFigure(), rect); } + protected String getSeverityMessage(IValidatableModel model) { + List messages = model.getMessage(); + String message = null; + for (Iterator iterator = messages.iterator(); iterator.hasNext();) { + String string = (String) iterator.next(); + if (message == null) { + message = " - " + string; + } else { + message = message + "\n" + " - " + string; + } + } + return message; + } + public List getModelChildren() { if (childrenLoaded) { TreeNodeModel node = (TreeNodeModel) getModel(); return node.getChildren(); } else { - return Collections.EMPTY_LIST; + return Collections.emptyList(); } } @@ -239,6 +278,9 @@ public void propertyChange(PropertyChangeEvent evt) { String proName = evt.getPropertyName(); + if (TreeNodeModel.PRO_SEVERITY_CHANGED.equals(proName)) { + refreshVisuals(); + } if (TreeNodeModel.PRO_FORCE_VISUAL_CHANGED.equals(proName) || TreeNodeModel.PRO_TEXT_CHANGED.equals(proName)) { refreshVisuals(); } Index: src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/editparts/TreeNodeConnectionEditPart.java (working copy) @@ -15,8 +15,11 @@ import org.eclipse.draw2d.PolylineConnection; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.PointList; +import org.eclipse.gef.DefaultEditDomain; import org.eclipse.gef.EditPolicy; +import org.eclipse.gef.GraphicalViewer; import org.eclipse.gef.editparts.AbstractConnectionEditPart; +import org.eclipse.ui.IEditorPart; import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeConnectionEditPolicy; import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeEndpointEditPolicy; import org.jboss.tools.smooks.gef.tree.figures.LeftOrRightAnchor; @@ -27,6 +30,8 @@ */ public class TreeNodeConnectionEditPart extends AbstractConnectionEditPart { protected int alpha = 255; + + protected boolean canDelete = true; @Override protected void createEditPolicies() { @@ -38,6 +43,26 @@ this.alpha = alpha; } + /** + * @return the canDelete + */ + public boolean isCanDelete() { + return canDelete; + } + + /** + * @param canDelete the canDelete to set + */ + public void setCanDelete(boolean canDelete) { + this.canDelete = canDelete; + } + + protected IEditorPart getEditorPart(){ + GraphicalViewer viewer = (GraphicalViewer) this.getViewer(); + DefaultEditDomain domain = (DefaultEditDomain)viewer.getEditDomain(); + return domain.getEditorPart(); + } + protected IFigure createSourceFlagFigure() { Figure sourceFlagFigure = new Figure() { Index: src/org/jboss/tools/smooks/gef/tree/editparts/TreeContainerEditPart.java =================================================================== --- src/org/jboss/tools/smooks/gef/tree/editparts/TreeContainerEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/tree/editparts/TreeContainerEditPart.java (working copy) @@ -7,6 +7,7 @@ import java.util.List; import org.eclipse.draw2d.IFigure; +import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; @@ -19,6 +20,8 @@ import org.eclipse.gef.tools.ConnectionDragCreationTool; import org.eclipse.swt.graphics.Image; import org.eclipse.ui.IEditorPart; +import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator; +import org.jboss.tools.smooks.configuration.editors.GraphicsConstants; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.gef.tree.editpolicy.FigureHighlightEditPolicy; import org.jboss.tools.smooks.gef.tree.editpolicy.TreeNodeGraphicalNodeEditPolicy; @@ -28,6 +31,7 @@ import org.jboss.tools.smooks.gef.tree.figures.TreeFigureExpansionEvent; import org.jboss.tools.smooks.gef.tree.model.TreeContainerModel; import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; +import org.jboss.tools.smooks.graphical.editors.model.IValidatableModel; import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; /** @@ -58,10 +62,27 @@ if (text != null && model.isHeaderVisable() && getFigure() instanceof TreeContainerFigure) { TreeContainerFigure figure = (TreeContainerFigure) getFigure(); Image i = model.getImage(); + Label tooltip = null; + int serverity = model.getSeverity(); + String message = getSeverityMessage(model); + if (serverity == IValidatableModel.NONE) { + i = model.getImage(); + } + if (serverity == IValidatableModel.ERROR) { + i = SmooksConfigurationActivator.getDefault().getImageRegistry().get(GraphicsConstants.IMAGE_ERROR); + tooltip = errorLabel; + tooltip.setText(message); + } + if (serverity == IValidatableModel.WARNING) { + i = SmooksConfigurationActivator.getDefault().getImageRegistry().get(GraphicsConstants.IMAGE_WARNING); + tooltip = warningLabel; + tooltip.setText(message); + } if (i != null) { figure.setIcon(i); } figure.setText(text); + figure.setToolTip(tooltip); } boolean isSource = this.isSourceLinkNodeEditPart(); if (!isSource) { @@ -134,7 +155,7 @@ public DragTracker getDragTracker(Request request) { Object model = getModel(); if (model instanceof TreeContainerModel && request instanceof SelectionRequest) { - Point location = ((SelectionRequest)request).getLocation(); + Point location = ((SelectionRequest) request).getLocation(); IFigure figure = getFigure(); IFigure figure1 = figure.findFigureAt(location); if (figure1 instanceof DragLinkFigure && ((TreeContainerModel) model).canDragLink()) { Index: src/org/jboss/tools/smooks/gef/common/RootModel.java =================================================================== --- src/org/jboss/tools/smooks/gef/common/RootModel.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/common/RootModel.java (working copy) @@ -7,7 +7,11 @@ import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; -public class RootModel { +public class RootModel extends AbstractSmooksGraphicalModel{ + + public RootModel() { + super(null); + } public static final String ADD_CHILDREN = "__pro_add_children"; @@ -31,6 +35,7 @@ public void removeTreeNode(AbstractSmooksGraphicalModel node) { this.getChildren().remove(node); + node.setParent(null); support.firePropertyChange(REMOVE_CHILDREN, node, null); } @@ -44,6 +49,7 @@ public void addTreeNode(AbstractSmooksGraphicalModel node) { this.getChildren().add(node); + node.setParent(this); support.firePropertyChange(ADD_CHILDREN, null, node); } } Index: src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java =================================================================== --- src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java (revision 18773) +++ src/org/jboss/tools/smooks/gef/model/AbstractSmooksGraphicalModel.java (working copy) @@ -21,12 +21,17 @@ import org.jboss.tools.smooks.gef.tree.model.IConnectableNode; import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection; import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; +import org.jboss.tools.smooks.graphical.editors.model.IValidatableModel; /** * @author Dart * */ -public class AbstractSmooksGraphicalModel implements IConnectableNode { +public class AbstractSmooksGraphicalModel implements IConnectableNode, IValidatableModel { + + private int severity = NONE; + + private List messages = null; public static final String PRO_ADD_CHILD = "_pro_add_child"; @@ -36,6 +41,8 @@ public static final String PRO_ADD_SOURCE_CONNECTION = "_pro_add_source_connected"; + public static final String PRO_SEVERITY_CHANGED = "_pro_severity_changed"; + public static final String PRO_ADD_TARGET_CONNECTION = "_pro_add_target_connected"; public static final String PRO_REMOVE_SOURCE_CONNECTION = "_pro_remove_source_connected"; @@ -89,6 +96,25 @@ // return new TreeNodeModel(model, contentProvider, labelProvider); // } + /** + * @return the severity + */ + public int getSeverity() { + return severity; + } + + /** + * @param severity + * the severity to set + */ + public void setSeverity(int severity) { + if (severity == this.severity) + return; + int old = this.severity; + this.severity = severity; + support.firePropertyChange(PRO_SEVERITY_CHANGED, old, this.severity); + } + public List getChildren() { if (children == null) { children = new ArrayList(); @@ -304,4 +330,15 @@ public void fireVisualChanged() { support.firePropertyChange(PRO_FORCE_VISUAL_CHANGED, new Object(), null); } + + public void addMessage(String message) { + getMessage().add(message); + } + + public List getMessage() { + if(messages == null){ + messages = new ArrayList(); + } + return messages; + } } Index: src/org/jboss/tools/smooks/editor/propertySections/CSVRecordSection.java =================================================================== --- src/org/jboss/tools/smooks/editor/propertySections/CSVRecordSection.java (revision 0) +++ src/org/jboss/tools/smooks/editor/propertySections/CSVRecordSection.java (revision 0) @@ -0,0 +1,181 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.editor.propertySections; + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.gef.GraphicalEditPart; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.forms.widgets.Section; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage; +import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetWidgetFactory; +import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; +import org.jboss.tools.smooks.graphical.editors.editparts.freemarker.FreemarkerCSVNodeEditPart; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerCSVNodeGraphicalModel; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerTemplateGraphicalModel; +import org.jboss.tools.smooks.model.freemarker.Freemarker; +import org.jboss.tools.smooks.model.freemarker.Template; +import org.jboss.tools.smooks.model.smooks.ParamType; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; + +/** + * @author Dart + * + */ +public class CSVRecordSection extends AbstractSmooksPropertySection { + + private Text speratorText; + private Text quoteText; + + private boolean fireEvent = true; + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.views.properties.tabbed.AbstractPropertySection#createControls + * (org.eclipse.swt.widgets.Composite, + * org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage) + */ + @Override + public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) { + super.createControls(parent, aTabbedPropertySheetPage); + TabbedPropertySheetWidgetFactory factory = aTabbedPropertySheetPage.getWidgetFactory(); + + Section section = createRootSection(factory, parent); + section.setText("CSV Properties"); + Composite mainComposite = factory.createComposite(section); + section.setClient(mainComposite); + + GridLayout gl = new GridLayout(); + gl.numColumns = 2; + mainComposite.setLayout(gl); + + factory.createLabel(mainComposite, "Sperator Character : "); + speratorText = factory.createText(mainComposite, ""); + speratorText.setTextLimit(1); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + speratorText.setLayoutData(gd); + + factory.createLabel(mainComposite, "Quote Character : "); + quoteText = factory.createText(mainComposite, ""); + quoteText.setTextLimit(1); + gd = new GridData(GridData.FILL_HORIZONTAL); + quoteText.setLayoutData(gd); + hookTextControls(); + } + + private Template getFreemarkerTemplate() { + Object graphModel = this.getPresentSelectedGraphModel(); + if (graphModel instanceof AbstractSmooksGraphicalModel) { + AbstractSmooksGraphicalModel templateGModel = (AbstractSmooksGraphicalModel) graphModel; + while (templateGModel != null && !(templateGModel instanceof FreemarkerTemplateGraphicalModel)) { + templateGModel = templateGModel.getParent(); + } + if (templateGModel != null) { + Object freemarker = templateGModel.getData(); + freemarker = AdapterFactoryEditingDomain.unwrap(freemarker); + if (freemarker instanceof Freemarker) { + return ((Freemarker) freemarker).getTemplate(); + } + } + } + return null; + } + + private FreemarkerCSVNodeEditPart getRecordCSVEditPart(){ + GraphicalEditPart editPart = getPresentSelectedEditPart(); + List children = editPart.getChildren(); + for (Iterator iterator = children.iterator(); iterator.hasNext();) { + Object childEditPart = (Object) iterator.next(); + if(childEditPart instanceof FreemarkerCSVNodeEditPart){ + return ((FreemarkerCSVNodeEditPart)childEditPart); + } + } + return null; + } + + private void generateNewTemplateContent(){ + FreemarkerCSVNodeEditPart editPart = getRecordCSVEditPart(); + if(editPart != null){ + Object data = editPart.getModel(); + if(data instanceof FreemarkerCSVNodeGraphicalModel){ + ((FreemarkerCSVNodeGraphicalModel)data).changeFreemarkerContents(); + } + } + } + + private void hookTextControls() { + speratorText.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + if (fireEvent) { + Template template = getFreemarkerTemplate(); + if (template != null) { + ParamType param = SmooksModelUtils.getParam(template, SmooksModelUtils.KEY_CSV_SEPERATOR); + if (param == null) + return; + SmooksModelUtils.setTextToSmooksType(getSmooksModelProvider().getEditingDomain(), param, + speratorText.getText()); + generateNewTemplateContent(); + } + } + } + }); + + quoteText.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + if (fireEvent) { + Template template = getFreemarkerTemplate(); + if (template != null) { + ParamType param = SmooksModelUtils.getParam(template, SmooksModelUtils.KEY_CSV_QUOTE); + if (param == null) + return; + SmooksModelUtils.setTextToSmooksType(getSmooksModelProvider().getEditingDomain(), param, + quoteText.getText()); + generateNewTemplateContent(); + } + } + } + }); + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.editor.propertySections.AbstractSmooksPropertySection + * #refresh() + */ + @Override + public void refresh() { + fireEvent = false; + super.refresh(); + + Template template = getFreemarkerTemplate(); + if (template != null) { + String quote = SmooksModelUtils.getParamValue(template, SmooksModelUtils.KEY_CSV_QUOTE); + String sperator = SmooksModelUtils.getParamValue(template, SmooksModelUtils.KEY_CSV_SEPERATOR); + + speratorText.setText(sperator); + quoteText.setText(quote); + } + + fireEvent = true; + } + +} Index: src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java =================================================================== --- src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java (revision 18773) +++ src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSectionFilter.java (working copy) @@ -12,7 +12,11 @@ import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.jface.viewers.IFilter; +import org.eclipse.ui.IEditorPart; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; +import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart; +import org.jboss.tools.smooks.graphical.editors.SmooksFreemarkerTemplateGraphicalEditor; +import org.jboss.tools.smooks.graphical.editors.editparts.AbstractResourceConfigChildNodeEditPart; import org.jboss.tools.smooks.graphical.editors.editparts.javamapping.JavaBeanChildNodeEditPart; import org.jboss.tools.smooks.model.javabean.ValueType; @@ -31,6 +35,12 @@ if (toTest == null) return false; if (toTest instanceof JavaBeanChildNodeEditPart) { + IEditorPart editorPart = ((AbstractResourceConfigChildNodeEditPart)toTest).getEditorPart(); + if(toTest instanceof JavaBeanChildNodeEditPart && editorPart instanceof IGraphicalEditorPart){ + if(SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart)editorPart).getID())){ + return false; + } + } AbstractSmooksGraphicalModel model = (AbstractSmooksGraphicalModel) ((JavaBeanChildNodeEditPart) toTest) .getModel(); Object data = model.getData(); Index: src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java =================================================================== --- src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java (revision 18773) +++ src/org/jboss/tools/smooks/editor/propertySections/ValueDecodeParamSection.java (working copy) @@ -82,7 +82,7 @@ TabbedPropertySheetWidgetFactory factory = aTabbedPropertySheetPage.getWidgetFactory(); Section section = createRootSection(factory, parent); - section.setText("Validation Rules Setting"); + section.setText("Decode Parameters"); controlComposite = factory.createComposite(section, SWT.NONE); Index: src/org/jboss/tools/smooks/editor/propertySections/AbstractSmooksPropertySection.java =================================================================== --- src/org/jboss/tools/smooks/editor/propertySections/AbstractSmooksPropertySection.java (revision 18773) +++ src/org/jboss/tools/smooks/editor/propertySections/AbstractSmooksPropertySection.java (working copy) @@ -51,6 +51,17 @@ } return null; } + + protected GraphicalEditPart getPresentSelectedEditPart() { + IStructuredSelection selection = (IStructuredSelection) this.getSelection(); + if(selection == null) return null; + if(selection.size() > 1) return null; + Object obj = selection.getFirstElement(); + if (obj != null && obj instanceof GraphicalEditPart) { + return (GraphicalEditPart)obj; + } + return null; + } protected Object getPresentSelectedModel() { IStructuredSelection selection = (IStructuredSelection) this.getSelection(); @@ -66,6 +77,18 @@ } return null; } + + protected Object getPresentSelectedGraphModel() { + IStructuredSelection selection = (IStructuredSelection) this.getSelection(); + if(selection == null) return null; + if(selection.size() > 1) return null; + Object obj = selection.getFirstElement(); + if (obj != null && obj instanceof GraphicalEditPart) { + Object gmodel = ((GraphicalEditPart) obj).getModel(); + return gmodel; + } + return null; + } protected IEditorPart getEditorPart() { IStructuredSelection selection = (IStructuredSelection) this.getSelection(); Index: src/org/jboss/tools/smooks/editor/propertySections/CSVRecordSectionFilter.java =================================================================== --- src/org/jboss/tools/smooks/editor/propertySections/CSVRecordSectionFilter.java (revision 0) +++ src/org/jboss/tools/smooks/editor/propertySections/CSVRecordSectionFilter.java (revision 0) @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.editor.propertySections; + +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jface.viewers.IFilter; +import org.jboss.tools.smooks.graphical.editors.editparts.freemarker.FreemarkerCSVNodeEditPart; +import org.jboss.tools.smooks.graphical.editors.editparts.freemarker.FreemarkerTemplateEditPart; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.CSVNodeModel; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerCSVNodeGraphicalModel; + +/** + * @author Dart + * + */ +public class CSVRecordSectionFilter implements IFilter { + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.viewers.IFilter#select(java.lang.Object) + */ + public boolean select(Object toTest) { + if (toTest instanceof FreemarkerTemplateEditPart) { + List children = ((FreemarkerTemplateEditPart) toTest).getChildren(); + for (Iterator iterator = children.iterator(); iterator.hasNext();) { + Object childEditPart = (Object) iterator.next(); + try{ + if (childEditPart instanceof FreemarkerCSVNodeEditPart) { + FreemarkerCSVNodeGraphicalModel gmodel = (FreemarkerCSVNodeGraphicalModel) ((FreemarkerCSVNodeEditPart) childEditPart) + .getModel(); + CSVNodeModel model = (CSVNodeModel) gmodel.getData(); + if (model.isRecord()) { + return true; + } + } + }catch(Exception e){ + e.printStackTrace(); + } + } + } + return false; + } +} Index: src/org/jboss/tools/smooks/editor/propertySections/SmooksPropertySectionFilter.java =================================================================== --- src/org/jboss/tools/smooks/editor/propertySections/SmooksPropertySectionFilter.java (revision 18773) +++ src/org/jboss/tools/smooks/editor/propertySections/SmooksPropertySectionFilter.java (working copy) @@ -11,8 +11,13 @@ package org.jboss.tools.smooks.editor.propertySections; import org.eclipse.jface.viewers.IFilter; +import org.eclipse.ui.IEditorPart; +import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart; +import org.jboss.tools.smooks.graphical.editors.SmooksFreemarkerTemplateGraphicalEditor; import org.jboss.tools.smooks.graphical.editors.editparts.AbstractResourceConfigChildNodeEditPart; import org.jboss.tools.smooks.graphical.editors.editparts.AbstractResourceConfigEditPart; +import org.jboss.tools.smooks.graphical.editors.editparts.javamapping.JavaBeanChildNodeEditPart; +import org.jboss.tools.smooks.graphical.editors.editparts.javamapping.JavaBeanEditPart; /** * @author Dart @@ -26,9 +31,21 @@ public boolean select(Object toTest) { if(toTest == null) return false; if(toTest instanceof AbstractResourceConfigEditPart){ + IEditorPart editorPart = ((AbstractResourceConfigEditPart)toTest).getEditorPart(); + if(toTest instanceof JavaBeanEditPart && editorPart instanceof IGraphicalEditorPart){ + if(SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart)editorPart).getID())){ + return false; + } + } return true; } if(toTest instanceof AbstractResourceConfigChildNodeEditPart){ + IEditorPart editorPart = ((AbstractResourceConfigChildNodeEditPart)toTest).getEditorPart(); + if(toTest instanceof JavaBeanChildNodeEditPart && editorPart instanceof IGraphicalEditorPart){ + if(SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart)editorPart).getID())){ + return false; + } + } return true; } return false; Index: src/org/jboss/tools/smooks/graphical/actions/AbstractProcessGraphAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/AbstractProcessGraphAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/AbstractProcessGraphAction.java (working copy) @@ -19,6 +19,7 @@ import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.ui.IEditorPart; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.model.graphics.ext.TaskType; @@ -32,8 +33,11 @@ protected ISelection currentSelection = null; - public AbstractProcessGraphAction(String text , ISmooksModelProvider provider){ + protected IEditorPart editorPart; + + public AbstractProcessGraphAction(String text , ISmooksModelProvider provider , IEditorPart editorPart){ super(); + this.editorPart = editorPart; this.provider = provider; this.setText(text); init(); Index: src/org/jboss/tools/smooks/graphical/actions/AddNextTaskNodeAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/AddNextTaskNodeAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/AddNextTaskNodeAction.java (working copy) @@ -10,21 +10,42 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.actions; +import java.util.Iterator; +import java.util.List; + import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.ecore.util.FeatureMapUtil; import org.eclipse.emf.edit.command.AddCommand; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.ui.IEditorPart; +import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.editor.ISmooksModelProvider; +import org.jboss.tools.smooks.graphical.editors.TaskTypeManager; +import org.jboss.tools.smooks.graphical.wizard.TemplateMessageTypeWizard; +import org.jboss.tools.smooks.graphical.wizard.freemarker.FreemarkerCSVTemplateCreationWizard; +import org.jboss.tools.smooks.model.freemarker.Freemarker; +import org.jboss.tools.smooks.model.freemarker.FreemarkerFactory; +import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage; import org.jboss.tools.smooks.model.graphics.ext.GraphFactory; import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; import org.jboss.tools.smooks.model.graphics.ext.TaskType; +import org.jboss.tools.smooks.model.smooks.ParamType; +import org.jboss.tools.smooks.model.smooks.SmooksFactory; +import org.jboss.tools.smooks.model.smooks.SmooksPackage; +import org.jboss.tools.smooks.model.smooks.SmooksResourceListType; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart * */ public class AddNextTaskNodeAction extends AddTaskNodeAction { - - public AddNextTaskNodeAction(String taskID, String text, ISmooksModelProvider provider) { - super(taskID, text, provider); + + public AddNextTaskNodeAction(String taskID, String text, ISmooksModelProvider provider, IEditorPart editor) { + super(taskID, text, provider, editor); } @Override @@ -36,23 +57,113 @@ public void run() { super.run(); if (this.provider != null) { - TaskType parentTask = this.getCurrentSelectedTask().get(0); - TaskType childTask = GraphFactory.eINSTANCE.createTaskType(); - childTask.setId(taskID); - childTask.setName(this.getText()); - Command command = AddCommand.create(provider.getEditingDomain(), parentTask, - GraphPackage.Literals.TASK_TYPE__TASK, childTask); - provider.getEditingDomain().getCommandStack().execute(command); + SmooksResourceListType resourceList = SmooksUIUtils.getSmooks11ResourceListType(provider.getSmooksModel()); + if (taskID.equals(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE)) { + // open wizard + TemplateMessageTypeWizard wizard = new TemplateMessageTypeWizard(); + WizardDialog dialog = new WizardDialog(editorPart.getSite().getShell(), wizard); + if (dialog.open() == Dialog.OK) { + // init freemarker model + IWizard currentWizard = wizard.getWizard(); + if (currentWizard instanceof FreemarkerCSVTemplateCreationWizard) { + + List fields = ((FreemarkerCSVTemplateCreationWizard) currentWizard).getFields(); + String fieldsString = ""; + for (Iterator iterator = fields.iterator(); iterator.hasNext();) { + String string = (String) iterator.next(); + fieldsString += string + ","; + } + if (fieldsString.length() > 0) { + fieldsString = fieldsString.substring(0, fieldsString.length() - 1); + } + String quote = ((FreemarkerCSVTemplateCreationWizard) currentWizard).getQuote(); + String seperator = ((FreemarkerCSVTemplateCreationWizard) currentWizard).getSeprator(); + + Freemarker freemarker = FreemarkerFactory.eINSTANCE.createFreemarker(); + + String idref = SmooksModelUtils.generateTaskID(resourceList, Freemarker.class, "freemarker"); + + ParamType idParam = SmooksFactory.eINSTANCE.createParamType(); + idParam.setName(SmooksModelUtils.KEY_OBJECT_ID); + idParam.setStringValue(idref); + + ParamType messageTypeParam = SmooksFactory.eINSTANCE.createParamType(); + messageTypeParam.setName(SmooksModelUtils.KEY_TEMPLATE_TYPE); + messageTypeParam.setStringValue(SmooksModelUtils.FREEMARKER_TEMPLATE_TYPE_CSV); + + ParamType quoteParam = SmooksFactory.eINSTANCE.createParamType(); + quoteParam.setName(SmooksModelUtils.KEY_CSV_QUOTE); + quoteParam.setStringValue(quote); + + ParamType speratorParam = SmooksFactory.eINSTANCE.createParamType(); + speratorParam.setName(SmooksModelUtils.KEY_CSV_SEPERATOR); + speratorParam.setStringValue(seperator); + + ParamType fieldsParam = SmooksFactory.eINSTANCE.createParamType(); + fieldsParam.setName(SmooksModelUtils.KEY_CSV_FIELDS); + fieldsParam.setStringValue(fieldsString); + + SmooksModelUtils.addParam(freemarker.getTemplate(), messageTypeParam); + SmooksModelUtils.addParam(freemarker.getTemplate(), quoteParam); + SmooksModelUtils.addParam(freemarker.getTemplate(), speratorParam); + SmooksModelUtils.addParam(freemarker.getTemplate(), fieldsParam); + freemarker.getParam().add(idParam); + + Command addFreemarkerCommand = AddCommand.create(this.provider.getEditingDomain(), + resourceList, + SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP, + FeatureMapUtil.createEntry(FreemarkerPackage.Literals.DOCUMENT_ROOT__FREEMARKER, + freemarker)); + TaskType parentTask = this.getCurrentSelectedTask().get(0); + TaskType childTask = GraphFactory.eINSTANCE.createTaskType(); + childTask.setId(taskID); + childTask.setName(this.getText()); + Command addTaskCommand = AddCommand.create(provider.getEditingDomain(), parentTask, + GraphPackage.Literals.TASK_TYPE__TASK, childTask); + + ParamType idrefParam = SmooksFactory.eINSTANCE.createParamType(); + idrefParam.setName(SmooksModelUtils.KEY_TASK_ID_REF); + + idrefParam.setStringValue(idref); + SmooksModelUtils.addParam(childTask, idrefParam); + + CompoundCommand cc = new CompoundCommand(); + cc.append(addFreemarkerCommand); + cc.append(addTaskCommand); + + provider.getEditingDomain().getCommandStack().execute(cc); + } + } else { + return; + } + } else { + Command command = createAddTaskCommand(); + provider.getEditingDomain().getCommandStack().execute(command); + } } } + private Command createAddTaskCommand() { + TaskType parentTask = this.getCurrentSelectedTask().get(0); + TaskType childTask = GraphFactory.eINSTANCE.createTaskType(); + childTask.setId(taskID); + childTask.setName(this.getText()); + Command command = AddCommand.create(provider.getEditingDomain(), parentTask, + GraphPackage.Literals.TASK_TYPE__TASK, childTask); + return command; + } + + protected TaskType createTaskType() { + return GraphFactory.eINSTANCE.createTaskType(); + } + @Override public void update() { super.update(); if (this.isEnabled()) { TaskType testTaskType = GraphFactory.eINSTANCE.createTaskType(); testTaskType.setId(taskID); - setEnabled(rules.isNextTask(this.getCurrentSelectedTask().get(0),testTaskType)); + setEnabled(rules.isNextTask(this.getCurrentSelectedTask().get(0), testTaskType)); } } Index: src/org/jboss/tools/smooks/graphical/actions/AddTaskNodeAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/AddTaskNodeAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/AddTaskNodeAction.java (working copy) @@ -1,5 +1,6 @@ package org.jboss.tools.smooks.graphical.actions; +import org.eclipse.ui.IEditorPart; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.graphical.editors.TaskTypeManager; import org.jboss.tools.smooks.model.graphics.ext.TaskType; @@ -8,10 +9,11 @@ protected String taskID = null; + protected TaskTypeRules rules = new TaskTypeRules(); - public AddTaskNodeAction(String taskID, String text, ISmooksModelProvider provider) { - super(text, provider); + public AddTaskNodeAction(String taskID, String text, ISmooksModelProvider provider, IEditorPart editorPart) { + super(text, provider,editorPart); this.taskID = taskID; } Index: src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java (working copy) @@ -19,11 +19,13 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.util.FeatureMapUtil; import org.eclipse.emf.edit.command.RemoveCommand; +import org.eclipse.ui.IEditorPart; import org.eclipse.ui.ISharedImages; import org.eclipse.ui.PlatformUI; import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.graphical.editors.TaskTypeManager; +import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; import org.jboss.tools.smooks.model.graphics.ext.ProcessesType; import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; import org.jboss.tools.smooks.model.graphics.ext.TaskType; @@ -36,8 +38,8 @@ */ public class DeleteTaskNodeAction extends AbstractProcessGraphAction { - public DeleteTaskNodeAction(ISmooksModelProvider provider) { - super("Delete", provider); + public DeleteTaskNodeAction(ISmooksModelProvider provider, IEditorPart editor) { + super("Delete", provider, editor); } @Override @@ -50,9 +52,9 @@ @Override public void update() { List taskList = this.getCurrentSelectedTask(); - if(!taskList.isEmpty() && taskList.size() == 1){ + if (!taskList.isEmpty() && taskList.size() == 1) { TaskType task = taskList.get(0); - if(TaskTypeManager.TASK_ID_INPUT.equals(task.getId())){ + if (TaskTypeManager.TASK_ID_INPUT.equals(task.getId())) { this.setEnabled(false); return; } @@ -78,8 +80,7 @@ if (listType != null) { for (Iterator iterator = allTask.iterator(); iterator.hasNext();) { TaskType taskType = (TaskType) iterator.next(); - List elements = TaskTypeManager.getAssociatedSmooksElements(taskType.getId(), - listType); + List elements = TaskTypeManager.getAssociatedSmooksElements(taskType, listType); if (elements != null && !elements.isEmpty()) { associatedElements.addAll(elements); } @@ -87,12 +88,17 @@ } Command remove = null; if (associatedElements.isEmpty()) { - remove = RemoveCommand.create(p.getEditingDomain(), currentTask); + remove = RemoveCommand.create(p.getEditingDomain(), currentTask.eContainer(), + GraphPackage.Literals.TASK_TYPE__TASK, currentTask); p.getEditingDomain().getCommandStack().execute(remove); } else { associatedElements = getDeletedObjects(associatedElements); CompoundCommand ccommand = new CompoundCommand(); - ccommand.append(RemoveCommand.create(p.getEditingDomain(), currentTask)); + Command removeTaskCommand = RemoveCommand.create(p.getEditingDomain(), + currentTask.eContainer(), GraphPackage.Literals.TASK_TYPE__TASK, currentTask); + if (removeTaskCommand.canExecute()) { + ccommand.append(removeTaskCommand); + } remove = RemoveCommand.create(p.getEditingDomain(), listType, SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP, associatedElements); Index: src/org/jboss/tools/smooks/graphical/actions/AddInputTaskAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/AddInputTaskAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/AddInputTaskAction.java (working copy) @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package org.jboss.tools.smooks.graphical.actions; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.edit.command.AddCommand; -import org.jboss.tools.smooks.editor.ISmooksModelProvider; -import org.jboss.tools.smooks.graphical.editors.TaskTypeManager; -import org.jboss.tools.smooks.model.graphics.ext.GraphFactory; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.ProcessType; -import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; -import org.jboss.tools.smooks.model.graphics.ext.TaskType; - -/** - * @author Dart - * - */ -public class AddInputTaskAction extends AddNextTaskNodeAction { - - - - public AddInputTaskAction(ISmooksModelProvider provider) { - super(TaskTypeManager.TASK_ID_INPUT, "Add Input Task", provider); - } - - @Override - public void run() { - if (this.provider != null) { - SmooksGraphicsExtType graph = provider.getSmooksGraphicsExt(); - ProcessType process = graph.getProcesses().getProcess(); - if (process != null && process.getTask().isEmpty()) { - TaskType childTask = GraphFactory.eINSTANCE.createTaskType(); - childTask.setId(taskID); - childTask.setName("Input Task"); - Command command = AddCommand.create(provider.getEditingDomain(), process, - GraphPackage.Literals.PROCESS_TYPE__TASK, childTask); - provider.getEditingDomain().getCommandStack().execute(command); - } - } - } - - @Override - public void update() { - this.setEnabled(false); - SmooksGraphicsExtType graph = provider.getSmooksGraphicsExt(); - ProcessType process = graph.getProcesses().getProcess(); - if (process != null && process.getTask().isEmpty()) { - this.setEnabled(true); - } - } -} Index: src/org/jboss/tools/smooks/graphical/actions/AddPreviousTaskNodeAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/AddPreviousTaskNodeAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/AddPreviousTaskNodeAction.java (working copy) @@ -1,84 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package org.jboss.tools.smooks.graphical.actions; - -import org.eclipse.emf.common.command.Command; -import org.eclipse.emf.common.command.CompoundCommand; -import org.eclipse.emf.ecore.EObject; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.util.EcoreUtil; -import org.eclipse.emf.edit.command.AddCommand; -import org.eclipse.emf.edit.command.DeleteCommand; -import org.jboss.tools.smooks.editor.ISmooksModelProvider; -import org.jboss.tools.smooks.model.graphics.ext.GraphFactory; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.ProcessType; -import org.jboss.tools.smooks.model.graphics.ext.TaskType; - -/** - * @author Dart - * - */ -public class AddPreviousTaskNodeAction extends AddTaskNodeAction { - - public AddPreviousTaskNodeAction(String taskID, String text, ISmooksModelProvider provider) { - super(taskID, text, provider); - // TODO Auto-generated constructor stub - } - - @Override - protected void init() { - super.init(); - } - - @Override - public void run() { - super.run(); - if (this.provider != null) { - TaskType parentTask = this.getCurrentSelectedTask().get(0); - EObject pp = parentTask.eContainer(); - TaskType childTask = GraphFactory.eINSTANCE.createTaskType(); - childTask.setId(taskID); - childTask.setName(this.getText()); - CompoundCommand cc = new CompoundCommand(); - Command command = DeleteCommand.create(provider.getEditingDomain(), parentTask); - cc.append(command); - childTask.getTask().add((TaskType) EcoreUtil.copy(parentTask)); - EStructuralFeature feature = null; - if (pp instanceof ProcessType) { - feature = GraphPackage.Literals.PROCESS_TYPE__TASK; - } - if (pp instanceof TaskType) { - feature = GraphPackage.Literals.TASK_TYPE__TASK; - } - if (feature != null) { - Command command1 = AddCommand.create(provider.getEditingDomain(), pp, feature, childTask); - cc.append(command1); - try { - provider.getEditingDomain().getCommandStack().execute(cc); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } - - @Override - public void update() { - super.update(); - if (this.isEnabled()) { - TaskType testTaskType = GraphFactory.eINSTANCE.createTaskType(); - testTaskType.setId(taskID); - setEnabled(rules.isPreTask(this.getCurrentSelectedTask().get(0),testTaskType)); - } - } - -} Index: src/org/jboss/tools/smooks/graphical/actions/TaskTypeRules.java =================================================================== --- src/org/jboss/tools/smooks/graphical/actions/TaskTypeRules.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/actions/TaskTypeRules.java (working copy) @@ -10,11 +10,14 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.actions; +import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.eclipse.emf.ecore.EObject; +import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.graphical.editors.TaskTypeManager; +import org.jboss.tools.smooks.model.graphics.ext.ProcessType; import org.jboss.tools.smooks.model.graphics.ext.TaskType; /** @@ -27,24 +30,43 @@ TaskType parentTask = testTask; String parentID = parentTask.getId(); + EObject parent = currentTask; + while (!(parent instanceof ProcessType)) { + parent = parent.eContainer(); + } + + List currentList = ((ProcessType) parent).getTask(); + List taskList = new ArrayList(); + for (Iterator iterator = currentList.iterator(); iterator.hasNext();) { + TaskType taskType = (TaskType) iterator.next(); + SmooksUIUtils.fillAllTask(taskType, taskList); + } + if (parentID.equals(TaskTypeManager.TASK_ID_INPUT)) { // if (!SmooksConstants.TASK_ID_JAVA_MAPPING.equals(taskID)) return false; } + if (parentID.equals(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE)) { + if (!TaskTypeManager.TASK_ID_JAVA_MAPPING.equals(currentTask.getId())) { + return false; + } + return true; + } if (parentID.equals(TaskTypeManager.TASK_ID_JAVA_MAPPING)) { if (!TaskTypeManager.TASK_ID_INPUT.equals(currentTask.getId())) { return false; } else { - EObject obj = parentTask.eContainer(); - if (obj instanceof TaskType) { - if (TaskTypeManager.TASK_ID_INPUT.equals(((TaskType) obj).getId())) { + for (Iterator iterator = taskList.iterator(); iterator.hasNext();) { + TaskType taskType = (TaskType) iterator.next(); + if (TaskTypeManager.TASK_ID_JAVA_MAPPING.equals(taskType.getId())) { return false; } } + return true; } } - return true; + return false; } public boolean isPreTask(TaskType currentTask, TaskType testTask) { Index: src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java (working copy) @@ -28,6 +28,8 @@ import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.command.CommandWrapper; import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.common.util.Diagnostic; +import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.command.AddCommand; @@ -75,6 +77,7 @@ import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataContentProvider; import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataLabelProvider; +import org.jboss.tools.smooks.configuration.validate.ISmooksModelValidateListener; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.editor.ISourceSynchronizeListener; import org.jboss.tools.smooks.gef.common.RootModel; @@ -90,9 +93,11 @@ import org.jboss.tools.smooks.graphical.editors.commands.IgnoreException; import org.jboss.tools.smooks.graphical.editors.editparts.InputDataContainerEditPart; import org.jboss.tools.smooks.graphical.editors.editparts.SmooksGraphUtil; +import org.jboss.tools.smooks.graphical.editors.model.IValidatableModel; import org.jboss.tools.smooks.graphical.editors.model.InputDataContianerModel; import org.jboss.tools.smooks.graphical.editors.model.InputDataRootModel; import org.jboss.tools.smooks.graphical.editors.model.InputDataTreeNodeModel; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerCSVNodeGraphicalModel; import org.jboss.tools.smooks.graphical.editors.model.javamapping.JavaBeanChildGraphModel; import org.jboss.tools.smooks.graphical.editors.model.javamapping.JavaBeanGraphModel; import org.jboss.tools.smooks.graphical.editors.model.xsl.XSLNodeGraphicalModel; @@ -101,6 +106,7 @@ import org.jboss.tools.smooks.model.graphics.ext.GraphType; import org.jboss.tools.smooks.model.graphics.ext.ISmooksGraphChangeListener; import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; +import org.jboss.tools.smooks.model.graphics.ext.TaskType; import org.jboss.tools.smooks.model.smooks.DocumentRoot; import org.jboss.tools.smooks.model.smooks.SmooksResourceListType; import org.jboss.tools.smooks.model.validation10.RuleType; @@ -110,7 +116,8 @@ * */ public class SmooksGraphicalEditorPart extends GraphicalEditor implements ISelectionChangedListener, - ISourceSynchronizeListener, ISmooksGraphChangeListener, IGraphicalEditorPart { + ISourceSynchronizeListener, ISmooksGraphChangeListener, IGraphicalEditorPart, ITaskNodeProvider, + ISmooksModelValidateListener { public static final int EXECUTE_COMMAND = 0; @@ -136,6 +143,8 @@ protected ConnectionModelFactory connectionModelFactory; + protected TaskType taskType; + public SmooksGraphicalEditorPart(ISmooksModelProvider provider) { super(); this.editDomain = new DefaultEditDomain(this); @@ -171,7 +180,21 @@ this.smooksModelProvider = provider; this.setEditDomain(editDomain); } - + + /** + * @return the taskType + */ + public TaskType getTaskType() { + return taskType; + } + + /** + * @param taskType + * the taskType to set + */ + public void setTaskType(TaskType taskType) { + this.taskType = taskType; + } @Override public void createPartControl(Composite parent) { @@ -192,7 +215,7 @@ super.createPartControl(parent); } - + public GraphicalViewer getGraphicalViewer() { return super.getGraphicalViewer(); } @@ -585,11 +608,12 @@ return editDomain; } -// @Override -// protected void configurePaletteViewer() { -// super.configurePaletteViewer(); -// getPaletteViewer().addDragSourceListener(new TemplateTransferDragSourceListener(getPaletteViewer())); -// } + // @Override + // protected void configurePaletteViewer() { + // super.configurePaletteViewer(); + // getPaletteViewer().addDragSourceListener(new + // TemplateTransferDragSourceListener(getPaletteViewer())); + // } protected EditPartFactory createEdtiPartFactory() { return new SmooksEditFactory(); @@ -874,6 +898,8 @@ if (model instanceof XSLNodeGraphicalModel) { return true; } + if (model instanceof FreemarkerCSVNodeGraphicalModel) + return true; return false; } @@ -1144,6 +1170,9 @@ if (type == ISmooksModelProvider.class) { return this.smooksModelProvider; } + if (type == ITaskNodeProvider.class) { + return this; + } return super.getAdapter(type); } @@ -1173,13 +1202,15 @@ initGraphicalModel(); } -// @Override -// protected PaletteRoot getPaletteRoot() { -// SmooksGraphicalEditorPaletteRootCreator creator = new SmooksGraphicalEditorPaletteRootCreator( -// this.smooksModelProvider, (AdapterFactoryEditingDomain) this.smooksModelProvider.getEditingDomain(), -// getSmooksResourceListType()); -// return creator.createPaletteRoot(); -// } + // @Override + // protected PaletteRoot getPaletteRoot() { + // SmooksGraphicalEditorPaletteRootCreator creator = new + // SmooksGraphicalEditorPaletteRootCreator( + // this.smooksModelProvider, (AdapterFactoryEditingDomain) + // this.smooksModelProvider.getEditingDomain(), + // getSmooksResourceListType()); + // return creator.createPaletteRoot(); + // } public SmooksResourceListType getSmooksResourceListType() { if (smooksModelProvider != null) { @@ -1239,4 +1270,86 @@ public String getID() { return null; } + + protected void cleanValidationMarker() { + if (root == null) + return; + List children = root.getChildren(); + for (Iterator iterator = children.iterator(); iterator.hasNext();) { + AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next(); + cleanValidationMarker(abstractSmooksGraphicalModel); + } + } + + protected void cleanValidationMarker(AbstractSmooksGraphicalModel model) { + model.setSeverity(IValidatableModel.NONE); + model.getMessage().clear(); + List children = model.getChildrenWithoutDynamic(); + for (Iterator iterator = children.iterator(); iterator.hasNext();) { + AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next(); + cleanValidationMarker(abstractSmooksGraphicalModel); + } + } + + public void validateEnd(List diagnosticResult) { + if (root == null) + return; + cleanValidationMarker(); + for (Iterator iterator = diagnosticResult.iterator(); iterator.hasNext();) { + Diagnostic diagnostic = (Diagnostic) iterator.next(); + refreshValidateResult(diagnostic); + } + } + + protected void refreshValidateResult(Diagnostic diagnostic) { + int severity = diagnostic.getSeverity(); + String message = diagnostic.getMessage(); + if (severity == Diagnostic.ERROR || severity == Diagnostic.WARNING) { + List datas = diagnostic.getData(); + AbstractSmooksGraphicalModel obj = null; + for (Iterator iterator2 = datas.iterator(); iterator2.hasNext();) { + Object object = (Object) iterator2.next(); + object = AdapterFactoryEditingDomain.unwrap(object); + if (object instanceof EObject) { + AbstractSmooksGraphicalModel graphModel = SmooksGraphUtil.findSmooksGraphModel(root, object); + if (graphModel == null) + continue; + obj = graphModel; + if (graphModel instanceof IValidatableModel) { + // ((IValidatableModel) + // graphModel).setSeverity(severity); + } + } + } + if (obj != null) { + for (Iterator iterator2 = datas.iterator(); iterator2.hasNext();) { + Object object = (Object) iterator2.next(); + object = AdapterFactoryEditingDomain.unwrap(object); + if (object instanceof EAttribute && obj != null) { + if (obj instanceof IValidatableModel) { + ((IValidatableModel) obj).addMessage(message); + // int s = ((IValidatableModel) obj).getSeverity(); + // if (s == IValidatableModel.ERROR && severity == + // IValidatableModel.WARNING) { + // // if the serverity is error already , dont set + // it + // // to be warning; + // } else { + // } + } + } + } + ((IValidatableModel) obj).setSeverity(severity); + } + } + List children = diagnostic.getChildren(); + for (Iterator iterator = children.iterator(); iterator.hasNext();) { + Diagnostic diagnostic2 = (Diagnostic) iterator.next(); + refreshValidateResult(diagnostic2); + } + } + + public void validateStart() { + + } } Index: src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java (working copy) @@ -17,6 +17,7 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.edit.command.AddCommand; import org.eclipse.emf.edit.command.SetCommand; import org.eclipse.emf.edit.domain.IEditingDomainProvider; @@ -31,8 +32,11 @@ import org.jboss.tools.smooks.model.javabean.BindingsType; import org.jboss.tools.smooks.model.javabean12.BeanType; import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig; +import org.jboss.tools.smooks.model.smooks.ParamType; +import org.jboss.tools.smooks.model.smooks.SmooksFactory; import org.jboss.tools.smooks.model.smooks.SmooksResourceListType; import org.jboss.tools.smooks.model.xsl.Xsl; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart @@ -47,8 +51,9 @@ Assert.isNotNull(this.domainProvider); } - public List analyzeTaskID(SmooksResourceListType resourceList) { + public List analyzeTaskID(SmooksResourceListType resourceList) { List taskIDs = new ArrayList(); + List tasks = new ArrayList(); List resourceConfigList = resourceList.getAbstractResourceConfig(); for (Iterator iterator = resourceConfigList.iterator(); iterator.hasNext();) { AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator.next(); @@ -59,12 +64,36 @@ continue; } taskIDs.add(TaskTypeManager.TASK_ID_JAVA_MAPPING); + + TaskType task = GraphFactory.eINSTANCE.createTaskType(); + task.setId(TaskTypeManager.TASK_ID_JAVA_MAPPING); + task.setName(TaskTypeManager.getTaskLabel(TaskTypeManager.TASK_ID_JAVA_MAPPING)); + tasks.add(task); } // for freemarker template if (abstractResourceConfig instanceof Freemarker) { - if (taskIDs.contains(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE)) { - continue; + + TaskType task = GraphFactory.eINSTANCE.createTaskType(); + task.setId(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE); + task.setName(TaskTypeManager.getTaskLabel(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE)); + tasks.add(task); + + String refid = SmooksModelUtils.getParamValue(((Freemarker) abstractResourceConfig).getParam(), + SmooksModelUtils.KEY_OBJECT_ID); + if (refid == null) { + refid = SmooksModelUtils.generateTaskID(resourceList, Freemarker.class, "freemarker"); + ParamType idParam = SmooksFactory.eINSTANCE.createParamType(); + idParam.setName(SmooksModelUtils.KEY_OBJECT_ID); + idParam.setStringValue(refid); + ((Freemarker) abstractResourceConfig).getParam().add(idParam); + } + if (refid != null) { + ParamType idParam = SmooksFactory.eINSTANCE.createParamType(); + idParam.setName(SmooksModelUtils.KEY_TASK_ID_REF); + idParam.setStringValue(refid); + SmooksModelUtils.addParam(task, idParam); } + taskIDs.add(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE); } // for xsl template @@ -75,7 +104,7 @@ // taskIDs.add(TaskTypeManager.TASK_ID_JAVA_MAPPING); } } - return taskIDs; + return tasks; } private SmooksGraphicsExtType getSmooksGraphicsType(SmooksResourceListType resouceList) { @@ -148,21 +177,60 @@ modelWasChanged = true; } - List taskIDs = analyzeTaskID(resourceList); - - for (Iterator iterator = taskIDs.iterator(); iterator.hasNext();) { - String taskId = (String) iterator.next(); - if (!taskIDIsExist(taskId, taskList)) { - TaskType task = GraphFactory.eINSTANCE.createTaskType(); - task.setId(taskId); - task.setName(TaskTypeManager.getTaskLabel(taskId)); - taskList.add(task); + List tasks = analyzeTaskID(resourceList); + for (Iterator iterator = tasks.iterator(); iterator.hasNext();) { + TaskType taskType = (TaskType) iterator.next(); + if (canAdd(taskList, taskType)) { + taskList.add(taskType); } } - modelWasChanged = linkTask(taskList, compoundCommand); + // for (Iterator iterator = taskIDs.iterator(); + // iterator.hasNext();) { + // String taskId = (String) iterator.next(); + // if (!taskIDIsExist(taskId, taskList)) { + // TaskType task = GraphFactory.eINSTANCE.createTaskType(); + // task.setId(taskId); + // task.setName(TaskTypeManager.getTaskLabel(taskId)); + // taskList.add(task); + // } + // } + List dummyTasks = new ArrayList(); + modelWasChanged = linkTask(taskList, dummyTasks, compoundCommand); compoundCommand.execute(); return modelWasChanged; } + + public static void main(String[] args){ +// Properties pros = System.getProperties(); +// Enumeration eee = pros.keys(); +// while(eee.hasMoreElements()){ +// Object key = eee.nextElement(); +// System.out.println(key + " : " + pros.getProperty(key.toString())); +// } + } + + private boolean canAdd(List list, TaskType taskType) { + if (TaskTypeManager.TASK_ID_JAVA_MAPPING.equals(taskType.getId())) { + for (Iterator iterator = list.iterator(); iterator.hasNext();) { + TaskType taskType1 = (TaskType) iterator.next(); + if (TaskTypeManager.TASK_ID_JAVA_MAPPING.equals(taskType1.getId())) { + return false; + } + } + } + return true; + } + + private List getTaskTypes(String id, List taskList) { + List tasks = new ArrayList(); + for (Iterator iterator = taskList.iterator(); iterator.hasNext();) { + TaskType taskType = (TaskType) iterator.next(); + if (id.equals(taskType.getId())) { + tasks.add(taskType); + } + } + return tasks; + } private TaskType getTaskType(String id, List taskList) { for (Iterator iterator = taskList.iterator(); iterator.hasNext();) { @@ -174,50 +242,78 @@ return null; } - private boolean linkTask(List taskList, CompoundCommand compoundCommand) { + private boolean linkTask(List taskList, List dummyTasks, CompoundCommand compoundCommand) { TaskType first = getTaskType(TaskTypeManager.TASK_ID_INPUT, taskList); if (first != null) { - return linkTask(first, taskList, compoundCommand); + taskList.remove(first); + return linkTask(first, taskList, dummyTasks, compoundCommand); } return false; } - private boolean linkTask(TaskType taskType, List taskList, CompoundCommand compoundCommand) { + private boolean linkTask(TaskType taskType, List taskList, List dummyTasks, + CompoundCommand compoundCommand) { String id = taskType.getId(); String[] childrenIds = TaskTypeManager.getChildTaskIDs(id); boolean changed = false; if (childrenIds != null) { for (int i = 0; i < childrenIds.length; i++) { String childId = childrenIds[i]; - TaskType childTask = getTaskType(childId, taskList); - if (childTask != null) { - if (!taskType.getTask().contains(childTask) - && ((childTask.eContainer() == null) || (childTask.eContainer() instanceof ProcessType))) { - Command c = AddCommand.create(domainProvider.getEditingDomain(), taskType, - GraphPackage.Literals.TASK_TYPE__TASK, childTask); - compoundCommand.append(c); - // taskType.getTask().add(childTask); - changed = true; + List tasks = getTaskTypes(childId, taskList); + for (Iterator iterator = tasks.iterator(); iterator.hasNext();) { + TaskType childTask = (TaskType) iterator.next(); + if (childTask != null) { + EList exsitedTasks = taskType.getTask(); + boolean duplited = false; + boolean canAdd = true; + for (Iterator iterator2 = exsitedTasks.iterator(); iterator2.hasNext();) { + TaskType taskType2 = (TaskType) iterator2.next(); + String refid = SmooksModelUtils.getParamValue(taskType2, SmooksModelUtils.KEY_TASK_ID_REF); + String refid2 = SmooksModelUtils.getParamValue(childTask, SmooksModelUtils.KEY_TASK_ID_REF); + if (refid != null && refid2 != null && refid.equals(refid2)) { + canAdd = false; + duplited = true; + break; + } + if (refid == null && refid2 == null) { + canAdd = false; + duplited = true; + break; + } + } + if (canAdd + && !taskType.getTask().contains(childTask) + && ((childTask.eContainer() == null) || (childTask.eContainer() instanceof ProcessType))) { + Command c = AddCommand.create(domainProvider.getEditingDomain(), taskType, + GraphPackage.Literals.TASK_TYPE__TASK, childTask); + compoundCommand.append(c); + // taskType.getTask().add(childTask); + changed = true; + } + if (!duplited) { + dummyTasks.add(childTask); + } + taskList.remove(childTask); + boolean cchange = linkTask(childTask, taskList, dummyTasks, compoundCommand); + changed = (changed || cchange); } - taskList.remove(childTask); - boolean cchange = linkTask(childTask, taskList, compoundCommand); - changed = (changed || cchange); } - } - } - return changed; - } - private boolean taskIDIsExist(String taskId, List taskList) { - for (Iterator iterator = taskList.iterator(); iterator.hasNext();) { - TaskType task = (TaskType) iterator.next(); - if (task.getId().equals(taskId)) { - return true; } } - return false; + return changed; } + // private boolean taskIDIsExist(String taskId, List taskList) { + // for (Iterator iterator = taskList.iterator(); iterator.hasNext();) { + // TaskType task = (TaskType) iterator.next(); + // if (task.getId().equals(taskId)) { + // return true; + // } + // } + // return false; + // } + // // private boolean taskIsExist(TaskType task , List taskIDs){ // for (Iterator iterator = taskIDs.iterator(); iterator.hasNext();) { // String id = (String) iterator.next(); Index: src/org/jboss/tools/smooks/graphical/editors/commands/DeleteSmooksGraphicalModelCommand.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/commands/DeleteSmooksGraphicalModelCommand.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/commands/DeleteSmooksGraphicalModelCommand.java (working copy) @@ -10,8 +10,13 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.editors.commands; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + import org.eclipse.gef.commands.Command; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; +import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection; /** * @author Dart @@ -23,6 +28,8 @@ private AbstractSmooksGraphicalModel parentModel; + private List deletedConnections = new ArrayList(); + private int oldIndex = -1; public DeleteSmooksGraphicalModelCommand(AbstractSmooksGraphicalModel graphModel){ @@ -46,8 +53,14 @@ */ @Override public void execute() { + if (deletedConnections != null) { + deletedConnections.clear(); + } else { + deletedConnections = new ArrayList(); + } oldIndex = parentModel.getChildrenWithoutDynamic().indexOf(graphModel); parentModel.removeChild(graphModel); + AbstractSmooksGraphicalModel.disconnectAllConnections(graphModel, deletedConnections); } /* (non-Javadoc) @@ -65,8 +78,18 @@ public void undo() { if(oldIndex != -1 && parentModel != null){ parentModel.addChild(oldIndex, graphModel); + reconnectAllConnections(); } super.undo(); } + + private void reconnectAllConnections() { + if (deletedConnections != null) { + for (Iterator iterator = deletedConnections.iterator(); iterator.hasNext();) { + TreeNodeConnection connection = (TreeNodeConnection) iterator.next(); + connection.connect(); + } + } + } } Index: src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java (working copy) @@ -23,12 +23,15 @@ import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.command.CommandWrapper; import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.command.AddCommand; import org.eclipse.emf.edit.command.DeleteCommand; import org.eclipse.emf.edit.command.RemoveCommand; +import org.eclipse.emf.edit.command.SetCommand; +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.domain.EditingDomain; -import org.eclipse.gef.dnd.TemplateTransfer; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; @@ -39,20 +42,12 @@ import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.swt.SWT; import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.dnd.DND; -import org.eclipse.swt.dnd.DragSource; -import org.eclipse.swt.dnd.DragSourceEvent; -import org.eclipse.swt.dnd.DragSourceListener; -import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.graphics.Point; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.ToolBar; -import org.eclipse.swt.widgets.ToolItem; import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorSite; @@ -75,8 +70,8 @@ import org.eclipse.zest.core.widgets.ZestStyles; import org.eclipse.zest.layouts.LayoutStyles; import org.eclipse.zest.layouts.algorithms.HorizontalTreeLayoutAlgorithm; -import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator; import org.jboss.tools.smooks.configuration.editors.SmooksReaderFormPage; +import org.jboss.tools.smooks.configuration.validate.ISmooksModelValidateListener; import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.editor.ISourceSynchronizeListener; @@ -92,13 +87,14 @@ import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; import org.jboss.tools.smooks.model.graphics.ext.TaskType; import org.jboss.tools.smooks.model.smooks.DocumentRoot; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart * */ public class SmooksProcessGraphicalEditor extends FormPage implements ISelectionChangedListener, - ISourceSynchronizeListener, ISmooksGraphChangeListener, IPropertyListener { + ISourceSynchronizeListener, ISmooksGraphChangeListener, IPropertyListener, ISmooksModelValidateListener { private List processPanelActions = new ArrayList(); @@ -442,7 +438,7 @@ // // fillPreTaskMenu(addPreTaskMenuManager); - DeleteTaskNodeAction deleteAction = new DeleteTaskNodeAction(smooksModelProvider); + DeleteTaskNodeAction deleteAction = new DeleteTaskNodeAction(smooksModelProvider, this); manager.add(deleteAction); this.processPanelActions.add(deleteAction); @@ -454,7 +450,7 @@ for (Iterator iterator = list.iterator(); iterator.hasNext();) { TaskTypeDescriptor taskTypeDescriptor = (TaskTypeDescriptor) iterator.next(); AddNextTaskNodeAction addNextInputAction = new AddNextTaskNodeAction(taskTypeDescriptor.getId(), - taskTypeDescriptor.getLabel(), smooksModelProvider); + taskTypeDescriptor.getLabel(), smooksModelProvider, this); this.processPanelActions.add(addNextInputAction); addNextTaskMenuManager.add(addNextInputAction); } @@ -539,64 +535,6 @@ initProcessGraphicalViewer(); } - protected void createProcessToolBar(Composite parent, FormToolkit toolkit) { - ToolBar toolBar = new ToolBar(parent, SWT.FLAT); - toolBar.setBackground(toolkit.getColors().getBackground()); - - Transfer[] types = new Transfer[] { TemplateTransfer.getInstance() }; - int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK; - final DragSource source = new DragSource(toolBar, operations); - source.setTransfer(types); - source.addDragListener(new DragSourceListener() { - - private Object data = null; - - public void dragStart(DragSourceEvent event) { - this.data = null; - DragSource source = (DragSource) event.getSource(); - ToolBar control = (ToolBar) source.getControl(); - ToolItem item = control.getItem(new Point(event.x, event.y)); - if (item == null) - return; - event.doit = true; - TaskTypeDescriptor data = (TaskTypeDescriptor) item.getData(); - event.data = data; - this.data = data; - TemplateTransfer.getInstance().setObject(data); - } - - public void dragSetData(DragSourceEvent event) { - // DragSource source = (DragSource) event.getSource(); - // ToolBar control = (ToolBar) source.getControl(); - // ToolItem item = control.getItem(new Point(event.x, - // event.y)); - // if(item == null) return; - // TaskTypeDescriptor data = (TaskTypeDescriptor) - // item.getData(); - event.data = this.data; - TemplateTransfer.getInstance().setObject(this.data); - // System.out.println(data.getId()); - } - - public void dragFinished(DragSourceEvent event) { - // if (event.detail == DND.DROP_MOVE) - // label.setText (""); - this.data = null; - } - }); - - List lis = TaskTypeManager.getAllTaskList(); - for (Iterator iterator = lis.iterator(); iterator.hasNext();) { - TaskTypeDescriptor taskTypeDescriptor = (TaskTypeDescriptor) iterator.next(); - ToolItem item = new ToolItem(toolBar, SWT.NONE); - item.setData(taskTypeDescriptor); - // item.setText(taskTypeDescriptor.getLabel()); - item.setToolTipText("Add " + taskTypeDescriptor.getLabel()); - item.setImage(SmooksConfigurationActivator.getDefault().getImageRegistry().get( - taskTypeDescriptor.getImagePath())); - } - } - protected void createTaskDetailsSection(FormToolkit toolkit, Composite parent) { Composite taskDetailsComposite = toolkit.createComposite(parent); FillLayout taskDetailsFillLayout = new FillLayout(); @@ -685,18 +623,32 @@ Collection objs = ((Command) command2).getAffectedObjects(); for (Iterator iterator2 = objs.iterator(); iterator2.hasNext();) { Object object = (Object) iterator2.next(); + object = AdapterFactoryEditingDomain.unwrap(object); if (object instanceof TaskType || object instanceof ProcessType) { showTaskControl(null); break; } } } + + if (command2 instanceof AddCommand || command2 instanceof SetCommand) { + Collection objs = ((Command) command2).getAffectedObjects(); + for (Iterator iterator2 = objs.iterator(); iterator2.hasNext();) { + Object object = (Object) iterator2.next(); + object = AdapterFactoryEditingDomain.unwrap(object); + if (object instanceof TaskType) { + showTaskControl((TaskType) object); + break; + } + } + } } } else { if (rawCommand instanceof DeleteCommand || rawCommand instanceof RemoveCommand) { activeModel = rawCommand.getAffectedObjects(); for (Iterator iterator = activeModel.iterator(); iterator.hasNext();) { Object object = (Object) iterator.next(); + object = AdapterFactoryEditingDomain.unwrap(object); if (object instanceof TaskType || object instanceof ProcessType) { if (getProcessGraphViewer() != null) { showTaskControl(null); @@ -704,7 +656,17 @@ } } } - + } + if (rawCommand instanceof AddCommand || rawCommand instanceof SetCommand) { + Collection objs = ((Command) rawCommand).getAffectedObjects(); + for (Iterator iterator2 = objs.iterator(); iterator2.hasNext();) { + Object object = (Object) iterator2.next(); + object = AdapterFactoryEditingDomain.unwrap(object); + if (object instanceof TaskType) { + showTaskControl((TaskType) object); + break; + } + } } } } @@ -765,23 +727,40 @@ if (smooksModelProvider != null) { this.handleCommandStack(smooksModelProvider.getEditingDomain().getCommandStack()); } - SmooksJavaMappingGraphicalEditor javaMappingPart = new SmooksJavaMappingGraphicalEditor(smooksModelProvider); - this.registeTaskDetailsPage(javaMappingPart, TaskTypeManager.TASK_ID_JAVA_MAPPING); + + List tasks = TaskTypeManager.getAllTaskList(); + for (Iterator iterator = tasks.iterator(); iterator.hasNext();) { + TaskTypeDescriptor taskTypeDescriptor = (TaskTypeDescriptor) iterator.next(); + IEditorPart part = createEditorPart(taskTypeDescriptor.getId()); + if (part != null) { + this.registeTaskDetailsPage(part, taskTypeDescriptor.getId()); + } + } + } - SmooksFreemarkerTemplateGraphicalEditor freemarkerPart = new SmooksFreemarkerTemplateGraphicalEditor( - smooksModelProvider); - this.registeTaskDetailsPage(freemarkerPart, TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE); + protected IEditorPart createEditorPart(String taskID) { + if (taskID.equals(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE)) { + SmooksFreemarkerTemplateGraphicalEditor freemarkerPart = new SmooksFreemarkerTemplateGraphicalEditor( + smooksModelProvider); + return freemarkerPart; + } + if (taskID.equals(TaskTypeManager.TASK_ID_JAVA_MAPPING)) { + SmooksJavaMappingGraphicalEditor javaMappingPart = new SmooksJavaMappingGraphicalEditor(smooksModelProvider); + return javaMappingPart; + } - SmooksReaderFormPage readerPage = new SmooksReaderFormPage(getEditor(), "input", "input"); - this.registeTaskDetailsPage(readerPage, TaskTypeManager.TASK_ID_INPUT); + if (taskID.equals(TaskTypeManager.TASK_ID_INPUT)) { + SmooksReaderFormPage readerPage = new SmooksReaderFormPage(getEditor(), "input", "input"); + return readerPage; + } + return null; + } - if (smooksModelProvider != null) { - this.handleCommandStack(smooksModelProvider.getEditingDomain().getCommandStack()); - } - // SmooksXSLTemplateGraphicalEditor xsltemplatePart = new - // SmooksXSLTemplateGraphicalEditor(smooksModelProvider); - // this.registeTaskDetailsPage(xsltemplatePart, - // TaskTypeManager.TASK_ID_XSL_TEMPLATE); + protected boolean isSingltonEditor(String taskID) { + if (taskID.equals(TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE)) { + return false; + } + return true; } @Override @@ -873,20 +852,40 @@ protected void showTaskControl(Object model) { if (model == null) pageBook.showEmptyPage(); - ; FormToolkit toolkit = ((AbstractSmooksFormEditor) this.smooksModelProvider).getToolkit(); if (model instanceof TaskType) { String id = ((TaskType) model).getId(); + if (!isSingltonEditor(id)) { + String idref = SmooksModelUtils.getParamValue((TaskType) model, "idref"); + if (idref != null) { + idref = id + "_" + idref; + if (getRegisteTaskPage(idref) == null) { + IEditorPart editor = createEditorPart(id); + this.registeTaskDetailsPage(editor, idref); + } + id = idref; + } else { + id = id + "_unknown"; + } + } if (id != null) { if (!pageBook.hasPage(id)) { Composite parent = pageBook.createPage(id); - Object page = getRegisteTaskPage(id); if (page != null && page instanceof IEditorPart) { try { parent.setLayout(new FillLayout()); + + ITaskNodeProvider nodeProvider = (ITaskNodeProvider) ((IEditorPart) page) + .getAdapter(ITaskNodeProvider.class); + if (nodeProvider != null) { + nodeProvider.setTaskType((TaskType) model); + } + createTaskPage((IEditorPart) page, parent); pageBook.showPage(id); + parent.setData(page); + } catch (PartInitException e) { pageBook.removePage(id); pageBook.showPage(emptyKey); @@ -1000,4 +999,26 @@ registedTaskPages = null; super.dispose(); } + + public void validateEnd(List diagnosticResult) { + Collection editors = registedTaskPages.values(); + for (Iterator iterator = editors.iterator(); iterator.hasNext();) { + Object object = (Object) iterator.next(); + if (object instanceof ISmooksModelValidateListener) { + ((ISmooksModelValidateListener) object).validateEnd(diagnosticResult); + } + } + + } + + public void validateStart() { + Collection editors = registedTaskPages.values(); + for (Iterator iterator = editors.iterator(); iterator.hasNext();) { + Object object = (Object) iterator.next(); + if (object instanceof ISmooksModelValidateListener) { + ((ISmooksModelValidateListener) object).validateStart(); + } + } + + } } Index: src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanGraphModel.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanGraphModel.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanGraphModel.java (working copy) @@ -10,14 +10,20 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.editors.model.javamapping; +import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; +import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; +import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart; import org.jboss.tools.smooks.graphical.editors.SmooksFreemarkerTemplateGraphicalEditor; import org.jboss.tools.smooks.graphical.editors.model.AbstractResourceConfigGraphModel; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.CSVNodeModel; +import org.jboss.tools.smooks.model.javabean.BindingsType; +import org.jboss.tools.smooks.model.javabean12.BeanType; /** * @author Dart @@ -26,9 +32,9 @@ public class JavaBeanGraphModel extends AbstractResourceConfigGraphModel { private IGraphicalEditorPart editorPart; - + public JavaBeanGraphModel(Object data, ITreeContentProvider contentProvider, ILabelProvider labelProvider, - IEditingDomainProvider domainProvider , IGraphicalEditorPart editorPart) { + IEditingDomainProvider domainProvider, IGraphicalEditorPart editorPart) { super(data, contentProvider, labelProvider, domainProvider); this.editorPart = editorPart; } @@ -39,17 +45,65 @@ Object m = AdapterFactoryEditingDomain.unwrap(model); if (m instanceof String) return null; - return new JavaBeanChildGraphModel(model, contentProvider, labelProvider, this.domainProvider); + return new JavaBeanChildGraphModel(model, contentProvider, labelProvider, this.domainProvider, this.editorPart); + } + + protected boolean inJavaMapping() { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(editorPart.getID())) { + return false; + } + return true; + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#canLinkWithSource + * (java.lang.Object) + */ + @Override + public boolean canLinkWithSource(Object model) { + if (!inJavaMapping()) + return false; + return super.canLinkWithSource(model); + } - - - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.tree.model.TreeContainerModel#canDragLink() + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#canLinkWithTarget + * (java.lang.Object) + */ + @Override + public boolean canLinkWithTarget(Object model) { + AbstractSmooksGraphicalModel gm = (AbstractSmooksGraphicalModel) model; + Object m = gm.getData(); + if (data instanceof BeanType || data instanceof BindingsType) { + if (m instanceof CSVNodeModel) { + if (data instanceof EObject) { + if (SmooksUIUtils.isCollectionJavaGraphModel((EObject) data)) { + return ((CSVNodeModel) m).isRecord(); + } + } + } + } + if (!inJavaMapping()) + return false; + return super.canLinkWithTarget(model); + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.model.TreeContainerModel#canDragLink() */ @Override public boolean canDragLink() { - if(SmooksFreemarkerTemplateGraphicalEditor.ID.equals(editorPart.getID())){ + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(editorPart.getID())) { return true; } return false; Index: src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/javamapping/JavaBeanChildGraphModel.java (working copy) @@ -24,6 +24,8 @@ import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection; +import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart; +import org.jboss.tools.smooks.graphical.editors.SmooksFreemarkerTemplateGraphicalEditor; import org.jboss.tools.smooks.graphical.editors.model.AbstractResourceConfigChildNodeGraphModel; import org.jboss.tools.smooks.graphical.editors.model.freemarker.CSVLinkConnection; import org.jboss.tools.smooks.graphical.editors.model.freemarker.CSVNodeModel; @@ -35,9 +37,12 @@ */ public class JavaBeanChildGraphModel extends AbstractResourceConfigChildNodeGraphModel { + private IGraphicalEditorPart editorPart; + public JavaBeanChildGraphModel(Object data, ITreeContentProvider contentProvider, ILabelProvider labelProvider, - IEditingDomainProvider domainProvider) { + IEditingDomainProvider domainProvider, IGraphicalEditorPart editorPart) { super(data, contentProvider, labelProvider, domainProvider); + this.editorPart = editorPart; } /* @@ -73,6 +78,13 @@ return false; } + protected boolean inJavaMapping() { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(editorPart.getID())) { + return false; + } + return true; + } + /* * (non-Javadoc) * @@ -83,6 +95,8 @@ @Override public boolean canLinkWithSource(Object model) { // TODO Auto-generated method stub + if (!inJavaMapping()) + return false; return super.canLinkWithSource(model); } @@ -97,10 +111,13 @@ public boolean canLinkWithTarget(Object model) { AbstractSmooksGraphicalModel gm = (AbstractSmooksGraphicalModel) model; Object m = gm.getData(); - if (data instanceof ValueType || data instanceof org.jboss.tools.smooks.model.javabean12.ValueType - || m instanceof CSVNodeModel) { - return !((CSVNodeModel) m).isRecord(); + if (data instanceof ValueType || data instanceof org.jboss.tools.smooks.model.javabean12.ValueType) { + if (m instanceof CSVNodeModel) { + return !((CSVNodeModel) m).isRecord(); + } } + if (!inJavaMapping()) + return false; return super.canLinkWithTarget(model); } Index: src/org/jboss/tools/smooks/graphical/editors/model/freemarker/AddFreemarkerCSVFieldAction.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/freemarker/AddFreemarkerCSVFieldAction.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/freemarker/AddFreemarkerCSVFieldAction.java (working copy) @@ -13,6 +13,8 @@ import org.eclipse.gef.requests.CreationFactory; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.IWorkbenchPart; +import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator; +import org.jboss.tools.smooks.configuration.editors.GraphicsConstants; import org.jboss.tools.smooks.graphical.actions.AddSmooksModelAction; /** @@ -31,7 +33,7 @@ @Override public ImageDescriptor getActionImageDescriptor() { - return null; + return SmooksConfigurationActivator.getImageDescriptor(GraphicsConstants.IMAGE_JAVA_ARRAY); } @Override Index: src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVNodeGraphicalModel.java (working copy) @@ -10,6 +10,7 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.editors.model.freemarker; +import java.util.Iterator; import java.util.List; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; @@ -17,6 +18,7 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; import org.jboss.tools.smooks.configuration.SmooksConstants; +import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject; import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; @@ -24,6 +26,7 @@ import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; import org.jboss.tools.smooks.model.freemarker.Freemarker; import org.jboss.tools.smooks.model.freemarker.Template; +import org.jboss.tools.smooks.model.smooks.ParamType; import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** @@ -72,6 +75,37 @@ return false; } + protected void resetFieldsList() { + AbstractSmooksGraphicalModel record = this; + CSVNodeModel model = (CSVNodeModel) record.getData(); + while (!model.isRecord()) { + record = record.getParent(); + model = (CSVNodeModel) record.getData(); + } + List children = record.getChildrenWithoutDynamic(); + String fieldsString = ""; + for (Iterator iterator = children.iterator(); iterator.hasNext();) { + AbstractSmooksGraphicalModel ixmlStructuredObject = (AbstractSmooksGraphicalModel) iterator.next(); + fieldsString += ((IXMLStructuredObject) ixmlStructuredObject.getData()).getNodeName() + ","; + } + if (fieldsString.length() > 1) { + fieldsString = fieldsString.substring(0, fieldsString.length() - 1); + } + AbstractSmooksGraphicalModel parent = this; + while (parent != null && !(parent instanceof FreemarkerTemplateGraphicalModel)) { + parent = parent.getParent(); + } + Freemarker freemarker = (Freemarker) parent.getData(); + Template template = freemarker.getTemplate(); + if (template != null) { + ParamType param = SmooksModelUtils.getParam(template, SmooksModelUtils.KEY_CSV_FIELDS); + if (param != null) { + SmooksModelUtils.setTextToSmooksType(this.domainProvider.getEditingDomain(), param, fieldsString); + changeFreemarkerContents(); + } + } + } + /** * * @param name @@ -82,33 +116,49 @@ if (!oldName.equals(name)) { node.setName(name); fireVisualChanged(); - changeFreemarkerContents(); + resetFieldsList(); } } - - - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addChild(org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#removeChild + * (org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) + */ + @Override + public void removeChild(AbstractSmooksGraphicalModel node) { + super.removeChild(node); + resetFieldsList(); + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addChild + * (org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) */ @Override public void addChild(AbstractSmooksGraphicalModel node) { super.addChild(node); - changeFreemarkerContents(); + resetFieldsList(); } - - protected void changeFreemarkerContents(){ + + public void changeFreemarkerContents() { AbstractSmooksGraphicalModel parent1 = this; - while(!(parent1 instanceof FreemarkerTemplateGraphicalModel)){ + while (!(parent1 instanceof FreemarkerTemplateGraphicalModel)) { parent1 = parent1.getParent(); } Object data = parent1.getData(); data = AdapterFactoryEditingDomain.unwrap(data); Template template = null; - if(data instanceof Freemarker){ - template = ((Freemarker)data).getTemplate(); + if (data instanceof Freemarker) { + template = ((Freemarker) data).getTemplate(); } - if(template == null) return; + if (template == null) + return; String content = null; try { Object parent = this.getParent(); @@ -122,22 +172,28 @@ t.printStackTrace(); } String version = SmooksConstants.VERSION_1_1; - if(this.domainProvider instanceof ISmooksModelProvider){ - version = ((ISmooksModelProvider)domainProvider).getSmooksGraphicsExt().getPlatformVersion(); + if (this.domainProvider instanceof ISmooksModelProvider) { + version = ((ISmooksModelProvider) domainProvider).getSmooksGraphicsExt().getPlatformVersion(); } + // if (content != null) { if (SmooksConstants.VERSION_1_1.equals(version)) { // CDATA SmooksModelUtils.setCDATAToSmooksType(domainProvider.getEditingDomain(), template, content); } - + if (SmooksConstants.VERSION_1_2.equals(version)) { // Comment SmooksModelUtils.setCommentToSmooksType(domainProvider.getEditingDomain(), template, content); } + // } } - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addTargetConnection(org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection) + /* + * (non-Javadoc) + * + * @seeorg.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel# + * addTargetConnection + * (org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection) */ @Override public void addTargetConnection(TreeNodeConnection connection) { @@ -146,8 +202,12 @@ changeFreemarkerContents(); } - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#removeTargetConnection(org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection) + /* + * (non-Javadoc) + * + * @seeorg.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel# + * removeTargetConnection + * (org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection) */ @Override public void removeTargetConnection(TreeNodeConnection connection) { Index: src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerContentProvider.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerContentProvider.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerContentProvider.java (working copy) @@ -11,15 +11,22 @@ package org.jboss.tools.smooks.graphical.editors.model.freemarker; import java.util.HashMap; +import java.util.List; import java.util.Map; +import org.eclipse.emf.edit.command.AddCommand; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.Viewer; +import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.configuration.editors.xml.AbstractXMLObject; import org.jboss.tools.smooks.configuration.editors.xml.XMLStructuredDataContentProvider; import org.jboss.tools.smooks.configuration.editors.xml.XSLModelAnalyzer; import org.jboss.tools.smooks.model.freemarker.Freemarker; import org.jboss.tools.smooks.model.freemarker.Template; +import org.jboss.tools.smooks.model.smooks.ParamType; +import org.jboss.tools.smooks.model.smooks.SmooksFactory; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelConstants; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart @@ -55,6 +62,16 @@ Template template = ((Freemarker) parentElement).getTemplate(); if (template != null) { Object obj = buffer.get(template); + String comments = SmooksModelUtils.getAnyTypeComment(template); + + List params = SmooksModelUtils.getParams(template); + + ParamType param = SmooksFactory.eINSTANCE.createParamType(); + param.setName("name"); + param.setStringValue("aaa"); + + + System.out.println(comments); // if (obj == null) { // String filePath = SmooksModelUtils.getAnyTypeText(template); // if(filePath != null) filePath = filePath.trim(); Index: src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateGraphicalModel.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateGraphicalModel.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerTemplateGraphicalModel.java (working copy) @@ -10,14 +10,22 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.editors.model.freemarker; +import java.util.ArrayList; import java.util.List; -import org.eclipse.emf.edit.domain.IEditingDomainProvider; +import org.eclipse.jface.resource.ImageRegistry; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.swt.graphics.Image; +import org.jboss.tools.smooks.configuration.SmooksConfigurationActivator; +import org.jboss.tools.smooks.configuration.editors.GraphicsConstants; +import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; import org.jboss.tools.smooks.graphical.editors.model.AbstractResourceConfigGraphModel; +import org.jboss.tools.smooks.model.freemarker.Freemarker; +import org.jboss.tools.smooks.model.freemarker.Template; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart @@ -31,12 +39,49 @@ public static final int TYPE_XML = 3; + public static final int TYPE_XSD = 3; + + private ISmooksModelProvider smooksModelProvider; + private int templateType = TYPE_CSV; + private boolean firstLoadChildren = true; + public FreemarkerTemplateGraphicalModel(Object data, ITreeContentProvider contentProvider, - ILabelProvider labelProvider, IEditingDomainProvider domainProvider) { + ILabelProvider labelProvider, ISmooksModelProvider domainProvider) { super(data, contentProvider, labelProvider, domainProvider); - // TODO Auto-generated constructor stub + this.smooksModelProvider = domainProvider; + } + + private void initChildrenNodes() { + Freemarker freemarker = (Freemarker) getData(); + Template template = freemarker.getTemplate(); + if (template != null) { + String[] fields = SmooksModelUtils.getFreemarkerCSVFileds(template); + String type = SmooksModelUtils.getTemplateType(template); + if (SmooksModelUtils.FREEMARKER_TEMPLATE_TYPE_CSV.equals(type)) { + if (fields != null) { + CSVNodeModel recordModel = new CSVNodeModel(); + recordModel.setName("CSV-Record"); + recordModel.setRecord(true); + FreemarkerCSVNodeGraphicalModel recordGraphNode = new FreemarkerCSVNodeGraphicalModel(recordModel, + contentProvider, labelProvider, smooksModelProvider); + this.getChildrenWithoutDynamic().add(recordGraphNode); + recordGraphNode.setParent(this); + List fieldsGraphNodeList = new ArrayList(); + for (int i = 0; i < fields.length; i++) { + String field = fields[i]; + CSVNodeModel fieldNode = new CSVNodeModel(); + fieldNode.setName(field); + FreemarkerCSVNodeGraphicalModel fieldGraphNode = new FreemarkerCSVNodeGraphicalModel(fieldNode, + contentProvider, labelProvider, smooksModelProvider); + recordGraphNode.getChildrenWithoutDynamic().add(fieldGraphNode); + fieldGraphNode.setParent(recordGraphNode); + fieldsGraphNodeList.add(fieldGraphNode); + } + } + } + } } /* @@ -56,30 +101,104 @@ return null; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * + * @see org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#getImage() + */ + @Override + public Image getImage() { + ImageRegistry registry = SmooksConfigurationActivator.getDefault().getImageRegistry(); + if (getTemplateType() == TYPE_CSV) { + return registry.get(GraphicsConstants.IMAGE_CSV_FILE); + } + if (getTemplateType() == TYPE_XML) { + return registry.get(GraphicsConstants.IMAGE_XML_FILE); + } + return registry.get(GraphicsConstants.IMAGE_UNKNOWN_OBJ); + } + + /* + * (non-Javadoc) + * + * @see org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#getText() + */ + @Override + public String getText() { + if (getTemplateType() == TYPE_CSV) { + return "CSV Template"; + } + return super.getText(); + } + + /* + * (non-Javadoc) + * * @see org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#getChildren() */ @Override public List getChildren() { + if (firstLoadChildren) { + try { + initChildrenNodes(); + } catch (Exception e) { + e.printStackTrace(); + } + firstLoadChildren = false; + } return this.getChildrenWithoutDynamic(); } - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addChild(org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addChild + * (org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) */ @Override public void addChild(AbstractSmooksGraphicalModel node) { super.addChild(node); } - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addChild(int, org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel#addChild + * (int, org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) */ @Override public void addChild(int index, AbstractSmooksGraphicalModel node) { super.addChild(index, node); } + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#canLinkWithSource + * (java.lang.Object) + */ + @Override + public boolean canLinkWithSource(Object model) { + return false; + // return super.canLinkWithSource(model); + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.model.TreeNodeModel#canLinkWithTarget + * (java.lang.Object) + */ + @Override + public boolean canLinkWithTarget(Object model) { + return false; + // return super.canLinkWithTarget(model); + } + /** * @return the templateType */ Index: src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/model/freemarker/FreemarkerCSVContentGenerator.java (working copy) @@ -24,9 +24,13 @@ import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection; import org.jboss.tools.smooks.graphical.editors.model.javamapping.JavaBeanChildGraphModel; import org.jboss.tools.smooks.graphical.editors.model.javamapping.JavaBeanGraphModel; +import org.jboss.tools.smooks.model.freemarker.Freemarker; +import org.jboss.tools.smooks.model.freemarker.Template; import org.jboss.tools.smooks.model.javabean.BindingsType; import org.jboss.tools.smooks.model.javabean.ValueType; +import org.jboss.tools.smooks.model.javabean.WiringType; import org.jboss.tools.smooks.model.javabean12.BeanType; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -39,11 +43,49 @@ public String generateCSVContents(FreemarkerCSVNodeGraphicalModel csvRecordGraphicalModel) throws TemplateBuilderException { - CSVNodeModel csvRecordModel = (CSVNodeModel) csvRecordGraphicalModel.getData(); + // CSVNodeModel csvRecordModel = (CSVNodeModel) + // csvRecordGraphicalModel.getData(); + + String collectionName = null; + + List recordConnections = csvRecordGraphicalModel.getTargetConnections(); + if (recordConnections.size() > 1 || recordConnections.isEmpty()) { + return null; + } - String collectionName = csvRecordModel.getName(); - char sperator = csvRecordModel.getSperator(); - char quote = csvRecordModel.getQuto(); + TreeNodeConnection recordRootConnection = recordConnections.get(0); + AbstractSmooksGraphicalModel javabeanModel = recordRootConnection.getSourceNode(); + List javabeanChildren = javabeanModel.getChildrenWithoutDynamic(); + for (Iterator iterator = javabeanChildren.iterator(); iterator.hasNext();) { + AbstractSmooksGraphicalModel abstractSmooksGraphicalModel = (AbstractSmooksGraphicalModel) iterator.next(); + Object javabean = abstractSmooksGraphicalModel.getData(); + javabean = AdapterFactoryEditingDomain.unwrap(javabean); + if (javabean instanceof WiringType) { + collectionName = ((WiringType) javabean).getBeanIdRef(); + } + if (javabean instanceof org.jboss.tools.smooks.model.javabean12.WiringType) { + collectionName = ((org.jboss.tools.smooks.model.javabean12.WiringType) javabean).getBeanIdRef(); + } + } + + if (collectionName == null) + return null; + AbstractSmooksGraphicalModel freemarkerTemplateGraphmodel = csvRecordGraphicalModel.getParent(); + if (!(freemarkerTemplateGraphmodel instanceof FreemarkerTemplateGraphicalModel)) { + return null; + } + Object freemarker = ((FreemarkerTemplateGraphicalModel) freemarkerTemplateGraphmodel).getData(); + freemarker = AdapterFactoryEditingDomain.unwrap(freemarker); + if (!(freemarker instanceof Freemarker)) { + return null; + } + Template template = ((Freemarker) freemarker).getTemplate(); + if (template == null) + return null; + + char sperator = SmooksModelUtils.getFreemarkerCSVSeperator(template); + char quote = SmooksModelUtils.getFreemarkerCSVQuote(template); + List childrenGraphModel = csvRecordGraphicalModel.getChildren(); List fieldsName = new ArrayList(); for (Iterator iterator = childrenGraphModel.iterator(); iterator.hasNext();) { @@ -100,8 +142,11 @@ TreeNodeConnection recordConnection = connections.get(0); AbstractSmooksGraphicalModel sourceGraphModel = recordConnection.getSourceNode(); String mappingString = generateMappingString(sourceGraphModel, recordRootNode); - if (mappingString != null) { - mappingString = recordName + "." + mappingString; + // if (mappingString != null) { + // mappingString = recordName + "." + mappingString; + // } + if (mappingString == null || mappingString.length() == 0) { + return; } builder.addValueMapping(mappingString, getFieldElement(model, elementName)); } @@ -123,7 +168,7 @@ List nodesList = new ArrayList(); fillParentList(nodesList, parentModel, recordRootNode); String mappingString = ""; - for (int i = nodesList.size() - 1; i >= 0; i--) { + for (int i = 0; i < nodesList.size(); i++) { Object node = nodesList.get(i); String beanName = null; if (node instanceof BindingsType) { @@ -142,23 +187,30 @@ return mappingString; } - private void fillParentList(List list, AbstractSmooksGraphicalModel node, JavaBeanGraphModel recordRootNode) { + private boolean fillParentList(List list, AbstractSmooksGraphicalModel node, + JavaBeanGraphModel recordRootNode) { if (node instanceof JavaBeanChildGraphModel) { node = node.getParent(); } if (node != recordRootNode) { if (node instanceof JavaBeanGraphModel) { Object parent = node.getData(); - parent = AdapterFactoryEditingDomain.unwrap(parent); - list.add(parent); List connections = ((JavaBeanGraphModel) node).getTargetConnections(); - if (!connections.isEmpty() && connections.size() == 1) { - TreeNodeConnection connection = connections.get(0); + if (connections.isEmpty()) + return false; + for (Iterator iterator = connections.iterator(); iterator.hasNext();) { + TreeNodeConnection connection = (TreeNodeConnection) iterator.next(); AbstractSmooksGraphicalModel sourcenode = connection.getSourceNode(); - fillParentList(list, sourcenode, recordRootNode); + if (fillParentList(list, sourcenode, recordRootNode)) { + parent = AdapterFactoryEditingDomain.unwrap(parent); + list.add(parent); + } } } + } else { + return true; } + return true; } private Element getRecordElement(Document model) { Index: src/org/jboss/tools/smooks/graphical/editors/model/IValidatableModel.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/model/IValidatableModel.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/editors/model/IValidatableModel.java (revision 0) @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.editors.model; + +import java.util.List; + +import org.eclipse.emf.common.util.Diagnostic; + +/** + * @author Dart + * + */ +public interface IValidatableModel { + + public static final int NONE = -1; + + public static final int ERROR = Diagnostic.ERROR; + + public static final int WARNING = Diagnostic.WARNING; + + public int getSeverity(); + + public void setSeverity(int severity); + + public List getMessage(); + + public void addMessage(String message); +} Index: src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/process/TaskNodeFigure.java (working copy) @@ -18,12 +18,15 @@ import org.eclipse.draw2d.Clickable; import org.eclipse.draw2d.Figure; import org.eclipse.draw2d.Graphics; +import org.eclipse.draw2d.GridData; +import org.eclipse.draw2d.GridLayout; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.MouseEvent; import org.eclipse.draw2d.MouseMotionListener; import org.eclipse.draw2d.ToolbarLayout; import org.eclipse.draw2d.geometry.Dimension; +import org.eclipse.draw2d.geometry.Point; import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.graphics.Color; @@ -72,6 +75,29 @@ } private void hookTaskNodeFigure() { + // this.addMouseMotionListener(new MouseMotionListener() { + // + // public void mouseDragged(MouseEvent me) { + // } + // + // public void mouseEntered(MouseEvent me) { + // showAddFigure = true; + // imageSourceRectangle = null; + // addTaskFigure.repaint(); + // } + // + // public void mouseExited(MouseEvent me) { + // showAddFigure = false; + // addTaskFigure.repaint(); + // } + // + // public void mouseHover(MouseEvent me) { + // } + // + // public void mouseMoved(MouseEvent me) { + // } + // + // }); addTaskFigure.addMouseMotionListener(new MouseMotionListener() { public void mouseDragged(MouseEvent me) { @@ -100,12 +126,16 @@ protected void initFigure() { initMainFigure(); initAddTaskFigure(); - ToolbarLayout layout = new ToolbarLayout(true); - layout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER); + GridLayout girdlLayout = new GridLayout(); + girdlLayout.numColumns = 2; + this.setLayoutManager(girdlLayout); + GridData d = new GridData(GridData.FILL_VERTICAL); + // ToolbarLayout layout = new ToolbarLayout(true); + // layout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER); this.add(mainFigure); this.add(addTaskFigure); - - this.setLayoutManager(layout); + girdlLayout.setConstraint(addTaskFigure, d); + // this.setLayoutManager(layout); } private void initAddTaskFigure() { @@ -117,20 +147,27 @@ @Override protected void paintFigure(Graphics graphics) { super.paintFigure(graphics); + Rectangle rect = getBounds(); + Point center = rect.getCenter(); if (!showAddFigure) { - int feet = 4; - Rectangle rect = getBounds(); - imageSourceRectangle = new Rectangle(rect.x + feet, rect.y + feet, rect.width - feet * 2, - rect.height - feet * 2); +// int feet = 4; + graphics.fillRectangle(rect); + return; + // imageSourceRectangle = new Rectangle(rect.x + feet, + // rect.y + feet, rect.width - feet * 2, + // rect.height - feet * 2); } Image image = SmooksConfigurationActivator.getDefault().getImageRegistry().get( GraphicsConstants.IMAGE_ADD_TASK_BUTTON); if (image != null) { - Rectangle sourceRectangle = new Rectangle(0, 0, image.getBounds().width, image.getBounds().height); +// System.out.println(center.x - image.getBounds().width / 2); + Point location = new Point(center.x - image.getBounds().width / 2, center.y + - image.getBounds().height / 2); + graphics.drawImage(image, location); if (imageSourceRectangle == null) { - graphics.drawImage(image, getLocation()); +// graphics.drawImage(image, getLocation()); } else { - graphics.drawImage(image, sourceRectangle, imageSourceRectangle); +// graphics.drawImage(image, sourceRectangle, imageSourceRectangle); } } } Index: src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/SmooksFreemarkerTemplateGraphicalEditor.java (working copy) @@ -10,9 +10,14 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.editors; +import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; +import java.util.Iterator; import java.util.List; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; import org.eclipse.gef.EditPart; @@ -21,23 +26,42 @@ import org.eclipse.gef.requests.CreationFactory; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ITreeContentProvider; +import org.jboss.template.CollectionMapping; +import org.jboss.template.Mapping; +import org.jboss.template.TemplateBuilder; +import org.jboss.template.csv.CSVFreeMarkerTemplateBuilder; +import org.jboss.template.csv.CSVModelBuilder; +import org.jboss.tools.smooks.configuration.SmooksConstants; import org.jboss.tools.smooks.configuration.editors.actions.AbstractSmooksActionGrouper; import org.jboss.tools.smooks.configuration.editors.actions.ISmooksActionGrouper; +import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.editor.ISmooksModelProvider; +import org.jboss.tools.smooks.gef.common.RootModel; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.gef.tree.model.TreeContainerModel; +import org.jboss.tools.smooks.gef.tree.model.TreeNodeConnection; import org.jboss.tools.smooks.graphical.editors.autolayout.IAutoLayout; -import org.jboss.tools.smooks.graphical.editors.autolayout.XSLMappingAutoLayout; +import org.jboss.tools.smooks.graphical.editors.editparts.SmooksGraphUtil; import org.jboss.tools.smooks.graphical.editors.editparts.freemarker.CSVLinkConnectionEditPart; +import org.jboss.tools.smooks.graphical.editors.editparts.freemarker.FreemarkerAutoLayout; import org.jboss.tools.smooks.graphical.editors.model.freemarker.CSVLinkConnection; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.CSVNodeModel; import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerActionCreator; +import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerCSVNodeGraphicalModel; import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerContentProvider; import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerLabelProvider; import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerTemplateGraphicalModel; import org.jboss.tools.smooks.graphical.editors.model.javamapping.JavaBeanGraphModel; import org.jboss.tools.smooks.model.freemarker.Freemarker; +import org.jboss.tools.smooks.model.freemarker.Template; +import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; import org.jboss.tools.smooks.model.javabean.BindingsType; +import org.jboss.tools.smooks.model.javabean.ValueType; import org.jboss.tools.smooks.model.javabean12.BeanType; +import org.jboss.tools.smooks.model.smooks.SmooksResourceListType; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; +import org.w3c.dom.Document; +import org.w3c.dom.Node; /** * @author Dart @@ -47,7 +71,7 @@ public static final String ID = "__smooks_freemarker_template_graphical_editpart"; - private XSLMappingAutoLayout autoLayout = null; + private IAutoLayout autoLayout = null; public SmooksFreemarkerTemplateGraphicalEditor(ISmooksModelProvider provider) { super(provider); @@ -75,9 +99,9 @@ */ @Override public IAutoLayout getAutoLayout() { - // if(autoLayout == null){ - // autoLayout = new XSLMappingAutoLayout(); - // } + if (autoLayout == null) { + autoLayout = new FreemarkerAutoLayout(); + } return autoLayout; } @@ -180,6 +204,8 @@ private class FreemarkerTemplateConnectionModelFactory extends ConnectionModelFactoryImpl { + private List mappingList = null; + /* * (non-Javadoc) * @@ -205,6 +231,182 @@ public boolean hasSelectorConnection(AbstractSmooksGraphicalModel model) { return false; } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.graphical.editors.ConnectionModelFactoryImpl + * #createConnection(java.util.List, org.eclipse.emf.ecore.EObject, + * org.jboss.tools.smooks.gef.common.RootModel, + * org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) + */ + @Override + public Collection createConnection(List inputDataList, EObject rootModel, + RootModel root, AbstractSmooksGraphicalModel model) { + List collections = new ArrayList(); + + if (model instanceof FreemarkerCSVNodeGraphicalModel) { + CSVNodeModel data = (CSVNodeModel) model.getData(); + AbstractSmooksGraphicalModel freemarkerGraphModel = model.getParent(); + if (!(freemarkerGraphModel instanceof FreemarkerTemplateGraphicalModel)) { + freemarkerGraphModel = freemarkerGraphModel.getParent(); + } + + if (freemarkerGraphModel instanceof FreemarkerTemplateGraphicalModel) { + Freemarker freemarker = (Freemarker) AdapterFactoryEditingDomain.unwrap(freemarkerGraphModel + .getData()); + Template template = freemarker.getTemplate(); + fillMapping(template); + } + AbstractSmooksGraphicalModel sourceNode = null; + AbstractSmooksGraphicalModel targetNode = model; + SmooksResourceListType listType = SmooksUIUtils.getSmooks11ResourceListType(smooksModelProvider + .getSmooksModel()); + List beanidModels = new ArrayList(); + if (listType != null) { + SmooksUIUtils.fillBeanIdModelList(listType, beanidModels); + } + for (Iterator iterator = mappingList.iterator(); iterator.hasNext();) { + Mapping mapping = (Mapping) iterator.next(); + String path = mapping.getSrcPath(); + Node node = mapping.getMappingNode(); + String nodeName = node.getNodeName(); + if (data.isRecord()) { + if (mapping instanceof CollectionMapping) { + for (Iterator iterator2 = beanidModels.iterator(); iterator2.hasNext();) { + EObject eObject = (EObject) iterator2.next(); + EStructuralFeature feature = SmooksUIUtils.getBeanIDFeature(eObject); + if (feature != null) { + String beanid = (String) eObject.eGet(feature); + if (path.equals(beanid)) { + sourceNode = SmooksGraphUtil.findSmooksGraphModel((RootModel) root, eObject); + if (sourceNode != null && targetNode != null) { + TreeNodeConnection connection = new TreeNodeConnection(sourceNode, + targetNode); + connection.connectSource(); + targetNode.getTargetConnections().add(connection); + targetNode.fireConnectionChanged(); + collections.add(connection); + break; + } + } + } + } + } + } else { + if (nodeName.equals(data.getName())) { + String[] subpath = path.split("\\."); + if (subpath.length >= 2) { + String[] temppath = new String[2]; + System.arraycopy(subpath, subpath.length - 2, temppath, 0, 2); + Object beanModel = findJavaBeanModel(temppath[0], beanidModels); + if (beanModel != null) { + Object targetModel = findJavaGraphModel(temppath[1], beanModel); + sourceNode = SmooksGraphUtil.findSmooksGraphModel((RootModel) root, targetModel); + if (sourceNode != null && targetNode != null) { + TreeNodeConnection connection = new TreeNodeConnection(sourceNode, targetNode); + connection.connectSource(); + targetNode.getTargetConnections().add(connection); + targetNode.fireConnectionChanged(); + collections.add(connection); + } + } + } + } + } + } + } + + Collection cs = super.createConnection(inputDataList, rootModel, root, model); + if (cs != null) { + collections.addAll(cs); + } + return collections; + } + + private Object findJavaGraphModel(String propertyName, Object bean) { + if (bean instanceof BeanType) { + List values = ((BeanType) bean).getValue(); + for (Iterator iterator = values.iterator(); iterator.hasNext();) { + org.jboss.tools.smooks.model.javabean12.ValueType value = (org.jboss.tools.smooks.model.javabean12.ValueType) iterator + .next(); + if (propertyName.equals(value.getProperty())) { + return value; + } + } + } + if (bean instanceof BindingsType) { + List values = ((BindingsType) bean).getValue(); + for (Iterator iterator = values.iterator(); iterator.hasNext();) { + ValueType value = (ValueType) iterator.next(); + if (propertyName.equals(value.getProperty())) { + return value; + } + } + } + return null; + } + + private Object findJavaBeanModel(String beanid, List beans) { + for (Iterator iterator = beans.iterator(); iterator.hasNext();) { + Object object = (Object) iterator.next(); + if (object instanceof BindingsType) { + if (beanid.equals(((BindingsType) object).getBeanId())) { + return object; + } + } + if (object instanceof BeanType) { + if (beanid.equals(((BeanType) object).getBeanId())) { + return object; + } + } + } + return null; + } + + private void fillMapping(Template template) { + if (mappingList == null) { + mappingList = new ArrayList(); + } else { + mappingList.clear(); + } + String contents = SmooksModelUtils.getAnyTypeCDATA(template); + char seprator = SmooksModelUtils.getFreemarkerCSVSeperator(template); + char quote = SmooksModelUtils.getFreemarkerCSVQuote(template); + String[] fields = SmooksModelUtils.getFreemarkerCSVFileds(template); + SmooksGraphicsExtType ext = smooksModelProvider.getSmooksGraphicsExt(); + try { + if (ext != null) { + if (SmooksConstants.VERSION_1_2.equals(ext.getPlatformVersion())) { + contents = SmooksModelUtils.getAnyTypeComment(template); + } + } + CSVModelBuilder modelBuilder = new CSVModelBuilder(fields); + Document model = modelBuilder.buildModel(); + TemplateBuilder builder = new CSVFreeMarkerTemplateBuilder(model, seprator, quote, contents); + List mappings = builder.getMappings(); + mappingList.addAll(mappings); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.graphical.editors.ConnectionModelFactoryImpl + * #hasConnection + * (org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel) + */ + @Override + public boolean hasConnection(AbstractSmooksGraphicalModel model) { + if (model instanceof FreemarkerCSVNodeGraphicalModel) { + return true; + } + return super.hasConnection(model); + } } private class FreemarkerTemplateGraphicalModelFactory extends GraphicalModelFactoryImpl { @@ -226,9 +428,22 @@ ILabelProvider labelProvider = createLabelProvider(editingDomain.getAdapterFactory()); if (model instanceof Freemarker) { - graphModel = new FreemarkerTemplateGraphicalModel(model, new FreemarkerContentProvider( - contentProvider), new FreemarkerLabelProvider(labelProvider), provider); - ((TreeContainerModel) graphModel).setHeaderVisable(true); + Template template = ((Freemarker) model).getTemplate(); + String messageType = SmooksModelUtils.getTemplateType(template); + if (messageType != null && SmooksModelUtils.FREEMARKER_TEMPLATE_TYPE_CSV.equals(messageType)) { + String id = SmooksModelUtils.getParamValue(((Freemarker) model).getParam(), + SmooksModelUtils.KEY_OBJECT_ID); + String refid = SmooksModelUtils.getParamValue(getTaskType(), SmooksModelUtils.KEY_TASK_ID_REF); + + if (id != null && refid != null && id.equals(refid)) { + graphModel = new FreemarkerTemplateGraphicalModel(model, new FreemarkerContentProvider( + contentProvider), new FreemarkerLabelProvider(labelProvider), provider); + ((TreeContainerModel) graphModel).setHeaderVisable(true); + + ((FreemarkerTemplateGraphicalModel) graphModel) + .setTemplateType(FreemarkerTemplateGraphicalModel.TYPE_CSV); + } + } } if (model instanceof BindingsType || model instanceof BeanType) { graphModel = new JavaBeanGraphModel(model, contentProvider, labelProvider, provider, Index: src/org/jboss/tools/smooks/graphical/editors/ITaskNodeProvider.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/ITaskNodeProvider.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/editors/ITaskNodeProvider.java (revision 0) @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.editors; + +import org.jboss.tools.smooks.model.graphics.ext.TaskType; + +/** + * @author Dart + * + */ +public interface ITaskNodeProvider { + + public TaskType getTaskType(); + + public void setTaskType(TaskType taskType); + +} Index: src/org/jboss/tools/smooks/graphical/editors/editparts/AbstractResourceConfigEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/AbstractResourceConfigEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/AbstractResourceConfigEditPart.java (working copy) @@ -13,6 +13,7 @@ import java.util.Iterator; import java.util.List; +import org.eclipse.draw2d.IFigure; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.util.EcoreUtil; @@ -35,6 +36,7 @@ import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.gef.tree.command.GEFAdapterCommand; import org.jboss.tools.smooks.gef.tree.editparts.TreeContainerEditPart; +import org.jboss.tools.smooks.gef.tree.figures.TreeContainerFigure; import org.jboss.tools.smooks.gef.tree.model.TreeNodeModel; import org.jboss.tools.smooks.graphical.editors.model.AbstractResourceConfigGraphModel; import org.jboss.tools.smooks.model.smooks.SmooksPackage; @@ -44,6 +46,24 @@ * */ public class AbstractResourceConfigEditPart extends TreeContainerEditPart { + + + /* (non-Javadoc) + * @see org.jboss.tools.smooks.gef.tree.editparts.TreeContainerEditPart#createFigure() + */ + @Override + protected IFigure createFigure() { + IFigure figure = super.createFigure(); + if(figure instanceof TreeContainerFigure){ + ((TreeContainerFigure)figure).setSource(isSource()); + } + return figure; + } + + protected boolean isSource(){ + return true; + } + @Override protected String generateFigureID() { Index: src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/BeanReferenceConnectionEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/BeanReferenceConnectionEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/BeanReferenceConnectionEditPart.java (working copy) @@ -10,7 +10,6 @@ ******************************************************************************/ package org.jboss.tools.smooks.graphical.editors.editparts.javamapping; - import org.eclipse.draw2d.Connection; import org.eclipse.draw2d.ConnectionAnchor; import org.eclipse.draw2d.Graphics; @@ -19,22 +18,31 @@ import org.eclipse.draw2d.geometry.PointList; import org.eclipse.gef.DefaultEditDomain; import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.LineAttributes; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IEditorSite; import org.eclipse.ui.forms.editor.FormPage; import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart; import org.jboss.tools.smooks.gef.tree.figures.LeftOrRightAnchor; +import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart; +import org.jboss.tools.smooks.graphical.editors.SmooksFreemarkerTemplateGraphicalEditor; import org.jboss.tools.smooks.graphical.editors.SmooksTaskDetailsEditorSite; /** * @author Dart - * + * */ public class BeanReferenceConnectionEditPart extends TreeNodeConnectionEditPart { - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart#createConnectionFigure() + public BeanReferenceConnectionEditPart() { + super(); + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart# + * createConnectionFigure() */ @Override protected Connection createConnectionFigure() { @@ -88,17 +96,34 @@ DefaultEditDomain domain = (DefaultEditDomain) getViewer().getEditDomain(); IEditorPart editorPart = domain.getEditorPart(); IEditorSite site = editorPart.getEditorSite(); - if(site instanceof SmooksTaskDetailsEditorSite){ - FormPage page = ((SmooksTaskDetailsEditorSite)site).getParentEditor(); + if (site instanceof SmooksTaskDetailsEditorSite) { + FormPage page = ((SmooksTaskDetailsEditorSite) site).getParentEditor(); connection.setForegroundColor(page.getManagedForm().getToolkit().getColors().getBorderColor()); - + } connection.setLineStyle(Graphics.LINE_CUSTOM); - connection.setLineDash(new float[]{10,5}); + connection.setLineDash(new float[] { 10, 5 }); connection.setLineCap(SWT.CAP_ROUND); -// connection.set -// connection.setConnectionRouter(new ManhattanConnectionRouter()); + // connection.set + // connection.setConnectionRouter(new ManhattanConnectionRouter()); return connection; } + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart# + * isCanDelete() + */ + @Override + public boolean isCanDelete() { + IEditorPart editorpart = getEditorPart(); + if (editorpart instanceof IGraphicalEditorPart) { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) editorpart).getID())) { + return false; + } + } + return super.isCanDelete(); + } } Index: src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/JavaBeanChildNodeEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/JavaBeanChildNodeEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/JavaBeanChildNodeEditPart.java (working copy) @@ -19,6 +19,7 @@ import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.gef.commands.Command; import org.eclipse.gef.requests.DirectEditRequest; +import org.eclipse.ui.IEditorPart; import org.jboss.tools.smooks.editor.ISmooksModelProvider; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.gef.tree.command.GEFAdapterCommand; @@ -80,6 +81,12 @@ */ @Override protected boolean canDirectEdit() { + IEditorPart editorPart = this.getEditorPart(); + if (editorPart instanceof IGraphicalEditorPart) { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) editorPart).getID())) { + return false; + } + } JavaBeanChildGraphModel graphModel = (JavaBeanChildGraphModel) getModel(); boolean isArray = graphModel.parentIsArray(); boolean isCollection = graphModel.parentIsCollection(); @@ -142,6 +149,12 @@ @Override protected EStructuralFeature getFeature(EObject model) { + IEditorPart editorPart = this.getEditorPart(); + if (editorPart instanceof IGraphicalEditorPart) { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) editorPart).getID())) { + return null; + } + } if (model instanceof WiringType) { return JavabeanPackage.Literals.BINDINGS_TYPE__WIRING; } Index: src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/JavaBeanEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/JavaBeanEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/javamapping/JavaBeanEditPart.java (working copy) @@ -19,8 +19,11 @@ import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.ui.IEditorPart; import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; +import org.jboss.tools.smooks.graphical.editors.IGraphicalEditorPart; +import org.jboss.tools.smooks.graphical.editors.SmooksFreemarkerTemplateGraphicalEditor; import org.jboss.tools.smooks.graphical.editors.editparts.AbstractResourceConfigEditPart; import org.jboss.tools.smooks.model.javabean.BindingsType; import org.jboss.tools.smooks.model.javabean.JavabeanPackage; @@ -42,6 +45,12 @@ @Override protected EStructuralFeature getHostFeature(EObject model) { + IEditorPart editorPart = this.getEditorPart(); + if (editorPart instanceof IGraphicalEditorPart) { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) editorPart).getID())) { + return null; + } + } if (model instanceof BindingsType) { return JavabeanPackage.Literals.DOCUMENT_ROOT__BINDINGS; } @@ -50,11 +59,13 @@ } return null; } - - - /* (non-Javadoc) - * @see org.jboss.tools.smooks.gef.tree.editparts.TreeContainerEditPart#createFigure() + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.editparts.TreeContainerEditPart#createFigure + * () */ @Override protected IFigure createFigure() { @@ -65,6 +76,23 @@ * (non-Javadoc) * * @seeorg.jboss.tools.smooks.graphical.editors.editparts. + * AbstractResourceConfigEditPart#isSource() + */ + @Override + protected boolean isSource() { + IEditorPart part = this.getEditorPart(); + if (part instanceof IGraphicalEditorPart) { + if (SmooksFreemarkerTemplateGraphicalEditor.ID.equals(((IGraphicalEditorPart) part).getID())) { + return true; + } + } + return false; + } + + /* + * (non-Javadoc) + * + * @seeorg.jboss.tools.smooks.graphical.editors.editparts. * AbstractResourceConfigEditPart * #createModelCreationEMFCommand(org.eclipse.emf.edit.domain.EditingDomain, * java.lang.Object, java.lang.Object, java.lang.Object) @@ -76,7 +104,7 @@ if (model instanceof EObject) { boolean isArray = SmooksUIUtils.isArrayJavaGraphModel((EObject) model); boolean isCollection = SmooksUIUtils.isCollectionJavaGraphModel((EObject) model); - if(isArray || isCollection){ + if (isArray || isCollection) { return null; } } Index: src/org/jboss/tools/smooks/graphical/editors/editparts/InputDataContainerEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/InputDataContainerEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/InputDataContainerEditPart.java (working copy) @@ -14,6 +14,7 @@ import org.eclipse.draw2d.ColorConstants; import org.eclipse.draw2d.Figure; +import org.eclipse.draw2d.FigureUtilities; import org.eclipse.draw2d.Graphics; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; @@ -111,9 +112,9 @@ protected void paintBorder(Graphics graphics) { // super.paintBorder(graphics); if (isSelected() || isFocus()) { - graphics.setForegroundColor(GraphicsConstants.BORDER_CORLOR); + graphics.setForegroundColor(ColorConstants.orange); } else { - graphics.setForegroundColor(ColorConstants.black); + graphics.setForegroundColor(FigureUtilities.darker(ColorConstants.orange)); } Point p2 = new Point(); Index: src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerAutoLayout.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerAutoLayout.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerAutoLayout.java (revision 0) @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.editors.editparts.freemarker; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.draw2d.graph.DirectedGraph; +import org.eclipse.draw2d.graph.Node; +import org.eclipse.draw2d.graph.NodeList; +import org.jboss.tools.smooks.graphical.editors.autolayout.IAutoLayout; +import org.jboss.tools.smooks.graphical.editors.editparts.javamapping.JavaBeanEditPart; + +/** + * @author Dart + * + */ +public class FreemarkerAutoLayout implements IAutoLayout{ + + private int INPUT_JAVA_WIDTH = 200; + + private int SPACE_XSL = 20; + + private int INIT_X = 200; + + private int INIT_Y = 80; + + public void visit(DirectedGraph graph){ + NodeList nodeList = graph.nodes; + // place the java-mapping nodes; + int javaHeight = 0; + int javaWidth = 0; + Node inputNode = null; + int java_y = INIT_Y; + List javaNodes = new ArrayList(); + for (Iterator iterator = nodeList.iterator(); iterator.hasNext();) { + Node node = (Node) iterator.next(); + Object data = node.data; + if(data instanceof JavaBeanEditPart){ + javaHeight = javaHeight + SPACE_XSL + node.height; + javaWidth = Math.max(javaWidth, node.width); + node.y = java_y; + java_y = java_y + SPACE_XSL + node.height; + javaNodes.add(node); + } + if(data instanceof FreemarkerTemplateEditPart){ + inputNode = node; + } + } + javaHeight = javaHeight - INIT_Y; + int java_x = INIT_X; + if(inputNode != null){ + inputNode.x = INIT_X; + java_x = INIT_X; + int input_y = INIT_Y; + if(javaHeight > inputNode.height){ + int cha = (javaHeight - inputNode.height)/2; + input_y = cha; + } + inputNode.y = input_y; + inputNode.x = java_x + javaWidth + INPUT_JAVA_WIDTH; + } + + for (Iterator iterator = javaNodes.iterator(); iterator.hasNext();) { + Node node = (Node) iterator.next(); + node.x = java_x; + } + + } +} \ No newline at end of file Index: src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerTemplateEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerTemplateEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerTemplateEditPart.java (working copy) @@ -12,19 +12,10 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.gef.EditPart; import org.eclipse.gef.commands.Command; import org.eclipse.gef.requests.CreateRequest; -import org.eclipse.jface.viewers.ILabelProvider; -import org.eclipse.jface.viewers.ITreeContentProvider; -import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; -import org.jboss.tools.smooks.graphical.editors.commands.AddSmooksGraphicalModelCommand; import org.jboss.tools.smooks.graphical.editors.editparts.AbstractResourceConfigEditPart; -import org.jboss.tools.smooks.graphical.editors.model.AbstractResourceConfigGraphModel; -import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerCSVNodeGraphicalModel; -import org.jboss.tools.smooks.graphical.editors.model.freemarker.FreemarkerCreationFactory; -import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage; /** * @author Dart @@ -41,9 +32,19 @@ */ @Override protected EStructuralFeature getHostFeature(EObject model) { - return FreemarkerPackage.Literals.DOCUMENT_ROOT__FREEMARKER; + return null; } + /* + * (non-Javadoc) + * + * @seeorg.jboss.tools.smooks.graphical.editors.editparts. + * AbstractResourceConfigEditPart#isSource() + */ + @Override + protected boolean isSource() { + return false; + } /* * (non-Javadoc) @@ -54,20 +55,27 @@ */ @Override protected Command getCreateCommand(EditPart host, CreateRequest request) { - Object type = request.getNewObjectType(); - Object model = request.getNewObject(); - if (FreemarkerCreationFactory.CSV_RECORD.equals(type)) { - Object parent = host.getModel(); - ILabelProvider provider = ((AbstractResourceConfigGraphModel) parent).getLabelProvider(); - ITreeContentProvider provider1 = ((AbstractResourceConfigGraphModel) parent).getContentProvider(); - IEditingDomainProvider provider2 = ((AbstractResourceConfigGraphModel) parent).getDomainProvider(); - AbstractSmooksGraphicalModel childModel = new FreemarkerCSVNodeGraphicalModel(model, provider1, provider, provider2); - if (model != null && childModel instanceof AbstractSmooksGraphicalModel - && parent instanceof AbstractSmooksGraphicalModel) { - return new AddSmooksGraphicalModelCommand((AbstractSmooksGraphicalModel) parent, - (AbstractSmooksGraphicalModel) childModel); - } - } + // Object type = request.getNewObjectType(); + // Object model = request.getNewObject(); + // if (FreemarkerCreationFactory.CSV_RECORD.equals(type)) { + // Object parent = host.getModel(); + // ILabelProvider provider = ((AbstractResourceConfigGraphModel) + // parent).getLabelProvider(); + // ITreeContentProvider provider1 = ((AbstractResourceConfigGraphModel) + // parent).getContentProvider(); + // IEditingDomainProvider provider2 = + // ((AbstractResourceConfigGraphModel) parent).getDomainProvider(); + // AbstractSmooksGraphicalModel childModel = new + // FreemarkerCSVNodeGraphicalModel(model, provider1, provider, + // provider2); + // if (model != null && childModel instanceof + // AbstractSmooksGraphicalModel + // && parent instanceof AbstractSmooksGraphicalModel) { + // return new + // AddSmooksGraphicalModelCommand((AbstractSmooksGraphicalModel) parent, + // (AbstractSmooksGraphicalModel) childModel); + // } + // } return null; } } Index: src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerCSVNodeEditPart.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerCSVNodeEditPart.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/freemarker/FreemarkerCSVNodeEditPart.java (working copy) @@ -18,6 +18,7 @@ import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.LayoutManager; import org.eclipse.draw2d.ToolbarLayout; +import org.eclipse.draw2d.geometry.Dimension; import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; import org.eclipse.emf.edit.domain.IEditingDomainProvider; import org.eclipse.gef.EditPart; @@ -112,6 +113,19 @@ SPACE_INT = 0; CLICKNODE_HEIGHT = 0; CLICKNODE_WIDTH = 0; + expand = true; + } + + /* + * (non-Javadoc) + * + * @seeorg.jboss.tools.smooks.gef.tree.figures.TreeNodeFigure# + * getPreferredSize(int, int) + */ + @Override + public Dimension getPreferredSize(int hint, int hint2) { + expand = true; + return super.getPreferredSize(hint, hint2); } /* @@ -200,6 +214,27 @@ return layout; } + /* + * (non-Javadoc) + * + * @seeorg.jboss.tools.smooks.gef.tree.figures.TreeNodeFigure# + * collapsedNode() + */ + @Override + public void collapsedNode() { + } + + /* + * (non-Javadoc) + * + * @see + * org.jboss.tools.smooks.gef.tree.figures.TreeNodeFigure#expandNode + * () + */ + @Override + public void expandNode() { + } + }; return figure; } @@ -210,11 +245,23 @@ * (non-Javadoc) * * @see + * org.jboss.tools.smooks.gef.tree.editparts.TreeNodeEditPart#expandNode() + */ + @Override + public void expandNode() { + super.expandNode(); + } + + /* + * (non-Javadoc) + * + * @see * org.jboss.tools.smooks.gef.tree.editparts.TreeNodeEditPart#treeCollapsed * (org.jboss.tools.smooks.gef.tree.figures.TreeFigureExpansionEvent) */ @Override public void treeCollapsed(TreeFigureExpansionEvent event) { + System.out.println(); } /* @@ -226,6 +273,7 @@ */ @Override public void treeExpanded(TreeFigureExpansionEvent event) { + System.out.println(); } /* @@ -248,8 +296,11 @@ AbstractSmooksGraphicalModel graphModel = (AbstractSmooksGraphicalModel) editPart.getModel(); Object data = graphModel.getData(); data = AdapterFactoryEditingDomain.unwrap(data); - DeleteSmooksGraphicalModelCommand deleteCommand = new DeleteSmooksGraphicalModelCommand(graphModel); - return deleteCommand; + if (data instanceof CSVNodeModel && !((CSVNodeModel) data).isRecord()) { + DeleteSmooksGraphicalModelCommand deleteCommand = new DeleteSmooksGraphicalModelCommand( + graphModel); + return deleteCommand; + } } return null; } @@ -267,11 +318,19 @@ .getContentProvider(); IEditingDomainProvider provider2 = ((FreemarkerCSVNodeGraphicalModel) graphModel) .getDomainProvider(); - FreemarkerCSVNodeGraphicalModel childGraphModel = new FreemarkerCSVNodeGraphicalModel(model, - provider1, provider, provider2); - AddSmooksGraphicalModelCommand command = new AddSmooksGraphicalModelCommand( - (AbstractSmooksGraphicalModel) graphModel, childGraphModel); - return command; + Object parentData = ((FreemarkerCSVNodeGraphicalModel) graphModel).getData(); + if (parentData instanceof CSVNodeModel) { + if (((CSVNodeModel) parentData).isRecord()) { + if (model instanceof CSVNodeModel && !((CSVNodeModel) model).isRecord()) { + FreemarkerCSVNodeGraphicalModel childGraphModel = new FreemarkerCSVNodeGraphicalModel( + model, provider1, provider, provider2); + + AddSmooksGraphicalModelCommand command = new AddSmooksGraphicalModelCommand( + (AbstractSmooksGraphicalModel) graphModel, childGraphModel); + return command; + } + } + } } return null; } @@ -332,7 +391,7 @@ @Override protected boolean canDirectEdit() { Object data = ((AbstractSmooksGraphicalModel) getModel()).getData(); - if (data instanceof CSVNodeModel) { + if (data instanceof CSVNodeModel && !((CSVNodeModel) data).isRecord()) { return true; } return false; Index: src/org/jboss/tools/smooks/graphical/editors/editparts/SmooksGraphUtil.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/editparts/SmooksGraphUtil.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/editparts/SmooksGraphUtil.java (working copy) @@ -21,11 +21,13 @@ import org.jboss.tools.smooks.gef.common.RootModel; import org.jboss.tools.smooks.gef.model.AbstractSmooksGraphicalModel; import org.jboss.tools.smooks.graphical.editors.model.InputDataContianerModel; +import org.jboss.tools.smooks.model.freemarker.Freemarker; import org.jboss.tools.smooks.model.graphics.ext.FigureType; import org.jboss.tools.smooks.model.graphics.ext.GraphType; import org.jboss.tools.smooks.model.javabean.BindingsType; import org.jboss.tools.smooks.model.javabean12.BeanType; import org.jboss.tools.smooks.model.xsl.Xsl; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart @@ -60,6 +62,16 @@ id = id.trim(); return "XSL_" + id; } + + if (data instanceof Freemarker) { + String id = SmooksModelUtils.getParamValue(((Freemarker)data).getParam(), SmooksModelUtils.KEY_OBJECT_ID); + if (id == null) { + id = "freemarker"; + }else{ + id = "freemarker_"+id; + } + return id; + } return null; } Index: src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java (working copy) @@ -22,6 +22,7 @@ import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig; import org.jboss.tools.smooks.model.smooks.SmooksResourceListType; import org.jboss.tools.smooks.model.xsl.Xsl; +import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils; /** * @author Dart @@ -43,11 +44,10 @@ if (parentId == null) return null; if (parentId.equals(TaskTypeManager.TASK_ID_INPUT)) { - return new String[] { TaskTypeManager.TASK_ID_JAVA_MAPPING, TaskTypeManager.TASK_ID_XSL_TEMPLATE, - TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE }; + return new String[] { TaskTypeManager.TASK_ID_JAVA_MAPPING }; } if (parentId.equals(TaskTypeManager.TASK_ID_JAVA_MAPPING)) { - return new String[] { TaskTypeManager.TASK_ID_XSL_TEMPLATE, TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE }; + return new String[] { TaskTypeManager.TASK_ID_FREEMARKER_TEMPLATE }; } return null; } @@ -65,8 +65,6 @@ GraphicsConstants.IMAGE_JAVA_AMPPING_TASK)); allTaskList.add(new TaskTypeDescriptor(TASK_ID_FREEMARKER_TEMPLATE, "Apply Template", GraphicsConstants.IMAGE_APPLY_FREEMARKER_TASK)); -// allTaskList.add(new TaskTypeDescriptor(TASK_ID_XSL_TEMPLATE, "Apply XSL Template", -// GraphicsConstants.IMAGE_APPLY_XSL_TASK)); } return allTaskList; } @@ -116,19 +114,32 @@ * @param smooksResourceList * @return */ - public static List getAssociatedSmooksElements(String taskID, SmooksResourceListType smooksResourceList) { - List elementTypes = getAssociatedSmooksElementsType(taskID); + public static List getAssociatedSmooksElements(TaskType taskType, SmooksResourceListType smooksResourceList) { + List elementTypes = getAssociatedSmooksElementsType(taskType.getId()); List resourceConfigList = smooksResourceList.getAbstractResourceConfig(); List associatedElements = new ArrayList(); for (Iterator iterator = resourceConfigList.iterator(); iterator.hasNext();) { AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator.next(); - if (isSameType(abstractResourceConfig, elementTypes)) { + if (isSameType(abstractResourceConfig, elementTypes) && canRemove(abstractResourceConfig, taskType)) { associatedElements.add(abstractResourceConfig); } } return associatedElements; } + private static boolean canRemove(AbstractResourceConfig abstractResourceConfig, TaskType taskType) { + if (abstractResourceConfig instanceof Freemarker) { + String refid = SmooksModelUtils.getParamValue(taskType, SmooksModelUtils.KEY_TASK_ID_REF); + String id = SmooksModelUtils.getParamValue(((Freemarker) abstractResourceConfig).getParam(), + SmooksModelUtils.KEY_OBJECT_ID); + if (refid != null && id != null && id.equals(refid)) { + return true; + } + return false; + } + return true; + } + private static boolean isSameType(Object element, List elementTypes) { for (Iterator iterator = elementTypes.iterator(); iterator.hasNext();) { Class object = (Class) iterator.next(); Index: src/org/jboss/tools/smooks/graphical/editors/ConnectionModelFactoryImpl.java =================================================================== --- src/org/jboss/tools/smooks/graphical/editors/ConnectionModelFactoryImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/graphical/editors/ConnectionModelFactoryImpl.java (working copy) @@ -42,7 +42,7 @@ AbstractSmooksGraphicalModel model) { Object mm = model.getData(); mm = AdapterFactoryEditingDomain.unwrap(mm); - if (mm == null && !(mm instanceof EObject)) + if (mm == null || !(mm instanceof EObject)) return null; EObject cmodel = (EObject) mm; EStructuralFeature beanIDRefFeature = SmooksUIUtils.getBeanIDRefFeature(cmodel); Index: src/org/jboss/tools/smooks/graphical/wizard/TemplateMessageTypeWizard.java =================================================================== --- src/org/jboss/tools/smooks/graphical/wizard/TemplateMessageTypeWizard.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/wizard/TemplateMessageTypeWizard.java (revision 0) @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.wizard; + +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.IWizardNode; +import org.eclipse.jface.wizard.Wizard; + +/** + * @author Dart + * + */ +public class TemplateMessageTypeWizard extends Wizard { + + private TemplateWizardSelectionPage page = null; + + private IWizard wizard; + + public TemplateMessageTypeWizard() { + super(); + this.setForcePreviousAndNextButtons(true); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.Wizard#addPages() + */ + @Override + public void addPages() { + page = new TemplateWizardSelectionPage("Template Output Type"); + this.addPage(page); + super.addPages(); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.Wizard#performFinish() + */ + @Override + public boolean performFinish() { + IWizardNode node = page.getSelectedNode(); + if(node instanceof TemplateMessageTypeWizardNode){ + wizard = ((TemplateMessageTypeWizardNode)node).getWizard(); + } + return true; + } + + /** + * @return the wizard + */ + public IWizard getWizard() { + return wizard; + } + + + +} Index: src/org/jboss/tools/smooks/graphical/wizard/TemplateMessageTypeWizardNode.java =================================================================== --- src/org/jboss/tools/smooks/graphical/wizard/TemplateMessageTypeWizardNode.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/wizard/TemplateMessageTypeWizardNode.java (revision 0) @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.wizard; + +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.IWizardNode; +import org.eclipse.swt.graphics.Point; + +/** + * @author Dart + * + */ +public class TemplateMessageTypeWizardNode implements IWizardNode { + + IWizard wizard = null; + String name = ""; + String iconPath = null; + String pluginID = null; + String description = ""; + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getPluginID() { + return pluginID; + } + + public void setPluginID(String pluginID) { + this.pluginID = pluginID; + } + + public String getIconPath() { + return iconPath; + } + + public void setIconPath(String iconPath) { + this.iconPath = iconPath; + } + + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void setWizard(IWizard wizard) { + this.wizard = wizard; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.IWizardNode#dispose() + */ + public void dispose() { + + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.IWizardNode#getExtent() + */ + public Point getExtent() { + return null; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.IWizardNode#getWizard() + */ + public IWizard getWizard() { + return wizard; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.IWizardNode#isContentCreated() + */ + public boolean isContentCreated() { + return wizard.getPageCount() > 0; + } + + +} Index: src/org/jboss/tools/smooks/graphical/wizard/TemplateWizardSelectionPage.java =================================================================== --- src/org/jboss/tools/smooks/graphical/wizard/TemplateWizardSelectionPage.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/wizard/TemplateWizardSelectionPage.java (revision 0) @@ -0,0 +1,155 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.wizard; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.IWizardPage; +import org.eclipse.jface.wizard.WizardSelectionPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.jboss.tools.smooks.graphical.wizard.freemarker.FreemarkerCSVTemplateCreationWizard; + +/** + * @author Dart + * + */ +public class TemplateWizardSelectionPage extends WizardSelectionPage { + List registedWizard = new ArrayList(); + private Label desLabel; + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets + * .Composite) + */ + public void createControl(Composite parent) { + // parent.setLayout(new FillLayout()); + Composite main = new Composite(parent, SWT.NONE); + + GridLayout gridLayout = new GridLayout(); + main.setLayout(gridLayout); + + Label label = new Label(main, SWT.NONE); + label.setText("Message Type"); + + final Combo combo = new Combo(main, SWT.BORDER | SWT.READ_ONLY); + combo.addSelectionListener(new SelectionAdapter() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse + * .swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(SelectionEvent e) { + super.widgetSelected(e); + TemplateMessageTypeWizardNode node = registedWizard.get(combo.getSelectionIndex()); + setSelectedNode(node); + updateDescriptionLabel(node); + } + + }); + + initInputTypeCombo(combo); + + GridData gd = new GridData(GridData.FILL_BOTH); + combo.setLayoutData(gd); + + Composite separatorComposite = new Composite(main, SWT.NONE); + gd = new GridData(); + gd.heightHint = 12; + separatorComposite.setLayoutData(gd); + + desLabel = new Label(main, SWT.NONE); + gd = new GridData(GridData.FILL_HORIZONTAL); + desLabel.setLayoutData(gd); + + // for (Iterator iterator = registedWizard.iterator(); + // iterator.hasNext();) { + // IWizardNode node = (IWizardNode) iterator.next(); + // node. + // } + this.setControl(main); + if (!registedWizard.isEmpty()) { + combo.select(0); + TemplateMessageTypeWizardNode node = registedWizard.get(combo.getSelectionIndex()); + setSelectedNode(node); + updateDescriptionLabel(node); + } + } + + protected void updateDescriptionLabel(TemplateMessageTypeWizardNode node) { + String des = null; + if (node != null) { + des = node.getDescription(); + } + if (des == null) { + des = ""; + } + desLabel.setText(des); + } + + private void initInputTypeCombo(Combo combo) { + for (Iterator iterator = this.registedWizard.iterator(); iterator.hasNext();) { + TemplateMessageTypeWizardNode type = (TemplateMessageTypeWizardNode) iterator.next(); + combo.add(type.getName()); + } + } + + public IWizardPage getNextPage() { + if (this.getSelectedNode() == null) { + return null; + } + + boolean isCreated = getSelectedNode().isContentCreated(); + + IWizard wizard = getSelectedNode().getWizard(); + + if (wizard == null) { + setSelectedNode(null); + return null; + } + if (!isCreated) { + wizard.addPages(); + } + return wizard.getStartingPage(); + } + + public TemplateWizardSelectionPage(String pageName) { + super(pageName); + setDescription("Choose \"Message Type\" ."); //$NON-NLS-1$ + setTitle("Message Type Selection"); //$NON-NLS-1$ + TemplateMessageTypeWizardNode node = new TemplateMessageTypeWizardNode(); + node.setName("CSV"); +// node.setDescription("CSV"); + node.setWizard(new FreemarkerCSVTemplateCreationWizard()); + + registedWizard.add(node); + } + + public void activeSelectionWizard() { + + } +} Index: src/org/jboss/tools/smooks/graphical/wizard/freemarker/FreemarkerCSVCreationWizardPage.java =================================================================== --- src/org/jboss/tools/smooks/graphical/wizard/freemarker/FreemarkerCSVCreationWizardPage.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/wizard/freemarker/FreemarkerCSVCreationWizardPage.java (revision 0) @@ -0,0 +1,356 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.wizard.freemarker; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.CellEditor; +import org.eclipse.jface.viewers.ICellModifier; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TextCellEditor; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Item; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; + +/** + * @author Dart + * + */ +public class FreemarkerCSVCreationWizardPage extends WizardPage { + + private List fieldsList = new ArrayList(); + private Text seperatorText; + private Text quoteText; + + public FreemarkerCSVCreationWizardPage(String pageName, String title, ImageDescriptor titleImage) { + super(pageName, title, titleImage); + } + + public FreemarkerCSVCreationWizardPage(String pageName) { + super(pageName); + this.setTitle("CSV Template Configuration"); + this.setDescription("Configurate CSV Template"); + } + + /** + * @return the fieldsList + */ + public List getFieldsList() { + return fieldsList; + } + + /** + * @return the seperatorText + */ + public Text getSeperatorText() { + return seperatorText; + } + + /** + * @return the quoteText + */ + public Text getQuoteText() { + return quoteText; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets + * .Composite) + */ + public void createControl(Composite parent) { + fieldsList.clear(); + + Composite mainComposite = new Composite(parent, SWT.NONE); + GridData gd = new GridData(GridData.FILL_BOTH); + mainComposite.setLayoutData(gd); + GridLayout layout = new GridLayout(); + layout.numColumns = 2; + mainComposite.setLayout(layout); + + Label seperatorLabel = new Label(mainComposite, SWT.NONE); + seperatorLabel.setText("Seperator Character : "); + seperatorText = new Text(mainComposite, SWT.BORDER); + gd = new GridData(GridData.FILL_HORIZONTAL); + seperatorText.setLayoutData(gd); + seperatorText.setTextLimit(1); + + Label quoteLabel = new Label(mainComposite, SWT.NONE); + quoteLabel.setText("Quote Character : "); + quoteText = new Text(mainComposite, SWT.BORDER); + gd = new GridData(GridData.FILL_HORIZONTAL); + quoteText.setLayoutData(gd); + quoteText.setTextLimit(1); + + + + gd = new GridData(GridData.FILL_HORIZONTAL); + gd.heightHint = 200; + gd.horizontalSpan = 2; + Group fieldsComposite = new Group(mainComposite, SWT.NONE); + fieldsComposite.setText("Fields"); + fieldsComposite.setLayoutData(gd); + GridLayout gl = new GridLayout(); + gl.numColumns = 2; + fieldsComposite.setLayout(gl); + + gd = new GridData(GridData.FILL_BOTH); + + String fields = null; + + final TableViewer fieldsViewer = new TableViewer(fieldsComposite, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION); + fieldsViewer.getControl().setLayoutData(gd); + fieldsViewer.getTable().setLinesVisible(true); + fieldsViewer.setContentProvider(new FieldsContentProvider()); + fieldsViewer.setLabelProvider(new FieldsLabelProvider()); + + CellEditor fieldCellEditor = new TextCellEditor(fieldsViewer.getTable(), SWT.BORDER); + + fieldsViewer.getTable().setLinesVisible(true); + + fieldsViewer.setCellEditors(new CellEditor[] { fieldCellEditor }); + + fieldsViewer.setColumnProperties(new String[] { "field" }); + + fieldsViewer.setCellModifier(new ICellModifier() { + + public void modify(Object element, String property, Object value) { + Object el = null; + if (element instanceof Item) { + el = ((Item) element).getData(); + } + if (el == null) + return; + if (el instanceof FieldText && value instanceof String) { + if (property.equals("field")) { + if (value.toString().equals(((FieldText) el).getText())) { + return; + } + ((FieldText) el).setText(value.toString()); + fieldsViewer.refresh(el); + updatePage(); + } + } + } + + public Object getValue(Object element, String property) { + if (element instanceof FieldText) { + if (property.equals("field")) { + return ((FieldText) element).getText(); + } + } + + return null; + } + + public boolean canModify(Object element, String property) { + if (element instanceof FieldText) { + if (property.equals("field")) { + return true; + } + } + return false; + } + }); + if (fields == null) { + fields = ""; + } + fillFieldsList(fields); + fieldsViewer.setInput(fieldsList); + + Composite buttonComposite = new Composite(fieldsComposite, SWT.NONE); + gd = new GridData(GridData.FILL_VERTICAL); + gd.widthHint = 100; + buttonComposite.setLayoutData(gd); + + GridLayout bgl = new GridLayout(); + buttonComposite.setLayout(bgl); + + gd = new GridData(GridData.FILL_HORIZONTAL); + + final Button addButton = new Button(buttonComposite, SWT.NONE); + addButton.setLayoutData(gd); + addButton.setText("Add Field"); + + final Button removeButton = new Button(buttonComposite, SWT.NONE); + removeButton.setLayoutData(gd); + removeButton.setText("Remove"); + + addButton.addSelectionListener(new SelectionListener() { + + public void widgetSelected(SelectionEvent e) { + addButton.setEnabled(false); + try { + FieldText field = new FieldText("field"); + fieldsList.add(field); + fieldsViewer.refresh(); + updatePage(); + } catch (Throwable t) { + + } finally { + addButton.setEnabled(true); + } + } + + public void widgetDefaultSelected(SelectionEvent e) { + // TODO Auto-generated method stub + + } + }); + + removeButton.addSelectionListener(new SelectionListener() { + + public void widgetSelected(SelectionEvent e) { + IStructuredSelection s = (IStructuredSelection) fieldsViewer.getSelection(); + fieldsList.removeAll(s.toList()); + fieldsViewer.refresh(); + updatePage(); + } + + public void widgetDefaultSelected(SelectionEvent e) { + + } + }); + + this.setControl(mainComposite); + + seperatorText.setText(","); + quoteText.setText("\""); + + seperatorText.addModifyListener(new ModifyListener() { + + public void modifyText(ModifyEvent e) { + updatePage(); + } + }); + quoteText.addModifyListener(new ModifyListener() { + + public void modifyText(ModifyEvent e) { + updatePage(); + } + }); + + this.setPageComplete(false); + } + + private void fillFieldsList(String fieldsString) { + if (fieldsString == null || fieldsString.length() == 0) + return; + String input = fieldsString.toString(); + input = input.trim(); + if (input.indexOf(",") != -1) { + String[] fields = input.split(","); + if (fields != null && fields.length > 0) { + for (int i = 0; i < fields.length; i++) { + String field = fields[i]; + if (field != null) { + field = field.trim(); + fieldsList.add(new FieldText(field)); + } + } + } + } else { + fieldsList.add(new FieldText(input)); + } + } + + protected void updatePage() { + String error = null; + String seperator = seperatorText.getText(); + String quote = quoteText.getText(); + if (seperator == null || seperator.length() == 0) { + error = "Seperator can't be null"; + } + if (quote == null || quote.length() == 0) { + error = "Quote can't be null"; + } + + if (seperator != null && seperator.length() > 1) { + error = "Seperator must be only one character"; + } + if (quote != null && quote.length() > 1) { + error = "Quote must be only one character"; + } + if (fieldsList.isEmpty()) { + error = "Fields can't be null"; + } + this.setErrorMessage(error); + this.setPageComplete(error == null); + } + + private class FieldsLabelProvider extends LabelProvider { + + @Override + public String getText(Object element) { + if (element instanceof FieldText) { + return ((FieldText) element).getText(); + } + return super.getText(element); + } + + } + + private class FieldsContentProvider implements IStructuredContentProvider { + + public void dispose() { + // TODO Auto-generated method stub + + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + + } + + public Object[] getElements(Object inputElement) { + if (inputElement instanceof List) { + return ((List) inputElement).toArray(); + } + return new Object[] {}; + } + } + + class FieldText { + private String text = null; + + public FieldText(String t) { + setText(t); + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + } + +} Index: src/org/jboss/tools/smooks/graphical/wizard/freemarker/FreemarkerCSVTemplateCreationWizard.java =================================================================== --- src/org/jboss/tools/smooks/graphical/wizard/freemarker/FreemarkerCSVTemplateCreationWizard.java (revision 0) +++ src/org/jboss/tools/smooks/graphical/wizard/freemarker/FreemarkerCSVTemplateCreationWizard.java (revision 0) @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright (c) 2008 Red Hat, Inc. + * Distributed under license by Red Hat, Inc. All rights reserved. + * This program is made available under the terms of the + * Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Red Hat, Inc. - initial API and implementation + ******************************************************************************/ +package org.jboss.tools.smooks.graphical.wizard.freemarker; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.jface.wizard.Wizard; +import org.jboss.tools.smooks.graphical.wizard.freemarker.FreemarkerCSVCreationWizardPage.FieldText; + +/** + * @author Dart + * + */ +public class FreemarkerCSVTemplateCreationWizard extends Wizard { + + private FreemarkerCSVCreationWizardPage page; + private String seprator; + private String quote; + + private List fields = new ArrayList(); + + public FreemarkerCSVTemplateCreationWizard() { + super(); + // TODO Auto-generated constructor stub + } + + /** + * @return the seprator + */ + public String getSeprator() { + return seprator; + } + + /** + * @return the quote + */ + public String getQuote() { + return quote; + } + + /** + * @return the fields + */ + public List getFields() { + return fields; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.Wizard#addPages() + */ + @Override + public void addPages() { + if (page == null) { + page = new FreemarkerCSVCreationWizardPage("CSV"); + } + this.addPage(page); + super.addPages(); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.wizard.Wizard#performFinish() + */ + @Override + public boolean performFinish() { + if (page != null) { + seprator = page.getSeperatorText().getText(); + quote = page.getQuoteText().getText(); + List fieldList = page.getFieldsList(); + for (Iterator iterator = fieldList.iterator(); iterator.hasNext();) { + FieldText fieldText = (FieldText) iterator.next(); + fields.add(fieldText.getText()); + } + return true; + } + return true; + } + +} Index: src/org/jboss/template/TemplateBuilder.java =================================================================== --- src/org/jboss/template/TemplateBuilder.java (revision 18773) +++ src/org/jboss/template/TemplateBuilder.java (working copy) @@ -43,7 +43,7 @@ * @param model The model on which the template will be constructed. */ public TemplateBuilder(Document model) { - Assert.isNotNull(model, "model"); + Assert.isNotNull(model, "model"); this.model = model; } @@ -100,8 +100,16 @@ public boolean removeMapping(Mapping mapping) { return mappings.remove(mapping); } + + /** + * Get the full list of mappings. + * @return The full list of mappings. + */ + public List getMappings() { + return mappings; + } - private void asserValidMappingNode(Node mappingNode) throws InvalidMappingException { + private void asserValidMappingNode(Node mappingNode) throws InvalidMappingException { if(mappingNode.getNodeType() != Node.ATTRIBUTE_NODE && mappingNode.getNodeType() != Node.ELEMENT_NODE) { throw new InvalidMappingException("Unsupported XML target node mapping. Support XML elements and attributes only."); } Index: src/org/jboss/template/util/FreeMarkerUtil.java =================================================================== --- src/org/jboss/template/util/FreeMarkerUtil.java (revision 0) +++ src/org/jboss/template/util/FreeMarkerUtil.java (revision 0) @@ -0,0 +1,44 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2006, JBoss Inc., and others contributors as indicated + * by the @authors tag. All rights reserved. + * See the copyright.txt in the distribution for a + * full listing of individual contributors. + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License, v. 2.1. + * This program is distributed in the hope that it will be useful, but WITHOUT A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License, + * v.2.1 along with this distribution; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * (C) 2005-2006, JBoss Inc. + */ +package org.jboss.template.util; + +import org.jboss.template.exception.TemplateBuilderException; + +/** + * FreeMarker utility methods. + * + * @author tom.fennelly@jboss.com + */ +public class FreeMarkerUtil { + + public static String extractJavaPath(String dollarVariable) throws TemplateBuilderException { + dollarVariable = dollarVariable.trim(); + + if(isDollarVariable(dollarVariable)) { + return dollarVariable.substring(2, dollarVariable.length() - 1); + } else { + throw new TemplateBuilderException(""); + } + } + + public static boolean isDollarVariable(String variable) { + return (variable.startsWith("${") && variable.endsWith("}")); + } +} Index: src/org/jboss/template/csv/CSVModelBuilder.java =================================================================== --- src/org/jboss/template/csv/CSVModelBuilder.java (revision 18773) +++ src/org/jboss/template/csv/CSVModelBuilder.java (working copy) @@ -26,6 +26,7 @@ import org.w3c.dom.Element; /** + * CSV Model Builder. * @author tom.fennelly@jboss.com */ public class CSVModelBuilder extends ModelBuilder { Index: src/org/jboss/template/csv/CSVFreeMarkerTemplateBuilder.java =================================================================== --- src/org/jboss/template/csv/CSVFreeMarkerTemplateBuilder.java (revision 0) +++ src/org/jboss/template/csv/CSVFreeMarkerTemplateBuilder.java (revision 0) @@ -0,0 +1,175 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2006, JBoss Inc., and others contributors as indicated + * by the @authors tag. All rights reserved. + * See the copyright.txt in the distribution for a + * full listing of individual contributors. + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License, v. 2.1. + * This program is distributed in the hope that it will be useful, but WITHOUT A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License, + * v.2.1 along with this distribution; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * (C) 2005-2006, JBoss Inc. + */ +package org.jboss.template.csv; + +import java.io.IOException; +import java.io.StringReader; +import java.util.Enumeration; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; +import org.w3c.dom.Node; +import org.jboss.template.*; +import org.jboss.template.exception.TemplateBuilderException; +import org.jboss.template.exception.UnmappedCollectionNodeException; +import org.jboss.template.util.FreeMarkerUtil; + +import au.com.bytecode.opencsv.CSVReader; + +import freemarker.core.TemplateElement; +import freemarker.template.Configuration; +import freemarker.template.Template; + +/** + * Freemarker Template Builder for a CSV messages. + * + * @author tom.fennelly@jboss.com + */ +public class CSVFreeMarkerTemplateBuilder extends TemplateBuilder { + + private char separatorChar; + private char quoteChar; + + /** + * Construct a new FreeMarker Template Builder with no mappings. + * @param model The model. + * @param separatorChar The CSV field separator character. + * @param quoteChar The CSV field quote character. + */ + public CSVFreeMarkerTemplateBuilder(Document model, char separatorChar, char quoteChar) { + super(model); + this.separatorChar = separatorChar; + this.quoteChar = quoteChar; + } + + /** + * Construct a new FreeMarker Template Builder, extracting the mappings from the + * supplied FreeMarker template String. + * @param model The model. + * @param separatorChar The CSV field separator character. + * @param quoteChar The CSV field quote character. + * @param ftlTemplate The FreeMarker Template from which the mappings are to be extracted. + * @throws TemplateBuilderException Error parsing the supplied FreeMarker template. + */ + public CSVFreeMarkerTemplateBuilder(Document model, char separatorChar, char quoteChar, String ftlTemplate) throws TemplateBuilderException { + this(model, separatorChar, quoteChar); + addMappings(ftlTemplate); + } + + private void addMappings(String ftlTemplate) throws TemplateBuilderException { + Template template; + + try { + template = new Template("csvTemplate", new StringReader(ftlTemplate), new Configuration()); + } catch (IOException e) { + throw new TemplateBuilderException ("Failed to parse the Supplied FreeMarker template.", e); + } + + TemplateElement listElement = template.getRootTreeNode(); + if(!listElement.getNodeName().equals("IteratorBlock") || !listElement.getDescription().startsWith("list")) { + throw new TemplateBuilderException ("Unable to recognize template as being a CSV template. Expecting first template token to be a 'list' IteratorBlock node."); + } + + // Add the mapping for the list itself... + addCSVListMapping(listElement.getDescription()); + + // Add the mappings for the individual fields... + addCSVFieldMappings(listElement); + } + + private void addCSVListMapping(String description) throws TemplateBuilderException { + String[] tokens = description.split(" +?"); + Element csvRecordElement = getModel().getDocumentElement(); + + // 2nd and 4th tokens contain the info we're looking for e.g. "list message.people as person" + addCollectionMapping(tokens[1], csvRecordElement, tokens[3]); + } + + private void addCSVFieldMappings(TemplateElement listElement) throws TemplateBuilderException { + StringBuilder parseBuffer = new StringBuilder(); + Enumeration children = listElement.children(); + + while(children != null && children.hasMoreElements()) { + TemplateElement child = (TemplateElement) children.nextElement(); + parseBuffer.append(child.getCanonicalForm()); + } + + Element csvRecordElement = getModel().getDocumentElement(); + CSVReader csvReader = new CSVReader(new StringReader(parseBuffer.toString()), separatorChar, quoteChar); + try { + String[] fields = csvReader.readNext(); + int fieldIndex = 0; + NodeList csvFieldModelNodes = csvRecordElement.getChildNodes(); + + for(int i = 0; i < csvFieldModelNodes.getLength(); i++) { + Node node = csvFieldModelNodes.item(i); + if(node.getNodeType() == Node.ELEMENT_NODE) { + if(fieldIndex >= fields.length) { + throw new TemplateBuilderException("CSV Template fieldset size does not match that of the specified message model. Check the supplied fieldset. Check the specified 'separator' and 'quote' characters match those used in the template."); + } + + if(FreeMarkerUtil.isDollarVariable(fields[fieldIndex])) { + addValueMapping(FreeMarkerUtil.extractJavaPath(fields[fieldIndex]), node); + } + fieldIndex++; + } + } + } catch (IOException e) { + throw new TemplateBuilderException("Failed to parse CSV fields in CSV template.", e); + } + } + + public String buildTemplate() throws TemplateBuilderException { + Element recordElement = getModel().getDocumentElement(); + CollectionMapping collectionMapping = getCollectionMapping(recordElement); + + if(collectionMapping == null) { + throw new UnmappedCollectionNodeException(recordElement); + } else { + StringBuilder template = new StringBuilder(); + NodeList nodeList = recordElement.getChildNodes(); + int fieldIndex = 0; + + template.append("<#list " + collectionMapping.getSrcPath() + " as " + collectionMapping.getCollectionItemName() + ">\n"); + for(int i = 0; i < nodeList.getLength(); i++) { + Node node = nodeList.item(i); + if(node.getNodeType() == Node.ELEMENT_NODE) { + Mapping fieldMapping = getMapping(node); + + if(fieldIndex > 0) { + template.append(separatorChar); + } + + if(fieldMapping != null) { + template.append(quoteChar); + template.append("${" + fieldMapping.getSrcPath() + "}"); + template.append(quoteChar); + } + + fieldIndex++; + } + } + template.append("\n"); + + return template.toString(); + } + } +} \ No newline at end of file Index: src/org/jboss/template/xsd/XSDFreeMarkerTemplateBuilder.java =================================================================== --- src/org/jboss/template/xsd/XSDFreeMarkerTemplateBuilder.java (revision 0) +++ src/org/jboss/template/xsd/XSDFreeMarkerTemplateBuilder.java (revision 0) @@ -0,0 +1,42 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2006, JBoss Inc., and others contributors as indicated + * by the @authors tag. All rights reserved. + * See the copyright.txt in the distribution for a + * full listing of individual contributors. + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License, v. 2.1. + * This program is distributed in the hope that it will be useful, but WITHOUT A + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * You should have received a copy of the GNU Lesser General Public License, + * v.2.1 along with this distribution; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + * (C) 2005-2006, JBoss Inc. + */ +package org.jboss.template.xsd; + +import org.w3c.dom.Document; +import org.milyn.xml.XmlUtil; +import org.jboss.template.*; +import org.jboss.template.exception.TemplateBuilderException; + +/** + * Freemarker Template Buidler for a XSD messages. + * + * @author tom.fennelly@jboss.com + */ +public class XSDFreeMarkerTemplateBuilder extends TemplateBuilder { + + public XSDFreeMarkerTemplateBuilder(Document model) { + super(model); + } + + public String buildTemplate() throws TemplateBuilderException { + // TODO... + return XmlUtil.serialize(getModel(), true); + } +} Index: src/org/jboss/template/xsd/XSDModelBuilder.java =================================================================== --- src/org/jboss/template/xsd/XSDModelBuilder.java (revision 18773) +++ src/org/jboss/template/xsd/XSDModelBuilder.java (working copy) @@ -114,14 +114,14 @@ } } - EList typeDefs = schema.getTypeDefinitions(); + EList typeDefs = schema.getTypeDefinitions(); for(int i = 0; i < typeDefs.size(); i++) { XSDTypeDefinition type = (XSDTypeDefinition) typeDefs.get(i); types.put(type.getName(), type); } // Load includes and imports types... - List contents = schema.getContents(); + List contents = schema.getContents(); for(Object schemaComponentObj : contents) { if(schemaComponentObj instanceof XSDImport) { XSDImport xsdImport = (XSDImport) schemaComponentObj; @@ -188,7 +188,7 @@ private void processComplexType(Document document, Element element, XSDComplexTypeDefinition complexTypeDef) { XSDParticle particle = complexTypeDef.getComplexType(); - EList attributes = complexTypeDef.getAttributeContents(); + EList attributes = complexTypeDef.getAttributeContents(); addAttributes(element, attributes); Index: src/org/jboss/template/Mapping.java =================================================================== --- src/org/jboss/template/Mapping.java (revision 18773) +++ src/org/jboss/template/Mapping.java (working copy) @@ -69,7 +69,7 @@ } public void addHideNode(Node node) { - Assert.isNotNull(node, "node"); + Assert.isNotNull(node, "node"); if(hideNodes == null) { hideNodes = new ArrayList(); @@ -79,7 +79,7 @@ } public void addShowNode(Node node) { - Assert.isNotNull(node, "node"); + Assert.isNotNull(node, "node"); if(showNodes == null) { showNodes = new ArrayList(); #P org.jboss.tools.smooks.core.test Index: src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java =================================================================== --- src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java (revision 18773) +++ src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java (working copy) @@ -25,6 +25,7 @@ import org.eclipse.ui.ide.IDE; import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils; import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor; +import org.jboss.tools.smooks.model.freemarker.Template; /** * @author Dart Index: src/org/jboss/template/csv/CSVToFreemarkerTemplateBuilderTest.java =================================================================== --- src/org/jboss/template/csv/CSVToFreemarkerTemplateBuilderTest.java (revision 18773) +++ src/org/jboss/template/csv/CSVToFreemarkerTemplateBuilderTest.java (working copy) @@ -19,6 +19,8 @@ */ package org.jboss.template.csv; +import java.io.IOException; + import junit.framework.TestCase; import org.jboss.template.exception.TemplateBuilderException; @@ -30,88 +32,131 @@ * @author tom.fennelly@jboss.com */ public class CSVToFreemarkerTemplateBuilderTest extends TestCase { - - public static void main(String[] args) throws TemplateBuilderException{ - new CSVToFreemarkerTemplateBuilderTest().test_all_fields_mapped(); + + public static void main(String[] args) throws TemplateBuilderException { + // new CSVToFreemarkerTemplateBuilderTest().test_all_fields_mapped(); + } + + public void test_all_fields_mapped_01() throws TemplateBuilderException, IOException { + CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); + Document model = modelBuilder.buildModel(); + CSVFreeMarkerTemplateBuilder builder1 = new CSVFreeMarkerTemplateBuilder(model, ',', '\"'); + + builder1.addCollectionMapping("people", getRecordElement(model), "person"); + builder1.addValueMapping("person.fname", getFieldElement(model, "firstname")); + builder1.addValueMapping("person.lname", getFieldElement(model, "lastname")); + builder1.addValueMapping("person.address.country", getFieldElement(model, "country")); + + String template = builder1.buildTemplate(); + // System.out.println(template); + assertEquals("<#list people as person>\n" + + "\"${person.fname}\",\"${person.lname}\",\"${person.address.country}\"\n" + "", template); + + CSVFreeMarkerTemplateBuilder builder2 = new CSVFreeMarkerTemplateBuilder(model, ',', '\"', template); + template = builder2.buildTemplate(); + // System.out.println(template); + assertEquals("<#list people as person>\n" + + "\"${person.fname}\",\"${person.lname}\",\"${person.address.country}\"\n" + "", template); } - public void test_all_fields_mapped() throws TemplateBuilderException { - CSVModelBuilder modelBuilder = new CSVModelBuilder(new String[]{"firstname", "lastname", "country"}); - Document model = modelBuilder.buildModel(); - CSVToFreemarkerTemplateBuilder builder; - - builder = new CSVToFreemarkerTemplateBuilder(model, ',', '\"'); + /** + * Same as test above accept it uses different delimiters. + */ + public void test_all_fields_mapped_02() throws TemplateBuilderException, IOException { + CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); + Document model = modelBuilder.buildModel(); + CSVFreeMarkerTemplateBuilder builder1 = new CSVFreeMarkerTemplateBuilder(model, '|', '\''); + + builder1.addCollectionMapping("people", getRecordElement(model), "person"); + builder1.addValueMapping("person.fname", getFieldElement(model, "firstname")); + builder1.addValueMapping("person.lname", getFieldElement(model, "lastname")); + builder1.addValueMapping("person.address.country", getFieldElement(model, "country")); + + String template = builder1.buildTemplate(); + // System.out.println(template); + assertEquals("<#list people as person>\n" + "'${person.fname}'|'${person.lname}'|'${person.address.country}'\n" + + "", template); + + CSVFreeMarkerTemplateBuilder builder2 = new CSVFreeMarkerTemplateBuilder(model, '|', '\'', template); + template = builder2.buildTemplate(); + // System.out.println(template); + assertEquals("<#list people as person>\n" + "'${person.fname}'|'${person.lname}'|'${person.address.country}'\n" + + "", template); + } - builder.addCollectionMapping("people", getRecordElement(model),"person"); - builder.addValueMapping("person.fname", getFieldElement(model, "firstname")); - builder.addValueMapping("person.lname", getFieldElement(model, "lastname")); - builder.addValueMapping("person.address.country", getFieldElement(model, "country")); + public void test_all_fields_not_mapped() throws TemplateBuilderException { + CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); + Document model = modelBuilder.buildModel(); + CSVFreeMarkerTemplateBuilder builder; - String template = builder.buildTemplate(); - System.out.println(template); - assertEquals("<#list people as person>\n" + - "\"${person.fname}\",\"${person.lname}\",\"${person.address.country}\"\n" + - "", - template); - } + builder = new CSVFreeMarkerTemplateBuilder(model, ',', '\"'); - public void test_all_fields_not_mapped() throws TemplateBuilderException { - CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); - Document model = modelBuilder.buildModel(); - CSVToFreemarkerTemplateBuilder builder; + builder.addCollectionMapping("people", getRecordElement(model), "person"); + builder.addValueMapping("person.fname", getFieldElement(model, "firstname")); + builder.addValueMapping("person.address.country", getFieldElement(model, "country")); - builder = new CSVToFreemarkerTemplateBuilder(model, ',', '\"'); + String template = builder.buildTemplate(); + // System.out.println(template); + assertEquals( + "<#list people as person>\n" + "\"${person.fname}\",,\"${person.address.country}\"\n" + "", + template); - builder.addCollectionMapping("people", getRecordElement(model), "person"); - builder.addValueMapping("person.fname", getFieldElement(model, "firstname")); - builder.addValueMapping("person.address.country", getFieldElement(model, "country")); + CSVFreeMarkerTemplateBuilder builder2 = new CSVFreeMarkerTemplateBuilder(model, ',', '\"', template); + template = builder2.buildTemplate(); + // System.out.println(template); + assertEquals( + "<#list people as person>\n" + "\"${person.fname}\",,\"${person.address.country}\"\n" + "", + template); - String template = builder.buildTemplate(); - System.out.println(template); - assertEquals("<#list people as person>\n" + - "\"${person.fname}\",,\"${person.address.country}\"\n" + - "", - template); - } + try { + new CSVFreeMarkerTemplateBuilder(model, ';', '\"', template); + fail("Expected TemplateBuilderException"); + } catch (TemplateBuilderException e) { + assertEquals( + "CSV Template fieldset size does not match that of the specified message model. Check the supplied fieldset. Check the specified 'separator' and 'quote' characters match those used in the template.", + e.getMessage()); + } + } - public void test_collection_not_mapped_01() throws TemplateBuilderException { - CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); - Document model = modelBuilder.buildModel(); - CSVToFreemarkerTemplateBuilder builder; + public void test_collection_not_mapped_01() throws TemplateBuilderException { + CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); + Document model = modelBuilder.buildModel(); + CSVFreeMarkerTemplateBuilder builder; - builder = new CSVToFreemarkerTemplateBuilder(model, ',', '\"'); + builder = new CSVFreeMarkerTemplateBuilder(model, ',', '\"'); - try { - // Shouldn't be able to add a value binding where the model target is inside - // an unmapped collection... - builder.addValueMapping("person.fname", getFieldElement(model, "firstname")); - fail("Expected UnmappedCollectionNodeException"); - } catch(UnmappedCollectionNodeException e) { - assertEquals("Unmapped collection node 'csv-record'.", e.getMessage()); - } - } + try { + // Shouldn't be able to add a value binding where the model target + // is inside + // an unmapped collection... + builder.addValueMapping("person.fname", getFieldElement(model, "firstname")); + fail("Expected UnmappedCollectionNodeException"); + } catch (UnmappedCollectionNodeException e) { + assertEquals("Unmapped collection node 'csv-record'.", e.getMessage()); + } + } - public void test_collection_not_mapped_02() throws TemplateBuilderException { - CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); - Document model = modelBuilder.buildModel(); - CSVToFreemarkerTemplateBuilder builder; + public void test_collection_not_mapped_02() throws TemplateBuilderException { + CSVModelBuilder modelBuilder = new CSVModelBuilder("firstname", "lastname", "country"); + Document model = modelBuilder.buildModel(); + CSVFreeMarkerTemplateBuilder builder; - builder = new CSVToFreemarkerTemplateBuilder(model, ',', '\"'); + builder = new CSVFreeMarkerTemplateBuilder(model, ',', '\"'); - try { - // For CSV, you need to have at least mapped the collection... - builder.buildTemplate(); - fail("Expected UnmappedCollectionNodeException"); - } catch(UnmappedCollectionNodeException e) { - assertEquals("Unmapped collection node 'csv-record'.", e.getMessage()); - } - } + try { + // For CSV, you need to have at least mapped the collection... + builder.buildTemplate(); + fail("Expected UnmappedCollectionNodeException"); + } catch (UnmappedCollectionNodeException e) { + assertEquals("Unmapped collection node 'csv-record'.", e.getMessage()); + } + } - private Element getRecordElement(Document model) { - return model.getDocumentElement(); - } + private Element getRecordElement(Document model) { + return model.getDocumentElement(); + } - private Element getFieldElement(Document model, String fieldName) { - return (Element) model.getElementsByTagName(fieldName).item(0); - } + private Element getFieldElement(Document model, String fieldName) { + return (Element) model.getElementsByTagName(fieldName).item(0); + } } \ No newline at end of file #P org.jboss.tools.smooks.core Index: src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java =================================================================== --- src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java (revision 18773) +++ src/org/jboss/tools/smooks10/model/smooks/util/SmooksModelUtils.java (working copy) @@ -18,6 +18,7 @@ import org.eclipse.emf.common.command.Command; import org.eclipse.emf.common.command.CompoundCommand; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.ExtendedMetaData; @@ -28,9 +29,12 @@ import org.eclipse.emf.edit.command.CommandParameter; import org.eclipse.emf.edit.command.RemoveCommand; import org.eclipse.emf.edit.domain.EditingDomain; +import org.jboss.tools.smooks.model.freemarker.Freemarker; +import org.jboss.tools.smooks.model.freemarker.Template; import org.jboss.tools.smooks.model.graphics.ext.GraphFactory; import org.jboss.tools.smooks.model.graphics.ext.InputType; import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; +import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig; import org.jboss.tools.smooks.model.smooks.ConditionType; import org.jboss.tools.smooks.model.smooks.ConditionsType; import org.jboss.tools.smooks.model.smooks.SmooksResourceListType; @@ -47,6 +51,20 @@ public class SmooksModelUtils { + public static final String KEY_TEMPLATE_TYPE = "messageType"; + + public static final String FREEMARKER_TEMPLATE_TYPE_CSV = "CSV"; + + public static final String KEY_CSV_FIELDS = "csvFields"; + + public static final String KEY_TASK_ID_REF = "idref"; + + public static final String KEY_OBJECT_ID = "id"; + + public static final String KEY_CSV_SEPERATOR = "seperator"; + + public static final String KEY_CSV_QUOTE = "quote"; + public static final String INPUT_TYPE_JAVA = "java"; public static final String INPUT_TYPE_CUSTOME = "custom"; @@ -108,11 +126,11 @@ if ("bindings".equals(param.getName())) { if (param.eContents().isEmpty()) continue; - List bindingList = (List) param.getMixed().get(SmooksModelUtils.ELEMENT_BINDING, false); + List bindingList = (List) param.getMixed().list(SmooksModelUtils.ELEMENT_BINDING); return bindingList; } } - return Collections.EMPTY_LIST; + return Collections.emptyList(); } public static boolean isBeanPopulatorResource(ResourceConfigType type) { @@ -327,13 +345,11 @@ } public static String getAnyTypeComment(AnyType anyType) { - Object value = anyType.getMixed().get(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT, true); - if (value != null) { - if (value instanceof List && !((List) value).isEmpty()) { - Object v = ((List) value).get(0); - if (v != null) { - return v.toString().trim(); - } + EList value = anyType.getMixed().list(XMLTypePackage.Literals.XML_TYPE_DOCUMENT_ROOT__COMMENT); + if (value != null && !value.isEmpty()) { + Object v = ((List) value).get(0); + if (v != null) { + return v.toString().trim(); } // return value.toString(); } @@ -536,4 +552,134 @@ return Collections.emptyList(); } + public static List getParams(AnyType model) { + if (model == null) + return Collections.emptyList(); + List obj = model.getMixed().list( + org.jboss.tools.smooks.model.smooks.SmooksPackage.Literals.DOCUMENT_ROOT__PARAM); + return obj; + } + + public static void addParam(AnyType model, org.jboss.tools.smooks.model.smooks.ParamType param) { + if (model == null) + return; + model.getMixed().add( + XMLTypePackage.Literals.ANY_TYPE__MIXED, + FeatureMapUtil.createEntry( + org.jboss.tools.smooks.model.smooks.SmooksPackage.Literals.DOCUMENT_ROOT__PARAM, param)); + } + + public static char getFreemarkerCSVSeperator(Template template) { + org.jboss.tools.smooks.model.smooks.ParamType typeParam = getParam(template, KEY_CSV_SEPERATOR); + if (typeParam != null) { + String value = typeParam.getStringValue(); + if (value != null && value.length() == 1) { + return value.toCharArray()[0]; + } + } + return 0; + } + + public static char getFreemarkerCSVQuote(Template template) { + org.jboss.tools.smooks.model.smooks.ParamType typeParam = getParam(template, KEY_CSV_QUOTE); + if (typeParam != null) { + String value = typeParam.getStringValue(); + if (value != null && value.length() == 1) { + return value.toCharArray()[0]; + } + } + return 0; + } + + public static String getTemplateType(AnyType template) { + if (template == null) + return null; + org.jboss.tools.smooks.model.smooks.ParamType typeParam = getParam(template, KEY_TEMPLATE_TYPE); + if (typeParam != null) { + return typeParam.getStringValue(); + } + return null; + } + + public static String[] getFreemarkerCSVFileds(Template template) { + org.jboss.tools.smooks.model.smooks.ParamType typeParam = getParam(template, KEY_CSV_FIELDS); + if (typeParam != null) { + String value = typeParam.getStringValue(); + if (value != null) { + value = value.trim(); + return value.split(","); + } + } + return null; + } + + public static org.jboss.tools.smooks.model.smooks.ParamType getParam(AnyType model, String paramName) { + List params = getParams(model); + for (Iterator iterator = params.iterator(); iterator.hasNext();) { + org.jboss.tools.smooks.model.smooks.ParamType paramType = (org.jboss.tools.smooks.model.smooks.ParamType) iterator + .next(); + if (paramName.equals(paramType.getName())) { + return paramType; + } + } + return null; + } + + public static String getParamValue(AnyType model, String paramName) { + List params = getParams(model); + for (Iterator iterator = params.iterator(); iterator.hasNext();) { + org.jboss.tools.smooks.model.smooks.ParamType paramType = (org.jboss.tools.smooks.model.smooks.ParamType) iterator + .next(); + if (paramName.equals(paramType.getName())) { + return paramType.getStringValue(); + } + } + return null; + } + + public static String getParamValue(List params, String paramName) { + for (Iterator iterator = params.iterator(); iterator.hasNext();) { + org.jboss.tools.smooks.model.smooks.ParamType paramType = (org.jboss.tools.smooks.model.smooks.ParamType) iterator + .next(); + if (paramName.equals(paramType.getName())) { + return paramType.getStringValue(); + } + } + return null; + } + + public static String generateTaskID(SmooksResourceListType resourceList, Class modelClass, String baseID) { + List configList = resourceList.getAbstractResourceConfig(); + int index = 0; + List modelList = new ArrayList(); + for (Iterator iterator = configList.iterator(); iterator.hasNext();) { + AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator.next(); + if (modelClass.isInstance(abstractResourceConfig)) { + modelList.add(abstractResourceConfig); + // index++; + } + } + String id = baseID + String.valueOf(index); + int i = 0; + for (i = 0; i < modelList.size(); i++) { + AbstractResourceConfig abstractResourceConfig = modelList.get(i); + String idref = null; + if (abstractResourceConfig instanceof Freemarker) { + idref = SmooksModelUtils.getParamValue(((Freemarker) abstractResourceConfig).getParam(), + SmooksModelUtils.KEY_OBJECT_ID); + } + if (idref == null) { + idref = SmooksModelUtils.getParamValue(abstractResourceConfig, SmooksModelUtils.KEY_OBJECT_ID); + } + if (id.equals(idref)) { + index++; + id = baseID + String.valueOf(index); + i = 0; + continue; + } + } + return id; + + } + } Index: src/org/jboss/tools/smooks/model/graphics/ext/ProcessesType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/ProcessesType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/ProcessesType.java (working copy) @@ -1,55 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Processes Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ProcessesType#getProcess Process}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getProcessesType() - * @model extendedMetaData="name='processes_._type' kind='elementOnly'" - * @generated - */ -public interface ProcessesType extends EObject { - /** - * Returns the value of the 'Process' containment reference. - * - *

- * If the meaning of the 'Process' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Process' containment reference. - * @see #setProcess(ProcessType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getProcessesType_Process() - * @model containment="true" required="true" - * extendedMetaData="kind='element' name='process' namespace='##targetNamespace'" - * @generated - */ - ProcessType getProcess(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessesType#getProcess Process}' containment reference. - * - * - * @param value the new value of the 'Process' containment reference. - * @see #getProcess() - * @generated - */ - void setProcess(ProcessType value); - -} // ProcessesType Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphicsExtTypeImpl.java (working copy) @@ -1,594 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.impl; - - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.emf.common.notify.Notification; -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.ENotificationImpl; -import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.InternalEList; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.GraphType; -import org.jboss.tools.smooks.model.graphics.ext.ISmooksGraphChangeListener; -import org.jboss.tools.smooks.model.graphics.ext.InputType; -import org.jboss.tools.smooks.model.graphics.ext.ProcessesType; -import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; -import org.jboss.tools.smooks.model.smooks.impl.AbstractResourceConfigImpl; - - -/** - * - * An implementation of the model object 'Smooks Graphics Ext Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getInput Input}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getGraph Graph}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getProcesses Processes}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getAuthor Author}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getInputType Input Type}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getName Name}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getOutputType Output Type}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl#getPlatformVersion Platform Version}
  • - *
- *

- * - * @generated - */ -public class SmooksGraphicsExtTypeImpl extends AbstractResourceConfigImpl implements SmooksGraphicsExtType { - - private List changeListeners = null; - - public List getChangeListeners() { - if(changeListeners == null){ - changeListeners = new ArrayList(); - } - return changeListeners; - } - - public void addSmooksGraphChangeListener(ISmooksGraphChangeListener listener) { - getChangeListeners().add(listener); - } - - public void removeSmooksGraphChangeListener(ISmooksGraphChangeListener listener) { - getChangeListeners().remove(listener); - } - - /** - * The cached value of the '{@link #getInput() Input}' containment reference list. - * - * - * @see #getInput() - * @generated - * @ordered - */ - protected EList input; - - /** - * The cached value of the '{@link #getGraph() Graph}' containment reference. - * - * - * @see #getGraph() - * @generated - * @ordered - */ - protected GraphType graph; - - /** - * The cached value of the '{@link #getProcesses() Processes}' containment reference. - * - * - * @see #getProcesses() - * @generated - * @ordered - */ - protected ProcessesType processes; - - /** - * The default value of the '{@link #getAuthor() Author}' attribute. - * - * - * @see #getAuthor() - * @generated - * @ordered - */ - protected static final String AUTHOR_EDEFAULT = null; - - /** - * The cached value of the '{@link #getAuthor() Author}' attribute. - * - * - * @see #getAuthor() - * @generated - * @ordered - */ - protected String author = AUTHOR_EDEFAULT; - - /** - * The default value of the '{@link #getInputType() Input Type}' attribute. - * - * - * @see #getInputType() - * @generated - * @ordered - */ - protected static final String INPUT_TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getInputType() Input Type}' attribute. - * - * - * @see #getInputType() - * @generated - * @ordered - */ - protected String inputType = INPUT_TYPE_EDEFAULT; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getOutputType() Output Type}' attribute. - * - * - * @see #getOutputType() - * @generated - * @ordered - */ - protected static final String OUTPUT_TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getOutputType() Output Type}' attribute. - * - * - * @see #getOutputType() - * @generated - * @ordered - */ - protected String outputType = OUTPUT_TYPE_EDEFAULT; - - /** - * The default value of the '{@link #getPlatformVersion() Platform Version}' attribute. - * - * - * @see #getPlatformVersion() - * @generated - * @ordered - */ - protected static final String PLATFORM_VERSION_EDEFAULT = null; - - /** - * The cached value of the '{@link #getPlatformVersion() Platform Version}' attribute. - * - * - * @see #getPlatformVersion() - * @generated - * @ordered - */ - protected String platformVersion = PLATFORM_VERSION_EDEFAULT; - - /** - * - * - * @generated - */ - protected SmooksGraphicsExtTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.SMOOKS_GRAPHICS_EXT_TYPE; - } - - /** - * - * - * @generated - */ - public EList getInput() { - if (input == null) { - input = new EObjectContainmentEList(InputType.class, this, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT); - } - return input; - } - - /** - * - * - * @generated - */ - public GraphType getGraph() { - return graph; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetGraph(GraphType newGraph, NotificationChain msgs) { - GraphType oldGraph = graph; - graph = newGraph; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH, oldGraph, newGraph); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setGraph(GraphType newGraph) { - if (newGraph != graph) { - NotificationChain msgs = null; - if (graph != null) - msgs = ((InternalEObject)graph).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH, null, msgs); - if (newGraph != null) - msgs = ((InternalEObject)newGraph).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH, null, msgs); - msgs = basicSetGraph(newGraph, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH, newGraph, newGraph)); - } - - /** - * - * - * @generated - */ - public ProcessesType getProcesses() { - return processes; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetProcesses(ProcessesType newProcesses, NotificationChain msgs) { - ProcessesType oldProcesses = processes; - processes = newProcesses; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES, oldProcesses, newProcesses); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setProcesses(ProcessesType newProcesses) { - if (newProcesses != processes) { - NotificationChain msgs = null; - if (processes != null) - msgs = ((InternalEObject)processes).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES, null, msgs); - if (newProcesses != null) - msgs = ((InternalEObject)newProcesses).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES, null, msgs); - msgs = basicSetProcesses(newProcesses, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES, newProcesses, newProcesses)); - } - - /** - * - * - * @generated - */ - public String getAuthor() { - return author; - } - - /** - * - * - * @generated - */ - public void setAuthor(String newAuthor) { - String oldAuthor = author; - author = newAuthor; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR, oldAuthor, author)); - } - - /** - * - * - * @generated - */ - public String getInputType() { - return inputType; - } - - /** - * - * - * @generated - */ - public void setInputType(String newInputType) { - String oldInputType = inputType; - inputType = newInputType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE, oldInputType, inputType)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getOutputType() { - return outputType; - } - - /** - * - * - * @generated - */ - public void setOutputType(String newOutputType) { - String oldOutputType = outputType; - outputType = newOutputType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE, oldOutputType, outputType)); - } - - /** - * - * - * @generated - */ - public String getPlatformVersion() { - return platformVersion; - } - - /** - * - * - * @generated - */ - public void setPlatformVersion(String newPlatformVersion) { - String oldPlatformVersion = platformVersion; - platformVersion = newPlatformVersion; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION, oldPlatformVersion, platformVersion)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT: - return ((InternalEList)getInput()).basicRemove(otherEnd, msgs); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH: - return basicSetGraph(null, msgs); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES: - return basicSetProcesses(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT: - return getInput(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH: - return getGraph(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES: - return getProcesses(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR: - return getAuthor(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE: - return getInputType(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__NAME: - return getName(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE: - return getOutputType(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION: - return getPlatformVersion(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT: - getInput().clear(); - getInput().addAll((Collection)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH: - setGraph((GraphType)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES: - setProcesses((ProcessesType)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR: - setAuthor((String)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE: - setInputType((String)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__NAME: - setName((String)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE: - setOutputType((String)newValue); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION: - setPlatformVersion((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT: - getInput().clear(); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH: - setGraph((GraphType)null); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES: - setProcesses((ProcessesType)null); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR: - setAuthor(AUTHOR_EDEFAULT); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE: - setInputType(INPUT_TYPE_EDEFAULT); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__NAME: - setName(NAME_EDEFAULT); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE: - setOutputType(OUTPUT_TYPE_EDEFAULT); - return; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION: - setPlatformVersion(PLATFORM_VERSION_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT: - return input != null && !input.isEmpty(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__GRAPH: - return graph != null; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES: - return processes != null; - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR: - return AUTHOR_EDEFAULT == null ? author != null : !AUTHOR_EDEFAULT.equals(author); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE: - return INPUT_TYPE_EDEFAULT == null ? inputType != null : !INPUT_TYPE_EDEFAULT.equals(inputType); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE: - return OUTPUT_TYPE_EDEFAULT == null ? outputType != null : !OUTPUT_TYPE_EDEFAULT.equals(outputType); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION: - return PLATFORM_VERSION_EDEFAULT == null ? platformVersion != null : !PLATFORM_VERSION_EDEFAULT.equals(platformVersion); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (author: "); - result.append(author); - result.append(", inputType: "); - result.append(inputType); - result.append(", name: "); - result.append(name); - result.append(", outputType: "); - result.append(outputType); - result.append(", platformVersion: "); - result.append(platformVersion); - result.append(')'); - return result.toString(); - } - -} //SmooksGraphicsExtTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphPackageImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphPackageImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphPackageImpl.java (working copy) @@ -1,1321 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.eclipse.emf.ecore.xml.type.XMLTypePackage; -import org.jboss.tools.smooks.model.common.CommonPackage; -import org.jboss.tools.smooks.model.common.impl.CommonPackageImpl; -import org.jboss.tools.smooks.model.graphics.ext.ConnectionType; -import org.jboss.tools.smooks.model.graphics.ext.FigureType; -import org.jboss.tools.smooks.model.graphics.ext.GraphFactory; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.GraphType; -import org.jboss.tools.smooks.model.graphics.ext.InputType; -import org.jboss.tools.smooks.model.graphics.ext.ParamType; -import org.jboss.tools.smooks.model.graphics.ext.ProcessType; -import org.jboss.tools.smooks.model.graphics.ext.ProcessesType; -import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot; -import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; -import org.jboss.tools.smooks.model.graphics.ext.TaskType; -import org.jboss.tools.smooks.model.smooks.SmooksPackage; -import org.jboss.tools.smooks.model.smooks.impl.SmooksPackageImpl; - - - -/** - * - * An implementation of the model Package. - * - * @generated - */ -public class GraphPackageImpl extends EPackageImpl implements GraphPackage { - /** - * - * - * @generated - */ - private EClass connectionTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass smooksGraphExtensionDocumentRootEClass = null; - - /** - * - * - * @generated - */ - private EClass figureTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass graphTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass inputTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass paramTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass processesTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass processTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass smooksGraphicsExtTypeEClass = null; - - /** - * - * - * @generated - */ - private EClass taskTypeEClass = null; - - /** - * Creates an instance of the model Package, registered with - * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package - * package URI value. - *

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. - * - * - * @see org.eclipse.emf.ecore.EPackage.Registry - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#eNS_URI - * @see #init() - * @generated - */ - private GraphPackageImpl() { - super(eNS_URI, GraphFactory.eINSTANCE); - } - - /** - * - * - * @generated - */ - private static boolean isInited = false; - - /** - * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * - *

This method is used to initialize {@link GraphPackage#eINSTANCE} when that field is accessed. - * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. - * - * - * @see #eNS_URI - * @see #createPackageContents() - * @see #initializePackageContents() - * @generated - */ - public static GraphPackage init() { - if (isInited) return (GraphPackage)EPackage.Registry.INSTANCE.getEPackage(GraphPackage.eNS_URI); - - // Obtain or create and register package - GraphPackageImpl theGraphPackage = (GraphPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GraphPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GraphPackageImpl()); - - isInited = true; - - // Initialize simple dependencies - XMLTypePackage.eINSTANCE.eClass(); - - // Obtain or create and register interdependencies - SmooksPackageImpl theSmooksPackage = (SmooksPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) instanceof SmooksPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI) : SmooksPackage.eINSTANCE); - CommonPackageImpl theCommonPackage = (CommonPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) instanceof CommonPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(CommonPackage.eNS_URI) : CommonPackage.eINSTANCE); - - // Create package meta-data objects - theGraphPackage.createPackageContents(); - theSmooksPackage.createPackageContents(); - theCommonPackage.createPackageContents(); - - // Initialize created meta-data - theGraphPackage.initializePackageContents(); - theSmooksPackage.initializePackageContents(); - theCommonPackage.initializePackageContents(); - - // Mark meta-data to indicate it can't be changed - theGraphPackage.freeze(); - - - // Update the registry and return the package - EPackage.Registry.INSTANCE.put(GraphPackage.eNS_URI, theGraphPackage); - return theGraphPackage; - } - - /** - * - * - * @generated - */ - public EClass getConnectionType() { - return connectionTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionType_Source() { - return (EAttribute)connectionTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionType_Target() { - return (EAttribute)connectionTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getConnectionType_Id() { - return (EAttribute)connectionTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getSmooksGraphExtensionDocumentRoot() { - return smooksGraphExtensionDocumentRootEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphExtensionDocumentRoot_Mixed() { - return (EAttribute)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_XMLNSPrefixMap() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_XSISchemaLocation() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Connection() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Figure() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Graph() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Input() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Param() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Process() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(8); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Processes() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(9); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_SmooksGraphicsExt() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(10); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphExtensionDocumentRoot_Source() { - return (EAttribute)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(11); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphExtensionDocumentRoot_Target() { - return (EAttribute)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(12); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphExtensionDocumentRoot_Task() { - return (EReference)smooksGraphExtensionDocumentRootEClass.getEStructuralFeatures().get(13); - } - - /** - * - * - * @generated - */ - public EClass getFigureType() { - return figureTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getFigureType_Height() { - return (EAttribute)figureTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getFigureType_Id() { - return (EAttribute)figureTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getFigureType_ParentFigureId() { - return (EAttribute)figureTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getFigureType_Width() { - return (EAttribute)figureTypeEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getFigureType_X() { - return (EAttribute)figureTypeEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getFigureType_Y() { - return (EAttribute)figureTypeEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EClass getGraphType() { - return graphTypeEClass; - } - - /** - * - * - * @generated - */ - public EReference getGraphType_Figure() { - return (EReference)graphTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getGraphType_Connection() { - return (EReference)graphTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getInputType() { - return inputTypeEClass; - } - - /** - * - * - * @generated - */ - public EReference getInputType_Param() { - return (EReference)inputTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getInputType_Type() { - return (EAttribute)inputTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EClass getParamType() { - return paramTypeEClass; - } - - /** - * - * - * @generated - */ - public EAttribute getParamType_Value() { - return (EAttribute)paramTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getParamType_Name() { - return (EAttribute)paramTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getParamType_Type() { - return (EAttribute)paramTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getProcessesType() { - return processesTypeEClass; - } - - /** - * - * - * @generated - */ - public EReference getProcessesType_Process() { - return (EReference)processesTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EClass getProcessType() { - return processTypeEClass; - } - - /** - * - * - * @generated - */ - public EReference getProcessType_Task() { - return (EReference)processTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getProcessType_Id() { - return (EAttribute)processTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getProcessType_Name() { - return (EAttribute)processTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EClass getSmooksGraphicsExtType() { - return smooksGraphicsExtTypeEClass; - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphicsExtType_Input() { - return (EReference)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphicsExtType_Graph() { - return (EReference)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EReference getSmooksGraphicsExtType_Processes() { - return (EReference)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphicsExtType_Author() { - return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphicsExtType_InputType() { - return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(4); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphicsExtType_Name() { - return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(5); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphicsExtType_OutputType() { - return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(6); - } - - /** - * - * - * @generated - */ - public EAttribute getSmooksGraphicsExtType_PlatformVersion() { - return (EAttribute)smooksGraphicsExtTypeEClass.getEStructuralFeatures().get(7); - } - - /** - * - * - * @generated - */ - public EClass getTaskType() { - return taskTypeEClass; - } - - /** - * - * - * @generated - */ - public EReference getTaskType_Task() { - return (EReference)taskTypeEClass.getEStructuralFeatures().get(0); - } - - /** - * - * - * @generated - */ - public EAttribute getTaskType_Id() { - return (EAttribute)taskTypeEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - public EAttribute getTaskType_Name() { - return (EAttribute)taskTypeEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - public EAttribute getTaskType_Type() { - return (EAttribute)taskTypeEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - public GraphFactory getGraphFactory() { - return (GraphFactory)getEFactoryInstance(); - } - - /** - * - * - * @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. - * - * - * @generated - */ - public void createPackageContents() { - if (isCreated) return; - isCreated = true; - - // Create classes and their features - connectionTypeEClass = createEClass(CONNECTION_TYPE); - createEAttribute(connectionTypeEClass, CONNECTION_TYPE__SOURCE); - createEAttribute(connectionTypeEClass, CONNECTION_TYPE__TARGET); - createEAttribute(connectionTypeEClass, CONNECTION_TYPE__ID); - - smooksGraphExtensionDocumentRootEClass = createEClass(SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT); - createEAttribute(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT); - createEAttribute(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE); - createEAttribute(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET); - createEReference(smooksGraphExtensionDocumentRootEClass, SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK); - - figureTypeEClass = createEClass(FIGURE_TYPE); - createEAttribute(figureTypeEClass, FIGURE_TYPE__HEIGHT); - createEAttribute(figureTypeEClass, FIGURE_TYPE__ID); - createEAttribute(figureTypeEClass, FIGURE_TYPE__PARENT_FIGURE_ID); - createEAttribute(figureTypeEClass, FIGURE_TYPE__WIDTH); - createEAttribute(figureTypeEClass, FIGURE_TYPE__X); - createEAttribute(figureTypeEClass, FIGURE_TYPE__Y); - - graphTypeEClass = createEClass(GRAPH_TYPE); - createEReference(graphTypeEClass, GRAPH_TYPE__FIGURE); - createEReference(graphTypeEClass, GRAPH_TYPE__CONNECTION); - - inputTypeEClass = createEClass(INPUT_TYPE); - createEReference(inputTypeEClass, INPUT_TYPE__PARAM); - createEAttribute(inputTypeEClass, INPUT_TYPE__TYPE); - - paramTypeEClass = createEClass(PARAM_TYPE); - createEAttribute(paramTypeEClass, PARAM_TYPE__VALUE); - createEAttribute(paramTypeEClass, PARAM_TYPE__NAME); - createEAttribute(paramTypeEClass, PARAM_TYPE__TYPE); - - processesTypeEClass = createEClass(PROCESSES_TYPE); - createEReference(processesTypeEClass, PROCESSES_TYPE__PROCESS); - - processTypeEClass = createEClass(PROCESS_TYPE); - createEReference(processTypeEClass, PROCESS_TYPE__TASK); - createEAttribute(processTypeEClass, PROCESS_TYPE__ID); - createEAttribute(processTypeEClass, PROCESS_TYPE__NAME); - - smooksGraphicsExtTypeEClass = createEClass(SMOOKS_GRAPHICS_EXT_TYPE); - createEReference(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__INPUT); - createEReference(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__GRAPH); - createEReference(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES); - createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR); - createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE); - createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__NAME); - createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE); - createEAttribute(smooksGraphicsExtTypeEClass, SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION); - - taskTypeEClass = createEClass(TASK_TYPE); - createEReference(taskTypeEClass, TASK_TYPE__TASK); - createEAttribute(taskTypeEClass, TASK_TYPE__ID); - createEAttribute(taskTypeEClass, TASK_TYPE__NAME); - createEAttribute(taskTypeEClass, TASK_TYPE__TYPE); - } - - /** - * - * - * @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. - * - * - * @generated - */ - public void initializePackageContents() { - if (isInitialized) return; - isInitialized = true; - - // Initialize package - setName(eNAME); - setNsPrefix(eNS_PREFIX); - setNsURI(eNS_URI); - - // Obtain other dependent packages - XMLTypePackage theXMLTypePackage = (XMLTypePackage)EPackage.Registry.INSTANCE.getEPackage(XMLTypePackage.eNS_URI); - SmooksPackage theSmooksPackage = (SmooksPackage)EPackage.Registry.INSTANCE.getEPackage(SmooksPackage.eNS_URI); - - // Create type parameters - - // Set bounds for type parameters - - // Add supertypes to classes - smooksGraphicsExtTypeEClass.getESuperTypes().add(theSmooksPackage.getAbstractResourceConfig()); - - // Initialize classes and features; add operations and parameters - initEClass(connectionTypeEClass, ConnectionType.class, "ConnectionType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getConnectionType_Source(), theXMLTypePackage.getString(), "source", null, 1, 1, ConnectionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConnectionType_Target(), theXMLTypePackage.getString(), "target", null, 1, 1, ConnectionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getConnectionType_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, ConnectionType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(smooksGraphExtensionDocumentRootEClass, SmooksGraphExtensionDocumentRoot.class, "SmooksGraphExtensionDocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getSmooksGraphExtensionDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Connection(), this.getConnectionType(), null, "connection", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Figure(), this.getFigureType(), null, "figure", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Graph(), this.getGraphType(), null, "graph", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Input(), this.getInputType(), null, "input", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Param(), this.getParamType(), null, "param", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Process(), this.getProcessType(), null, "process", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Processes(), this.getProcessesType(), null, "processes", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_SmooksGraphicsExt(), this.getSmooksGraphicsExtType(), null, "smooksGraphicsExt", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphExtensionDocumentRoot_Source(), theXMLTypePackage.getString(), "source", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphExtensionDocumentRoot_Target(), theXMLTypePackage.getString(), "target", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphExtensionDocumentRoot_Task(), this.getTaskType(), null, "task", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - - initEClass(figureTypeEClass, FigureType.class, "FigureType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getFigureType_Height(), theXMLTypePackage.getString(), "height", null, 0, 1, FigureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFigureType_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, FigureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFigureType_ParentFigureId(), theXMLTypePackage.getString(), "parentFigureId", null, 0, 1, FigureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFigureType_Width(), theXMLTypePackage.getString(), "width", null, 0, 1, FigureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFigureType_X(), theXMLTypePackage.getString(), "x", null, 0, 1, FigureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getFigureType_Y(), theXMLTypePackage.getString(), "y", null, 0, 1, FigureType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(graphTypeEClass, GraphType.class, "GraphType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getGraphType_Figure(), this.getFigureType(), null, "figure", null, 0, -1, GraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getGraphType_Connection(), this.getConnectionType(), null, "connection", null, 0, -1, GraphType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(inputTypeEClass, InputType.class, "InputType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getInputType_Param(), this.getParamType(), null, "param", null, 0, -1, InputType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getInputType_Type(), theXMLTypePackage.getString(), "type", null, 0, 1, InputType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(paramTypeEClass, ParamType.class, "ParamType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getParamType_Value(), theXMLTypePackage.getString(), "value", null, 0, 1, ParamType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getParamType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, ParamType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getParamType_Type(), theXMLTypePackage.getString(), "type", null, 0, 1, ParamType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(processesTypeEClass, ProcessesType.class, "ProcessesType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getProcessesType_Process(), this.getProcessType(), null, "process", null, 1, 1, ProcessesType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(processTypeEClass, ProcessType.class, "ProcessType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getProcessType_Task(), this.getTaskType(), null, "task", null, 0, -1, ProcessType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProcessType_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, ProcessType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getProcessType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, ProcessType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(smooksGraphicsExtTypeEClass, SmooksGraphicsExtType.class, "SmooksGraphicsExtType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getSmooksGraphicsExtType_Input(), this.getInputType(), null, "input", null, 0, -1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphicsExtType_Graph(), this.getGraphType(), null, "graph", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getSmooksGraphicsExtType_Processes(), this.getProcessesType(), null, "processes", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphicsExtType_Author(), theXMLTypePackage.getString(), "author", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphicsExtType_InputType(), theXMLTypePackage.getString(), "inputType", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphicsExtType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphicsExtType_OutputType(), theXMLTypePackage.getString(), "outputType", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getSmooksGraphicsExtType_PlatformVersion(), theXMLTypePackage.getString(), "platformVersion", null, 0, 1, SmooksGraphicsExtType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - initEClass(taskTypeEClass, TaskType.class, "TaskType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getTaskType_Task(), this.getTaskType(), null, "task", null, 0, -1, TaskType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getTaskType_Id(), theXMLTypePackage.getString(), "id", null, 0, 1, TaskType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getTaskType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, TaskType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getTaskType_Type(), theXMLTypePackage.getString(), "type", null, 0, 1, TaskType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - - // Create resource - createResource(eNS_URI); - - // Create annotations - // http:///org/eclipse/emf/ecore/util/ExtendedMetaData - createExtendedMetaDataAnnotations(); - } - - /** - * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData. - * - * - * @generated - */ - protected void createExtendedMetaDataAnnotations() { - String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; - addAnnotation - (connectionTypeEClass, - source, - new String[] { - "name", "connection_._type", - "kind", "elementOnly" - }); - addAnnotation - (getConnectionType_Source(), - source, - new String[] { - "kind", "element", - "name", "source", - "namespace", "##targetNamespace" - }); - addAnnotation - (getConnectionType_Target(), - source, - new String[] { - "kind", "element", - "name", "target", - "namespace", "##targetNamespace" - }); - addAnnotation - (getConnectionType_Id(), - source, - new String[] { - "kind", "attribute", - "name", "id" - }); - addAnnotation - (smooksGraphExtensionDocumentRootEClass, - source, - new String[] { - "name", "", - "kind", "mixed" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Mixed(), - source, - new String[] { - "kind", "elementWildcard", - "name", ":mixed" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_XMLNSPrefixMap(), - source, - new String[] { - "kind", "attribute", - "name", "xmlns:prefix" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_XSISchemaLocation(), - source, - new String[] { - "kind", "attribute", - "name", "xsi:schemaLocation" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Connection(), - source, - new String[] { - "kind", "element", - "name", "connection", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Figure(), - source, - new String[] { - "kind", "element", - "name", "figure", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Graph(), - source, - new String[] { - "kind", "element", - "name", "graph", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Input(), - source, - new String[] { - "kind", "element", - "name", "input", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Param(), - source, - new String[] { - "kind", "element", - "name", "param", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Process(), - source, - new String[] { - "kind", "element", - "name", "process", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Processes(), - source, - new String[] { - "kind", "element", - "name", "processes", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_SmooksGraphicsExt(), - source, - new String[] { - "kind", "element", - "name", "smooks-graphics-ext", - "namespace", "##targetNamespace", - "affiliation", "http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Source(), - source, - new String[] { - "kind", "element", - "name", "source", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Target(), - source, - new String[] { - "kind", "element", - "name", "target", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphExtensionDocumentRoot_Task(), - source, - new String[] { - "kind", "element", - "name", "task", - "namespace", "##targetNamespace" - }); - addAnnotation - (figureTypeEClass, - source, - new String[] { - "name", "figure_._type", - "kind", "empty" - }); - addAnnotation - (getFigureType_Height(), - source, - new String[] { - "kind", "attribute", - "name", "height" - }); - addAnnotation - (getFigureType_Id(), - source, - new String[] { - "kind", "attribute", - "name", "id" - }); - addAnnotation - (getFigureType_ParentFigureId(), - source, - new String[] { - "kind", "attribute", - "name", "parentFigureId" - }); - addAnnotation - (getFigureType_Width(), - source, - new String[] { - "kind", "attribute", - "name", "width" - }); - addAnnotation - (getFigureType_X(), - source, - new String[] { - "kind", "attribute", - "name", "x" - }); - addAnnotation - (getFigureType_Y(), - source, - new String[] { - "kind", "attribute", - "name", "y" - }); - addAnnotation - (graphTypeEClass, - source, - new String[] { - "name", "graph_._type", - "kind", "elementOnly" - }); - addAnnotation - (getGraphType_Figure(), - source, - new String[] { - "kind", "element", - "name", "figure", - "namespace", "##targetNamespace" - }); - addAnnotation - (getGraphType_Connection(), - source, - new String[] { - "kind", "element", - "name", "connection", - "namespace", "##targetNamespace" - }); - addAnnotation - (inputTypeEClass, - source, - new String[] { - "name", "input_._type", - "kind", "elementOnly" - }); - addAnnotation - (getInputType_Param(), - source, - new String[] { - "kind", "element", - "name", "param", - "namespace", "##targetNamespace" - }); - addAnnotation - (getInputType_Type(), - source, - new String[] { - "kind", "attribute", - "name", "type" - }); - addAnnotation - (paramTypeEClass, - source, - new String[] { - "name", "param_._type", - "kind", "simple" - }); - addAnnotation - (getParamType_Value(), - source, - new String[] { - "name", ":0", - "kind", "simple" - }); - addAnnotation - (getParamType_Name(), - source, - new String[] { - "kind", "attribute", - "name", "name" - }); - addAnnotation - (getParamType_Type(), - source, - new String[] { - "kind", "attribute", - "name", "type" - }); - addAnnotation - (processesTypeEClass, - source, - new String[] { - "name", "processes_._type", - "kind", "elementOnly" - }); - addAnnotation - (getProcessesType_Process(), - source, - new String[] { - "kind", "element", - "name", "process", - "namespace", "##targetNamespace" - }); - addAnnotation - (processTypeEClass, - source, - new String[] { - "name", "process_._type", - "kind", "elementOnly" - }); - addAnnotation - (getProcessType_Task(), - source, - new String[] { - "kind", "element", - "name", "task", - "namespace", "##targetNamespace" - }); - addAnnotation - (getProcessType_Id(), - source, - new String[] { - "kind", "attribute", - "name", "id" - }); - addAnnotation - (getProcessType_Name(), - source, - new String[] { - "kind", "attribute", - "name", "name" - }); - addAnnotation - (smooksGraphicsExtTypeEClass, - source, - new String[] { - "name", "smooks-graphics-ext_._type", - "kind", "elementOnly" - }); - addAnnotation - (getSmooksGraphicsExtType_Input(), - source, - new String[] { - "kind", "element", - "name", "input", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphicsExtType_Graph(), - source, - new String[] { - "kind", "element", - "name", "graph", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphicsExtType_Processes(), - source, - new String[] { - "kind", "element", - "name", "processes", - "namespace", "##targetNamespace" - }); - addAnnotation - (getSmooksGraphicsExtType_Author(), - source, - new String[] { - "kind", "attribute", - "name", "author" - }); - addAnnotation - (getSmooksGraphicsExtType_InputType(), - source, - new String[] { - "kind", "attribute", - "name", "inputType" - }); - addAnnotation - (getSmooksGraphicsExtType_Name(), - source, - new String[] { - "kind", "attribute", - "name", "name" - }); - addAnnotation - (getSmooksGraphicsExtType_OutputType(), - source, - new String[] { - "kind", "attribute", - "name", "outputType" - }); - addAnnotation - (getSmooksGraphicsExtType_PlatformVersion(), - source, - new String[] { - "kind", "attribute", - "name", "platformVersion" - }); - addAnnotation - (taskTypeEClass, - source, - new String[] { - "name", "task_._type", - "kind", "elementOnly" - }); - addAnnotation - (getTaskType_Task(), - source, - new String[] { - "kind", "element", - "name", "task", - "namespace", "##targetNamespace" - }); - addAnnotation - (getTaskType_Id(), - source, - new String[] { - "kind", "attribute", - "name", "id" - }); - addAnnotation - (getTaskType_Name(), - source, - new String[] { - "kind", "attribute", - "name", "name" - }); - addAnnotation - (getTaskType_Type(), - source, - new String[] { - "kind", "attribute", - "name", "type" - }); - } - -} //GraphPackageImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/ConnectionTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/ConnectionTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/ConnectionTypeImpl.java (working copy) @@ -1,275 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.model.graphics.ext.ConnectionType; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; - -/** - * - * An implementation of the model object 'Connection Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl#getSource Source}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl#getTarget Target}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl#getId Id}
  • - *
- *

- * - * @generated - */ -public class ConnectionTypeImpl extends EObjectImpl implements ConnectionType { - /** - * The default value of the '{@link #getSource() Source}' attribute. - * - * - * @see #getSource() - * @generated - * @ordered - */ - protected static final String SOURCE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getSource() Source}' attribute. - * - * - * @see #getSource() - * @generated - * @ordered - */ - protected String source = SOURCE_EDEFAULT; - - /** - * The default value of the '{@link #getTarget() Target}' attribute. - * - * - * @see #getTarget() - * @generated - * @ordered - */ - protected static final String TARGET_EDEFAULT = null; - - /** - * The cached value of the '{@link #getTarget() Target}' attribute. - * - * - * @see #getTarget() - * @generated - * @ordered - */ - protected String target = TARGET_EDEFAULT; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * - * - * @generated - */ - protected ConnectionTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.CONNECTION_TYPE; - } - - /** - * - * - * @generated - */ - public String getSource() { - return source; - } - - /** - * - * - * @generated - */ - public void setSource(String newSource) { - String oldSource = source; - source = newSource; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.CONNECTION_TYPE__SOURCE, oldSource, source)); - } - - /** - * - * - * @generated - */ - public String getTarget() { - return target; - } - - /** - * - * - * @generated - */ - public void setTarget(String newTarget) { - String oldTarget = target; - target = newTarget; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.CONNECTION_TYPE__TARGET, oldTarget, target)); - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.CONNECTION_TYPE__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.CONNECTION_TYPE__SOURCE: - return getSource(); - case GraphPackage.CONNECTION_TYPE__TARGET: - return getTarget(); - case GraphPackage.CONNECTION_TYPE__ID: - return getId(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.CONNECTION_TYPE__SOURCE: - setSource((String)newValue); - return; - case GraphPackage.CONNECTION_TYPE__TARGET: - setTarget((String)newValue); - return; - case GraphPackage.CONNECTION_TYPE__ID: - setId((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.CONNECTION_TYPE__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case GraphPackage.CONNECTION_TYPE__TARGET: - setTarget(TARGET_EDEFAULT); - return; - case GraphPackage.CONNECTION_TYPE__ID: - setId(ID_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.CONNECTION_TYPE__SOURCE: - return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source); - case GraphPackage.CONNECTION_TYPE__TARGET: - return TARGET_EDEFAULT == null ? target != null : !TARGET_EDEFAULT.equals(target); - case GraphPackage.CONNECTION_TYPE__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (source: "); - result.append(source); - result.append(", target: "); - result.append(target); - result.append(", id: "); - result.append(id); - result.append(')'); - return result.toString(); - } - -} //ConnectionTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/ProcessTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/ProcessTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/ProcessTypeImpl.java (working copy) @@ -1,280 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.impl; - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -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.ENotificationImpl; -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.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.ProcessType; -import org.jboss.tools.smooks.model.graphics.ext.TaskType; - -/** - * - * An implementation of the model object 'Process Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl#getTask Task}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl#getId Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl#getName Name}
  • - *
- *

- * - * @generated - */ -public class ProcessTypeImpl extends EObjectImpl implements ProcessType { - /** - * The cached value of the '{@link #getTask() Task}' containment reference list. - * - * - * @see #getTask() - * @generated - * @ordered - */ - protected EList task; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * - * - * @generated - */ - protected ProcessTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.PROCESS_TYPE; - } - - /** - * - * - * @generated - */ - public EList getTask() { - if (task == null) { - task = new EObjectContainmentEList(TaskType.class, this, GraphPackage.PROCESS_TYPE__TASK); - } - return task; - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.PROCESS_TYPE__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.PROCESS_TYPE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.PROCESS_TYPE__TASK: - return ((InternalEList)getTask()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.PROCESS_TYPE__TASK: - return getTask(); - case GraphPackage.PROCESS_TYPE__ID: - return getId(); - case GraphPackage.PROCESS_TYPE__NAME: - return getName(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.PROCESS_TYPE__TASK: - getTask().clear(); - getTask().addAll((Collection)newValue); - return; - case GraphPackage.PROCESS_TYPE__ID: - setId((String)newValue); - return; - case GraphPackage.PROCESS_TYPE__NAME: - setName((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.PROCESS_TYPE__TASK: - getTask().clear(); - return; - case GraphPackage.PROCESS_TYPE__ID: - setId(ID_EDEFAULT); - return; - case GraphPackage.PROCESS_TYPE__NAME: - setName(NAME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.PROCESS_TYPE__TASK: - return task != null && !task.isEmpty(); - case GraphPackage.PROCESS_TYPE__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case GraphPackage.PROCESS_TYPE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (id: "); - result.append(id); - result.append(", name: "); - result.append(name); - result.append(')'); - return result.toString(); - } - -} //ProcessTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/FigureTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/FigureTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/FigureTypeImpl.java (working copy) @@ -1,437 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.model.graphics.ext.FigureType; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; - -/** - * - * An implementation of the model object 'Figure Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl#getHeight Height}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl#getId Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl#getParentFigureId Parent Figure Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl#getWidth Width}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl#getX X}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl#getY Y}
  • - *
- *

- * - * @generated - */ -public class FigureTypeImpl extends EObjectImpl implements FigureType { - /** - * The default value of the '{@link #getHeight() Height}' attribute. - * - * - * @see #getHeight() - * @generated - * @ordered - */ - protected static final String HEIGHT_EDEFAULT = null; - - /** - * The cached value of the '{@link #getHeight() Height}' attribute. - * - * - * @see #getHeight() - * @generated - * @ordered - */ - protected String height = HEIGHT_EDEFAULT; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * The default value of the '{@link #getParentFigureId() Parent Figure Id}' attribute. - * - * - * @see #getParentFigureId() - * @generated - * @ordered - */ - protected static final String PARENT_FIGURE_ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getParentFigureId() Parent Figure Id}' attribute. - * - * - * @see #getParentFigureId() - * @generated - * @ordered - */ - protected String parentFigureId = PARENT_FIGURE_ID_EDEFAULT; - - /** - * The default value of the '{@link #getWidth() Width}' attribute. - * - * - * @see #getWidth() - * @generated - * @ordered - */ - protected static final String WIDTH_EDEFAULT = null; - - /** - * The cached value of the '{@link #getWidth() Width}' attribute. - * - * - * @see #getWidth() - * @generated - * @ordered - */ - protected String width = WIDTH_EDEFAULT; - - /** - * The default value of the '{@link #getX() X}' attribute. - * - * - * @see #getX() - * @generated - * @ordered - */ - protected static final String X_EDEFAULT = null; - - /** - * The cached value of the '{@link #getX() X}' attribute. - * - * - * @see #getX() - * @generated - * @ordered - */ - protected String x = X_EDEFAULT; - - /** - * The default value of the '{@link #getY() Y}' attribute. - * - * - * @see #getY() - * @generated - * @ordered - */ - protected static final String Y_EDEFAULT = null; - - /** - * The cached value of the '{@link #getY() Y}' attribute. - * - * - * @see #getY() - * @generated - * @ordered - */ - protected String y = Y_EDEFAULT; - - /** - * - * - * @generated - */ - protected FigureTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.FIGURE_TYPE; - } - - /** - * - * - * @generated - */ - public String getHeight() { - return height; - } - - /** - * - * - * @generated - */ - public void setHeight(String newHeight) { - String oldHeight = height; - height = newHeight; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.FIGURE_TYPE__HEIGHT, oldHeight, height)); - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.FIGURE_TYPE__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - public String getParentFigureId() { - return parentFigureId; - } - - /** - * - * - * @generated - */ - public void setParentFigureId(String newParentFigureId) { - String oldParentFigureId = parentFigureId; - parentFigureId = newParentFigureId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.FIGURE_TYPE__PARENT_FIGURE_ID, oldParentFigureId, parentFigureId)); - } - - /** - * - * - * @generated - */ - public String getWidth() { - return width; - } - - /** - * - * - * @generated - */ - public void setWidth(String newWidth) { - String oldWidth = width; - width = newWidth; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.FIGURE_TYPE__WIDTH, oldWidth, width)); - } - - /** - * - * - * @generated - */ - public String getX() { - return x; - } - - /** - * - * - * @generated - */ - public void setX(String newX) { - String oldX = x; - x = newX; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.FIGURE_TYPE__X, oldX, x)); - } - - /** - * - * - * @generated - */ - public String getY() { - return y; - } - - /** - * - * - * @generated - */ - public void setY(String newY) { - String oldY = y; - y = newY; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.FIGURE_TYPE__Y, oldY, y)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.FIGURE_TYPE__HEIGHT: - return getHeight(); - case GraphPackage.FIGURE_TYPE__ID: - return getId(); - case GraphPackage.FIGURE_TYPE__PARENT_FIGURE_ID: - return getParentFigureId(); - case GraphPackage.FIGURE_TYPE__WIDTH: - return getWidth(); - case GraphPackage.FIGURE_TYPE__X: - return getX(); - case GraphPackage.FIGURE_TYPE__Y: - return getY(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.FIGURE_TYPE__HEIGHT: - setHeight((String)newValue); - return; - case GraphPackage.FIGURE_TYPE__ID: - setId((String)newValue); - return; - case GraphPackage.FIGURE_TYPE__PARENT_FIGURE_ID: - setParentFigureId((String)newValue); - return; - case GraphPackage.FIGURE_TYPE__WIDTH: - setWidth((String)newValue); - return; - case GraphPackage.FIGURE_TYPE__X: - setX((String)newValue); - return; - case GraphPackage.FIGURE_TYPE__Y: - setY((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.FIGURE_TYPE__HEIGHT: - setHeight(HEIGHT_EDEFAULT); - return; - case GraphPackage.FIGURE_TYPE__ID: - setId(ID_EDEFAULT); - return; - case GraphPackage.FIGURE_TYPE__PARENT_FIGURE_ID: - setParentFigureId(PARENT_FIGURE_ID_EDEFAULT); - return; - case GraphPackage.FIGURE_TYPE__WIDTH: - setWidth(WIDTH_EDEFAULT); - return; - case GraphPackage.FIGURE_TYPE__X: - setX(X_EDEFAULT); - return; - case GraphPackage.FIGURE_TYPE__Y: - setY(Y_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.FIGURE_TYPE__HEIGHT: - return HEIGHT_EDEFAULT == null ? height != null : !HEIGHT_EDEFAULT.equals(height); - case GraphPackage.FIGURE_TYPE__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case GraphPackage.FIGURE_TYPE__PARENT_FIGURE_ID: - return PARENT_FIGURE_ID_EDEFAULT == null ? parentFigureId != null : !PARENT_FIGURE_ID_EDEFAULT.equals(parentFigureId); - case GraphPackage.FIGURE_TYPE__WIDTH: - return WIDTH_EDEFAULT == null ? width != null : !WIDTH_EDEFAULT.equals(width); - case GraphPackage.FIGURE_TYPE__X: - return X_EDEFAULT == null ? x != null : !X_EDEFAULT.equals(x); - case GraphPackage.FIGURE_TYPE__Y: - return Y_EDEFAULT == null ? y != null : !Y_EDEFAULT.equals(y); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (height: "); - result.append(height); - result.append(", id: "); - result.append(id); - result.append(", parentFigureId: "); - result.append(parentFigureId); - result.append(", width: "); - result.append(width); - result.append(", x: "); - result.append(x); - result.append(", y: "); - result.append(y); - result.append(')'); - return result.toString(); - } - -} //FigureTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphTypeImpl.java (working copy) @@ -1,193 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.model.graphics.ext.ConnectionType; -import org.jboss.tools.smooks.model.graphics.ext.FigureType; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.GraphType; - -/** - * - * An implementation of the model object 'Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.GraphTypeImpl#getFigure Figure}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.GraphTypeImpl#getConnection Connection}
  • - *
- *

- * - * @generated - */ -public class GraphTypeImpl extends EObjectImpl implements GraphType { - /** - * The cached value of the '{@link #getFigure() Figure}' containment reference list. - * - * - * @see #getFigure() - * @generated - * @ordered - */ - protected EList figure; - - /** - * The cached value of the '{@link #getConnection() Connection}' containment reference list. - * - * - * @see #getConnection() - * @generated - * @ordered - */ - protected EList connection; - - /** - * - * - * @generated - */ - protected GraphTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.GRAPH_TYPE; - } - - /** - * - * - * @generated - */ - public EList getFigure() { - if (figure == null) { - figure = new EObjectContainmentEList(FigureType.class, this, GraphPackage.GRAPH_TYPE__FIGURE); - } - return figure; - } - - /** - * - * - * @generated - */ - public EList getConnection() { - if (connection == null) { - connection = new EObjectContainmentEList(ConnectionType.class, this, GraphPackage.GRAPH_TYPE__CONNECTION); - } - return connection; - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.GRAPH_TYPE__FIGURE: - return ((InternalEList)getFigure()).basicRemove(otherEnd, msgs); - case GraphPackage.GRAPH_TYPE__CONNECTION: - return ((InternalEList)getConnection()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.GRAPH_TYPE__FIGURE: - return getFigure(); - case GraphPackage.GRAPH_TYPE__CONNECTION: - return getConnection(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.GRAPH_TYPE__FIGURE: - getFigure().clear(); - getFigure().addAll((Collection)newValue); - return; - case GraphPackage.GRAPH_TYPE__CONNECTION: - getConnection().clear(); - getConnection().addAll((Collection)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.GRAPH_TYPE__FIGURE: - getFigure().clear(); - return; - case GraphPackage.GRAPH_TYPE__CONNECTION: - getConnection().clear(); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.GRAPH_TYPE__FIGURE: - return figure != null && !figure.isEmpty(); - case GraphPackage.GRAPH_TYPE__CONNECTION: - return connection != null && !connection.isEmpty(); - } - return super.eIsSet(featureID); - } - -} //GraphTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/TaskTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/TaskTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/TaskTypeImpl.java (working copy) @@ -1,333 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.impl; - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -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.ENotificationImpl; -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.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.TaskType; - -/** - * - * An implementation of the model object 'Task Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl#getTask Task}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl#getId Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl#getName Name}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl#getType Type}
  • - *
- *

- * - * @generated - */ -public class TaskTypeImpl extends EObjectImpl implements TaskType { - /** - * The cached value of the '{@link #getTask() Task}' containment reference list. - * - * - * @see #getTask() - * @generated - * @ordered - */ - protected EList task; - - /** - * The default value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected static final String ID_EDEFAULT = null; - - /** - * The cached value of the '{@link #getId() Id}' attribute. - * - * - * @see #getId() - * @generated - * @ordered - */ - protected String id = ID_EDEFAULT; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected String type = TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected TaskTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.TASK_TYPE; - } - - /** - * - * - * @generated - */ - public EList getTask() { - if (task == null) { - task = new EObjectContainmentEList(TaskType.class, this, GraphPackage.TASK_TYPE__TASK); - } - return task; - } - - /** - * - * - * @generated - */ - public String getId() { - return id; - } - - /** - * - * - * @generated - */ - public void setId(String newId) { - String oldId = id; - id = newId; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.TASK_TYPE__ID, oldId, id)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.TASK_TYPE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.TASK_TYPE__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.TASK_TYPE__TASK: - return ((InternalEList)getTask()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.TASK_TYPE__TASK: - return getTask(); - case GraphPackage.TASK_TYPE__ID: - return getId(); - case GraphPackage.TASK_TYPE__NAME: - return getName(); - case GraphPackage.TASK_TYPE__TYPE: - return getType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.TASK_TYPE__TASK: - getTask().clear(); - getTask().addAll((Collection)newValue); - return; - case GraphPackage.TASK_TYPE__ID: - setId((String)newValue); - return; - case GraphPackage.TASK_TYPE__NAME: - setName((String)newValue); - return; - case GraphPackage.TASK_TYPE__TYPE: - setType((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.TASK_TYPE__TASK: - getTask().clear(); - return; - case GraphPackage.TASK_TYPE__ID: - setId(ID_EDEFAULT); - return; - case GraphPackage.TASK_TYPE__NAME: - setName(NAME_EDEFAULT); - return; - case GraphPackage.TASK_TYPE__TYPE: - setType(TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.TASK_TYPE__TASK: - return task != null && !task.isEmpty(); - case GraphPackage.TASK_TYPE__ID: - return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.equals(id); - case GraphPackage.TASK_TYPE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case GraphPackage.TASK_TYPE__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (id: "); - result.append(id); - result.append(", name: "); - result.append(name); - result.append(", type: "); - result.append(type); - result.append(')'); - return result.toString(); - } - -} //TaskTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/ProcessesTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/ProcessesTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/ProcessesTypeImpl.java (working copy) @@ -1,180 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.ProcessType; -import org.jboss.tools.smooks.model.graphics.ext.ProcessesType; - -/** - * - * An implementation of the model object 'Processes Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessesTypeImpl#getProcess Process}
  • - *
- *

- * - * @generated - */ -public class ProcessesTypeImpl extends EObjectImpl implements ProcessesType { - /** - * The cached value of the '{@link #getProcess() Process}' containment reference. - * - * - * @see #getProcess() - * @generated - * @ordered - */ - protected ProcessType process; - - /** - * - * - * @generated - */ - protected ProcessesTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.PROCESSES_TYPE; - } - - /** - * - * - * @generated - */ - public ProcessType getProcess() { - return process; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetProcess(ProcessType newProcess, NotificationChain msgs) { - ProcessType oldProcess = process; - process = newProcess; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GraphPackage.PROCESSES_TYPE__PROCESS, oldProcess, newProcess); - if (msgs == null) msgs = notification; else msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - public void setProcess(ProcessType newProcess) { - if (newProcess != process) { - NotificationChain msgs = null; - if (process != null) - msgs = ((InternalEObject)process).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - GraphPackage.PROCESSES_TYPE__PROCESS, null, msgs); - if (newProcess != null) - msgs = ((InternalEObject)newProcess).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - GraphPackage.PROCESSES_TYPE__PROCESS, null, msgs); - msgs = basicSetProcess(newProcess, msgs); - if (msgs != null) msgs.dispatch(); - } - else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.PROCESSES_TYPE__PROCESS, newProcess, newProcess)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.PROCESSES_TYPE__PROCESS: - return basicSetProcess(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.PROCESSES_TYPE__PROCESS: - return getProcess(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.PROCESSES_TYPE__PROCESS: - setProcess((ProcessType)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.PROCESSES_TYPE__PROCESS: - setProcess((ProcessType)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.PROCESSES_TYPE__PROCESS: - return process != null; - } - return super.eIsSet(featureID); - } - -} //ProcessesTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/InputTypeImpl.java (working copy) @@ -1,226 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.impl; - - -import java.util.Collection; - -import org.eclipse.emf.common.notify.Notification; -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.ENotificationImpl; -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.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.InputType; -import org.jboss.tools.smooks.model.graphics.ext.ParamType; - -/** - * - * An implementation of the model object 'Input Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl#getParam Param}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl#getType Type}
  • - *
- *

- * - * @generated - */ -public class InputTypeImpl extends EObjectImpl implements InputType { - /** - * The cached value of the '{@link #getParam() Param}' containment reference list. - * - * - * @see #getParam() - * @generated - * @ordered - */ - protected EList param; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected String type = TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected InputTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.INPUT_TYPE; - } - - /** - * - * - * @generated - */ - public EList getParam() { - if (param == null) { - param = new EObjectContainmentEList(ParamType.class, this, GraphPackage.INPUT_TYPE__PARAM); - } - return param; - } - - /** - * - * - * @generated - */ - public String getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.INPUT_TYPE__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.INPUT_TYPE__PARAM: - return ((InternalEList)getParam()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.INPUT_TYPE__PARAM: - return getParam(); - case GraphPackage.INPUT_TYPE__TYPE: - return getType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.INPUT_TYPE__PARAM: - getParam().clear(); - getParam().addAll((Collection)newValue); - return; - case GraphPackage.INPUT_TYPE__TYPE: - setType((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.INPUT_TYPE__PARAM: - getParam().clear(); - return; - case GraphPackage.INPUT_TYPE__TYPE: - setType(TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.INPUT_TYPE__PARAM: - return param != null && !param.isEmpty(); - case GraphPackage.INPUT_TYPE__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (type: "); - result.append(type); - result.append(')'); - return result.toString(); - } - -} //InputTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphExtensionDocumentRootImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphExtensionDocumentRootImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/SmooksGraphExtensionDocumentRootImpl.java (working copy) @@ -1,692 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.impl; - - -import org.eclipse.emf.common.notify.NotificationChain; - -import org.eclipse.emf.common.util.EMap; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; -import org.eclipse.emf.ecore.EcorePackage; -import org.eclipse.emf.ecore.InternalEObject; - -import org.eclipse.emf.ecore.impl.EObjectImpl; -import org.eclipse.emf.ecore.impl.EStringToStringMapEntryImpl; - -import org.eclipse.emf.ecore.util.BasicFeatureMap; -import org.eclipse.emf.ecore.util.EcoreEMap; -import org.eclipse.emf.ecore.util.FeatureMap; -import org.eclipse.emf.ecore.util.InternalEList; -import org.jboss.tools.smooks.model.graphics.ext.ConnectionType; -import org.jboss.tools.smooks.model.graphics.ext.FigureType; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.GraphType; -import org.jboss.tools.smooks.model.graphics.ext.InputType; -import org.jboss.tools.smooks.model.graphics.ext.ParamType; -import org.jboss.tools.smooks.model.graphics.ext.ProcessType; -import org.jboss.tools.smooks.model.graphics.ext.ProcessesType; -import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot; -import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType; -import org.jboss.tools.smooks.model.graphics.ext.TaskType; - -/** - * - * An implementation of the model object 'Smooks Graph Extension Document Root'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getMixed Mixed}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getXMLNSPrefixMap XMLNS Prefix Map}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getXSISchemaLocation XSI Schema Location}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getConnection Connection}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getFigure Figure}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getGraph Graph}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getInput Input}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getParam Param}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getProcess Process}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getProcesses Processes}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getSmooksGraphicsExt Smooks Graphics Ext}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getSource Source}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getTarget Target}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl#getTask Task}
  • - *
- *

- * - * @generated - */ -public class SmooksGraphExtensionDocumentRootImpl extends EObjectImpl implements SmooksGraphExtensionDocumentRoot { - /** - * The cached value of the '{@link #getMixed() Mixed}' attribute list. - * - * - * @see #getMixed() - * @generated - * @ordered - */ - protected FeatureMap mixed; - - /** - * The cached value of the '{@link #getXMLNSPrefixMap() XMLNS Prefix Map}' map. - * - * - * @see #getXMLNSPrefixMap() - * @generated - * @ordered - */ - protected EMap xMLNSPrefixMap; - - /** - * The cached value of the '{@link #getXSISchemaLocation() XSI Schema Location}' map. - * - * - * @see #getXSISchemaLocation() - * @generated - * @ordered - */ - protected EMap xSISchemaLocation; - - /** - * The default value of the '{@link #getSource() Source}' attribute. - * - * - * @see #getSource() - * @generated - * @ordered - */ - protected static final String SOURCE_EDEFAULT = null; - - /** - * The default value of the '{@link #getTarget() Target}' attribute. - * - * - * @see #getTarget() - * @generated - * @ordered - */ - protected static final String TARGET_EDEFAULT = null; - - /** - * - * - * @generated - */ - protected SmooksGraphExtensionDocumentRootImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT; - } - - /** - * - * - * @generated - */ - public FeatureMap getMixed() { - if (mixed == null) { - mixed = new BasicFeatureMap(this, GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED); - } - return mixed; - } - - /** - * - * - * @generated - */ - public EMap getXMLNSPrefixMap() { - if (xMLNSPrefixMap == null) { - xMLNSPrefixMap = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP); - } - return xMLNSPrefixMap; - } - - /** - * - * - * @generated - */ - public EMap getXSISchemaLocation() { - if (xSISchemaLocation == null) { - xSISchemaLocation = new EcoreEMap(EcorePackage.Literals.ESTRING_TO_STRING_MAP_ENTRY, EStringToStringMapEntryImpl.class, this, GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION); - } - return xSISchemaLocation; - } - - /** - * - * - * @generated - */ - public ConnectionType getConnection() { - return (ConnectionType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetConnection(ConnectionType newConnection, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION, newConnection, msgs); - } - - /** - * - * - * @generated - */ - public void setConnection(ConnectionType newConnection) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION, newConnection); - } - - /** - * - * - * @generated - */ - public FigureType getFigure() { - return (FigureType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetFigure(FigureType newFigure, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE, newFigure, msgs); - } - - /** - * - * - * @generated - */ - public void setFigure(FigureType newFigure) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE, newFigure); - } - - /** - * - * - * @generated - */ - public GraphType getGraph() { - return (GraphType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetGraph(GraphType newGraph, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH, newGraph, msgs); - } - - /** - * - * - * @generated - */ - public void setGraph(GraphType newGraph) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH, newGraph); - } - - /** - * - * - * @generated - */ - public InputType getInput() { - return (InputType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetInput(InputType newInput, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT, newInput, msgs); - } - - /** - * - * - * @generated - */ - public void setInput(InputType newInput) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT, newInput); - } - - /** - * - * - * @generated - */ - public ParamType getParam() { - return (ParamType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetParam(ParamType newParam, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM, newParam, msgs); - } - - /** - * - * - * @generated - */ - public void setParam(ParamType newParam) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM, newParam); - } - - /** - * - * - * @generated - */ - public ProcessType getProcess() { - return (ProcessType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetProcess(ProcessType newProcess, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS, newProcess, msgs); - } - - /** - * - * - * @generated - */ - public void setProcess(ProcessType newProcess) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS, newProcess); - } - - /** - * - * - * @generated - */ - public ProcessesType getProcesses() { - return (ProcessesType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetProcesses(ProcessesType newProcesses, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES, newProcesses, msgs); - } - - /** - * - * - * @generated - */ - public void setProcesses(ProcessesType newProcesses) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES, newProcesses); - } - - /** - * - * - * @generated - */ - public SmooksGraphicsExtType getSmooksGraphicsExt() { - return (SmooksGraphicsExtType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetSmooksGraphicsExt(SmooksGraphicsExtType newSmooksGraphicsExt, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT, newSmooksGraphicsExt, msgs); - } - - /** - * - * - * @generated - */ - public void setSmooksGraphicsExt(SmooksGraphicsExtType newSmooksGraphicsExt) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT, newSmooksGraphicsExt); - } - - /** - * - * - * @generated - */ - public String getSource() { - return (String)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE, true); - } - - /** - * - * - * @generated - */ - public void setSource(String newSource) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE, newSource); - } - - /** - * - * - * @generated - */ - public String getTarget() { - return (String)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET, true); - } - - /** - * - * - * @generated - */ - public void setTarget(String newTarget) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET, newTarget); - } - - /** - * - * - * @generated - */ - public TaskType getTask() { - return (TaskType)getMixed().get(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK, true); - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetTask(TaskType newTask, NotificationChain msgs) { - return ((FeatureMap.Internal)getMixed()).basicAdd(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK, newTask, msgs); - } - - /** - * - * - * @generated - */ - public void setTask(TaskType newTask) { - ((FeatureMap.Internal)getMixed()).set(GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK, newTask); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED: - return ((InternalEList)getMixed()).basicRemove(otherEnd, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: - return ((InternalEList)getXMLNSPrefixMap()).basicRemove(otherEnd, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: - return ((InternalEList)getXSISchemaLocation()).basicRemove(otherEnd, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION: - return basicSetConnection(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE: - return basicSetFigure(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH: - return basicSetGraph(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT: - return basicSetInput(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM: - return basicSetParam(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS: - return basicSetProcess(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES: - return basicSetProcesses(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT: - return basicSetSmooksGraphicsExt(null, msgs); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK: - return basicSetTask(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED: - if (coreType) return getMixed(); - return ((FeatureMap.Internal)getMixed()).getWrapper(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: - if (coreType) return getXMLNSPrefixMap(); - else return getXMLNSPrefixMap().map(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: - if (coreType) return getXSISchemaLocation(); - else return getXSISchemaLocation().map(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION: - return getConnection(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE: - return getFigure(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH: - return getGraph(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT: - return getInput(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM: - return getParam(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS: - return getProcess(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES: - return getProcesses(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT: - return getSmooksGraphicsExt(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE: - return getSource(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET: - return getTarget(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK: - return getTask(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED: - ((FeatureMap.Internal)getMixed()).set(newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: - ((EStructuralFeature.Setting)getXMLNSPrefixMap()).set(newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: - ((EStructuralFeature.Setting)getXSISchemaLocation()).set(newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION: - setConnection((ConnectionType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE: - setFigure((FigureType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH: - setGraph((GraphType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT: - setInput((InputType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM: - setParam((ParamType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS: - setProcess((ProcessType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES: - setProcesses((ProcessesType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT: - setSmooksGraphicsExt((SmooksGraphicsExtType)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE: - setSource((String)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET: - setTarget((String)newValue); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK: - setTask((TaskType)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED: - getMixed().clear(); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: - getXMLNSPrefixMap().clear(); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: - getXSISchemaLocation().clear(); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION: - setConnection((ConnectionType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE: - setFigure((FigureType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH: - setGraph((GraphType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT: - setInput((InputType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM: - setParam((ParamType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS: - setProcess((ProcessType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES: - setProcesses((ProcessesType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT: - setSmooksGraphicsExt((SmooksGraphicsExtType)null); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE: - setSource(SOURCE_EDEFAULT); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET: - setTarget(TARGET_EDEFAULT); - return; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK: - setTask((TaskType)null); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED: - return mixed != null && !mixed.isEmpty(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP: - return xMLNSPrefixMap != null && !xMLNSPrefixMap.isEmpty(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION: - return xSISchemaLocation != null && !xSISchemaLocation.isEmpty(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION: - return getConnection() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE: - return getFigure() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH: - return getGraph() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT: - return getInput() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM: - return getParam() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS: - return getProcess() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES: - return getProcesses() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT: - return getSmooksGraphicsExt() != null; - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE: - return SOURCE_EDEFAULT == null ? getSource() != null : !SOURCE_EDEFAULT.equals(getSource()); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET: - return TARGET_EDEFAULT == null ? getTarget() != null : !TARGET_EDEFAULT.equals(getTarget()); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK: - return getTask() != null; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (mixed: "); - result.append(mixed); - result.append(')'); - return result.toString(); - } - -} //SmooksGraphExtensionDocumentRootImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/ParamTypeImpl.java (working copy) @@ -1,275 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.model.graphics.ext.GraphPackage; -import org.jboss.tools.smooks.model.graphics.ext.ParamType; - -/** - * - * An implementation of the model object 'Param Type'. - * - *

- * The following features are implemented: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl#getValue Value}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl#getName Name}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl#getType Type}
  • - *
- *

- * - * @generated - */ -public class ParamTypeImpl extends EObjectImpl implements ParamType { - /** - * The default value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected static final String VALUE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getValue() Value}' attribute. - * - * - * @see #getValue() - * @generated - * @ordered - */ - protected String value = VALUE_EDEFAULT; - - /** - * The default value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected static final String NAME_EDEFAULT = null; - - /** - * The cached value of the '{@link #getName() Name}' attribute. - * - * - * @see #getName() - * @generated - * @ordered - */ - protected String name = NAME_EDEFAULT; - - /** - * The default value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected static final String TYPE_EDEFAULT = null; - - /** - * The cached value of the '{@link #getType() Type}' attribute. - * - * - * @see #getType() - * @generated - * @ordered - */ - protected String type = TYPE_EDEFAULT; - - /** - * - * - * @generated - */ - protected ParamTypeImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return GraphPackage.Literals.PARAM_TYPE; - } - - /** - * - * - * @generated - */ - public String getValue() { - return value; - } - - /** - * - * - * @generated - */ - public void setValue(String newValue) { - String oldValue = value; - value = newValue; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.PARAM_TYPE__VALUE, oldValue, value)); - } - - /** - * - * - * @generated - */ - public String getName() { - return name; - } - - /** - * - * - * @generated - */ - public void setName(String newName) { - String oldName = name; - name = newName; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.PARAM_TYPE__NAME, oldName, name)); - } - - /** - * - * - * @generated - */ - public String getType() { - return type; - } - - /** - * - * - * @generated - */ - public void setType(String newType) { - String oldType = type; - type = newType; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, GraphPackage.PARAM_TYPE__TYPE, oldType, type)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case GraphPackage.PARAM_TYPE__VALUE: - return getValue(); - case GraphPackage.PARAM_TYPE__NAME: - return getName(); - case GraphPackage.PARAM_TYPE__TYPE: - return getType(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case GraphPackage.PARAM_TYPE__VALUE: - setValue((String)newValue); - return; - case GraphPackage.PARAM_TYPE__NAME: - setName((String)newValue); - return; - case GraphPackage.PARAM_TYPE__TYPE: - setType((String)newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case GraphPackage.PARAM_TYPE__VALUE: - setValue(VALUE_EDEFAULT); - return; - case GraphPackage.PARAM_TYPE__NAME: - setName(NAME_EDEFAULT); - return; - case GraphPackage.PARAM_TYPE__TYPE: - setType(TYPE_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case GraphPackage.PARAM_TYPE__VALUE: - return VALUE_EDEFAULT == null ? value != null : !VALUE_EDEFAULT.equals(value); - case GraphPackage.PARAM_TYPE__NAME: - return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); - case GraphPackage.PARAM_TYPE__TYPE: - return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type); - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) return super.toString(); - - StringBuffer result = new StringBuffer(super.toString()); - result.append(" (value: "); - result.append(value); - result.append(", name: "); - result.append(name); - result.append(", type: "); - result.append(type); - result.append(')'); - return result.toString(); - } - -} //ParamTypeImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphFactoryImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphFactoryImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/impl/GraphFactoryImpl.java (working copy) @@ -1,198 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.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.model.graphics.ext.*; - -/** - * - * An implementation of the model Factory. - * - * @generated - */ -public class GraphFactoryImpl extends EFactoryImpl implements GraphFactory { - /** - * Creates the default factory implementation. - * - * - * @generated - */ - public static GraphFactory init() { - try { - GraphFactory theGraphFactory = (GraphFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd"); - if (theGraphFactory != null) { - return theGraphFactory; - } - } - catch (Exception exception) { - EcorePlugin.INSTANCE.log(exception); - } - return new GraphFactoryImpl(); - } - - /** - * Creates an instance of the factory. - * - * - * @generated - */ - public GraphFactoryImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - public EObject create(EClass eClass) { - switch (eClass.getClassifierID()) { - case GraphPackage.CONNECTION_TYPE: return createConnectionType(); - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT: return createSmooksGraphExtensionDocumentRoot(); - case GraphPackage.FIGURE_TYPE: return createFigureType(); - case GraphPackage.GRAPH_TYPE: return createGraphType(); - case GraphPackage.INPUT_TYPE: return createInputType(); - case GraphPackage.PARAM_TYPE: return createParamType(); - case GraphPackage.PROCESSES_TYPE: return createProcessesType(); - case GraphPackage.PROCESS_TYPE: return createProcessType(); - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE: return createSmooksGraphicsExtType(); - case GraphPackage.TASK_TYPE: return createTaskType(); - default: - throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); - } - } - - /** - * - * - * @generated - */ - public ConnectionType createConnectionType() { - ConnectionTypeImpl connectionType = new ConnectionTypeImpl(); - return connectionType; - } - - /** - * - * - * @generated - */ - public SmooksGraphExtensionDocumentRoot createSmooksGraphExtensionDocumentRoot() { - SmooksGraphExtensionDocumentRootImpl smooksGraphExtensionDocumentRoot = new SmooksGraphExtensionDocumentRootImpl(); - return smooksGraphExtensionDocumentRoot; - } - - /** - * - * - * @generated - */ - public FigureType createFigureType() { - FigureTypeImpl figureType = new FigureTypeImpl(); - return figureType; - } - - /** - * - * - * @generated - */ - public GraphType createGraphType() { - GraphTypeImpl graphType = new GraphTypeImpl(); - return graphType; - } - - /** - * - * - * @generated - */ - public InputType createInputType() { - InputTypeImpl inputType = new InputTypeImpl(); - return inputType; - } - - /** - * - * - * @generated - */ - public ParamType createParamType() { - ParamTypeImpl paramType = new ParamTypeImpl(); - return paramType; - } - - /** - * - * - * @generated - */ - public ProcessesType createProcessesType() { - ProcessesTypeImpl processesType = new ProcessesTypeImpl(); - return processesType; - } - - /** - * - * - * @generated - */ - public ProcessType createProcessType() { - ProcessTypeImpl processType = new ProcessTypeImpl(); - return processType; - } - - /** - * - * - * @generated - */ - public SmooksGraphicsExtType createSmooksGraphicsExtType() { - SmooksGraphicsExtTypeImpl smooksGraphicsExtType = new SmooksGraphicsExtTypeImpl(); - return smooksGraphicsExtType; - } - - /** - * - * - * @generated - */ - public TaskType createTaskType() { - TaskTypeImpl taskType = new TaskTypeImpl(); - return taskType; - } - - /** - * - * - * @generated - */ - public GraphPackage getGraphPackage() { - return (GraphPackage)getEPackage(); - } - - /** - * - * - * @deprecated - * @generated - */ - @Deprecated - public static GraphPackage getPackage() { - return GraphPackage.eINSTANCE; - } - -} //GraphFactoryImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/GraphPackage.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/GraphPackage.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/GraphPackage.java (working copy) @@ -1,1799 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -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.jboss.tools.smooks.model.smooks.SmooksPackage; - - -/** - * - * The Package for the model. - * It contains accessors for the meta objects to represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * - * - * Smooks Graphics Editor Extention File Schema - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphFactory - * @model kind="package" - * @generated - */ -public interface GraphPackage extends EPackage { - /** - * The package name. - * - * - * @generated - */ - String eNAME = "graph"; - - /** - * The package namespace URI. - * - * - * @generated - */ - String eNS_URI = "http://www.jboss.org/jbosstools/smooks/smooks-graphics-ext.xsd"; - - /** - * The package namespace name. - * - * - * @generated - */ - String eNS_PREFIX = "graph"; - - /** - * The singleton instance of the package. - * - * - * @generated - */ - GraphPackage eINSTANCE = org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl.init(); - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl Connection Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getConnectionType() - * @generated - */ - int CONNECTION_TYPE = 0; - - /** - * The feature id for the 'Source' attribute. - * - * - * @generated - * @ordered - */ - int CONNECTION_TYPE__SOURCE = 0; - - /** - * The feature id for the 'Target' attribute. - * - * - * @generated - * @ordered - */ - int CONNECTION_TYPE__TARGET = 1; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int CONNECTION_TYPE__ID = 2; - - /** - * The number of structural features of the 'Connection Type' class. - * - * - * @generated - * @ordered - */ - int CONNECTION_TYPE_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl Smooks Graph Extension Document Root}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getSmooksGraphExtensionDocumentRoot() - * @generated - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT = 1; - - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED = 0; - - /** - * The feature id for the 'XMLNS Prefix Map' map. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1; - - /** - * The feature id for the 'XSI Schema Location' map. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2; - - /** - * The feature id for the 'Connection' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION = 3; - - /** - * The feature id for the 'Figure' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE = 4; - - /** - * The feature id for the 'Graph' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH = 5; - - /** - * The feature id for the 'Input' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT = 6; - - /** - * The feature id for the 'Param' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM = 7; - - /** - * The feature id for the 'Process' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS = 8; - - /** - * The feature id for the 'Processes' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES = 9; - - /** - * The feature id for the 'Smooks Graphics Ext' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT = 10; - - /** - * The feature id for the 'Source' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE = 11; - - /** - * The feature id for the 'Target' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET = 12; - - /** - * The feature id for the 'Task' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK = 13; - - /** - * The number of structural features of the 'Smooks Graph Extension Document Root' class. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT_FEATURE_COUNT = 14; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl Figure Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getFigureType() - * @generated - */ - int FIGURE_TYPE = 2; - - /** - * The feature id for the 'Height' attribute. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE__HEIGHT = 0; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE__ID = 1; - - /** - * The feature id for the 'Parent Figure Id' attribute. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE__PARENT_FIGURE_ID = 2; - - /** - * The feature id for the 'Width' attribute. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE__WIDTH = 3; - - /** - * The feature id for the 'X' attribute. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE__X = 4; - - /** - * The feature id for the 'Y' attribute. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE__Y = 5; - - /** - * The number of structural features of the 'Figure Type' class. - * - * - * @generated - * @ordered - */ - int FIGURE_TYPE_FEATURE_COUNT = 6; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.GraphTypeImpl Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getGraphType() - * @generated - */ - int GRAPH_TYPE = 3; - - /** - * The feature id for the 'Figure' containment reference list. - * - * - * @generated - * @ordered - */ - int GRAPH_TYPE__FIGURE = 0; - - /** - * The feature id for the 'Connection' containment reference list. - * - * - * @generated - * @ordered - */ - int GRAPH_TYPE__CONNECTION = 1; - - /** - * The number of structural features of the 'Type' class. - * - * - * @generated - * @ordered - */ - int GRAPH_TYPE_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl Input Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getInputType() - * @generated - */ - int INPUT_TYPE = 4; - - /** - * The feature id for the 'Param' containment reference list. - * - * - * @generated - * @ordered - */ - int INPUT_TYPE__PARAM = 0; - - /** - * The feature id for the 'Type' attribute. - * - * - * @generated - * @ordered - */ - int INPUT_TYPE__TYPE = 1; - - /** - * The number of structural features of the 'Input Type' class. - * - * - * @generated - * @ordered - */ - int INPUT_TYPE_FEATURE_COUNT = 2; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl Param Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getParamType() - * @generated - */ - int PARAM_TYPE = 5; - - /** - * The feature id for the 'Value' attribute. - * - * - * @generated - * @ordered - */ - int PARAM_TYPE__VALUE = 0; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int PARAM_TYPE__NAME = 1; - - /** - * The feature id for the 'Type' attribute. - * - * - * @generated - * @ordered - */ - int PARAM_TYPE__TYPE = 2; - - /** - * The number of structural features of the 'Param Type' class. - * - * - * @generated - * @ordered - */ - int PARAM_TYPE_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessesTypeImpl Processes Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ProcessesTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getProcessesType() - * @generated - */ - int PROCESSES_TYPE = 6; - - /** - * The feature id for the 'Process' containment reference. - * - * - * @generated - * @ordered - */ - int PROCESSES_TYPE__PROCESS = 0; - - /** - * The number of structural features of the 'Processes Type' class. - * - * - * @generated - * @ordered - */ - int PROCESSES_TYPE_FEATURE_COUNT = 1; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl Process Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getProcessType() - * @generated - */ - int PROCESS_TYPE = 7; - - /** - * The feature id for the 'Task' containment reference list. - * - * - * @generated - * @ordered - */ - int PROCESS_TYPE__TASK = 0; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int PROCESS_TYPE__ID = 1; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int PROCESS_TYPE__NAME = 2; - - /** - * The number of structural features of the 'Process Type' class. - * - * - * @generated - * @ordered - */ - int PROCESS_TYPE_FEATURE_COUNT = 3; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl Smooks Graphics Ext Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getSmooksGraphicsExtType() - * @generated - */ - int SMOOKS_GRAPHICS_EXT_TYPE = 8; - - /** - * The feature id for the 'Mixed' attribute list. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__MIXED = SmooksPackage.ABSTRACT_RESOURCE_CONFIG__MIXED; - - /** - * The feature id for the 'Any' attribute list. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__ANY = SmooksPackage.ABSTRACT_RESOURCE_CONFIG__ANY; - - /** - * The feature id for the 'Any Attribute' attribute list. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__ANY_ATTRIBUTE = SmooksPackage.ABSTRACT_RESOURCE_CONFIG__ANY_ATTRIBUTE; - - /** - * The feature id for the 'Input' containment reference list. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__INPUT = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 0; - - /** - * The feature id for the 'Graph' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__GRAPH = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 1; - - /** - * The feature id for the 'Processes' containment reference. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 2; - - /** - * The feature id for the 'Author' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 3; - - /** - * The feature id for the 'Input Type' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 4; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__NAME = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 5; - - /** - * The feature id for the 'Output Type' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 6; - - /** - * The feature id for the 'Platform Version' attribute. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 7; - - /** - * The number of structural features of the 'Smooks Graphics Ext Type' class. - * - * - * @generated - * @ordered - */ - int SMOOKS_GRAPHICS_EXT_TYPE_FEATURE_COUNT = SmooksPackage.ABSTRACT_RESOURCE_CONFIG_FEATURE_COUNT + 8; - - /** - * The meta object id for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl Task Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getTaskType() - * @generated - */ - int TASK_TYPE = 9; - - /** - * The feature id for the 'Task' containment reference list. - * - * - * @generated - * @ordered - */ - int TASK_TYPE__TASK = 0; - - /** - * The feature id for the 'Id' attribute. - * - * - * @generated - * @ordered - */ - int TASK_TYPE__ID = 1; - - /** - * The feature id for the 'Name' attribute. - * - * - * @generated - * @ordered - */ - int TASK_TYPE__NAME = 2; - - /** - * The feature id for the 'Type' attribute. - * - * - * @generated - * @ordered - */ - int TASK_TYPE__TYPE = 3; - - /** - * The number of structural features of the 'Task Type' class. - * - * - * @generated - * @ordered - */ - int TASK_TYPE_FEATURE_COUNT = 4; - - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType Connection Type}'. - * - * - * @return the meta object for class 'Connection Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.ConnectionType - * @generated - */ - EClass getConnectionType(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getSource Source}'. - * - * - * @return the meta object for the attribute 'Source'. - * @see org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getSource() - * @see #getConnectionType() - * @generated - */ - EAttribute getConnectionType_Source(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getTarget Target}'. - * - * - * @return the meta object for the attribute 'Target'. - * @see org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getTarget() - * @see #getConnectionType() - * @generated - */ - EAttribute getConnectionType_Target(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getId() - * @see #getConnectionType() - * @generated - */ - EAttribute getConnectionType_Id(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot Smooks Graph Extension Document Root}'. - * - * - * @return the meta object for class 'Smooks Graph Extension Document Root'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot - * @generated - */ - EClass getSmooksGraphExtensionDocumentRoot(); - - /** - * Returns the meta object for the attribute list '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getMixed Mixed}'. - * - * - * @return the meta object for the attribute list 'Mixed'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getMixed() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EAttribute getSmooksGraphExtensionDocumentRoot_Mixed(); - - /** - * Returns the meta object for the map '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getXMLNSPrefixMap XMLNS Prefix Map}'. - * - * - * @return the meta object for the map 'XMLNS Prefix Map'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getXMLNSPrefixMap() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_XMLNSPrefixMap(); - - /** - * Returns the meta object for the map '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getXSISchemaLocation XSI Schema Location}'. - * - * - * @return the meta object for the map 'XSI Schema Location'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getXSISchemaLocation() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_XSISchemaLocation(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getConnection Connection}'. - * - * - * @return the meta object for the containment reference 'Connection'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getConnection() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Connection(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getFigure Figure}'. - * - * - * @return the meta object for the containment reference 'Figure'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getFigure() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Figure(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getGraph Graph}'. - * - * - * @return the meta object for the containment reference 'Graph'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getGraph() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Graph(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getInput Input}'. - * - * - * @return the meta object for the containment reference 'Input'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getInput() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Input(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getParam Param}'. - * - * - * @return the meta object for the containment reference 'Param'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getParam() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Param(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcess Process}'. - * - * - * @return the meta object for the containment reference 'Process'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcess() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Process(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcesses Processes}'. - * - * - * @return the meta object for the containment reference 'Processes'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcesses() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Processes(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSmooksGraphicsExt Smooks Graphics Ext}'. - * - * - * @return the meta object for the containment reference 'Smooks Graphics Ext'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSmooksGraphicsExt() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_SmooksGraphicsExt(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSource Source}'. - * - * - * @return the meta object for the attribute 'Source'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSource() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EAttribute getSmooksGraphExtensionDocumentRoot_Source(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTarget Target}'. - * - * - * @return the meta object for the attribute 'Target'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTarget() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EAttribute getSmooksGraphExtensionDocumentRoot_Target(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTask Task}'. - * - * - * @return the meta object for the containment reference 'Task'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTask() - * @see #getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EReference getSmooksGraphExtensionDocumentRoot_Task(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType Figure Type}'. - * - * - * @return the meta object for class 'Figure Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType - * @generated - */ - EClass getFigureType(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getHeight Height}'. - * - * - * @return the meta object for the attribute 'Height'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType#getHeight() - * @see #getFigureType() - * @generated - */ - EAttribute getFigureType_Height(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType#getId() - * @see #getFigureType() - * @generated - */ - EAttribute getFigureType_Id(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getParentFigureId Parent Figure Id}'. - * - * - * @return the meta object for the attribute 'Parent Figure Id'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType#getParentFigureId() - * @see #getFigureType() - * @generated - */ - EAttribute getFigureType_ParentFigureId(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getWidth Width}'. - * - * - * @return the meta object for the attribute 'Width'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType#getWidth() - * @see #getFigureType() - * @generated - */ - EAttribute getFigureType_Width(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getX X}'. - * - * - * @return the meta object for the attribute 'X'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType#getX() - * @see #getFigureType() - * @generated - */ - EAttribute getFigureType_X(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getY Y}'. - * - * - * @return the meta object for the attribute 'Y'. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType#getY() - * @see #getFigureType() - * @generated - */ - EAttribute getFigureType_Y(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.GraphType Type}'. - * - * - * @return the meta object for class 'Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphType - * @generated - */ - EClass getGraphType(); - - /** - * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.GraphType#getFigure Figure}'. - * - * - * @return the meta object for the containment reference list 'Figure'. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphType#getFigure() - * @see #getGraphType() - * @generated - */ - EReference getGraphType_Figure(); - - /** - * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.GraphType#getConnection Connection}'. - * - * - * @return the meta object for the containment reference list 'Connection'. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphType#getConnection() - * @see #getGraphType() - * @generated - */ - EReference getGraphType_Connection(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.InputType Input Type}'. - * - * - * @return the meta object for class 'Input Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.InputType - * @generated - */ - EClass getInputType(); - - /** - * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getParam Param}'. - * - * - * @return the meta object for the containment reference list 'Param'. - * @see org.jboss.tools.smooks.model.graphics.ext.InputType#getParam() - * @see #getInputType() - * @generated - */ - EReference getInputType_Param(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getType Type}'. - * - * - * @return the meta object for the attribute 'Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.InputType#getType() - * @see #getInputType() - * @generated - */ - EAttribute getInputType_Type(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType Param Type}'. - * - * - * @return the meta object for class 'Param Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.ParamType - * @generated - */ - EClass getParamType(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue Value}'. - * - * - * @return the meta object for the attribute 'Value'. - * @see org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue() - * @see #getParamType() - * @generated - */ - EAttribute getParamType_Value(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.jboss.tools.smooks.model.graphics.ext.ParamType#getName() - * @see #getParamType() - * @generated - */ - EAttribute getParamType_Name(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getType Type}'. - * - * - * @return the meta object for the attribute 'Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.ParamType#getType() - * @see #getParamType() - * @generated - */ - EAttribute getParamType_Type(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessesType Processes Type}'. - * - * - * @return the meta object for class 'Processes Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessesType - * @generated - */ - EClass getProcessesType(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessesType#getProcess Process}'. - * - * - * @return the meta object for the containment reference 'Process'. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessesType#getProcess() - * @see #getProcessesType() - * @generated - */ - EReference getProcessesType_Process(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType Process Type}'. - * - * - * @return the meta object for class 'Process Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessType - * @generated - */ - EClass getProcessType(); - - /** - * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getTask Task}'. - * - * - * @return the meta object for the containment reference list 'Task'. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessType#getTask() - * @see #getProcessType() - * @generated - */ - EReference getProcessType_Task(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessType#getId() - * @see #getProcessType() - * @generated - */ - EAttribute getProcessType_Id(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessType#getName() - * @see #getProcessType() - * @generated - */ - EAttribute getProcessType_Name(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType Smooks Graphics Ext Type}'. - * - * - * @return the meta object for class 'Smooks Graphics Ext Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType - * @generated - */ - EClass getSmooksGraphicsExtType(); - - /** - * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInput Input}'. - * - * - * @return the meta object for the containment reference list 'Input'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInput() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EReference getSmooksGraphicsExtType_Input(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getGraph Graph}'. - * - * - * @return the meta object for the containment reference 'Graph'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getGraph() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EReference getSmooksGraphicsExtType_Graph(); - - /** - * Returns the meta object for the containment reference '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getProcesses Processes}'. - * - * - * @return the meta object for the containment reference 'Processes'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getProcesses() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EReference getSmooksGraphicsExtType_Processes(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getAuthor Author}'. - * - * - * @return the meta object for the attribute 'Author'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getAuthor() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EAttribute getSmooksGraphicsExtType_Author(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType Input Type}'. - * - * - * @return the meta object for the attribute 'Input Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EAttribute getSmooksGraphicsExtType_InputType(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getName() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EAttribute getSmooksGraphicsExtType_Name(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType Output Type}'. - * - * - * @return the meta object for the attribute 'Output Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EAttribute getSmooksGraphicsExtType_OutputType(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getPlatformVersion Platform Version}'. - * - * - * @return the meta object for the attribute 'Platform Version'. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getPlatformVersion() - * @see #getSmooksGraphicsExtType() - * @generated - */ - EAttribute getSmooksGraphicsExtType_PlatformVersion(); - - /** - * Returns the meta object for class '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType Task Type}'. - * - * - * @return the meta object for class 'Task Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.TaskType - * @generated - */ - EClass getTaskType(); - - /** - * Returns the meta object for the containment reference list '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getTask Task}'. - * - * - * @return the meta object for the containment reference list 'Task'. - * @see org.jboss.tools.smooks.model.graphics.ext.TaskType#getTask() - * @see #getTaskType() - * @generated - */ - EReference getTaskType_Task(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getId Id}'. - * - * - * @return the meta object for the attribute 'Id'. - * @see org.jboss.tools.smooks.model.graphics.ext.TaskType#getId() - * @see #getTaskType() - * @generated - */ - EAttribute getTaskType_Id(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getName Name}'. - * - * - * @return the meta object for the attribute 'Name'. - * @see org.jboss.tools.smooks.model.graphics.ext.TaskType#getName() - * @see #getTaskType() - * @generated - */ - EAttribute getTaskType_Name(); - - /** - * Returns the meta object for the attribute '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getType Type}'. - * - * - * @return the meta object for the attribute 'Type'. - * @see org.jboss.tools.smooks.model.graphics.ext.TaskType#getType() - * @see #getTaskType() - * @generated - */ - EAttribute getTaskType_Type(); - - /** - * Returns the factory that creates the instances of the model. - * - * - * @return the factory that creates the instances of the model. - * @generated - */ - GraphFactory getGraphFactory(); - - /** - * - * Defines literals for the meta objects that represent - *
    - *
  • each class,
  • - *
  • each feature of each class,
  • - *
  • each enum,
  • - *
  • and each data type
  • - *
- * - * @generated - */ - interface Literals { - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl Connection Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ConnectionTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getConnectionType() - * @generated - */ - EClass CONNECTION_TYPE = eINSTANCE.getConnectionType(); - - /** - * The meta object literal for the 'Source' attribute feature. - * - * - * @generated - */ - EAttribute CONNECTION_TYPE__SOURCE = eINSTANCE.getConnectionType_Source(); - - /** - * The meta object literal for the 'Target' attribute feature. - * - * - * @generated - */ - EAttribute CONNECTION_TYPE__TARGET = eINSTANCE.getConnectionType_Target(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute CONNECTION_TYPE__ID = eINSTANCE.getConnectionType_Id(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl Smooks Graph Extension Document Root}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphExtensionDocumentRootImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getSmooksGraphExtensionDocumentRoot() - * @generated - */ - EClass SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT = eINSTANCE.getSmooksGraphExtensionDocumentRoot(); - - /** - * The meta object literal for the 'Mixed' attribute list feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__MIXED = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Mixed(); - - /** - * The meta object literal for the 'XMLNS Prefix Map' map feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getSmooksGraphExtensionDocumentRoot_XMLNSPrefixMap(); - - /** - * The meta object literal for the 'XSI Schema Location' map feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getSmooksGraphExtensionDocumentRoot_XSISchemaLocation(); - - /** - * The meta object literal for the 'Connection' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__CONNECTION = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Connection(); - - /** - * The meta object literal for the 'Figure' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__FIGURE = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Figure(); - - /** - * The meta object literal for the 'Graph' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__GRAPH = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Graph(); - - /** - * The meta object literal for the 'Input' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__INPUT = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Input(); - - /** - * The meta object literal for the 'Param' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PARAM = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Param(); - - /** - * The meta object literal for the 'Process' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESS = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Process(); - - /** - * The meta object literal for the 'Processes' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__PROCESSES = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Processes(); - - /** - * The meta object literal for the 'Smooks Graphics Ext' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT = eINSTANCE.getSmooksGraphExtensionDocumentRoot_SmooksGraphicsExt(); - - /** - * The meta object literal for the 'Source' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SOURCE = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Source(); - - /** - * The meta object literal for the 'Target' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TARGET = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Target(); - - /** - * The meta object literal for the 'Task' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__TASK = eINSTANCE.getSmooksGraphExtensionDocumentRoot_Task(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl Figure Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.FigureTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getFigureType() - * @generated - */ - EClass FIGURE_TYPE = eINSTANCE.getFigureType(); - - /** - * The meta object literal for the 'Height' attribute feature. - * - * - * @generated - */ - EAttribute FIGURE_TYPE__HEIGHT = eINSTANCE.getFigureType_Height(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute FIGURE_TYPE__ID = eINSTANCE.getFigureType_Id(); - - /** - * The meta object literal for the 'Parent Figure Id' attribute feature. - * - * - * @generated - */ - EAttribute FIGURE_TYPE__PARENT_FIGURE_ID = eINSTANCE.getFigureType_ParentFigureId(); - - /** - * The meta object literal for the 'Width' attribute feature. - * - * - * @generated - */ - EAttribute FIGURE_TYPE__WIDTH = eINSTANCE.getFigureType_Width(); - - /** - * The meta object literal for the 'X' attribute feature. - * - * - * @generated - */ - EAttribute FIGURE_TYPE__X = eINSTANCE.getFigureType_X(); - - /** - * The meta object literal for the 'Y' attribute feature. - * - * - * @generated - */ - EAttribute FIGURE_TYPE__Y = eINSTANCE.getFigureType_Y(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.GraphTypeImpl Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getGraphType() - * @generated - */ - EClass GRAPH_TYPE = eINSTANCE.getGraphType(); - - /** - * The meta object literal for the 'Figure' containment reference list feature. - * - * - * @generated - */ - EReference GRAPH_TYPE__FIGURE = eINSTANCE.getGraphType_Figure(); - - /** - * The meta object literal for the 'Connection' containment reference list feature. - * - * - * @generated - */ - EReference GRAPH_TYPE__CONNECTION = eINSTANCE.getGraphType_Connection(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl Input Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.InputTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getInputType() - * @generated - */ - EClass INPUT_TYPE = eINSTANCE.getInputType(); - - /** - * The meta object literal for the 'Param' containment reference list feature. - * - * - * @generated - */ - EReference INPUT_TYPE__PARAM = eINSTANCE.getInputType_Param(); - - /** - * The meta object literal for the 'Type' attribute feature. - * - * - * @generated - */ - EAttribute INPUT_TYPE__TYPE = eINSTANCE.getInputType_Type(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl Param Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ParamTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getParamType() - * @generated - */ - EClass PARAM_TYPE = eINSTANCE.getParamType(); - - /** - * The meta object literal for the 'Value' attribute feature. - * - * - * @generated - */ - EAttribute PARAM_TYPE__VALUE = eINSTANCE.getParamType_Value(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute PARAM_TYPE__NAME = eINSTANCE.getParamType_Name(); - - /** - * The meta object literal for the 'Type' attribute feature. - * - * - * @generated - */ - EAttribute PARAM_TYPE__TYPE = eINSTANCE.getParamType_Type(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessesTypeImpl Processes Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ProcessesTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getProcessesType() - * @generated - */ - EClass PROCESSES_TYPE = eINSTANCE.getProcessesType(); - - /** - * The meta object literal for the 'Process' containment reference feature. - * - * - * @generated - */ - EReference PROCESSES_TYPE__PROCESS = eINSTANCE.getProcessesType_Process(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl Process Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.ProcessTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getProcessType() - * @generated - */ - EClass PROCESS_TYPE = eINSTANCE.getProcessType(); - - /** - * The meta object literal for the 'Task' containment reference list feature. - * - * - * @generated - */ - EReference PROCESS_TYPE__TASK = eINSTANCE.getProcessType_Task(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute PROCESS_TYPE__ID = eINSTANCE.getProcessType_Id(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute PROCESS_TYPE__NAME = eINSTANCE.getProcessType_Name(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl Smooks Graphics Ext Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.SmooksGraphicsExtTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getSmooksGraphicsExtType() - * @generated - */ - EClass SMOOKS_GRAPHICS_EXT_TYPE = eINSTANCE.getSmooksGraphicsExtType(); - - /** - * The meta object literal for the 'Input' containment reference list feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPHICS_EXT_TYPE__INPUT = eINSTANCE.getSmooksGraphicsExtType_Input(); - - /** - * The meta object literal for the 'Graph' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPHICS_EXT_TYPE__GRAPH = eINSTANCE.getSmooksGraphicsExtType_Graph(); - - /** - * The meta object literal for the 'Processes' containment reference feature. - * - * - * @generated - */ - EReference SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES = eINSTANCE.getSmooksGraphicsExtType_Processes(); - - /** - * The meta object literal for the 'Author' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPHICS_EXT_TYPE__AUTHOR = eINSTANCE.getSmooksGraphicsExtType_Author(); - - /** - * The meta object literal for the 'Input Type' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPHICS_EXT_TYPE__INPUT_TYPE = eINSTANCE.getSmooksGraphicsExtType_InputType(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPHICS_EXT_TYPE__NAME = eINSTANCE.getSmooksGraphicsExtType_Name(); - - /** - * The meta object literal for the 'Output Type' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPHICS_EXT_TYPE__OUTPUT_TYPE = eINSTANCE.getSmooksGraphicsExtType_OutputType(); - - /** - * The meta object literal for the 'Platform Version' attribute feature. - * - * - * @generated - */ - EAttribute SMOOKS_GRAPHICS_EXT_TYPE__PLATFORM_VERSION = eINSTANCE.getSmooksGraphicsExtType_PlatformVersion(); - - /** - * The meta object literal for the '{@link org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl Task Type}' class. - * - * - * @see org.jboss.tools.smooks.model.graphics.ext.impl.TaskTypeImpl - * @see org.jboss.tools.smooks.model.graphics.ext.impl.GraphPackageImpl#getTaskType() - * @generated - */ - EClass TASK_TYPE = eINSTANCE.getTaskType(); - - /** - * The meta object literal for the 'Task' containment reference list feature. - * - * - * @generated - */ - EReference TASK_TYPE__TASK = eINSTANCE.getTaskType_Task(); - - /** - * The meta object literal for the 'Id' attribute feature. - * - * - * @generated - */ - EAttribute TASK_TYPE__ID = eINSTANCE.getTaskType_Id(); - - /** - * The meta object literal for the 'Name' attribute feature. - * - * - * @generated - */ - EAttribute TASK_TYPE__NAME = eINSTANCE.getTaskType_Name(); - - /** - * The meta object literal for the 'Type' attribute feature. - * - * - * @generated - */ - EAttribute TASK_TYPE__TYPE = eINSTANCE.getTaskType_Type(); - - } - -} //GraphPackage Index: src/org/jboss/tools/smooks/model/graphics/ext/TaskType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/TaskType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/TaskType.java (working copy) @@ -1,131 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Task Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getTask Task}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getId Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getName Name}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getType Type}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getTaskType() - * @model extendedMetaData="name='task_._type' kind='elementOnly'" - * @generated - */ -public interface TaskType extends EObject { - /** - * Returns the value of the 'Task' containment reference list. - * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.TaskType}. - * - *

- * If the meaning of the 'Task' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Task' containment reference list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getTaskType_Task() - * @model containment="true" - * extendedMetaData="kind='element' name='task' namespace='##targetNamespace'" - * @generated - */ - EList getTask(); - - /** - * Returns the value of the 'Id' attribute. - * - *

- * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getTaskType_Id() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='id'" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - - /** - * Returns the value of the 'Name' attribute. - * - *

- * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getTaskType_Name() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='name'" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Type' attribute. - * - *

- * If the meaning of the 'Type' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Type' attribute. - * @see #setType(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getTaskType_Type() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='type'" - * @generated - */ - String getType(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType#getType Type}' attribute. - * - * - * @param value the new value of the 'Type' attribute. - * @see #getType() - * @generated - */ - void setType(String value); - -} // TaskType Index: src/org/jboss/tools/smooks/model/graphics/ext/GraphType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/GraphType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/GraphType.java (working copy) @@ -1,65 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.GraphType#getFigure Figure}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.GraphType#getConnection Connection}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getGraphType() - * @model extendedMetaData="name='graph_._type' kind='elementOnly'" - * @generated - */ -public interface GraphType extends EObject { - /** - * Returns the value of the 'Figure' containment reference list. - * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.FigureType}. - * - *

- * If the meaning of the 'Figure' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Figure' containment reference list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getGraphType_Figure() - * @model containment="true" - * extendedMetaData="kind='element' name='figure' namespace='##targetNamespace'" - * @generated - */ - EList getFigure(); - - /** - * Returns the value of the 'Connection' containment reference list. - * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType}. - * - *

- * If the meaning of the 'Connection' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Connection' containment reference list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getGraphType_Connection() - * @model containment="true" - * extendedMetaData="kind='element' name='connection' namespace='##targetNamespace'" - * @generated - */ - EList getConnection(); - -} // GraphType Index: src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphExtensionDocumentRoot.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphExtensionDocumentRoot.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphExtensionDocumentRoot.java (working copy) @@ -1,395 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.common.util.EMap; - -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.emf.ecore.util.FeatureMap; - -/** - * - * A representation of the model object 'Smooks Graph Extension Document Root'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getMixed Mixed}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getXMLNSPrefixMap XMLNS Prefix Map}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getXSISchemaLocation XSI Schema Location}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getConnection Connection}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getFigure Figure}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getGraph Graph}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getInput Input}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getParam Param}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcess Process}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcesses Processes}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSmooksGraphicsExt Smooks Graphics Ext}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSource Source}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTarget Target}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTask Task}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot() - * @model extendedMetaData="name='' kind='mixed'" - * @generated - */ -public interface SmooksGraphExtensionDocumentRoot extends EObject { - /** - * Returns the value of the 'Mixed' attribute list. - * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. - * - *

- * If the meaning of the 'Mixed' attribute list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Mixed' attribute list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Mixed() - * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" - * extendedMetaData="kind='elementWildcard' name=':mixed'" - * @generated - */ - FeatureMap getMixed(); - - /** - * Returns the value of the 'XMLNS Prefix Map' map. - * The key is of type {@link java.lang.String}, - * and the value is of type {@link java.lang.String}, - * - *

- * If the meaning of the 'XMLNS Prefix Map' map isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'XMLNS Prefix Map' map. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_XMLNSPrefixMap() - * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry" transient="true" - * extendedMetaData="kind='attribute' name='xmlns:prefix'" - * @generated - */ - EMap getXMLNSPrefixMap(); - - /** - * Returns the value of the 'XSI Schema Location' map. - * The key is of type {@link java.lang.String}, - * and the value is of type {@link java.lang.String}, - * - *

- * If the meaning of the 'XSI Schema Location' map isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'XSI Schema Location' map. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_XSISchemaLocation() - * @model mapType="org.eclipse.emf.ecore.EStringToStringMapEntry" transient="true" - * extendedMetaData="kind='attribute' name='xsi:schemaLocation'" - * @generated - */ - EMap getXSISchemaLocation(); - - /** - * Returns the value of the 'Connection' containment reference. - * - *

- * If the meaning of the 'Connection' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Connection' containment reference. - * @see #setConnection(ConnectionType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Connection() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='connection' namespace='##targetNamespace'" - * @generated - */ - ConnectionType getConnection(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getConnection Connection}' containment reference. - * - * - * @param value the new value of the 'Connection' containment reference. - * @see #getConnection() - * @generated - */ - void setConnection(ConnectionType value); - - /** - * Returns the value of the 'Figure' containment reference. - * - *

- * If the meaning of the 'Figure' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Figure' containment reference. - * @see #setFigure(FigureType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Figure() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='figure' namespace='##targetNamespace'" - * @generated - */ - FigureType getFigure(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getFigure Figure}' containment reference. - * - * - * @param value the new value of the 'Figure' containment reference. - * @see #getFigure() - * @generated - */ - void setFigure(FigureType value); - - /** - * Returns the value of the 'Graph' containment reference. - * - *

- * If the meaning of the 'Graph' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Graph' containment reference. - * @see #setGraph(GraphType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Graph() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='graph' namespace='##targetNamespace'" - * @generated - */ - GraphType getGraph(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getGraph Graph}' containment reference. - * - * - * @param value the new value of the 'Graph' containment reference. - * @see #getGraph() - * @generated - */ - void setGraph(GraphType value); - - /** - * Returns the value of the 'Input' containment reference. - * - *

- * If the meaning of the 'Input' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Input' containment reference. - * @see #setInput(InputType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Input() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='input' namespace='##targetNamespace'" - * @generated - */ - InputType getInput(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getInput Input}' containment reference. - * - * - * @param value the new value of the 'Input' containment reference. - * @see #getInput() - * @generated - */ - void setInput(InputType value); - - /** - * Returns the value of the 'Param' containment reference. - * - *

- * If the meaning of the 'Param' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Param' containment reference. - * @see #setParam(ParamType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Param() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='param' namespace='##targetNamespace'" - * @generated - */ - ParamType getParam(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getParam Param}' containment reference. - * - * - * @param value the new value of the 'Param' containment reference. - * @see #getParam() - * @generated - */ - void setParam(ParamType value); - - /** - * Returns the value of the 'Process' containment reference. - * - *

- * If the meaning of the 'Process' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Process' containment reference. - * @see #setProcess(ProcessType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Process() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='process' namespace='##targetNamespace'" - * @generated - */ - ProcessType getProcess(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcess Process}' containment reference. - * - * - * @param value the new value of the 'Process' containment reference. - * @see #getProcess() - * @generated - */ - void setProcess(ProcessType value); - - /** - * Returns the value of the 'Processes' containment reference. - * - *

- * If the meaning of the 'Processes' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Processes' containment reference. - * @see #setProcesses(ProcessesType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Processes() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='processes' namespace='##targetNamespace'" - * @generated - */ - ProcessesType getProcesses(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getProcesses Processes}' containment reference. - * - * - * @param value the new value of the 'Processes' containment reference. - * @see #getProcesses() - * @generated - */ - void setProcesses(ProcessesType value); - - /** - * Returns the value of the 'Smooks Graphics Ext' containment reference. - * - *

- * If the meaning of the 'Smooks Graphics Ext' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Smooks Graphics Ext' containment reference. - * @see #setSmooksGraphicsExt(SmooksGraphicsExtType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_SmooksGraphicsExt() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='smooks-graphics-ext' namespace='##targetNamespace' affiliation='http://www.milyn.org/xsd/smooks-1.1.xsd#abstract-resource-config'" - * @generated - */ - SmooksGraphicsExtType getSmooksGraphicsExt(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSmooksGraphicsExt Smooks Graphics Ext}' containment reference. - * - * - * @param value the new value of the 'Smooks Graphics Ext' containment reference. - * @see #getSmooksGraphicsExt() - * @generated - */ - void setSmooksGraphicsExt(SmooksGraphicsExtType value); - - /** - * Returns the value of the 'Source' attribute. - * - *

- * If the meaning of the 'Source' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Source' attribute. - * @see #setSource(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Source() - * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='source' namespace='##targetNamespace'" - * @generated - */ - String getSource(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getSource Source}' attribute. - * - * - * @param value the new value of the 'Source' attribute. - * @see #getSource() - * @generated - */ - void setSource(String value); - - /** - * Returns the value of the 'Target' attribute. - * - *

- * If the meaning of the 'Target' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Target' attribute. - * @see #setTarget(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Target() - * @model unique="false" dataType="org.eclipse.emf.ecore.xml.type.String" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='target' namespace='##targetNamespace'" - * @generated - */ - String getTarget(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTarget Target}' attribute. - * - * - * @param value the new value of the 'Target' attribute. - * @see #getTarget() - * @generated - */ - void setTarget(String value); - - /** - * Returns the value of the 'Task' containment reference. - * - *

- * If the meaning of the 'Task' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Task' containment reference. - * @see #setTask(TaskType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphExtensionDocumentRoot_Task() - * @model containment="true" upper="-2" transient="true" volatile="true" derived="true" - * extendedMetaData="kind='element' name='task' namespace='##targetNamespace'" - * @generated - */ - TaskType getTask(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot#getTask Task}' containment reference. - * - * - * @param value the new value of the 'Task' containment reference. - * @see #getTask() - * @generated - */ - void setTask(TaskType value); - -} // SmooksGraphExtensionDocumentRoot Index: src/org/jboss/tools/smooks/model/graphics/ext/FigureType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/FigureType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/FigureType.java (working copy) @@ -1,195 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Figure Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getHeight Height}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getId Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getParentFigureId Parent Figure Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getWidth Width}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getX X}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getY Y}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType() - * @model extendedMetaData="name='figure_._type' kind='empty'" - * @generated - */ -public interface FigureType extends EObject { - /** - * Returns the value of the 'Height' attribute. - * - *

- * If the meaning of the 'Height' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Height' attribute. - * @see #setHeight(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType_Height() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='height'" - * @generated - */ - String getHeight(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getHeight Height}' attribute. - * - * - * @param value the new value of the 'Height' attribute. - * @see #getHeight() - * @generated - */ - void setHeight(String value); - - /** - * Returns the value of the 'Id' attribute. - * - *

- * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType_Id() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='id'" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - - /** - * Returns the value of the 'Parent Figure Id' attribute. - * - *

- * If the meaning of the 'Parent Figure Id' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Parent Figure Id' attribute. - * @see #setParentFigureId(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType_ParentFigureId() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='parentFigureId'" - * @generated - */ - String getParentFigureId(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getParentFigureId Parent Figure Id}' attribute. - * - * - * @param value the new value of the 'Parent Figure Id' attribute. - * @see #getParentFigureId() - * @generated - */ - void setParentFigureId(String value); - - /** - * Returns the value of the 'Width' attribute. - * - *

- * If the meaning of the 'Width' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Width' attribute. - * @see #setWidth(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType_Width() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='width'" - * @generated - */ - String getWidth(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getWidth Width}' attribute. - * - * - * @param value the new value of the 'Width' attribute. - * @see #getWidth() - * @generated - */ - void setWidth(String value); - - /** - * Returns the value of the 'X' attribute. - * - *

- * If the meaning of the 'X' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'X' attribute. - * @see #setX(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType_X() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='x'" - * @generated - */ - String getX(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getX X}' attribute. - * - * - * @param value the new value of the 'X' attribute. - * @see #getX() - * @generated - */ - void setX(String value); - - /** - * Returns the value of the 'Y' attribute. - * - *

- * If the meaning of the 'Y' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Y' attribute. - * @see #setY(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getFigureType_Y() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='y'" - * @generated - */ - String getY(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType#getY Y}' attribute. - * - * - * @param value the new value of the 'Y' attribute. - * @see #getY() - * @generated - */ - void setY(String value); - -} // FigureType Index: src/org/jboss/tools/smooks/model/graphics/ext/InputType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/InputType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/InputType.java (working copy) @@ -1,75 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Input Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.InputType#getParam Param}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.InputType#getType Type}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getInputType() - * @model extendedMetaData="name='input_._type' kind='elementOnly'" - * @generated - */ -public interface InputType extends EObject { - /** - * Returns the value of the 'Param' containment reference list. - * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.ParamType}. - * - *

- * If the meaning of the 'Param' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Param' containment reference list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getInputType_Param() - * @model containment="true" - * extendedMetaData="kind='element' name='param' namespace='##targetNamespace'" - * @generated - */ - EList getParam(); - - /** - * Returns the value of the 'Type' attribute. - * - *

- * If the meaning of the 'Type' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Type' attribute. - * @see #setType(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getInputType_Type() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='type'" - * @generated - */ - String getType(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.InputType#getType Type}' attribute. - * - * - * @param value the new value of the 'Type' attribute. - * @see #getType() - * @generated - */ - void setType(String value); - -} // InputType Index: src/org/jboss/tools/smooks/model/graphics/ext/util/GraphAdapterFactory.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/util/GraphAdapterFactory.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/util/GraphAdapterFactory.java (working copy) @@ -1,346 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.util; - - - -import org.eclipse.emf.common.notify.Adapter; -import org.eclipse.emf.common.notify.Notifier; - -import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; - -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.emf.ecore.xml.type.AnyType; -import org.jboss.tools.smooks.model.common.AbstractAnyType; -import org.jboss.tools.smooks.model.graphics.ext.*; -import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig; - - -/** - * - * The Adapter Factory for the model. - * It provides an adapter createXXX method for each class of the model. - * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage - * @generated - */ -public class GraphAdapterFactory extends AdapterFactoryImpl { - /** - * The cached model package. - * - * - * @generated - */ - protected static GraphPackage modelPackage; - - /** - * Creates an instance of the adapter factory. - * - * - * @generated - */ - public GraphAdapterFactory() { - if (modelPackage == null) { - modelPackage = GraphPackage.eINSTANCE; - } - } - - /** - * Returns whether this factory is applicable for the type of the object. - * - * This implementation returns true if the object is either the model's package or is an instance object of the model. - * - * @return whether this factory is applicable for the type of the object. - * @generated - */ - @Override - public boolean isFactoryForType(Object object) { - if (object == modelPackage) { - return true; - } - if (object instanceof EObject) { - return ((EObject)object).eClass().getEPackage() == modelPackage; - } - return false; - } - - /** - * The switch that delegates to the createXXX methods. - * - * - * @generated - */ - protected GraphSwitch modelSwitch = - new GraphSwitch() { - @Override - public Adapter caseConnectionType(ConnectionType object) { - return createConnectionTypeAdapter(); - } - @Override - public Adapter caseSmooksGraphExtensionDocumentRoot(SmooksGraphExtensionDocumentRoot object) { - return createSmooksGraphExtensionDocumentRootAdapter(); - } - @Override - public Adapter caseFigureType(FigureType object) { - return createFigureTypeAdapter(); - } - @Override - public Adapter caseGraphType(GraphType object) { - return createGraphTypeAdapter(); - } - @Override - public Adapter caseInputType(InputType object) { - return createInputTypeAdapter(); - } - @Override - public Adapter caseParamType(ParamType object) { - return createParamTypeAdapter(); - } - @Override - public Adapter caseProcessesType(ProcessesType object) { - return createProcessesTypeAdapter(); - } - @Override - public Adapter caseProcessType(ProcessType object) { - return createProcessTypeAdapter(); - } - @Override - public Adapter caseSmooksGraphicsExtType(SmooksGraphicsExtType object) { - return createSmooksGraphicsExtTypeAdapter(); - } - @Override - public Adapter caseTaskType(TaskType object) { - return createTaskTypeAdapter(); - } - @Override - public Adapter caseAnyType(AnyType object) { - return createAnyTypeAdapter(); - } - @Override - public Adapter caseAbstractAnyType(AbstractAnyType object) { - return createAbstractAnyTypeAdapter(); - } - @Override - public Adapter caseAbstractResourceConfig(AbstractResourceConfig object) { - return createAbstractResourceConfigAdapter(); - } - @Override - public Adapter defaultCase(EObject object) { - return createEObjectAdapter(); - } - }; - - /** - * Creates an adapter for the target. - * - * - * @param target the object to adapt. - * @return the adapter for the target. - * @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.model.graphics.ext.ConnectionType Connection Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.ConnectionType - * @generated - */ - public Adapter createConnectionTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot Smooks Graph Extension Document Root}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot - * @generated - */ - public Adapter createSmooksGraphExtensionDocumentRootAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.FigureType Figure Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.FigureType - * @generated - */ - public Adapter createFigureTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.GraphType Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphType - * @generated - */ - public Adapter createGraphTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.InputType Input Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.InputType - * @generated - */ - public Adapter createInputTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType Param Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.ParamType - * @generated - */ - public Adapter createParamTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessesType Processes Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessesType - * @generated - */ - public Adapter createProcessesTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType Process Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.ProcessType - * @generated - */ - public Adapter createProcessTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType Smooks Graphics Ext Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType - * @generated - */ - public Adapter createSmooksGraphicsExtTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.graphics.ext.TaskType Task Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.graphics.ext.TaskType - * @generated - */ - public Adapter createTaskTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.xml.type.AnyType Any Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.eclipse.emf.ecore.xml.type.AnyType - * @generated - */ - public Adapter createAnyTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.common.AbstractAnyType Abstract Any Type}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.common.AbstractAnyType - * @generated - */ - public Adapter createAbstractAnyTypeAdapter() { - return null; - } - - /** - * Creates a new adapter for an object of class '{@link org.jboss.tools.smooks.model.smooks.AbstractResourceConfig Abstract Resource Config}'. - * - * 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. - * - * @return the new adapter. - * @see org.jboss.tools.smooks.model.smooks.AbstractResourceConfig - * @generated - */ - public Adapter createAbstractResourceConfigAdapter() { - return null; - } - - /** - * Creates a new adapter for the default case. - * - * This default implementation returns null. - * - * @return the new adapter. - * @generated - */ - public Adapter createEObjectAdapter() { - return null; - } - -} //GraphAdapterFactory Index: src/org/jboss/tools/smooks/model/graphics/ext/util/GraphSwitch.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/util/GraphSwitch.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/util/GraphSwitch.java (working copy) @@ -1,373 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.util; - - - -import java.util.List; - -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EObject; - -import org.eclipse.emf.ecore.xml.type.AnyType; -import org.jboss.tools.smooks.model.common.AbstractAnyType; -import org.jboss.tools.smooks.model.graphics.ext.*; -import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig; - - -/** - * - * The Switch for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the caseXXX 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. - * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage - * @generated - */ -public class GraphSwitch { - /** - * The cached model package - * - * - * @generated - */ - protected static GraphPackage modelPackage; - - /** - * Creates an instance of the switch. - * - * - * @generated - */ - public GraphSwitch() { - if (modelPackage == null) { - modelPackage = GraphPackage.eINSTANCE; - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - public T doSwitch(EObject theEObject) { - return doSwitch(theEObject.eClass(), theEObject); - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(EClass theEClass, EObject theEObject) { - if (theEClass.eContainer() == modelPackage) { - return doSwitch(theEClass.getClassifierID(), theEObject); - } - else { - List eSuperTypes = theEClass.getESuperTypes(); - return - eSuperTypes.isEmpty() ? - defaultCase(theEObject) : - doSwitch(eSuperTypes.get(0), theEObject); - } - } - - /** - * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. - * - * - * @return the first non-null result returned by a caseXXX call. - * @generated - */ - protected T doSwitch(int classifierID, EObject theEObject) { - switch (classifierID) { - case GraphPackage.CONNECTION_TYPE: { - ConnectionType connectionType = (ConnectionType)theEObject; - T result = caseConnectionType(connectionType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT: { - SmooksGraphExtensionDocumentRoot smooksGraphExtensionDocumentRoot = (SmooksGraphExtensionDocumentRoot)theEObject; - T result = caseSmooksGraphExtensionDocumentRoot(smooksGraphExtensionDocumentRoot); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.FIGURE_TYPE: { - FigureType figureType = (FigureType)theEObject; - T result = caseFigureType(figureType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.GRAPH_TYPE: { - GraphType graphType = (GraphType)theEObject; - T result = caseGraphType(graphType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.INPUT_TYPE: { - InputType inputType = (InputType)theEObject; - T result = caseInputType(inputType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.PARAM_TYPE: { - ParamType paramType = (ParamType)theEObject; - T result = caseParamType(paramType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.PROCESSES_TYPE: { - ProcessesType processesType = (ProcessesType)theEObject; - T result = caseProcessesType(processesType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.PROCESS_TYPE: { - ProcessType processType = (ProcessType)theEObject; - T result = caseProcessType(processType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.SMOOKS_GRAPHICS_EXT_TYPE: { - SmooksGraphicsExtType smooksGraphicsExtType = (SmooksGraphicsExtType)theEObject; - T result = caseSmooksGraphicsExtType(smooksGraphicsExtType); - if (result == null) result = caseAbstractResourceConfig(smooksGraphicsExtType); - if (result == null) result = caseAbstractAnyType(smooksGraphicsExtType); - if (result == null) result = caseAnyType(smooksGraphicsExtType); - if (result == null) result = defaultCase(theEObject); - return result; - } - case GraphPackage.TASK_TYPE: { - TaskType taskType = (TaskType)theEObject; - T result = caseTaskType(taskType); - if (result == null) result = defaultCase(theEObject); - return result; - } - default: return defaultCase(theEObject); - } - } - - /** - * Returns the result of interpreting the object as an instance of 'Connection Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Connection Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseConnectionType(ConnectionType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Smooks Graph Extension Document Root'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Smooks Graph Extension Document Root'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSmooksGraphExtensionDocumentRoot(SmooksGraphExtensionDocumentRoot object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Figure Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Figure Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseFigureType(FigureType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseGraphType(GraphType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Input Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Input Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseInputType(InputType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Param Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Param Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseParamType(ParamType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Processes Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Processes Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProcessesType(ProcessesType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Process Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Process Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseProcessType(ProcessType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Smooks Graphics Ext Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Smooks Graphics Ext Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseSmooksGraphicsExtType(SmooksGraphicsExtType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Task Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Task Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseTaskType(TaskType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Any Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Any Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAnyType(AnyType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Abstract Any Type'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Abstract Any Type'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAbstractAnyType(AbstractAnyType object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'Abstract Resource Config'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Abstract Resource Config'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseAbstractResourceConfig(AbstractResourceConfig object) { - return null; - } - - /** - * Returns the result of interpreting the object as an instance of 'EObject'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch, but this is the last case anyway. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'EObject'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) - * @generated - */ - public T defaultCase(EObject object) { - return null; - } - -} //GraphSwitch Index: src/org/jboss/tools/smooks/model/graphics/ext/util/GraphResourceFactoryImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/util/GraphResourceFactoryImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/util/GraphResourceFactoryImpl.java (working copy) @@ -1,56 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.util; - -import org.eclipse.emf.common.util.URI; - -import org.eclipse.emf.ecore.resource.Resource; - -import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; - -import org.eclipse.emf.ecore.xmi.XMLResource; - -/** - * - * The Resource Factory associated with the package. - * - * @see org.jboss.tools.smooks.model.graphics.ext.util.GraphResourceImpl - * @generated - */ -public class GraphResourceFactoryImpl extends ResourceFactoryImpl { - /** - * Creates an instance of the resource factory. - * - * - * @generated - */ - public GraphResourceFactoryImpl() { - super(); - } - - /** - * Creates an instance of the resource. - * - * - * @generated - */ - @Override - public Resource createResource(URI uri) { - XMLResource result = new GraphResourceImpl(uri); - result.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - result.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE); - - result.getDefaultSaveOptions().put(XMLResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - result.getDefaultSaveOptions().put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE); - - result.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE); - return result; - } - -} //GraphResourceFactoryImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/util/GraphXMLProcessor.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/util/GraphXMLProcessor.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/util/GraphXMLProcessor.java (working copy) @@ -1,54 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.util; - - -import java.util.Map; - -import org.eclipse.emf.ecore.EPackage; - -import org.eclipse.emf.ecore.resource.Resource; - -import org.eclipse.emf.ecore.xmi.util.XMLProcessor; -import org.jboss.tools.smooks.model.graphics.ext.GraphPackage; - -/** - * This class contains helper methods to serialize and deserialize XML documents - * - * - * @generated - */ -public class GraphXMLProcessor extends XMLProcessor { - - /** - * Public constructor to instantiate the helper. - * - * - * @generated - */ - public GraphXMLProcessor() { - super((EPackage.Registry.INSTANCE)); - GraphPackage.eINSTANCE.eClass(); - } - - /** - * Register for "*" and "xml" file extensions the GraphResourceFactoryImpl factory. - * - * - * @generated - */ - @Override - protected Map getRegistrations() { - if (registrations == null) { - super.getRegistrations(); - registrations.put(XML_EXTENSION, new GraphResourceFactoryImpl()); - registrations.put(STAR_EXTENSION, new GraphResourceFactoryImpl()); - } - return registrations; - } - -} //GraphXMLProcessor Index: src/org/jboss/tools/smooks/model/graphics/ext/util/GraphResourceImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/util/GraphResourceImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/util/GraphResourceImpl.java (working copy) @@ -1,32 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext.util; - -import org.eclipse.emf.common.util.URI; - -import org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl; - -/** - * - * The Resource associated with the package. - * - * @see org.jboss.tools.smooks.model.graphics.ext.util.GraphResourceFactoryImpl - * @generated - */ -public class GraphResourceImpl extends XMLResourceImpl { - /** - * Creates an instance of the resource. - * - * - * @param uri the URI of the new resource. - * @generated - */ - public GraphResourceImpl(URI uri) { - super(uri); - } - -} //GraphResourceImpl Index: src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/ParamType.java (working copy) @@ -1,111 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Param Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue Value}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getName Name}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getType Type}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getParamType() - * @model extendedMetaData="name='param_._type' kind='simple'" - * @generated - */ -public interface ParamType extends EObject { - /** - * Returns the value of the 'Value' attribute. - * - *

- * If the meaning of the 'Value' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Value' attribute. - * @see #setValue(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getParamType_Value() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="name=':0' kind='simple'" - * @generated - */ - String getValue(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getValue Value}' attribute. - * - * - * @param value the new value of the 'Value' attribute. - * @see #getValue() - * @generated - */ - void setValue(String value); - - /** - * Returns the value of the 'Name' attribute. - * - *

- * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getParamType_Name() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='name'" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Type' attribute. - * - *

- * If the meaning of the 'Type' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Type' attribute. - * @see #setType(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getParamType_Type() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='type'" - * @generated - */ - String getType(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ParamType#getType Type}' attribute. - * - * - * @param value the new value of the 'Type' attribute. - * @see #getType() - * @generated - */ - void setType(String value); - -} // ParamType Index: src/org/jboss/tools/smooks/model/graphics/ext/ConnectionType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/ConnectionType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/ConnectionType.java (working copy) @@ -1,111 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Connection Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getSource Source}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getTarget Target}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getId Id}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getConnectionType() - * @model extendedMetaData="name='connection_._type' kind='elementOnly'" - * @generated - */ -public interface ConnectionType extends EObject { - /** - * Returns the value of the 'Source' attribute. - * - *

- * If the meaning of the 'Source' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Source' attribute. - * @see #setSource(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getConnectionType_Source() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" - * extendedMetaData="kind='element' name='source' namespace='##targetNamespace'" - * @generated - */ - String getSource(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getSource Source}' attribute. - * - * - * @param value the new value of the 'Source' attribute. - * @see #getSource() - * @generated - */ - void setSource(String value); - - /** - * Returns the value of the 'Target' attribute. - * - *

- * If the meaning of the 'Target' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Target' attribute. - * @see #setTarget(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getConnectionType_Target() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" required="true" - * extendedMetaData="kind='element' name='target' namespace='##targetNamespace'" - * @generated - */ - String getTarget(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getTarget Target}' attribute. - * - * - * @param value the new value of the 'Target' attribute. - * @see #getTarget() - * @generated - */ - void setTarget(String value); - - /** - * Returns the value of the 'Id' attribute. - * - *

- * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getConnectionType_Id() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='id'" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ConnectionType#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - -} // ConnectionType Index: src/org/jboss/tools/smooks/model/graphics/ext/ProcessType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/ProcessType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/ProcessType.java (working copy) @@ -1,103 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.common.util.EList; - -import org.eclipse.emf.ecore.EObject; - -/** - * - * A representation of the model object 'Process Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getTask Task}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getId Id}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getName Name}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getProcessType() - * @model extendedMetaData="name='process_._type' kind='elementOnly'" - * @generated - */ -public interface ProcessType extends EObject { - /** - * Returns the value of the 'Task' containment reference list. - * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.TaskType}. - * - *

- * If the meaning of the 'Task' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Task' containment reference list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getProcessType_Task() - * @model containment="true" - * extendedMetaData="kind='element' name='task' namespace='##targetNamespace'" - * @generated - */ - EList getTask(); - - /** - * Returns the value of the 'Id' attribute. - * - *

- * If the meaning of the 'Id' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Id' attribute. - * @see #setId(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getProcessType_Id() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='id'" - * @generated - */ - String getId(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getId Id}' attribute. - * - * - * @param value the new value of the 'Id' attribute. - * @see #getId() - * @generated - */ - void setId(String value); - - /** - * Returns the value of the 'Name' attribute. - * - *

- * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getProcessType_Name() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='name'" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.ProcessType#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - -} // ProcessType Index: src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/SmooksGraphicsExtType.java (working copy) @@ -1,253 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import java.util.List; - -import org.eclipse.emf.common.util.EList; -import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig; - - -/** - * - * A representation of the model object 'Smooks Graphics Ext Type'. - * - * - *

- * The following features are supported: - *

    - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInput Input}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getGraph Graph}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getProcesses Processes}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getAuthor Author}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType Input Type}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getName Name}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType Output Type}
  • - *
  • {@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getPlatformVersion Platform Version}
  • - *
- *

- * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType() - * @model extendedMetaData="name='smooks-graphics-ext_._type' kind='elementOnly'" - * @generated - */ -public interface SmooksGraphicsExtType extends AbstractResourceConfig { - - List getChangeListeners(); - - void addSmooksGraphChangeListener(ISmooksGraphChangeListener listener); - - void removeSmooksGraphChangeListener(ISmooksGraphChangeListener listener); - - - /** - * Returns the value of the 'Input' containment reference list. - * The list contents are of type {@link org.jboss.tools.smooks.model.graphics.ext.InputType}. - * - *

- * If the meaning of the 'Input' containment reference list isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Input' containment reference list. - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_Input() - * @model containment="true" - * extendedMetaData="kind='element' name='input' namespace='##targetNamespace'" - * @generated - */ - EList getInput(); - - /** - * Returns the value of the 'Graph' containment reference. - * - *

- * If the meaning of the 'Graph' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Graph' containment reference. - * @see #setGraph(GraphType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_Graph() - * @model containment="true" - * extendedMetaData="kind='element' name='graph' namespace='##targetNamespace'" - * @generated - */ - GraphType getGraph(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getGraph Graph}' containment reference. - * - * - * @param value the new value of the 'Graph' containment reference. - * @see #getGraph() - * @generated - */ - void setGraph(GraphType value); - - /** - * Returns the value of the 'Processes' containment reference. - * - *

- * If the meaning of the 'Processes' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Processes' containment reference. - * @see #setProcesses(ProcessesType) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_Processes() - * @model containment="true" - * extendedMetaData="kind='element' name='processes' namespace='##targetNamespace'" - * @generated - */ - ProcessesType getProcesses(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getProcesses Processes}' containment reference. - * - * - * @param value the new value of the 'Processes' containment reference. - * @see #getProcesses() - * @generated - */ - void setProcesses(ProcessesType value); - - /** - * Returns the value of the 'Author' attribute. - * - *

- * If the meaning of the 'Author' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Author' attribute. - * @see #setAuthor(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_Author() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='author'" - * @generated - */ - String getAuthor(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getAuthor Author}' attribute. - * - * - * @param value the new value of the 'Author' attribute. - * @see #getAuthor() - * @generated - */ - void setAuthor(String value); - - /** - * Returns the value of the 'Input Type' attribute. - * - *

- * If the meaning of the 'Input Type' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Input Type' attribute. - * @see #setInputType(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_InputType() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='inputType'" - * @generated - */ - String getInputType(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getInputType Input Type}' attribute. - * - * - * @param value the new value of the 'Input Type' attribute. - * @see #getInputType() - * @generated - */ - void setInputType(String value); - - /** - * Returns the value of the 'Name' attribute. - * - *

- * If the meaning of the 'Name' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Name' attribute. - * @see #setName(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_Name() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='name'" - * @generated - */ - String getName(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getName Name}' attribute. - * - * - * @param value the new value of the 'Name' attribute. - * @see #getName() - * @generated - */ - void setName(String value); - - /** - * Returns the value of the 'Output Type' attribute. - * - *

- * If the meaning of the 'Output Type' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Output Type' attribute. - * @see #setOutputType(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_OutputType() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='outputType'" - * @generated - */ - String getOutputType(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getOutputType Output Type}' attribute. - * - * - * @param value the new value of the 'Output Type' attribute. - * @see #getOutputType() - * @generated - */ - void setOutputType(String value); - - /** - * Returns the value of the 'Platform Version' attribute. - * - *

- * If the meaning of the 'Platform Version' attribute isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Platform Version' attribute. - * @see #setPlatformVersion(String) - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage#getSmooksGraphicsExtType_PlatformVersion() - * @model dataType="org.eclipse.emf.ecore.xml.type.String" - * extendedMetaData="kind='attribute' name='platformVersion'" - * @generated - */ - String getPlatformVersion(); - - /** - * Sets the value of the '{@link org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType#getPlatformVersion Platform Version}' attribute. - * - * - * @param value the new value of the 'Platform Version' attribute. - * @see #getPlatformVersion() - * @generated - */ - void setPlatformVersion(String value); - -} // SmooksGraphicsExtType Index: src/org/jboss/tools/smooks/model/graphics/ext/GraphFactory.java =================================================================== --- src/org/jboss/tools/smooks/model/graphics/ext/GraphFactory.java (revision 18773) +++ src/org/jboss/tools/smooks/model/graphics/ext/GraphFactory.java (working copy) @@ -1,127 +0,0 @@ -/** - * - * - * - * $Id$ - */ -package org.jboss.tools.smooks.model.graphics.ext; - -import org.eclipse.emf.ecore.EFactory; - -/** - * - * The Factory for the model. - * It provides a create method for each non-abstract class of the model. - * - * @see org.jboss.tools.smooks.model.graphics.ext.GraphPackage - * @generated - */ -public interface GraphFactory extends EFactory { - /** - * The singleton instance of the factory. - * - * - * @generated - */ - GraphFactory eINSTANCE = org.jboss.tools.smooks.model.graphics.ext.impl.GraphFactoryImpl.init(); - - /** - * Returns a new object of class 'Connection Type'. - * - * - * @return a new object of class 'Connection Type'. - * @generated - */ - ConnectionType createConnectionType(); - - /** - * Returns a new object of class 'Smooks Graph Extension Document Root'. - * - * - * @return a new object of class 'Smooks Graph Extension Document Root'. - * @generated - */ - SmooksGraphExtensionDocumentRoot createSmooksGraphExtensionDocumentRoot(); - - /** - * Returns a new object of class 'Figure Type'. - * - * - * @return a new object of class 'Figure Type'. - * @generated - */ - FigureType createFigureType(); - - /** - * Returns a new object of class 'Type'. - * - * - * @return a new object of class 'Type'. - * @generated - */ - GraphType createGraphType(); - - /** - * Returns a new object of class 'Input Type'. - * - * - * @return a new object of class 'Input Type'. - * @generated - */ - InputType createInputType(); - - /** - * Returns a new object of class 'Param Type'. - * - * - * @return a new object of class 'Param Type'. - * @generated - */ - ParamType createParamType(); - - /** - * Returns a new object of class 'Processes Type'. - * - * - * @return a new object of class 'Processes Type'. - * @generated - */ - ProcessesType createProcessesType(); - - /** - * Returns a new object of class 'Process Type'. - * - * - * @return a new object of class 'Process Type'. - * @generated - */ - ProcessType createProcessType(); - - /** - * Returns a new object of class 'Smooks Graphics Ext Type'. - * - * - * @return a new object of class 'Smooks Graphics Ext Type'. - * @generated - */ - SmooksGraphicsExtType createSmooksGraphicsExtType(); - - /** - * Returns a new object of class 'Task Type'. - * - * - * @return a new object of class 'Task Type'. - * @generated - */ - TaskType createTaskType(); - - /** - * Returns the package supported by this factory. - * - * - * @return the package supported by this factory. - * @generated - */ - GraphPackage getGraphPackage(); - -} //GraphFactory Index: src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerImpl.java =================================================================== --- src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerImpl.java (revision 18773) +++ src/org/jboss/tools/smooks/model/freemarker/impl/FreemarkerImpl.java (working copy) @@ -156,6 +156,7 @@ */ protected FreemarkerImpl() { super(); + this.setApplyOnElement("#document"); setTemplate(FreemarkerFactory.eINSTANCE.createTemplate()); } #P org.jboss.tools.smooks.runtime Index: build.properties =================================================================== --- build.properties (revision 18773) +++ build.properties (working copy) @@ -7,5 +7,6 @@ libs/milyn-smooks-edi-1.2.1.jar,\ libs/milyn-smooks-json-1.2.1.jar,\ libs/opencsv-1.8.jar,\ - plugin.properties + plugin.properties,\ + libs/freemarker-2.3.11.jar jars.compile.order = Index: META-INF/MANIFEST.MF =================================================================== --- META-INF/MANIFEST.MF (revision 18773) +++ META-INF/MANIFEST.MF (working copy) @@ -20,10 +20,16 @@ libs/milyn-smooks-csv-1.2.1.jar, libs/milyn-smooks-edi-1.2.1.jar, libs/milyn-smooks-json-1.2.1.jar, - libs/opencsv-1.8.jar + libs/opencsv-1.8.jar, + libs/freemarker-2.3.11.jar Bundle-Localization: plugin Bundle-Vendor: %providerName -Export-Package: org.milyn, +Export-Package: au.com.bytecode.opencsv, + au.com.bytecode.opencsv.bean, + freemarker.core, + freemarker.template, + freemarker.template.utility, + org.milyn, org.milyn.cdr, org.milyn.csv, org.milyn.json, Index: .classpath =================================================================== --- .classpath (revision 18773) +++ .classpath (working copy) @@ -1,5 +1,6 @@ +