diff options
author | Thibault Le Ouay | 2014-04-14 14:59:57 +0000 |
---|---|---|
committer | Thibault Le Ouay | 2014-04-18 09:59:28 +0000 |
commit | 0040403cbbdb680e2e85c08391631f27679214ea (patch) | |
tree | 0fefa04b782f56d08c6ccae36d09c14ae011f7d3 | |
parent | 3dcbee22275fbd39a8bb6db0fe2bc77fa8981ec6 (diff) | |
download | org.eclipse.papyrus-0040403cbbdb680e2e85c08391631f27679214ea.tar.gz org.eclipse.papyrus-0040403cbbdb680e2e85c08391631f27679214ea.tar.xz org.eclipse.papyrus-0040403cbbdb680e2e85c08391631f27679214ea.zip |
432486: [Profile Diagram] Profile diagram should support Class
https://bugs.eclipse.org/bugs/show_bug.cgi?id=432486
Also add some test
Change-Id: I9085e97277cf20283208b238ecd754b198b2c2fd
Signed-off-by: Thibault Le Ouay <t.leouay@sherpa-eng.com>
307 files changed, 7839 insertions, 8936 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/.gitignore b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/.gitignore index 5a3675f1bba..329ccbbba6f 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/.gitignore +++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/.gitignore @@ -7,3 +7,4 @@ /linkCommands.java /TextNonResizableEditPolicy.java /Utils_qvto.java +/OpenDiagram.java diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/OpenDiagram.java b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/OpenDiagram.java index 0965d5e7d4f..7054e67cd8a 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/OpenDiagram.java +++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/OpenDiagram.java @@ -1,188 +1,188 @@ -/** - * Copyright (c) 2007, 2010, 2013 Borland Software Corporation and others - * - * All rights reserved. This program and the accompanying materials - * are 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: - * Artem Tikhomirov (Borland) - initial API and implementation - * Michael Golubev (Montages) - #386838 - migrate to Xtend2 - */ -package aspects.xpt.diagram.editpolicies; - -import com.google.common.base.Objects; -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.gmf.codegen.gmfgen.GenApplication; -import org.eclipse.gmf.codegen.gmfgen.GenCommonBase; -import org.eclipse.gmf.codegen.gmfgen.GenDiagram; -import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator; -import org.eclipse.gmf.codegen.gmfgen.OpenDiagramBehaviour; -import org.eclipse.xtend2.lib.StringConcatenation; -import org.eclipse.xtext.xbase.lib.Extension; -import xpt.Common; -import xpt.editor.DiagramEditorUtil; - -@Singleton -@SuppressWarnings("all") -public class OpenDiagram extends xpt.diagram.editpolicies.OpenDiagram { - @Inject - @Extension - private Common _common; - - @Inject - private DiagramEditorUtil xptDiagramEditorUtil; - - public CharSequence openCommandClass_intializeNewDiagram(final OpenDiagramBehaviour it) { - StringConcatenation _builder = new StringConcatenation(); - CharSequence _generatedMemberComment = this._common.generatedMemberComment(); - _builder.append(_generatedMemberComment, ""); - _builder.newLineIfNotEmpty(); - _builder.append("protected org.eclipse.gmf.runtime.notation.Diagram intializeNewDiagram() throws org.eclipse.core.commands.ExecutionException {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("org.eclipse.gmf.runtime.notation.Diagram d = org.eclipse.gmf.runtime.diagram.core.services.ViewService.createDiagram(getDiagramDomainElement(), getDiagramKind(), getPreferencesHint());"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("if (d == null) {"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\");"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("diagramFacet.setDiagramLink(d);"); - _builder.newLine(); - _builder.append("\t"); - CharSequence __assert = this._common._assert("diagramFacet.eResource() != null"); - _builder.append(__assert, "\t"); - _builder.newLineIfNotEmpty(); - _builder.append("\t"); - _builder.append("diagramFacet.eResource().getContents().add(d);"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("org.eclipse.emf.ecore.EObject container = diagramFacet.eContainer();"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("while (container instanceof org.eclipse.gmf.runtime.notation.View) {"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("((org.eclipse.gmf.runtime.notation.View) container).persist();"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("container = container.eContainer();"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("try {"); - _builder.newLine(); - { - GenCommonBase _subject = it.getSubject(); - GenDiagram _diagram = _subject.getDiagram(); - GenEditorGenerator _editorGen = _diagram.getEditorGen(); - GenApplication _application = _editorGen.getApplication(); - boolean _equals = Objects.equal(null, _application); - if (_equals) { - _builder.append("\t"); - _builder.append("new org.eclipse.ui.actions.WorkspaceModifyOperation() {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("\t"); - _builder.append("protected void execute(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException, java.lang.reflect.InvocationTargetException, InterruptedException {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("\t\t"); - _builder.append("try {"); - _builder.newLine(); - } - } - _builder.append("\t"); - _builder.append("for (java.util.Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("org.eclipse.emf.ecore.resource.Resource nextResource = (org.eclipse.emf.ecore.resource.Resource) it.next();"); - _builder.newLine(); - _builder.append("\t\t"); - _builder.append("if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {"); - _builder.newLine(); - _builder.append("\t\t\t"); - _builder.append("nextResource.save("); - GenCommonBase _subject_1 = it.getSubject(); - GenDiagram _diagram_1 = _subject_1.getDiagram(); - CharSequence _qualifiedClassName = this.xptDiagramEditorUtil.qualifiedClassName(_diagram_1); - _builder.append(_qualifiedClassName, "\t\t\t"); - _builder.append(".getSaveOptions());"); - _builder.newLineIfNotEmpty(); - _builder.append("\t\t"); - _builder.append("}"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}"); - _builder.newLine(); - { - GenCommonBase _subject_2 = it.getSubject(); - GenDiagram _diagram_2 = _subject_2.getDiagram(); - GenEditorGenerator _editorGen_1 = _diagram_2.getEditorGen(); - GenApplication _application_1 = _editorGen_1.getApplication(); - boolean _equals_1 = Objects.equal(null, _application_1); - if (_equals_1) { - _builder.append("\t"); - _builder.append("} catch (java.io.IOException ex) {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("\t"); - _builder.append("throw new java.lang.reflect.InvocationTargetException(ex, \"Save operation failed\");"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}\t\t"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}.run(null);"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("} catch (java.lang.reflect.InvocationTargetException e) {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("\t"); - _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\", e);"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("} catch (InterruptedException e) {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("\t"); - _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\", e);"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}"); - _builder.newLine(); - } else { - _builder.append("\t"); - _builder.append("} catch (java.io.IOException ex) {"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("\t"); - _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\", ex);"); - _builder.newLine(); - _builder.append("\t"); - _builder.append("}"); - _builder.newLine(); - } - } - _builder.append("\t"); - _builder.append("return d;"); - _builder.newLine(); - _builder.append("}"); - _builder.newLine(); - return _builder; - } -} +/**
+ * Copyright (c) 2007, 2010, 2013 Borland Software Corporation and others
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Artem Tikhomirov (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.xpt.diagram.editpolicies;
+
+import com.google.common.base.Objects;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import org.eclipse.gmf.codegen.gmfgen.GenApplication;
+import org.eclipse.gmf.codegen.gmfgen.GenCommonBase;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.gmf.codegen.gmfgen.GenEditorGenerator;
+import org.eclipse.gmf.codegen.gmfgen.OpenDiagramBehaviour;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.Extension;
+import xpt.Common;
+import xpt.editor.DiagramEditorUtil;
+
+@Singleton
+@SuppressWarnings("all")
+public class OpenDiagram extends xpt.diagram.editpolicies.OpenDiagram {
+ @Inject
+ @Extension
+ private Common _common;
+
+ @Inject
+ private DiagramEditorUtil xptDiagramEditorUtil;
+
+ public CharSequence openCommandClass_intializeNewDiagram(final OpenDiagramBehaviour it) {
+ StringConcatenation _builder = new StringConcatenation();
+ CharSequence _generatedMemberComment = this._common.generatedMemberComment();
+ _builder.append(_generatedMemberComment, "");
+ _builder.newLineIfNotEmpty();
+ _builder.append("protected org.eclipse.gmf.runtime.notation.Diagram intializeNewDiagram() throws org.eclipse.core.commands.ExecutionException {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("org.eclipse.gmf.runtime.notation.Diagram d = org.eclipse.gmf.runtime.diagram.core.services.ViewService.createDiagram(getDiagramDomainElement(), getDiagramKind(), getPreferencesHint());");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("if (d == null) {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\");");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("diagramFacet.setDiagramLink(d);");
+ _builder.newLine();
+ _builder.append("\t");
+ CharSequence __assert = this._common._assert("diagramFacet.eResource() != null");
+ _builder.append(__assert, "\t");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t");
+ _builder.append("diagramFacet.eResource().getContents().add(d);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("org.eclipse.emf.ecore.EObject container = diagramFacet.eContainer();");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("while (container instanceof org.eclipse.gmf.runtime.notation.View) {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("((org.eclipse.gmf.runtime.notation.View) container).persist();");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("container = container.eContainer();");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("try {");
+ _builder.newLine();
+ {
+ GenCommonBase _subject = it.getSubject();
+ GenDiagram _diagram = _subject.getDiagram();
+ GenEditorGenerator _editorGen = _diagram.getEditorGen();
+ GenApplication _application = _editorGen.getApplication();
+ boolean _equals = Objects.equal(null, _application);
+ if (_equals) {
+ _builder.append("\t");
+ _builder.append("new org.eclipse.ui.actions.WorkspaceModifyOperation() {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("protected void execute(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException, java.lang.reflect.InvocationTargetException, InterruptedException {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t\t");
+ _builder.append("try {");
+ _builder.newLine();
+ }
+ }
+ _builder.append("\t");
+ _builder.append("for (java.util.Iterator<?> it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("org.eclipse.emf.ecore.resource.Resource nextResource = (org.eclipse.emf.ecore.resource.Resource) it.next();");
+ _builder.newLine();
+ _builder.append("\t\t");
+ _builder.append("if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {");
+ _builder.newLine();
+ _builder.append("\t\t\t");
+ _builder.append("nextResource.save(");
+ GenCommonBase _subject_1 = it.getSubject();
+ GenDiagram _diagram_1 = _subject_1.getDiagram();
+ CharSequence _qualifiedClassName = this.xptDiagramEditorUtil.qualifiedClassName(_diagram_1);
+ _builder.append(_qualifiedClassName, "\t\t\t");
+ _builder.append(".getSaveOptions());");
+ _builder.newLineIfNotEmpty();
+ _builder.append("\t\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ {
+ GenCommonBase _subject_2 = it.getSubject();
+ GenDiagram _diagram_2 = _subject_2.getDiagram();
+ GenEditorGenerator _editorGen_1 = _diagram_2.getEditorGen();
+ GenApplication _application_1 = _editorGen_1.getApplication();
+ boolean _equals_1 = Objects.equal(null, _application_1);
+ if (_equals_1) {
+ _builder.append("\t");
+ _builder.append("} catch (java.io.IOException ex) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("throw new java.lang.reflect.InvocationTargetException(ex, \"Save operation failed\");");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}\t\t");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}.run(null);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("} catch (java.lang.reflect.InvocationTargetException e) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\", e);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("} catch (InterruptedException e) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\", e);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ } else {
+ _builder.append("\t");
+ _builder.append("} catch (java.io.IOException ex) {");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("\t");
+ _builder.append("throw new org.eclipse.core.commands.ExecutionException(\"Can\'t create diagram of \'\" + getDiagramKind() + \"\' kind\", ex);");
+ _builder.newLine();
+ _builder.append("\t");
+ _builder.append("}");
+ _builder.newLine();
+ }
+ }
+ _builder.append("\t");
+ _builder.append("return d;");
+ _builder.newLine();
+ _builder.append("}");
+ _builder.newLine();
+ return _builder;
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/.gitignore b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/.gitignore index e9026f74121..2448c5be523 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/.gitignore +++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/.gitignore @@ -4,3 +4,4 @@ /VisualIDRegistry.java /extensions.java /ActionBarContributor.java +/NewDiagramFileWizard.java diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/NewDiagramFileWizard.java b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/NewDiagramFileWizard.java index fe89454a3e6..6ca4ddf3f04 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/NewDiagramFileWizard.java +++ b/plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/NewDiagramFileWizard.java @@ -1,94 +1,94 @@ -/** - * Copyright (c) 2007, 2010, 2013 Borland Software Corporation and others - * - * All rights reserved. This program and the accompanying materials - * are 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: - * Alexander Shatalin (Borland) - initial API and implementation - * Michael Golubev (Montages) - #386838 - migrate to Xtend2 - */ -package aspects.xpt.editor; - -import com.google.inject.Inject; -import com.google.inject.Singleton; -import org.eclipse.gmf.codegen.gmfgen.GenDiagram; -import org.eclipse.xtend2.lib.StringConcatenation; -import org.eclipse.xtext.xbase.lib.Extension; -import xpt.Externalizer; -import xpt.ExternalizerUtils_qvto; - -@Singleton -@SuppressWarnings("all") -public class NewDiagramFileWizard extends xpt.editor.NewDiagramFileWizard { - @Inject - @Extension - private ExternalizerUtils_qvto _externalizerUtils_qvto; - - @Inject - private Externalizer xptExternalizer; - - public CharSequence i18nValues(final GenDiagram it) { - StringConcatenation _builder = new StringConcatenation(); - String _i18nKeyForNewDiagramFileWizardCreationPage = this.i18nKeyForNewDiagramFileWizardCreationPage(it); - String _nameKey = this._externalizerUtils_qvto.nameKey(_i18nKeyForNewDiagramFileWizardCreationPage); - CharSequence _messageEntry = this.xptExternalizer.messageEntry(_nameKey, "Initialize new diagram file"); - _builder.append(_messageEntry, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardCreationPage_1 = this.i18nKeyForNewDiagramFileWizardCreationPage(it); - String _titleKey = this._externalizerUtils_qvto.titleKey(_i18nKeyForNewDiagramFileWizardCreationPage_1); - CharSequence _messageEntry_1 = this.xptExternalizer.messageEntry(_titleKey, "Diagram file"); - _builder.append(_messageEntry_1, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardCreationPage_2 = this.i18nKeyForNewDiagramFileWizardCreationPage(it); - String _descriptionKey = this._externalizerUtils_qvto.descriptionKey(_i18nKeyForNewDiagramFileWizardCreationPage_2); - CharSequence _messageEntry_2 = this.xptExternalizer.messageEntry(_descriptionKey, - "Create new diagram based on {0} model content"); - _builder.append(_messageEntry_2, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardRootSelectionPage = this.i18nKeyForNewDiagramFileWizardRootSelectionPage(it); - String _nameKey_1 = this._externalizerUtils_qvto.nameKey(_i18nKeyForNewDiagramFileWizardRootSelectionPage); - CharSequence _messageEntry_3 = this.xptExternalizer.messageEntry(_nameKey_1, - "Select diagram root element"); - _builder.append(_messageEntry_3, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardRootSelectionPage_1 = this.i18nKeyForNewDiagramFileWizardRootSelectionPage(it); - String _titleKey_1 = this._externalizerUtils_qvto.titleKey(_i18nKeyForNewDiagramFileWizardRootSelectionPage_1); - CharSequence _messageEntry_4 = this.xptExternalizer.messageEntry(_titleKey_1, "Diagram root element"); - _builder.append(_messageEntry_4, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardRootSelectionPage_2 = this.i18nKeyForNewDiagramFileWizardRootSelectionPage(it); - String _descriptionKey_1 = this._externalizerUtils_qvto.descriptionKey(_i18nKeyForNewDiagramFileWizardRootSelectionPage_2); - CharSequence _messageEntry_5 = this.xptExternalizer.messageEntry(_descriptionKey_1, - "Select semantic model element to be depicted on diagram"); - _builder.append(_messageEntry_5, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardRootSelectionPageSelectionTitle = this.i18nKeyForNewDiagramFileWizardRootSelectionPageSelectionTitle(it); - CharSequence _messageEntry_6 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardRootSelectionPageSelectionTitle, - "Select diagram root element:"); - _builder.append(_messageEntry_6, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardRootSelectionPageNoSelectionMessage = this.i18nKeyForNewDiagramFileWizardRootSelectionPageNoSelectionMessage(it); - CharSequence _messageEntry_7 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardRootSelectionPageNoSelectionMessage, - "Diagram root element is not selected"); - _builder.append(_messageEntry_7, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardRootSelectionPageInvalidSelectionMessage = this.i18nKeyForNewDiagramFileWizardRootSelectionPageInvalidSelectionMessage(it); - CharSequence _messageEntry_8 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardRootSelectionPageInvalidSelectionMessage, - "Invalid diagram root element is selected"); - _builder.append(_messageEntry_8, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardInitDiagramCommand = this.i18nKeyForNewDiagramFileWizardInitDiagramCommand(it); - CharSequence _messageEntry_9 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardInitDiagramCommand, "Initializing diagram contents"); - _builder.append(_messageEntry_9, ""); - _builder.newLineIfNotEmpty(); - String _i18nKeyForNewDiagramFileWizardIncorrectRootError = this.i18nKeyForNewDiagramFileWizardIncorrectRootError(it); - CharSequence _messageEntry_10 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardIncorrectRootError, - "Incorrect model object stored as a root resource object"); - _builder.append(_messageEntry_10, ""); - _builder.newLineIfNotEmpty(); - return _builder; - } -} +/**
+ * Copyright (c) 2007, 2010, 2013 Borland Software Corporation and others
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Alexander Shatalin (Borland) - initial API and implementation
+ * Michael Golubev (Montages) - #386838 - migrate to Xtend2
+ */
+package aspects.xpt.editor;
+
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import org.eclipse.gmf.codegen.gmfgen.GenDiagram;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.Extension;
+import xpt.Externalizer;
+import xpt.ExternalizerUtils_qvto;
+
+@Singleton
+@SuppressWarnings("all")
+public class NewDiagramFileWizard extends xpt.editor.NewDiagramFileWizard {
+ @Inject
+ @Extension
+ private ExternalizerUtils_qvto _externalizerUtils_qvto;
+
+ @Inject
+ private Externalizer xptExternalizer;
+
+ public CharSequence i18nValues(final GenDiagram it) {
+ StringConcatenation _builder = new StringConcatenation();
+ String _i18nKeyForNewDiagramFileWizardCreationPage = this.i18nKeyForNewDiagramFileWizardCreationPage(it);
+ String _nameKey = this._externalizerUtils_qvto.nameKey(_i18nKeyForNewDiagramFileWizardCreationPage);
+ CharSequence _messageEntry = this.xptExternalizer.messageEntry(_nameKey, "Initialize new diagram file");
+ _builder.append(_messageEntry, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardCreationPage_1 = this.i18nKeyForNewDiagramFileWizardCreationPage(it);
+ String _titleKey = this._externalizerUtils_qvto.titleKey(_i18nKeyForNewDiagramFileWizardCreationPage_1);
+ CharSequence _messageEntry_1 = this.xptExternalizer.messageEntry(_titleKey, "Diagram file");
+ _builder.append(_messageEntry_1, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardCreationPage_2 = this.i18nKeyForNewDiagramFileWizardCreationPage(it);
+ String _descriptionKey = this._externalizerUtils_qvto.descriptionKey(_i18nKeyForNewDiagramFileWizardCreationPage_2);
+ CharSequence _messageEntry_2 = this.xptExternalizer.messageEntry(_descriptionKey,
+ "Create new diagram based on {0} model content");
+ _builder.append(_messageEntry_2, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardRootSelectionPage = this.i18nKeyForNewDiagramFileWizardRootSelectionPage(it);
+ String _nameKey_1 = this._externalizerUtils_qvto.nameKey(_i18nKeyForNewDiagramFileWizardRootSelectionPage);
+ CharSequence _messageEntry_3 = this.xptExternalizer.messageEntry(_nameKey_1,
+ "Select diagram root element");
+ _builder.append(_messageEntry_3, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardRootSelectionPage_1 = this.i18nKeyForNewDiagramFileWizardRootSelectionPage(it);
+ String _titleKey_1 = this._externalizerUtils_qvto.titleKey(_i18nKeyForNewDiagramFileWizardRootSelectionPage_1);
+ CharSequence _messageEntry_4 = this.xptExternalizer.messageEntry(_titleKey_1, "Diagram root element");
+ _builder.append(_messageEntry_4, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardRootSelectionPage_2 = this.i18nKeyForNewDiagramFileWizardRootSelectionPage(it);
+ String _descriptionKey_1 = this._externalizerUtils_qvto.descriptionKey(_i18nKeyForNewDiagramFileWizardRootSelectionPage_2);
+ CharSequence _messageEntry_5 = this.xptExternalizer.messageEntry(_descriptionKey_1,
+ "Select semantic model element to be depicted on diagram");
+ _builder.append(_messageEntry_5, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardRootSelectionPageSelectionTitle = this.i18nKeyForNewDiagramFileWizardRootSelectionPageSelectionTitle(it);
+ CharSequence _messageEntry_6 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardRootSelectionPageSelectionTitle,
+ "Select diagram root element:");
+ _builder.append(_messageEntry_6, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardRootSelectionPageNoSelectionMessage = this.i18nKeyForNewDiagramFileWizardRootSelectionPageNoSelectionMessage(it);
+ CharSequence _messageEntry_7 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardRootSelectionPageNoSelectionMessage,
+ "Diagram root element is not selected");
+ _builder.append(_messageEntry_7, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardRootSelectionPageInvalidSelectionMessage = this.i18nKeyForNewDiagramFileWizardRootSelectionPageInvalidSelectionMessage(it);
+ CharSequence _messageEntry_8 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardRootSelectionPageInvalidSelectionMessage,
+ "Invalid diagram root element is selected");
+ _builder.append(_messageEntry_8, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardInitDiagramCommand = this.i18nKeyForNewDiagramFileWizardInitDiagramCommand(it);
+ CharSequence _messageEntry_9 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardInitDiagramCommand, "Initializing diagram contents");
+ _builder.append(_messageEntry_9, "");
+ _builder.newLineIfNotEmpty();
+ String _i18nKeyForNewDiagramFileWizardIncorrectRootError = this.i18nKeyForNewDiagramFileWizardIncorrectRootError(it);
+ CharSequence _messageEntry_10 = this.xptExternalizer.messageEntry(_i18nKeyForNewDiagramFileWizardIncorrectRootError,
+ "Incorrect model object stored as a root resource object");
+ _builder.append(_messageEntry_10, "");
+ _builder.newLineIfNotEmpty();
+ return _builder;
+ }
+}
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend index c91257007a8..30ceac2cf6d 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend +++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/editor/Editor.xtend @@ -165,7 +165,7 @@ def constructPaletteViewer (GenEditorView it) ''' } ''' -def dispose(GenEditorView it)''' +override dispose(GenEditorView it)''' «generatedMemberComment» public void dispose() { // remove palette service listener diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/plugin/ActivatorImpl.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/plugin/ActivatorImpl.xtend index 6ada77e3fad..f9fdd6abd3e 100644 --- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/plugin/ActivatorImpl.xtend +++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/xpt/plugin/ActivatorImpl.xtend @@ -42,7 +42,6 @@ import xpt.Common «providersAccessMethods(it)» «logError(it)» «logInfo(it)» - «debug(it)» «additions(it)» } ''' diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/.options b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/.options index 74f3a159b28..38706dd74bf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/.options +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/.options @@ -1,7 +1,7 @@ -# Tracing options for the org.eclipse.papyrus.uml.diagram.profile plug-in - -# Common issues -org.eclipse.papyrus.uml.diagram.profile/debug=false - -# Visual IDs -org.eclipse.papyrus.uml.diagram.profile/debug/visualID=false +# Tracing options for the org.eclipse.papyrus.uml.diagram.profile plug-in
+
+# Common issues
+org.eclipse.papyrus.uml.diagram.profile/debug=false
+
+# Visual IDs
+org.eclipse.papyrus.uml.diagram.profile/debug/visualID=false
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationBranchDeletion.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationBranchDeletion.java index 8a3599bb91e..c9664946574 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationBranchDeletion.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationBranchDeletion.java @@ -1,7 +1,7 @@ /*****************************************************************************
* Copyright (c) 2008 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,11 +9,12 @@ *
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted code from the class diagram
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted code from the class diagram
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.profile.custom.commands;
import java.util.ArrayList;
+import java.util.List;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -47,6 +48,7 @@ import org.eclipse.uml2.uml.UMLPackage; /**
* The Class AssociationBranchDeletion is used delete a branch
*/
+
public class AssociationBranchDeletion implements IObjectActionDelegate {
/** The selected element. */
@@ -63,33 +65,26 @@ public class AssociationBranchDeletion implements IObjectActionDelegate { * {@inheritDoc}
*/
public void run(IAction action) {
-
CompoundCommand command = new CompoundCommand();
Association association = null;
TransactionalEditingDomain domain = selectedElement.getEditingDomain();
GraphicalEditPart associationNodeEditPart = null;
-
// 1. Semantic deletion
GraphicalEditPart branchSource = (GraphicalEditPart)selectedElement.getSource();
- GraphicalEditPart branchtarget = (GraphicalEditPart)selectedElement.getTarget();
EStructuralFeature feature = null;
ArrayList<NamedElement> newValue = new ArrayList<NamedElement>();
-
// target is the association end of the association branch
association = (Association)branchSource.resolveSemanticElement();
associationNodeEditPart = branchSource;
newValue.addAll(association.getMemberEnds());
newValue.remove(MultiAssociationHelper.getPropertyToListen((Edge)selectedElement.getModel(), association));
feature = UMLPackage.eINSTANCE.getAssociation_OwnedEnd();
-
SetRequest setRequest = new SetRequest(association, feature, newValue);
SetValueCommand setValueCommand = new SetValueCommand(setRequest);
command.add(new ICommandProxy(setValueCommand));
-
// 2. graphical deletion of the branch
View associationBranchView = selectedElement.getNotationView();
command.add(new ICommandProxy(new DeleteCommand(domain, associationBranchView)));
-
// 3. test if it exists more than 2 branches
int branchNumber = associationNodeEditPart.getSourceConnections().size() + associationNodeEditPart.getTargetConnections().size();
if(branchNumber == 3) {
@@ -100,25 +95,32 @@ public class AssociationBranchDeletion implements IObjectActionDelegate { // dependency
ArrayList<EditPart> sourceList = new ArrayList<EditPart>();
ArrayList<EditPart> targetList = new ArrayList<EditPart>();
-
- sourceList.addAll(associationNodeEditPart.getSourceConnections());
- targetList.addAll(associationNodeEditPart.getTargetConnections());
+ List<?> sourceConnections = associationNodeEditPart.getSourceConnections();
+ for(Object object : sourceConnections) {
+ if(object instanceof EditPart) {
+ sourceList.add((EditPart)object);
+ }
+ }
+ List<?> targetConnections = associationNodeEditPart.getTargetConnections();
+ for(Object object : targetConnections) {
+ if(object instanceof EditPart) {
+ targetList.add((EditPart)object);
+ }
+ }
sourceList.remove(selectedElement);
targetList.remove(selectedElement);
PreferencesHint preferencesHint = ((GraphicalEditPart)((ConnectionEditPart)(sourceList.get(0))).getTarget()).getDiagramPreferencesHint();
ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4001, ((IHintedType)UMLElementTypes.Association_4001).getSemanticHint(), preferencesHint);
-
CustomDeferredCreateConnectionViewCommand binaryCommand = new CustomDeferredCreateConnectionViewCommand(domain, ((IHintedType)UMLElementTypes.Association_4001).getSemanticHint(), new SemanticAdapter(null, (((ConnectionEditPart)(sourceList.get(0))).getTarget()).getModel()), new SemanticAdapter(null, (((ConnectionEditPart)(sourceList.get(1))).getTarget()).getModel()), sourceList.get(0).getViewer(), preferencesHint, viewDescriptor, null);
binaryCommand.setElement(association);
command.add(new ICommandProxy(binaryCommand));
}
// 6.command Execution
selectedElement.getDiagramEditDomain().getDiagramCommandStack().execute(command);
-
}
/**
- *
+ *
* {@inheritedDoc}
*/
public void selectionChanged(IAction action, ISelection selection) {
@@ -131,11 +133,10 @@ public class AssociationBranchDeletion implements IObjectActionDelegate { }
/**
- *
+ *
* {@inheritedDoc}
*/
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
// TODO Auto-generated method stub
-
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationDiamondViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationDiamondViewCreateCommand.java index d88e739ca27..29367f9b845 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationDiamondViewCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/AssociationDiamondViewCreateCommand.java @@ -108,14 +108,13 @@ public class AssociationDiamondViewCreateCommand extends AbstractTransactionalCo // ((IHintedType) UMLElementTypes.Dependency_2014)
// .getSemanticHint(), -1, true, preferenceHint);
UMLViewProvider viewProvider = new UMLViewProvider();
- this.node = viewProvider.createAssociation_2015(((EObject)semanticApdater.getAdapter(EObject.class)), this.containerView, -1, true, preferenceHint);
-
+ node = viewProvider.createAssociation_2015(((EObject) semanticApdater.getAdapter(EObject.class)), this.containerView, -1, true, preferenceHint);
// put to the good position
Location notationLocation = NotationFactory.eINSTANCE.createLocation();
notationLocation.setX(location.x);
notationLocation.setY(location.y);
- ((Node)this.node).setLayoutConstraint(notationLocation);
- semanticApdater.setView(this.node);
+ ((Node) node).setLayoutConstraint(notationLocation);
+ semanticApdater.setView(node);
return CommandResult.newOKCommandResult(semanticApdater);
}
@@ -124,12 +123,12 @@ public class AssociationDiamondViewCreateCommand extends AbstractTransactionalCo * {@inheritDoc}
*/
@Override
- public List getAffectedFiles() {
- if(viewer != null) {
+ public List<?> getAffectedFiles() {
+ if (viewer != null) {
EditPart editpart = viewer.getRootEditPart().getContents();
- if(editpart instanceof IGraphicalEditPart) {
- View view = (View)((IGraphicalEditPart)editpart).getModel();
- if(view != null) {
+ if (editpart instanceof IGraphicalEditPart) {
+ View view = (View) ((IGraphicalEditPart) editpart).getModel();
+ if (view != null) {
IFile f = WorkspaceSynchronizer.getFile(view.eResource());
return f != null ? Collections.singletonList(f) : Collections.EMPTY_LIST;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java index d74dfd36c8e..27be7fe668e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/CustomAssociationCreateCommand.java @@ -29,16 +29,6 @@ import org.eclipse.uml2.uml.Type; * custom class to create an association
*/
public class CustomAssociationCreateCommand extends org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationCreateCommand {
-
- /** the container */
- protected Package container;
-
- /** the source of the association */
- protected EObject source;
-
- /** the target of the association */
- protected EObject target;
-
/**
*
* Constructor.
@@ -52,8 +42,6 @@ public class CustomAssociationCreateCommand extends org.eclipse.papyrus.uml.diag */
public CustomAssociationCreateCommand(CreateRelationshipRequest request, EObject source, EObject target) {
super(request, source, target);
- this.source = source;
- this.target = target;
container = deduceContainer(source, target);
}
@@ -63,13 +51,12 @@ public class CustomAssociationCreateCommand extends org.eclipse.papyrus.uml.diag */
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(!canExecute()) {
+ if (!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
- if(source instanceof Type && target instanceof Type && container instanceof Package) {
-
+ if (source instanceof Type && target instanceof Type && container instanceof Package) {
Association newElement = (Association) ProfileDiagramAssociationHelper.createAssociation(getEditingDomain(), (Type) source, (Type) target, container, null);
- ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ ((CreateElementRequest) getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
return null;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyBranchDeletion.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyBranchDeletion.java index 95363764e46..d83926c70f0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyBranchDeletion.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyBranchDeletion.java @@ -14,6 +14,7 @@ package org.eclipse.papyrus.uml.diagram.profile.custom.commands;
import java.util.ArrayList;
+import java.util.List;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -65,25 +66,22 @@ public class DependencyBranchDeletion implements IObjectActionDelegate { Dependency dependency = null;
TransactionalEditingDomain domain = selectedElement.getEditingDomain();
GraphicalEditPart dependencyNodeEditPart = null;
-
// 1. Semanctic deletion of the client or supplier
- GraphicalEditPart branchSource = (GraphicalEditPart)selectedElement.getSource();
- GraphicalEditPart branchtarget = (GraphicalEditPart)selectedElement.getTarget();
+ GraphicalEditPart branchSource = (GraphicalEditPart) selectedElement.getSource();
+ GraphicalEditPart branchtarget = (GraphicalEditPart) selectedElement.getTarget();
EStructuralFeature feature = null;
ArrayList<NamedElement> newValue = new ArrayList<NamedElement>();
-
- if(branchSource.resolveSemanticElement() instanceof Dependency) {
+ if (branchSource.resolveSemanticElement() instanceof Dependency) {
// target is the supplier of the dependency
- dependency = (Dependency)branchSource.resolveSemanticElement();
+ dependency = (Dependency) branchSource.resolveSemanticElement();
dependencyNodeEditPart = branchSource;
newValue.addAll(dependency.getSuppliers());
newValue.remove(branchtarget.resolveSemanticElement());
feature = UMLPackage.eINSTANCE.getDependency_Supplier();
-
} else {
// source is the client of the dependency to remove
feature = UMLPackage.eINSTANCE.getDependency_Client();
- dependency = (Dependency)branchtarget.resolveSemanticElement();
+ dependency = (Dependency) branchtarget.resolveSemanticElement();
dependencyNodeEditPart = branchtarget;
newValue.addAll(dependency.getClients());
newValue.remove(branchSource.resolveSemanticElement());
@@ -91,14 +89,12 @@ public class DependencyBranchDeletion implements IObjectActionDelegate { SetRequest setRequest = new SetRequest(dependency, feature, newValue);
SetValueCommand setValueCommand = new SetValueCommand(setRequest);
command.add(new ICommandProxy(setValueCommand));
-
// 2. graphical deletion of the branch
View branchDependencyView = selectedElement.getNotationView();
command.add(new ICommandProxy(new DeleteCommand(domain, branchDependencyView)));
-
// 3. test if it exists more than 2 branches
int branchNumber = dependencyNodeEditPart.getSourceConnections().size() + dependencyNodeEditPart.getTargetConnections().size();
- if(branchNumber == 3) {
+ if (branchNumber == 3) {
// 4. Graphical deletion of the node
command.add(new ICommandProxy(new DeleteCommand(domain, dependencyNodeEditPart.getNotationView())));
// 5. Graphical creation of the binary dependency
@@ -106,15 +102,24 @@ public class DependencyBranchDeletion implements IObjectActionDelegate { // dependency
ArrayList<EditPart> sourceList = new ArrayList<EditPart>();
ArrayList<EditPart> targetList = new ArrayList<EditPart>();
-
- sourceList.addAll(dependencyNodeEditPart.getSourceConnections());
- targetList.addAll(dependencyNodeEditPart.getTargetConnections());
+ List<?> sourceConnections = dependencyNodeEditPart.getSourceConnections();
+ for (Object object : sourceConnections) {
+ if (object instanceof EditPart) {
+ sourceList.add((EditPart) object);
+ }
+ }
+ List<?> targetConnections = dependencyNodeEditPart.getTargetConnections();
+ for (Object object : targetConnections) {
+ if (object instanceof EditPart) {
+ targetList.add((EditPart) object);
+ }
+ }
sourceList.remove(selectedElement);
targetList.remove(selectedElement);
- PreferencesHint preferencesHint = ((GraphicalEditPart)((ConnectionEditPart)(sourceList.get(0))).getTarget()).getDiagramPreferencesHint();
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4008, ((IHintedType)UMLElementTypes.Dependency_4008).getSemanticHint(), preferencesHint);
-
- CustomDeferredCreateConnectionViewCommand binaryCommand = new CustomDeferredCreateConnectionViewCommand(domain, ((IHintedType)UMLElementTypes.Dependency_4008).getSemanticHint(), new SemanticAdapter(null, (((ConnectionEditPart)(targetList.get(0))).getSource()).getModel()), new SemanticAdapter(null, (((ConnectionEditPart)(sourceList.get(0))).getTarget()).getModel()), sourceList.get(0).getViewer(), preferencesHint, viewDescriptor, null);
+ PreferencesHint preferencesHint = ((GraphicalEditPart) ((ConnectionEditPart) (sourceList.get(0))).getTarget()).getDiagramPreferencesHint();
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4008, ((IHintedType) UMLElementTypes.Dependency_4008).getSemanticHint(), preferencesHint);
+ CustomDeferredCreateConnectionViewCommand binaryCommand = new CustomDeferredCreateConnectionViewCommand(domain, ((IHintedType) UMLElementTypes.Dependency_4008).getSemanticHint(), new SemanticAdapter(null,
+ (((ConnectionEditPart) (targetList.get(0))).getSource()).getModel()), new SemanticAdapter(null, (((ConnectionEditPart) (sourceList.get(0))).getTarget()).getModel()), sourceList.get(0).getViewer(), preferencesHint, viewDescriptor, null);
binaryCommand.setElement(dependency);
command.add(new ICommandProxy(binaryCommand));
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyDiamondViewCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyDiamondViewCreateCommand.java index a75de0023f2..6fe689e3f8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyDiamondViewCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/commands/DependencyDiamondViewCreateCommand.java @@ -114,14 +114,13 @@ public class DependencyDiamondViewCreateCommand extends AbstractTransactionalCom // ((IHintedType) UMLElementTypes.Dependency_2014)
// .getSemanticHint(), -1, true, preferenceHint);
UMLViewProvider viewProvider = new UMLViewProvider();
- this.node = viewProvider.createDependency_2014(((EObject)semanticApdater.getAdapter(EObject.class)), this.containerView, -1, true, preferenceHint);
-
+ node = viewProvider.createDependency_2014(((EObject) semanticApdater.getAdapter(EObject.class)), this.containerView, -1, true, preferenceHint);
// put to the good position
Location notationLocation = NotationFactory.eINSTANCE.createLocation();
notationLocation.setX(location.x);
notationLocation.setY(location.y);
- ((Node)this.node).setLayoutConstraint(notationLocation);
- semanticApdater.setView(this.node);
+ ((Node) node).setLayoutConstraint(notationLocation);
+ semanticApdater.setView(node);
return CommandResult.newOKCommandResult(semanticApdater);
}
@@ -130,7 +129,7 @@ public class DependencyDiamondViewCreateCommand extends AbstractTransactionalCom * {@inheritDoc}
*/
@Override
- public List getAffectedFiles() {
+ public List<?> getAffectedFiles() {
if(viewer != null) {
EditPart editpart = viewer.getRootEditPart().getContents();
if(editpart instanceof IGraphicalEditPart) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndSourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndSourceEditPart.java index e79125eb1a9..c2461d626cb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndSourceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndSourceEditPart.java @@ -55,6 +55,8 @@ public class AssociationEndSourceEditPart extends AssociationRoleSourceEditPart * @param key
* @return
*/
+
+ @SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
if(key == IPropertySource.class) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndTargetEditPart.java index b1ed8fad63b..69197b8ebb3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndTargetEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/edit/parts/AssociationEndTargetEditPart.java @@ -49,6 +49,7 @@ public class AssociationEndTargetEditPart extends AssociationRoleTargetEditPart return AssociationEndSourceLabelHelper.getInstance().getUMLElement(this);
}
+ @SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
if(key == IPropertySource.class) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/CustomContextLinkFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/CustomContextLinkFigure.java new file mode 100644 index 00000000000..dda70b92cce --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/figure/CustomContextLinkFigure.java @@ -0,0 +1,55 @@ +/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Boutheina Bannour (CEA LIST) boutheina.bannour@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.figure;
+
+import org.eclipse.draw2d.Graphics;
+import org.eclipse.draw2d.PolylineDecoration;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure;
+
+/**
+ * Create an {@link CustomContextLinkFigure} with the tag <code>« context »</code>
+ *
+ */
+public class CustomContextLinkFigure extends DashedEdgeFigure {
+
+ /* label of context link does not contain information for the moment */
+ private WrappingLabel conveyedLabel;
+
+ public WrappingLabel getConveyedLabel() {
+ return conveyedLabel;
+ }
+
+ @Override
+ protected void createContents() {
+ super.createContents();
+ conveyedLabel = new WrappingLabel();
+ conveyedLabel.setOpaque(false);
+ conveyedLabel.setForegroundColor(getNameLabel().getForegroundColor());
+ conveyedLabel.setFont(getNameLabel().getFont());
+ add(conveyedLabel, 0);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure#resetStyle()
+ */
+ @Override
+ public void resetStyle() {
+ PolylineDecoration dec = new PolylineDecoration();
+ dec.setScale(15, 5);
+ dec.setLineWidth(1);
+ this.setTargetDecoration(null);
+ this.setLineStyle(Graphics.LINE_DASHDOT); // line drawing style
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ExtensionHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ExtensionHelper.java index 0666c5881f4..3d291f2edad 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ExtensionHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ExtensionHelper.java @@ -41,13 +41,12 @@ import org.eclipse.papyrus.infra.core.services.ServicesRegistry; import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.uml.diagram.common.Activator;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
-import org.eclipse.papyrus.uml.diagram.common.helper.NamedElementHelper;
import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.common.util.MDTUtil;
-import org.eclipse.papyrus.uml.diagram.common.util.Util;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ExtensionCustomNameEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.uml2.uml.AggregationKind;
@@ -91,22 +90,53 @@ public class ExtensionHelper extends ElementHelper { */
static public Command getDestroyExtensionCommand(Class metaclass) {
CompoundCommand cc = new CompoundCommand("Destroy Extension"); //$NON-NLS-1$
-
-
/* get all the profile and sub-profile for the diagram */
- IMultiDiagramEditor editor = (IMultiDiagramEditor)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IMultiDiagramEditor editor = (IMultiDiagramEditor) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
ServicesRegistry registry = editor.getServicesRegistry();
-
Profile rootProfile = null;
try {
ModelSet modelSet = ServiceUtils.getInstance().getModelSet(registry);
-
-
-
- if(modelSet != null) {
+ if (modelSet != null) {
IModel umlModel = modelSet.getModel(UmlModel.MODEL_ID);
- if(umlModel != null) {
- rootProfile = (Profile)((UmlModel)umlModel).lookupRoot();
+ if (umlModel != null) {
+ rootProfile = (Profile) ((UmlModel) umlModel).lookupRoot();
+ List<?> profileList = org.eclipse.papyrus.uml.tools.utils.ElementUtil.getInstancesFilteredByType(rootProfile, rootProfile.getClass(), null);
+ /*
+ * get all the extension of the metaclass
+ * /!\ some of them comes from the UML MetaModel
+ */
+ EList<Extension> extensionList = metaclass.getExtensions();
+ /*
+ * get the extensions to destroy
+ *
+ * All the user's extension are owned by the rootProfile or a sub-profile
+ */
+ ArrayList<Extension> extensionsToDestroy = new ArrayList<Extension>();
+ for (Extension extension : extensionList) {
+ EObject containerExt = extension.eContainer();
+ // test if it's a user extension or a metamodel extension
+ if (profileList.contains(containerExt) || containerExt == rootProfile) {
+ extensionsToDestroy.add(extension);
+ }
+ }
+ /*
+ * Destroy the property in the stereotypes
+ */
+ for (int iterExt = 0; iterExt < extensionsToDestroy.size(); iterExt++) {
+ cc.add(StereotypeHelper.getRemovePropertyCommand(extensionsToDestroy.get(iterExt)));
+ }
+ /*
+ * Destroy the extensions
+ */
+ for (Extension extension : extensionsToDestroy) {
+ DestroyElementRequest destroyElementRequest = new DestroyElementRequest(extension, false);
+ DestroyElementCommand destroyElementCommand = new DestroyElementCommand(destroyElementRequest);
+ cc.add(new ICommandProxy(destroyElementCommand));
+ }
+ if (cc.isEmpty()) {
+ // this command does nothing!
+ cc.add(new EMFtoGEFCommandWrapper(new IdentityCommand()));
+ }
}
}
} catch (NotFoundException ex) {
@@ -116,51 +146,6 @@ public class ExtensionHelper extends ElementHelper { Activator.log.error(ex);
return UnexecutableCommand.INSTANCE;
}
-
- List<?> profileList = Util.getInstancesFilteredByType(rootProfile, rootProfile.getClass(), null);
-
- /*
- * get all the extension of the metaclass
- * /!\ some of them comes from the UML MetaModel
- */
- EList<Extension> extensionList = metaclass.getExtensions();
-
-
- /*
- * get the extensions to destroy
- *
- * All the user's extension are owned by the rootProfile or a sub-profile
- */
-
- ArrayList<Extension> extensionsToDestroy = new ArrayList<Extension>();
- for(Extension extension : extensionList) {
- EObject containerExt = extension.eContainer();
- //test if it's a user extension or a metamodel extension
- if(profileList.contains(containerExt) || containerExt == rootProfile) {
- extensionsToDestroy.add(extension);
- }
-
- }
-
- /*
- * Destroy the property in the stereotypes
- */
- for(int iterExt = 0; iterExt < extensionsToDestroy.size(); iterExt++) {
- cc.add(StereotypeHelper.getRemovePropertyCommand(extensionsToDestroy.get(iterExt)));
- }
- /*
- * Destroy the extensions
- */
- for(Extension extension : extensionsToDestroy) {
- DestroyElementRequest destroyElementRequest = new DestroyElementRequest(extension, false);
- DestroyElementCommand destroyElementCommand = new DestroyElementCommand(destroyElementRequest);
- cc.add(new ICommandProxy(destroyElementCommand));
-
- }
- if(cc.isEmpty()) {
- //this command does nothing!
- cc.add(new EMFtoGEFCommandWrapper(new IdentityCommand()));
- }
return cc;
}
@@ -177,81 +162,67 @@ public class ExtensionHelper extends ElementHelper { String deducedName = deduceExtensionNameFromProperties(link);
String oldName = link.getName();
EditPolicy policy = null;
-
- //find the ExtensionEditPart
+ // find the ExtensionEditPart
List<?> view = DiagramEditPartsUtil.getEObjectViews(link);
- if(!view.isEmpty()) {
+ if (!view.isEmpty()) {
IEditorPart editor = MDTUtil.getActiveEditor();
- DiagramEditPart diagram = (DiagramEditPart)((IMultiDiagramEditor)editor).getAdapter(DiagramEditPart.class);
- EditPart extensionEP = DiagramEditPartsUtil.getEditPartFromView((View)view.get(0), diagram);
- if(extensionEP instanceof ExtensionEditPart) {
+ DiagramEditPart diagram = (DiagramEditPart) ((IMultiDiagramEditor) editor).getAdapter(DiagramEditPart.class);
+ EditPart extensionEP = DiagramEditPartsUtil.getEditPartFromView((View) view.get(0), diagram);
+ if (extensionEP instanceof ExtensionEditPart) {
policy = extensionEP.getEditPolicy(ExtensionCustomNameEditPolicy.SPECIFIC_EXTENSION_NAME_POLICY);
}
-
- //we change the stereotype to listen!
- if(policy != null) {
+ // we change the stereotype to listen!
+ if (policy != null) {
policy.deactivate();
}
}
-
-
Type sourceType = link.getEndTypes().get(source);
Type targetType = link.getEndTypes().get(target);
-
-
- //unactive the editpolicy for this old stereotype
-
- //remove the corresponding property in the old stereotype
- if(sourceType instanceof Stereotype) {
- EList<Property> attributes = ((Stereotype)sourceType).getOwnedAttributes();
- for(Property property : attributes) {
- if(property.getAssociation() == link) {
- //remove the property from the stereotype
- ((Stereotype)sourceType).getOwnedAttributes().remove(property);
- //remove the property from the extension
+ // unactive the editpolicy for this old stereotype
+ // remove the corresponding property in the old stereotype
+ if (sourceType instanceof Stereotype) {
+ EList<Property> attributes = ((Stereotype) sourceType).getOwnedAttributes();
+ for (Property property : attributes) {
+ if (property.getAssociation() == link) {
+ // remove the property from the stereotype
+ ((Stereotype) sourceType).getOwnedAttributes().remove(property);
+ // remove the property from the extension
link.getMemberEnds().remove(property);
break;
}
}
}
-
- //change the ExtensionEnd name
+ // change the ExtensionEnd name
EList<Property> ends = link.getOwnedEnds();
- for(Property endSource : ends) {
- if(endSource instanceof ExtensionEnd) {
+ for (Property endSource : ends) {
+ if (endSource instanceof ExtensionEnd) {
endSource.setName(ExtensionHelper.EXTENSION.replaceFirst("E", "e") + newSource.getName()); //$NON-NLS-1$ //$NON-NLS-2$
endSource.setType(newSource);
break;
}
}
-
-
- //create the new source property (stereotype)
+ // create the new source property (stereotype)
Property property = UMLFactory.eINSTANCE.createProperty();
property.setName(ExtensionHelper.BASE + targetType.getName());
property.setType(targetType);
property.setAssociation(link);
property.setAggregation(AggregationKind.NONE_LITERAL);
-
link.getMemberEnds().add(property);
newSource.getOwnedAttributes().add(property);
-
- //change the extension name, if the user doesn't have rename the extension!
- if(oldName.contains(deducedName)) {
- if(oldName.indexOf(deducedName) == 0) {
+ // change the extension name, if the user doesn't have rename the extension!
+ if (oldName.contains(deducedName)) {
+ if (oldName.indexOf(deducedName) == 0) {
oldName = oldName.substring(deducedName.length());
try {
- Integer test = Integer.parseInt(oldName);
- //if there is not exception, the name has not been edited by the user
- link.setName(getExtensionName((Element)link.eContainer(), newSource, (Class)targetType));
+ // if there is not exception, the name has not been edited by the user
+ link.setName(getExtensionName((Element) link.eContainer(), newSource, (Class) targetType));
} catch (NumberFormatException e) {
- //do nothing
+ // do nothing
}
-
}
}
- //the stereotype as change, now the edit policy is going to listen to this new stereotype
- if(policy != null) {
+ // the stereotype as change, now the edit policy is going to listen to this new stereotype
+ if (policy != null) {
policy.activate();
}
return CommandResult.newOKCommandResult(link);
@@ -273,36 +244,29 @@ public class ExtensionHelper extends ElementHelper { String deducedName = deduceExtensionNameFromProperties(link);
String oldName = link.getName();
Type sourceType = link.getEndTypes().get(source);
-
- //change the name and the type of the property
- if(sourceType instanceof Stereotype) {
- EList<Property> attributes = ((Stereotype)sourceType).getOwnedAttributes();
- for(Property property : attributes) {
- if(property.getAssociation() == link) {
+ // change the name and the type of the property
+ if (sourceType instanceof Stereotype) {
+ EList<Property> attributes = ((Stereotype) sourceType).getOwnedAttributes();
+ for (Property property : attributes) {
+ if (property.getAssociation() == link) {
property.setType(newTarget);
property.setName(ExtensionHelper.BASE + newTarget.getName());
break;
}
}
-
- //change the extension name, if the user doesn't have rename the extension!
- if(oldName.contains(deducedName)) {
- if(oldName.indexOf(deducedName) == 0) {
+ // change the extension name, if the user doesn't have rename the extension!
+ if (oldName.contains(deducedName)) {
+ if (oldName.indexOf(deducedName) == 0) {
oldName = oldName.substring(deducedName.length());
try {
- Integer test = Integer.parseInt(oldName);
- //if there is not exception, the name didn't edited by the user
- link.setName(getExtensionName((Element)link.eContainer(), (Stereotype)sourceType, newTarget));
+ // if there is not exception, the name didn't edited by the user
+ link.setName(getExtensionName((Element) link.eContainer(), (Stereotype) sourceType, newTarget));
} catch (NumberFormatException e) {
- //do nothing
+ // do nothing
}
-
}
}
}
-
-
-
return CommandResult.newOKCommandResult(link);
}
@@ -321,8 +285,7 @@ public class ExtensionHelper extends ElementHelper { public static String getExtensionName(Element extensionParent, Stereotype source, Class target) {
String name = "E_"; //$NON-NLS-1$
name += source.getName() + "_" + target.getName(); //$NON-NLS-1$
- NamedElementHelper helper = new NamedElementHelper();
- name = helper.getNewUMLElementName(extensionParent, name);//to add a number after the name!
+ name = NamedElementUtil.getDefaultNameWithIncrementFromBase(name, extensionParent.eContents());// to add a number after the name!
return name;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java index 5405d72767d..ac1078d8c8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiAssociationHelper.java @@ -20,7 +20,6 @@ import java.util.Iterator; import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.EditPartViewer;
@@ -70,29 +69,26 @@ import org.eclipse.uml2.uml.UMLPackage; * to n-ary association
*/
public class MultiAssociationHelper extends ElementHelper {
-
/**
* get the member end that will be managed by the branch of the association.
*
* @param associationBranchView
- * the association branch view
+ * the association branch view
* @param association
- * the association
+ * the association
*
* @return the property concerned by the branch or null if the property is not found
*/
public static Property getPropertyToListen(Edge associationBranchView, Association association) {
- Classifier target = (Classifier)(associationBranchView.getTarget().getElement());
+ Classifier target = (Classifier) (associationBranchView.getTarget().getElement());
// look for the property that is typed by the classifier
Property propertyToDisplay = null;
Iterator<Property> propertiesIterator = association.getMemberEnds().iterator();
-
- while(propertiesIterator.hasNext()) {
+ while (propertiesIterator.hasNext()) {
Property currentProperty = propertiesIterator.next();
- if(currentProperty.getType().equals(target)) {
+ if (currentProperty.getType().equals(target)) {
propertyToDisplay = currentProperty;
}
-
}
return propertyToDisplay;
}
@@ -101,7 +97,7 @@ public class MultiAssociationHelper extends ElementHelper { * constructor.
*
* @param editDomain
- * the editDomain , important to create commands can not be null
+ * the editDomain , important to create commands can not be null
*/
public MultiAssociationHelper(TransactionalEditingDomain editDomain) {
super();
@@ -112,76 +108,76 @@ public class MultiAssociationHelper extends ElementHelper { * Display all branches command.
*
* @param associationNodeEditPart
- * the association node edit part
+ * the association node edit part
*
* @return the command
*/
public Command displayAllBranchesCommand(AssociationNodeEditPart associationNodeEditPart) {
Command command = new CompoundCommand();
// 0. Obtain list of property to display
- Association association = (Association)associationNodeEditPart.resolveSemanticElement();
- ArrayList<Property> endToDisplay = new ArrayList(association.getMemberEnds());
+ Association association = (Association) associationNodeEditPart.resolveSemanticElement();
+ ArrayList<Property> endToDisplay = new ArrayList<Property>(association.getMemberEnds());
// 1. remove in the list all displayedElement.
- Iterator iter = associationNodeEditPart.getSourceConnections().iterator();
- while(iter.hasNext()) {
- EditPart currentEditPart = (EditPart)iter.next();
- if(currentEditPart instanceof AssociationBranchEditPart) {
- endToDisplay.remove(getPropertyToListen((Edge)((AssociationBranchEditPart)currentEditPart).getModel(), association));
+ Iterator<?> iter = associationNodeEditPart.getSourceConnections().iterator();
+ while (iter.hasNext()) {
+ EditPart currentEditPart = (EditPart) iter.next();
+ if (currentEditPart instanceof AssociationBranchEditPart) {
+ endToDisplay.remove(getPropertyToListen((Edge) ((AssociationBranchEditPart) currentEditPart).getModel(), association));
}
}
-
// 2. for each element create a graphical representation of the type and
// finally the branch
Iterator<Property> iteratorProp = endToDisplay.iterator();
int index = 0;
- while(iteratorProp.hasNext()) {
+ while (iteratorProp.hasNext()) {
index += 1;
// source editPart
EditPart sourceEditPart = null;
// end of the association end
Property currentEnd = iteratorProp.next();
-
// look for if an editpart exist for this element
- Collection<EditPart> editPartSet = associationNodeEditPart.getViewer().getEditPartRegistry().values();
+ Collection<?> values = associationNodeEditPart.getViewer().getEditPartRegistry().values();
+ Collection<EditPart> editPartSet = new ArrayList<EditPart>();
+ for (Object object : values) {
+ if (object instanceof EditPart)
+ {
+ editPartSet.add((EditPart) object);
+ }
+ }
Iterator<EditPart> editPartIterator = editPartSet.iterator();
-
- while(editPartIterator.hasNext() && sourceEditPart == null) {
-
+ while (editPartIterator.hasNext() && sourceEditPart == null) {
EditPart currentEditPart = editPartIterator.next();
-
- if((!(currentEditPart instanceof CompartmentEditPart)) && currentEditPart instanceof GraphicalEditPart && currentEnd.getType().equals(((GraphicalEditPart)currentEditPart).resolveSemanticElement())) {
+ if ((!(currentEditPart instanceof CompartmentEditPart)) && currentEditPart instanceof GraphicalEditPart && currentEnd.getType().equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
sourceEditPart = currentEditPart;
}
}
// descriptor for the branch
- ConnectionViewDescriptor viewBranchDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), ((IGraphicalEditPart)associationNodeEditPart).getDiagramPreferencesHint());
-
+ ConnectionViewDescriptor viewBranchDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(),
+ ((IGraphicalEditPart) associationNodeEditPart).getDiagramPreferencesHint());
// the editpart exist -> only creation of the branch
- if(sourceEditPart != null) {
-
- CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null, associationNodeEditPart.getModel()), new SemanticAdapter(null, sourceEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
-
+ if (sourceEditPart != null) {
+ CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null,
+ associationNodeEditPart.getModel()), new SemanticAdapter(null, sourceEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
aBranchCommand.setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(aBranchCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
} else {// the editpart does not exist
-
// creation of the node
IAdaptable elementAdapter = new EObjectAdapter(currentEnd.getType());
ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, null, ViewUtil.APPEND, true, associationNodeEditPart.getDiagramPreferencesHint());
-
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, (View)((View)associationNodeEditPart.getModel()).eContainer());
- ((CompoundCommand)command).add(new ICommandProxy(nodeCreationCommand));
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(associationNodeEditPart.getLocation().x + 200, associationNodeEditPart.getLocation().y + index * 100)); //$NON-NLS-1$
- ((CompoundCommand)command).add(new ICommandProxy(setBoundsCommand));
+ CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, (View) ((View) associationNodeEditPart.getModel()).eContainer());
+ ((CompoundCommand) command).add(new ICommandProxy(nodeCreationCommand));
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(),
+ "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(associationNodeEditPart.getLocation().x + 200, associationNodeEditPart.getLocation().y + index * 100)); //$NON-NLS-1$
+ ((CompoundCommand) command).add(new ICommandProxy(setBoundsCommand));
// Creation of the branch
- CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null, associationNodeEditPart.getModel()), (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), associationNodeEditPart.getViewer(), ((IGraphicalEditPart)associationNodeEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
-
+ CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null,
+ associationNodeEditPart.getModel()), (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), associationNodeEditPart.getViewer(), ((IGraphicalEditPart) associationNodeEditPart).getDiagramPreferencesHint(),
+ viewBranchDescriptor, null);
aBranchCommand.setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(aBranchCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
// creation of the link
}
-
}
return command;
}
@@ -190,79 +186,75 @@ public class MultiAssociationHelper extends ElementHelper { * Returns the drop Command for a MultiAssociation
*
* @param association
- * the association to drop
+ * the association to drop
* @param viewer
- * the viewer
+ * the viewer
* @param diagramPreferencesHint
- * the Diagram Preference Hint
+ * the Diagram Preference Hint
* @param location
- * the location for the drop
+ * the location for the drop
* @param containerView
- * the container view
+ * the container view
* @return
* The drop Command for a MultiAssociation
*/
public Command dropMultiAssociation(Association association, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView) {
Command command = new CompoundCommand();
// 0. Obtain list of property to display
- ArrayList<Property> endToDisplay = new ArrayList(association.getMemberEnds());
-
+ ArrayList<Property> endToDisplay = new ArrayList<Property>(association.getMemberEnds());
// 1. creatiuon of the diamon of association
AssociationDiamondViewCreateCommand nodeCreation = new AssociationDiamondViewCreateCommand(getEditingDomain(), containerView, viewer, diagramPreferencesHint, location, new SemanticAdapter(association, null));
- ((CompoundCommand)command).add(new ICommandProxy(nodeCreation));
-
+ ((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
// 2. for each element create a graphical representation of the type and
// finally the branch
Iterator<Property> iteratorProp = endToDisplay.iterator();
int index = 0;
- while(iteratorProp.hasNext()) {
+ while (iteratorProp.hasNext()) {
index += 1;
// source editPart
EditPart sourceEditPart = null;
// end of the association end
Property currentEnd = iteratorProp.next();
-
// look for if an editpart exist for this element
- Collection<EditPart> editPartSet = viewer.getEditPartRegistry().values();
+ Collection<EditPart> editPartSet = new ArrayList<EditPart>();
+ Collection<?> values = viewer.getEditPartRegistry().values();
+ for (Object object : values) {
+ if (object instanceof EditPart)
+ {
+ editPartSet.add((EditPart) object);
+ }
+ }
Iterator<EditPart> editPartIterator = editPartSet.iterator();
-
- while(editPartIterator.hasNext() && sourceEditPart == null) {
-
+ while (editPartIterator.hasNext() && sourceEditPart == null) {
EditPart currentEditPart = editPartIterator.next();
-
- if((!(currentEditPart instanceof CompartmentEditPart)) && currentEditPart instanceof GraphicalEditPart && currentEnd.getType().equals(((GraphicalEditPart)currentEditPart).resolveSemanticElement())) {
+ if ((!(currentEditPart instanceof CompartmentEditPart)) && currentEditPart instanceof GraphicalEditPart && currentEnd.getType().equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
sourceEditPart = currentEditPart;
}
}
// descriptor for the branch
- ConnectionViewDescriptor viewBranchDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), diagramPreferencesHint);
-
+ ConnectionViewDescriptor viewBranchDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), diagramPreferencesHint);
// the editpart exist -> only creation of the branch
- if(sourceEditPart != null) {
-
- CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, sourceEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
-
+ if (sourceEditPart != null) {
+ CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult()
+ .getReturnValue(), new SemanticAdapter(null, sourceEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
aBranchCommand.setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(aBranchCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
} else {// the editpart does not exist
-
// creation of the node
IAdaptable elementAdapter = new EObjectAdapter(currentEnd.getType());
ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, null, ViewUtil.APPEND, true, diagramPreferencesHint);
-
// get the command and execute it.
CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, containerView);
- ((CompoundCommand)command).add(new ICommandProxy(nodeCreationCommand));
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x + 200, location.y + index * 100)); //$NON-NLS-1$
- ((CompoundCommand)command).add(new ICommandProxy(setBoundsCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(nodeCreationCommand));
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x + 200, location.y + index * 100)); //$NON-NLS-1$
+ ((CompoundCommand) command).add(new ICommandProxy(setBoundsCommand));
// Creation of the branch
- CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), viewer, diagramPreferencesHint, viewBranchDescriptor, null);
-
+ CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult()
+ .getReturnValue(), (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), viewer, diagramPreferencesHint, viewBranchDescriptor, null);
aBranchCommand.setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(aBranchCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
// creation of the link
}
-
}
return command;
}
@@ -271,9 +263,9 @@ public class MultiAssociationHelper extends ElementHelper { * transform binary association to n-ary association.
*
* @param createConnectionViewAndElementRequest
- * the create connection view and element request
+ * the create connection view and element request
* @param command
- * the command
+ * the command
*
* @return the command in charge of this job
*/
@@ -286,147 +278,127 @@ public class MultiAssociationHelper extends ElementHelper { NamedElement newSemanticElement = null;// element that will be added as
// client ou supplier of the
// association
- EStructuralFeature feature = null; // role client or supplier
EditPart sourceEditPart = createConnectionViewAndElementRequest.getSourceEditPart();
EditPart targetEditPart = createConnectionViewAndElementRequest.getTargetEditPart();
View associationView = null;
Association association = null;
View parentView = null;
-
-
// ---------------------------------------------------------
// help to debug
- // System.err.println("\n+ 0. creation of variables");
- // System.err.println("+-> editting domain"+ getEditingDomain());
- // System.err.println("+-> sourceEditpart:" + sourceEditPart);
- // System.err.println("+-> targetEditPart:" + targetEditPart);
+ // System.err.println("\n+ 0. creation of variables");
+ // System.err.println("+-> editting domain"+ getEditingDomain());
+ // System.err.println("+-> sourceEditpart:" + sourceEditPart);
+ // System.err.println("+-> targetEditPart:" + targetEditPart);
// ---------------------------------------------------------
-
// 1. initialization
Command startCommand = createConnectionViewAndElementRequest.getStartCommand();
- if(command instanceof ICommandProxy) {
- ICommand startICommand = ((ICommandProxy)startCommand).getICommand();
- if(startICommand instanceof CompositeCommand) {
- Iterator<?> ite = ((CompositeCommand)startICommand).iterator();
-
- while(ite.hasNext()) {
- ICommand currentCommand = (ICommand)ite.next();
- if(currentCommand instanceof SetConnectionBendpointsCommand) {
- sourceLocation = ((SetConnectionBendpointsCommand)currentCommand).getSourceRefPoint();
- targetLocation = ((SetConnectionBendpointsCommand)currentCommand).getTargetRefPoint();
+ if (command instanceof ICommandProxy) {
+ ICommand startICommand = ((ICommandProxy) startCommand).getICommand();
+ if (startICommand instanceof CompositeCommand) {
+ Iterator<?> ite = ((CompositeCommand) startICommand).iterator();
+ while (ite.hasNext()) {
+ ICommand currentCommand = (ICommand) ite.next();
+ if (currentCommand instanceof SetConnectionBendpointsCommand) {
+ sourceLocation = ((SetConnectionBendpointsCommand) currentCommand).getSourceRefPoint();
+ targetLocation = ((SetConnectionBendpointsCommand) currentCommand).getTargetRefPoint();
}
}
}
}
-
- if(targetEditPart != null && sourceLocation != null && targetLocation != null) {
+ if (targetEditPart != null && sourceLocation != null && targetLocation != null) {
// the source or the target must be a association
// look for the edit part that represent the editpart
- if(((View)sourceEditPart.getModel()).getElement() != null && ((View)sourceEditPart.getModel()).getElement() instanceof Association) {
- associationView = ((View)sourceEditPart.getModel());
- association = (Association)((View)sourceEditPart.getModel()).getElement();
+ if (((View) sourceEditPart.getModel()).getElement() != null && ((View) sourceEditPart.getModel()).getElement() instanceof Association) {
+ associationView = ((View) sourceEditPart.getModel());
+ association = (Association) ((View) sourceEditPart.getModel()).getElement();
nodeLocation = sourceLocation;
- newSemanticElement = (NamedElement)((View)targetEditPart.getModel()).getElement();
- feature = UMLPackage.eINSTANCE.getTypedElement_Type();
+ newSemanticElement = (NamedElement) ((View) targetEditPart.getModel()).getElement();
}
-
- if(((View)targetEditPart.getModel()).getElement() != null && ((View)targetEditPart.getModel()).getElement() instanceof Association) {
- associationView = ((View)targetEditPart.getModel());
- association = (Association)((View)targetEditPart.getModel()).getElement();
+ if (((View) targetEditPart.getModel()).getElement() != null && ((View) targetEditPart.getModel()).getElement() instanceof Association) {
+ associationView = ((View) targetEditPart.getModel());
+ association = (Association) ((View) targetEditPart.getModel()).getElement();
nodeLocation = targetLocation;
- newSemanticElement = (NamedElement)((View)sourceEditPart.getModel()).getElement();
- feature = UMLPackage.eINSTANCE.getTypedElement_Type();
+ newSemanticElement = (NamedElement) ((View) sourceEditPart.getModel()).getElement();
}
-
- if(associationView == null || (targetEditPart.getModel() instanceof Edge)) {
+ if (associationView == null || (targetEditPart.getModel() instanceof Edge)) {
return null;
}
- parentView = (View)associationView.eContainer();
+ parentView = (View) associationView.eContainer();
// ---------------------------------------------------------
// help to debug
- // System.err.println("+ 1. initialization");
- // System.err.println("+-> sourceLocation:" + sourceLocation);
- // System.err.println("+-> targetLocation:" + targetLocation);
- // System.err.println("+-> AssociationView:" + associationView);
- // System.err.println("+-> association:" + association);
- // System.err.println("+-> nodeLocation:" + nodeLocation);
- // System.err.println("+-> newSemanticElement:" + newSemanticElement);
- // System.err.println("+-> feature:" + feature);
- // System.err.println("+-> parentView:" + parentView);
+ // System.err.println("+ 1. initialization");
+ // System.err.println("+-> sourceLocation:" + sourceLocation);
+ // System.err.println("+-> targetLocation:" + targetLocation);
+ // System.err.println("+-> AssociationView:" + associationView);
+ // System.err.println("+-> association:" + association);
+ // System.err.println("+-> nodeLocation:" + nodeLocation);
+ // System.err.println("+-> newSemanticElement:" + newSemanticElement);
+ // System.err.println("+-> feature:" + feature);
+ // System.err.println("+-> parentView:" + parentView);
// ---------------------------------------------------------
// 2. Remove the view of the association
- DeleteCommand deleteCommand = new DeleteLinkDuringCreationCommand(getEditingDomain(), (Edge)associationView, sourceEditPart.getViewer());
+ DeleteCommand deleteCommand = new DeleteLinkDuringCreationCommand(getEditingDomain(), (Edge) associationView, sourceEditPart.getViewer());
deleteCommand.setReuseParentTransaction(true);
Command removecommand = new ICommandProxy(deleteCommand);
- //to execute
- ((CompoundCommand)command).add(removecommand);
-
- //((CompoundCommand)command).add(removecommand);
-
+ // to execute
+ ((CompoundCommand) command).add(removecommand);
+ // ((CompoundCommand)command).add(removecommand);
// ---------------------------------------------------------
// help to debug
- // System.err.println("+ 2. Remove the view of the association");
- // System.err.println("+-> command:" + command.canExecute());
+ // System.err.println("+ 2. Remove the view of the association");
+ // System.err.println("+-> command:" + command.canExecute());
// ---------------------------------------------------------
-
-
-
// 3. set a new end association in the UML model
// 3.1 creation of the property
CreateElementRequest request = new CreateElementRequest(getEditingDomain(), association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
request.setParameter("type", newSemanticElement); //$NON-NLS-1$
EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request, DiagramUtils.getDiagramFrom(sourceEditPart));
propertyCreateCommand.setReuseParentTransaction(true);
- ((CompoundCommand)command).add(new ICommandProxy(propertyCreateCommand));
-
-
+ ((CompoundCommand) command).add(new ICommandProxy(propertyCreateCommand));
// 3. Node creation at this position
- View associationViewSource = ((Edge)associationView).getSource();
- View associationViewTarget = ((Edge)associationView).getTarget();
- AssociationDiamondViewCreateCommand nodeCreation = new AssociationDiamondViewCreateCommand(getEditingDomain(), parentView, sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), nodeLocation, new SemanticAdapter(association, null));
+ View associationViewSource = ((Edge) associationView).getSource();
+ View associationViewTarget = ((Edge) associationView).getTarget();
+ AssociationDiamondViewCreateCommand nodeCreation = new AssociationDiamondViewCreateCommand(getEditingDomain(), parentView, sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), nodeLocation,
+ new SemanticAdapter(association, null));
nodeCreation.setReuseParentTransaction(true);
- ((CompoundCommand)command).add(new ICommandProxy(nodeCreation));
-
+ ((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
// 4. reconstruction of the old link by taking in account the old
// connection
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint());
-
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
// 5. reconstruction of the first branch between old source to node
- ICommand firstBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, associationViewSource), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
- ((CustomDeferredCreateConnectionViewCommand)firstBranchCommand).setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(firstBranchCommand));
+ ICommand firstBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(
+ null, associationViewSource), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ ((CustomDeferredCreateConnectionViewCommand) firstBranchCommand).setElement(association);
+ ((CompoundCommand) command).add(new ICommandProxy(firstBranchCommand));
// 6. reconstruction of the second branch between node to old target
- ICommand secondBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, associationViewTarget), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
- ((CustomDeferredCreateConnectionViewCommand)secondBranchCommand).setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(secondBranchCommand));
-
+ ICommand secondBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(),
+ new SemanticAdapter(null, associationViewTarget), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ ((CustomDeferredCreateConnectionViewCommand) secondBranchCommand).setElement(association);
+ ((CompoundCommand) command).add(new ICommandProxy(secondBranchCommand));
// 7. Create of the third branch between node and target our source.
ICommand thirdBranchCommand = null;
-
- if(associationView.equals((sourceEditPart.getModel()))) {
+ if (associationView.equals((sourceEditPart.getModel()))) {
// third branch node and target
- thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null,
+ targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
} else {
// // third branch source and node
- thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable) nodeCreation
+ .getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
}
- ((CustomDeferredCreateConnectionViewCommand)thirdBranchCommand).setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(thirdBranchCommand));
-
-
-
+ ((CustomDeferredCreateConnectionViewCommand) thirdBranchCommand).setElement(association);
+ ((CompoundCommand) command).add(new ICommandProxy(thirdBranchCommand));
}
return command;
-
}
/**
* code to create new branch.
*
* @param createConnectionViewAndElementRequest
- * the create connection view and element request
+ * the create connection view and element request
* @param command
- * that will contain sub commands
+ * that will contain sub commands
*
* @return the command in charge of the branch creation
*/
@@ -435,42 +407,37 @@ public class MultiAssociationHelper extends ElementHelper { // init
EditPart sourceEditPart = createConnectionViewAndElementRequest.getSourceEditPart();
EditPart targetEditPart = createConnectionViewAndElementRequest.getTargetEditPart();
-
- if((targetEditPart.getModel() instanceof Edge)) {
- return null;
- }
- if(targetEditPart != null) {
+ if (targetEditPart != null) {
+ if ((targetEditPart.getModel() instanceof Edge)) {
+ return null;
+ }
// the source or the target must be a association
// look for the edit part that represent the editpart
EObject association = null;
NamedElement newSemanticElement = null;
- if(((View)sourceEditPart.getModel()).getElement() != null && ((View)sourceEditPart.getModel()).getElement() instanceof Association) {
- association = ((View)sourceEditPart.getModel()).getElement();
- newSemanticElement = (NamedElement)((View)targetEditPart.getModel()).getElement();
+ if (((View) sourceEditPart.getModel()).getElement() != null && ((View) sourceEditPart.getModel()).getElement() instanceof Association) {
+ association = ((View) sourceEditPart.getModel()).getElement();
+ newSemanticElement = (NamedElement) ((View) targetEditPart.getModel()).getElement();
}
-
- if(((View)targetEditPart.getModel()).getElement() != null && ((View)targetEditPart.getModel()).getElement() instanceof Association) {
- association = ((View)targetEditPart.getModel()).getElement();
- newSemanticElement = (NamedElement)((View)sourceEditPart.getModel()).getElement();
+ if (((View) targetEditPart.getModel()).getElement() != null && ((View) targetEditPart.getModel()).getElement() instanceof Association) {
+ association = ((View) targetEditPart.getModel()).getElement();
+ newSemanticElement = (NamedElement) ((View) sourceEditPart.getModel()).getElement();
}
- //System.err.println("step init, can execute?" + command.canExecute());
+ // System.err.println("step init, can execute?" + command.canExecute());
// 0. add semantic
CreateElementRequest request = new CreateElementRequest(getEditingDomain(), association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
request.setParameter("type", newSemanticElement); //$NON-NLS-1$
EditElementCommand propertyCreateCommand = new PropertyCommandForAssociation(request, DiagramUtils.getDiagramFrom(sourceEditPart));
- ((CompoundCommand)command).add(new ICommandProxy(propertyCreateCommand));
-
- //System.err.println("0. add semantic, can execute?" + command.canExecute());
+ ((CompoundCommand) command).add(new ICommandProxy(propertyCreateCommand));
+ // System.err.println("0. add semantic, can execute?" + command.canExecute());
// 1. add the branch graphically
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint());
-
- CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
-
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Association_4019, ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
+ CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Association_4019).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()),
+ new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
aBranchCommand.setElement(association);
- ((CompoundCommand)command).add(new ICommandProxy(aBranchCommand));
- //System.err.println("1. add the branch graphically, can execute?" + command.canExecute());
+ ((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
+ // System.err.println("1. add the branch graphically, can execute?" + command.canExecute());
return command;
-
}
return UnexecutableCommand.INSTANCE;
}
@@ -480,9 +447,9 @@ public class MultiAssociationHelper extends ElementHelper { * branches.
*
* @param createConnectionViewAndElementRequest
- * the create connection view and element request
+ * the create connection view and element request
* @param command
- * that will contains subcommands
+ * that will contains subcommands
*
* @return the command
*/
@@ -491,33 +458,28 @@ public class MultiAssociationHelper extends ElementHelper { command = new CompoundCommand();
EditPart sourceEditPart = createConnectionViewAndElementRequest.getSourceEditPart();
EditPart targetEditPart = createConnectionViewAndElementRequest.getTargetEditPart();
-
// if the the source or the target is a node association the goal is
// to create only one branch
- if((((View)sourceEditPart.getModel()).getType() == "" + AssociationNodeEditPart.VISUAL_ID)) { //$NON-NLS-1$
+ if ((((View) sourceEditPart.getModel()).getType() == "" + AssociationNodeEditPart.VISUAL_ID)) { //$NON-NLS-1$
return getBranchAssociationCommand(createConnectionViewAndElementRequest, command);
}
-
- if((((View)targetEditPart.getModel()).getType() == "" + AssociationNodeEditPart.VISUAL_ID)) { //$NON-NLS-1$
+ if ((((View) targetEditPart.getModel()).getType() == "" + AssociationNodeEditPart.VISUAL_ID)) { //$NON-NLS-1$
return UnexecutableCommand.INSTANCE;
}
// the source or the target has to be different of a dependency branch
- if(sourceEditPart instanceof AssociationBranchEditPart) {
- GraphicalEditPart associationNodeEditPart = lookForAssociationNodeEditPart((AssociationBranchEditPart)sourceEditPart);
-
- if(associationNodeEditPart != null) {
+ if (sourceEditPart instanceof AssociationBranchEditPart) {
+ GraphicalEditPart associationNodeEditPart = lookForAssociationNodeEditPart((AssociationBranchEditPart) sourceEditPart);
+ if (associationNodeEditPart != null) {
createConnectionViewAndElementRequest.setSourceEditPart(associationNodeEditPart);
return getBranchAssociationCommand(createConnectionViewAndElementRequest, command);
-
} else {
return UnexecutableCommand.INSTANCE;
}
}
// the source or the target has to be different of a dependency branch
- if(targetEditPart instanceof AssociationBranchEditPart) {
+ if (targetEditPart instanceof AssociationBranchEditPart) {
return UnexecutableCommand.INSTANCE;
}
-
// if not this a transformation of simple dependency to multiDependency
return getAssociationToMultiAssociationCommand(createConnectionViewAndElementRequest, command);
}
@@ -529,13 +491,12 @@ public class MultiAssociationHelper extends ElementHelper { * @return may be null
*/
protected GraphicalEditPart lookForAssociationNodeEditPart(AssociationBranchEditPart associationBranchEditPart) {
- if(associationBranchEditPart.getSource() instanceof AssociationNodeEditPart) {
- return (GraphicalEditPart)associationBranchEditPart.getSource();
+ if (associationBranchEditPart.getSource() instanceof AssociationNodeEditPart) {
+ return (GraphicalEditPart) associationBranchEditPart.getSource();
}
- if(associationBranchEditPart.getTarget() instanceof AssociationNodeEditPart) {
- return (GraphicalEditPart)associationBranchEditPart.getTarget();
+ if (associationBranchEditPart.getTarget() instanceof AssociationNodeEditPart) {
+ return (GraphicalEditPart) associationBranchEditPart.getTarget();
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiDependencyHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiDependencyHelper.java index 79b3127e6ec..c7ed3da7357 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiDependencyHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/MultiDependencyHelper.java @@ -65,80 +65,81 @@ import org.eclipse.uml2.uml.UMLPackage; * links
*/
public class MultiDependencyHelper extends ElementHelper {
-
/**
* Instantiates a new multi dependency helper.
*
* @param editDomain
- * the edit domain
+ * the edit domain
*/
public MultiDependencyHelper(TransactionalEditingDomain editDomain) {
super();
this.editDomain = editDomain;
}
- private CompoundCommand constructDependencyEnd(CompoundCommand command, DependencyDiamondViewCreateCommand nodeCreation, Collection<NamedElement> dependencyEnd, Dependency dependency, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView, boolean constructSource) {
+ private CompoundCommand constructDependencyEnd(CompoundCommand command, DependencyDiamondViewCreateCommand nodeCreation, Collection<NamedElement> dependencyEnd, Dependency dependency, EditPartViewer viewer, PreferencesHint diagramPreferencesHint,
+ Point location, View containerView, boolean constructSource) {
// 2. for each element create a graphical representation of the type and
// finally the branch
Iterator<NamedElement> iteratorProp = dependencyEnd.iterator();
int index = 0;
- while(iteratorProp.hasNext()) {
+ while (iteratorProp.hasNext()) {
index += 1;
// source editPart
EditPart sourceEditPart = null;
// end of the association end
NamedElement currentEnd = iteratorProp.next();
-
// look for if an editpart exist for this element
- Collection<EditPart> editPartSet = viewer.getEditPartRegistry().values();
+ Collection<EditPart> editPartSet = new ArrayList<EditPart>();
+ Collection<?> values = viewer.getEditPartRegistry().values();
+ for (Object object : values) {
+ if (object instanceof EditPart)
+ {
+ editPartSet.add((EditPart) object);
+ }
+ }
Iterator<EditPart> editPartIterator = editPartSet.iterator();
-
- while(editPartIterator.hasNext() && sourceEditPart == null) {
-
+ while (editPartIterator.hasNext() && sourceEditPart == null) {
EditPart currentEditPart = editPartIterator.next();
-
- if((!(currentEditPart instanceof CompartmentEditPart)) && currentEditPart instanceof GraphicalEditPart && currentEnd.equals(((GraphicalEditPart)currentEditPart).resolveSemanticElement())) {
+ if ((!(currentEditPart instanceof CompartmentEditPart)) && currentEditPart instanceof GraphicalEditPart && currentEnd.equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
sourceEditPart = currentEditPart;
}
}
// descriptor for the branch
- ConnectionViewDescriptor viewBranchDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4018, ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), diagramPreferencesHint);
-
+ ConnectionViewDescriptor viewBranchDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4018, ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), diagramPreferencesHint);
// the editpart exist -> only creation of the branch
- if(sourceEditPart != null) {
-
+ if (sourceEditPart != null) {
CustomDeferredCreateConnectionViewCommand aBranchCommand = null;
- if(constructSource) {
- aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
+ if (constructSource) {
+ aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable) nodeCreation
+ .getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
} else {
- aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, sourceEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
-
+ aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null,
+ sourceEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewBranchDescriptor, null);
}
aBranchCommand.setElement(dependency);
(command).add(new ICommandProxy(aBranchCommand));
} else {// the editpart does not exist
-
// creation of the node
IAdaptable elementAdapter = new EObjectAdapter(currentEnd);
ViewDescriptor descriptor = new ViewDescriptor(elementAdapter, Node.class, null, ViewUtil.APPEND, true, diagramPreferencesHint);
-
// get the command and execute it.
CreateCommand nodeCreationCommand = new CreateCommand(getEditingDomain(), descriptor, containerView);
(command).add(new ICommandProxy(nodeCreationCommand));
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x + 200, location.y + index * 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x + 200, location.y + index * 100)); //$NON-NLS-1$
(command).add(new ICommandProxy(setBoundsCommand));
// Creation of the branch
CustomDeferredCreateConnectionViewCommand aBranchCommand = null;
- if(constructSource) {
- aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), viewer, diagramPreferencesHint, viewBranchDescriptor, null);
+ if (constructSource) {
+ aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(),
+ (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), viewer, diagramPreferencesHint, viewBranchDescriptor, null);
} else {
- aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), viewer, diagramPreferencesHint, viewBranchDescriptor, null);
+ aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(),
+ (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), viewer, diagramPreferencesHint, viewBranchDescriptor, null);
}
aBranchCommand.setElement(dependency);
(command).add(new ICommandProxy(aBranchCommand));
// creation of the link
}
-
}
return command;
}
@@ -146,8 +147,8 @@ public class MultiDependencyHelper extends ElementHelper { public Command dropMutliDependency(Dependency dependency, EditPartViewer viewer, PreferencesHint diagramPreferencesHint, Point location, View containerView) {
CompoundCommand command = new CompoundCommand();
// 0. Obtain list of property to display
- ArrayList<NamedElement> endToDisplaySource = new ArrayList(dependency.getClients());
- ArrayList<NamedElement> endToDisplayTarget = new ArrayList(dependency.getSuppliers());
+ ArrayList<NamedElement> endToDisplaySource = new ArrayList<NamedElement>(dependency.getClients());
+ ArrayList<NamedElement> endToDisplayTarget = new ArrayList<NamedElement>(dependency.getSuppliers());
// 1. creation of the diamond of the Dependency
DependencyDiamondViewCreateCommand nodeCreation = new DependencyDiamondViewCreateCommand(getEditingDomain(), containerView, viewer, diagramPreferencesHint, location, new SemanticAdapter(dependency, null));
command.add(new ICommandProxy(nodeCreation));
@@ -155,7 +156,6 @@ public class MultiDependencyHelper extends ElementHelper { // finally the branch
command = constructDependencyEnd(command, nodeCreation, endToDisplaySource, dependency, viewer, diagramPreferencesHint, location, containerView, true);
command = constructDependencyEnd(command, nodeCreation, endToDisplayTarget, dependency, viewer, diagramPreferencesHint, location, containerView, false);
-
return command;
}
@@ -163,45 +163,40 @@ public class MultiDependencyHelper extends ElementHelper { * Gets the branch dependency command.
*
* @param createConnectionViewAndElementRequest
- * the create connection view and element request
+ * the create connection view and element request
* @param command
- * the command
+ * the command
*
* @return the branch dependency command
*/
private Command getBranchDepencencyCommand(CreateConnectionViewAndElementRequest createConnectionViewAndElementRequest, Command command) {
EditPart sourceEditPart = createConnectionViewAndElementRequest.getSourceEditPart();
EditPart targetEditPart = createConnectionViewAndElementRequest.getTargetEditPart();
-
EObject newSemanticElement = null;
EStructuralFeature feature = null;
Dependency dependency = null;
- if(((View)sourceEditPart.getModel()).getElement() != null && ((View)sourceEditPart.getModel()).getElement() instanceof Dependency) {
- newSemanticElement = ((View)targetEditPart.getModel()).getElement();
- dependency = (Dependency)((View)sourceEditPart.getModel()).getElement();
+ if (((View) sourceEditPart.getModel()).getElement() != null && ((View) sourceEditPart.getModel()).getElement() instanceof Dependency) {
+ newSemanticElement = ((View) targetEditPart.getModel()).getElement();
+ dependency = (Dependency) ((View) sourceEditPart.getModel()).getElement();
feature = UMLPackage.eINSTANCE.getDependency_Supplier();
}
-
- if(((View)targetEditPart.getModel()).getElement() != null && ((View)targetEditPart.getModel()).getElement() instanceof Dependency) {
- newSemanticElement = ((View)sourceEditPart.getModel()).getElement();
- dependency = (Dependency)((View)targetEditPart.getModel()).getElement();
+ if (((View) targetEditPart.getModel()).getElement() != null && ((View) targetEditPart.getModel()).getElement() instanceof Dependency) {
+ newSemanticElement = ((View) sourceEditPart.getModel()).getElement();
+ dependency = (Dependency) ((View) targetEditPart.getModel()).getElement();
feature = UMLPackage.eINSTANCE.getDependency_Client();
}
-
// 0. add the branch graphically
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4018, ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint());
-
- CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4018, ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
+ CustomDeferredCreateConnectionViewCommand aBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()),
+ new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
aBranchCommand.setElement(dependency);
command = new CompoundCommand();
- ((CompoundCommand)command).add(new ICommandProxy(aBranchCommand));
-
+ ((CompoundCommand) command).add(new ICommandProxy(aBranchCommand));
// 1. add the supplier or client
-
// set the new client or the new supplier
SetRequest setRequest = new SetRequest(dependency, feature, newSemanticElement);
SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- ((CompoundCommand)command).add(new ICommandProxy(setValueCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(setValueCommand));
return command;
}
@@ -209,9 +204,9 @@ public class MultiDependencyHelper extends ElementHelper { * Gets the command.
*
* @param createConnectionViewAndElementRequest
- * the create connection view and element request
+ * the create connection view and element request
* @param command
- * the command
+ * the command
*
* @return the command
*/
@@ -220,33 +215,27 @@ public class MultiDependencyHelper extends ElementHelper { command = new CompoundCommand();
EditPart sourceEditPart = createConnectionViewAndElementRequest.getSourceEditPart();
EditPart targetEditPart = createConnectionViewAndElementRequest.getTargetEditPart();
-
// if the the source or the target is a node dependency the purpose is
// to create only one branch
- if((sourceEditPart instanceof DependencyNodeEditPart) || (targetEditPart instanceof DependencyNodeEditPart)) {
+ if ((sourceEditPart instanceof DependencyNodeEditPart) || (targetEditPart instanceof DependencyNodeEditPart)) {
return getBranchDepencencyCommand(createConnectionViewAndElementRequest, command);
}
-
// the source or the target has to be different of a dependency branch
- if(sourceEditPart instanceof DependencyBranchEditPart) {
- GraphicalEditPart dependencyNodeEditPart = lookForDependencyNodeEditPart((DependencyBranchEditPart)sourceEditPart);
-
- if(dependencyNodeEditPart != null) {
+ if (sourceEditPart instanceof DependencyBranchEditPart) {
+ GraphicalEditPart dependencyNodeEditPart = lookForDependencyNodeEditPart((DependencyBranchEditPart) sourceEditPart);
+ if (dependencyNodeEditPart != null) {
createConnectionViewAndElementRequest.setSourceEditPart(dependencyNodeEditPart);
return getBranchDepencencyCommand(createConnectionViewAndElementRequest, command);
-
} else {
return UnexecutableCommand.INSTANCE;
}
}
// the source or the target has to be different of a dependency branch
- if(targetEditPart instanceof DependencyBranchEditPart) {
- GraphicalEditPart dependencyNodeEditPart = lookForDependencyNodeEditPart((DependencyBranchEditPart)targetEditPart);
-
- if(dependencyNodeEditPart != null) {
+ if (targetEditPart instanceof DependencyBranchEditPart) {
+ GraphicalEditPart dependencyNodeEditPart = lookForDependencyNodeEditPart((DependencyBranchEditPart) targetEditPart);
+ if (dependencyNodeEditPart != null) {
createConnectionViewAndElementRequest.setTargetEditPart(dependencyNodeEditPart);
return getBranchDepencencyCommand(createConnectionViewAndElementRequest, command);
-
} else {
return UnexecutableCommand.INSTANCE;
}
@@ -259,14 +248,13 @@ public class MultiDependencyHelper extends ElementHelper { * this method is used to create a branch of a dependency.
*
* @param createConnectionViewAndElementRequest
- * the create connection view and element request
+ * the create connection view and element request
* @param command
- * the command that is used to create the link branch of a dependency
+ * the command that is used to create the link branch of a dependency
*
* @return the set of command to create a branch of a dependency
*/
private Command getDependencyToMultiDependencyCommand(CreateConnectionViewAndElementRequest createConnectionViewAndElementRequest, Command command) {
-
// 0. creation of variables
command = new CompoundCommand();
Point sourceLocation = null;
@@ -280,49 +268,43 @@ public class MultiDependencyHelper extends ElementHelper { View dependencyView = null;
Dependency dependency = null;
View parentView = null;
-
// ---------------------------------------------------------
// help to debug
// System.err.println("+ 0. creation of variables");
// System.err.println("+-> sourceEditpart:" + sourceEditPart);
// System.err.println("+-> targetEditPart:" + targetEditPart);
// ---------------------------------------------------------
-
// 1. initialization
- ICommandProxy startcommand = ((ICommandProxy)createConnectionViewAndElementRequest.getStartCommand());
- Iterator<?> ite = ((CompositeCommand)startcommand.getICommand()).iterator();
-
- while(ite.hasNext()) {
- ICommand currentCommand = (ICommand)ite.next();
- if(currentCommand instanceof SetConnectionBendpointsCommand) {
- sourceLocation = ((SetConnectionBendpointsCommand)currentCommand).getSourceRefPoint();
- targetLocation = ((SetConnectionBendpointsCommand)currentCommand).getTargetRefPoint();
+ ICommandProxy startcommand = ((ICommandProxy) createConnectionViewAndElementRequest.getStartCommand());
+ Iterator<?> ite = ((CompositeCommand) startcommand.getICommand()).iterator();
+ while (ite.hasNext()) {
+ ICommand currentCommand = (ICommand) ite.next();
+ if (currentCommand instanceof SetConnectionBendpointsCommand) {
+ sourceLocation = ((SetConnectionBendpointsCommand) currentCommand).getSourceRefPoint();
+ targetLocation = ((SetConnectionBendpointsCommand) currentCommand).getTargetRefPoint();
}
}
-
- if(targetEditPart != null) {
+ if (targetEditPart != null) {
// the source or the target must be a dependency
// look for the redit part that represnet the editpart
- if(((View)sourceEditPart.getModel()).getElement() != null && ((View)sourceEditPart.getModel()).getElement() instanceof Dependency) {
- dependencyView = ((View)sourceEditPart.getModel());
- dependency = (Dependency)((View)sourceEditPart.getModel()).getElement();
+ if (((View) sourceEditPart.getModel()).getElement() != null && ((View) sourceEditPart.getModel()).getElement() instanceof Dependency) {
+ dependencyView = ((View) sourceEditPart.getModel());
+ dependency = (Dependency) ((View) sourceEditPart.getModel()).getElement();
nodeLocation = sourceLocation;
- newSemanticElement = (NamedElement)((View)targetEditPart.getModel()).getElement();
+ newSemanticElement = (NamedElement) ((View) targetEditPart.getModel()).getElement();
feature = UMLPackage.eINSTANCE.getDependency_Supplier();
}
-
- if(((View)targetEditPart.getModel()).getElement() != null && ((View)targetEditPart.getModel()).getElement() instanceof Dependency) {
- dependencyView = ((View)targetEditPart.getModel());
- dependency = (Dependency)((View)targetEditPart.getModel()).getElement();
+ if (((View) targetEditPart.getModel()).getElement() != null && ((View) targetEditPart.getModel()).getElement() instanceof Dependency) {
+ dependencyView = ((View) targetEditPart.getModel());
+ dependency = (Dependency) ((View) targetEditPart.getModel()).getElement();
nodeLocation = targetLocation;
- newSemanticElement = (NamedElement)((View)sourceEditPart.getModel()).getElement();
+ newSemanticElement = (NamedElement) ((View) sourceEditPart.getModel()).getElement();
feature = UMLPackage.eINSTANCE.getDependency_Client();
}
-
- if(dependencyView == null) {
+ if (dependencyView == null) {
return null;
}
- parentView = (View)dependencyView.eContainer();
+ parentView = (View) dependencyView.eContainer();
// ---------------------------------------------------------
// help to debug
// System.err.println("+ 1. initialization");
@@ -335,60 +317,55 @@ public class MultiDependencyHelper extends ElementHelper { // System.err.println("+-> feature:" + feature);
// System.err.println("+-> parentView:" + parentView);
// ---------------------------------------------------------
-
// 2. Remove the view of the dependency
- View dependencyViewSource = ((Edge)dependencyView).getSource();
- View dependencyViewTarget = ((Edge)dependencyView).getTarget();
- ((CompoundCommand)command).add(new ICommandProxy(new DeleteLinkDuringCreationCommand(getEditingDomain(), (Edge)dependencyView, sourceEditPart.getViewer())));
- // ((CompoundCommand)command).add(new ICommandProxy(new DeleteCommand(getEditingDomain(), dependencyView)));
-
+ View dependencyViewSource = ((Edge) dependencyView).getSource();
+ View dependencyViewTarget = ((Edge) dependencyView).getTarget();
+ ((CompoundCommand) command).add(new ICommandProxy(new DeleteLinkDuringCreationCommand(getEditingDomain(), (Edge) dependencyView, sourceEditPart.getViewer())));
+ // ((CompoundCommand)command).add(new ICommandProxy(new DeleteCommand(getEditingDomain(), dependencyView)));
// ---------------------------------------------------------
// help to debug
// System.err.println("+ 2. Remove the view of the dependency");
// System.err.println("+-> command:" + command.canExecute());
// ---------------------------------------------------------
-
// 3. Node creation at this position
- DependencyDiamondViewCreateCommand nodeCreation = new DependencyDiamondViewCreateCommand(getEditingDomain(), parentView, sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), nodeLocation, new SemanticAdapter(dependency, null));
- ((CompoundCommand)command).add(new ICommandProxy(nodeCreation));
-
+ DependencyDiamondViewCreateCommand nodeCreation = new DependencyDiamondViewCreateCommand(getEditingDomain(), parentView, sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), nodeLocation,
+ new SemanticAdapter(dependency, null));
+ ((CompoundCommand) command).add(new ICommandProxy(nodeCreation));
// ---------------------------------------------------------
// help to debug
// System.err.println("+ 3. Node creation at this position");
// System.err.println("+-> nodeCreation:" + nodeCreation.canExecute());
// ---------------------------------------------------------
-
// 4. reconstruction of the old link by taking in account the old
// connection
- ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4018, ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint());
-
+ ConnectionViewDescriptor viewDescriptor = new ConnectionViewDescriptor(UMLElementTypes.Dependency_4018, ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint());
// 5. reconstruction of the first branch between old source to node
- ICommand firstBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, dependencyViewSource), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
- ((CustomDeferredCreateConnectionViewCommand)firstBranchCommand).setElement(dependency);
- ((CompoundCommand)command).add(new ICommandProxy(firstBranchCommand));
-
+ ICommand firstBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, dependencyViewSource), (IAdaptable) nodeCreation
+ .getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ ((CustomDeferredCreateConnectionViewCommand) firstBranchCommand).setElement(dependency);
+ ((CompoundCommand) command).add(new ICommandProxy(firstBranchCommand));
// 6. reconstruction of the second branch between node to old target
- ICommand secondBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, dependencyViewTarget), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
- ((CustomDeferredCreateConnectionViewCommand)secondBranchCommand).setElement(dependency);
- ((CompoundCommand)command).add(new ICommandProxy(secondBranchCommand));
-
+ ICommand secondBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(
+ null, dependencyViewTarget), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ ((CustomDeferredCreateConnectionViewCommand) secondBranchCommand).setElement(dependency);
+ ((CompoundCommand) command).add(new ICommandProxy(secondBranchCommand));
// 7. Create of the third branch between node and target our source.
ICommand thirdBranchCommand = null;
-
- if(dependencyView.equals((sourceEditPart.getModel()))) {
+ if (dependencyView.equals((sourceEditPart.getModel()))) {
// third branch node and target
- thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null, targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), (IAdaptable) nodeCreation.getCommandResult().getReturnValue(), new SemanticAdapter(null,
+ targetEditPart.getModel()), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
} else {
// // third branch source and node
- thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable)nodeCreation.getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart)sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
+ thirdBranchCommand = new CustomDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) UMLElementTypes.Dependency_4018).getSemanticHint(), new SemanticAdapter(null, sourceEditPart.getModel()), (IAdaptable) nodeCreation
+ .getCommandResult().getReturnValue(), sourceEditPart.getViewer(), ((IGraphicalEditPart) sourceEditPart).getDiagramPreferencesHint(), viewDescriptor, null);
}
- ((CustomDeferredCreateConnectionViewCommand)thirdBranchCommand).setElement(dependency);
- ((CompoundCommand)command).add(new ICommandProxy(thirdBranchCommand));
-
+ ((CustomDeferredCreateConnectionViewCommand) thirdBranchCommand).setElement(dependency);
+ ((CompoundCommand) command).add(new ICommandProxy(thirdBranchCommand));
// 8. set thenew client or the new supplier
SetRequest setRequest = new SetRequest(dependency, feature, newSemanticElement);
SetValueCommand setValueCommand = new SetValueCommand(setRequest);
- ((CompoundCommand)command).add(new ICommandProxy(setValueCommand));
+ ((CompoundCommand) command).add(new ICommandProxy(setValueCommand));
return command;
}
return null;
@@ -401,13 +378,12 @@ public class MultiDependencyHelper extends ElementHelper { * @return may be null
*/
protected GraphicalEditPart lookForDependencyNodeEditPart(DependencyBranchEditPart dependencyBranchEditPart) {
- if(dependencyBranchEditPart.getSource() instanceof DependencyNodeEditPart) {
- return (GraphicalEditPart)dependencyBranchEditPart.getSource();
+ if (dependencyBranchEditPart.getSource() instanceof DependencyNodeEditPart) {
+ return (GraphicalEditPart) dependencyBranchEditPart.getSource();
}
- if(dependencyBranchEditPart.getTarget() instanceof DependencyNodeEditPart) {
- return (GraphicalEditPart)dependencyBranchEditPart.getTarget();
+ if (dependencyBranchEditPart.getTarget() instanceof DependencyNodeEditPart) {
+ return (GraphicalEditPart) dependencyBranchEditPart.getTarget();
}
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java index ca1a2132fee..70cb0f4580b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileDiagramAssociationHelper.java @@ -22,10 +22,10 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.notation.Diagram;
-import org.eclipse.papyrus.uml.diagram.common.helper.NamedElementHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.commands.PropertyCommandForAssociation;
import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Property;
@@ -38,7 +38,6 @@ import org.eclipse.uml2.uml.UMLPackage; * this is an helper that is specific for the class diagram
*/
public class ProfileDiagramAssociationHelper {
-
/**
* Returns the created Association corresponding to these parameters
*
@@ -56,7 +55,6 @@ public class ProfileDiagramAssociationHelper { * The created Association corresponding to these parameters
*/
public static EObject createAssociation(TransactionalEditingDomain domain, Type source, Type target, Package container, Diagram diagram) {
-
Association association = UMLFactory.eINSTANCE.createAssociation();
String targetString = target.getName().substring(0, 1).toLowerCase() + target.getName().substring(1, target.getName().length());
String sourceString = source.getName().substring(0, 1).toLowerCase() + source.getName().substring(1, source.getName().length());
@@ -71,18 +69,16 @@ public class ProfileDiagramAssociationHelper { }
assert (c.getCommandResult() == null);
assert (c.getCommandResult().getReturnValue() == null);
- Property targetProperty = (Property)c.getCommandResult().getReturnValue();
+ Property targetProperty = (Property) c.getCommandResult().getReturnValue();
targetProperty.setType(target);
targetProperty.setName(targetString);
targetProperty.setLower(1);
targetProperty.setUpper(1);
-
- //put the property in the class
- if(source instanceof StructuredClassifier) {
- ((StructuredClassifier)source).getOwnedAttributes().add(targetProperty);
+ // put the property in the class
+ if (source instanceof StructuredClassifier) {
+ ((StructuredClassifier) source).getOwnedAttributes().add(targetProperty);
}
// create source property
-
request = new CreateElementRequest(domain, association, UMLElementTypes.Property_3002, UMLPackage.eINSTANCE.getAssociation_OwnedEnd());
c = new PropertyCommandForAssociation(request, diagram);
try {
@@ -93,27 +89,25 @@ public class ProfileDiagramAssociationHelper { }
assert (c.getCommandResult() == null);
assert (c.getCommandResult().getReturnValue() == null);
- Property sourceProperty = (Property)c.getCommandResult().getReturnValue();
+ Property sourceProperty = (Property) c.getCommandResult().getReturnValue();
sourceProperty.setType(source);
sourceProperty.setName(sourceString);
sourceProperty.setLower(1);
sourceProperty.setUpper(1);
List<Property> memberEnds = association.getMemberEnds();
-
- if((memberEnds.indexOf((sourceProperty)) >= 0)) {
+ if ((memberEnds.indexOf((sourceProperty)) >= 0)) {
association.getMemberEnds().move(0, (sourceProperty));
} else {
association.getMemberEnds().add(0, (sourceProperty));
}
- if((memberEnds.indexOf((targetProperty)) >= 0)) {
+ if ((memberEnds.indexOf((targetProperty)) >= 0)) {
association.getMemberEnds().move(1, (targetProperty));
} else {
association.getMemberEnds().add(1, (targetProperty));
}
-
container.getPackagedElements().add(association);
ElementInitializers.getInstance().init_Association_4001(association);
- String associationName = NamedElementHelper.EINSTANCE.getNewUMLElementName(container, sourceString + "_" + targetString + "_"); //$NON-NLS-1$ //$NON-NLS-2$
+ String associationName = NamedElementUtil.getDefaultNameWithIncrementFromBase(sourceString + "_" + targetString + "_", container.eContents());//$NON-NLS-1$ //$NON-NLS-2$
association.setName(associationName);
return association;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileLinkMappingHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileLinkMappingHelper.java index 8fdb6b9bc78..5a6d5e6c56b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileLinkMappingHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/helper/ProfileLinkMappingHelper.java @@ -17,6 +17,7 @@ package org.eclipse.papyrus.uml.diagram.profile.custom.helper; import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.Iterator;
import org.eclipse.papyrus.uml.diagram.common.helper.ILinkMappingHelper;
@@ -32,12 +33,10 @@ import org.eclipse.uml2.uml.Type; * The Class LinkMappingHelper is specialization of the link mapping helper for the Class diagram
*/
public class ProfileLinkMappingHelper implements ILinkMappingHelper {
-
/**
* SingletonHolder is loaded at the first execution of getInstance() method
*/
private static class SingletonHolder {
-
private final static ProfileLinkMappingHelper instance = new ProfileLinkMappingHelper();
}
@@ -62,7 +61,6 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { */
public Collection<?> getSource(Element link) {
return LinkMappingHelper.getSource(link, new CommonSourceUMLSwitch() {
-
@Override
public java.util.Collection<?> caseAssociationClass(org.eclipse.uml2.uml.AssociationClass object) {
return object.getEndTypes();
@@ -70,9 +68,7 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { @Override
public java.util.Collection<?> caseElementImport(org.eclipse.uml2.uml.ElementImport object) {
- ArrayList result = new ArrayList();
- result.add(object.getImportingNamespace());
- return result;
+ return Collections.singleton(object.getImportingNamespace());
};
@Override
@@ -82,41 +78,31 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { @Override
public java.util.Collection<?> caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
- ArrayList result = new ArrayList();
- result.add(object.getImplementingClassifier());
- return result;
-
+ return Collections.singleton(object.getImplementingClassifier());
};
@Override
public java.util.Collection<?> caseProfileApplication(org.eclipse.uml2.uml.ProfileApplication object) {
- ArrayList result = new ArrayList();
- result.add(object.getApplyingPackage());
- return result;
+ return Collections.singleton(object.getApplyingPackage());
};
@Override
public java.util.Collection<?> caseTemplateBinding(org.eclipse.uml2.uml.TemplateBinding object) {
- ArrayList result = new ArrayList();
- result.add(object.getBoundElement());
- return result;
+ return Collections.singleton(object.getBoundElement());
};
@Override
public java.util.Collection<?> caseExtension(org.eclipse.uml2.uml.Extension object) {
ArrayList<Type> result = new ArrayList<Type>();
- //it's possible don't have ownedEnd...
- if(object.getOwnedEnds().size() != 0) {
+ // it's possible don't have ownedEnd...
+ if (object.getOwnedEnds().size() != 0) {
Iterator<Property> iterator = object.getOwnedEnds().iterator();
- while(iterator.hasNext()) {
+ while (iterator.hasNext()) {
result.add(iterator.next().getType());
}
-
-
}
return result;
};
-
});
}
@@ -125,13 +111,12 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { */
public Collection<?> getTarget(Element link) {
return LinkMappingHelper.getTarget(link, new CommonTargetUMLSwitch() {
-
@Override
public java.util.Collection<?> caseExtension(org.eclipse.uml2.uml.Extension object) {
- ArrayList result = new ArrayList();
- if(object.getMemberEnds().size() != 0) {
- for(int i = 0; i < object.getMemberEnds().size(); i++) {
- if(!(object.getMemberEnds().get(i) instanceof ExtensionEnd)) {
+ ArrayList<Type> result = new ArrayList<Type>();
+ if (object.getMemberEnds().size() != 0) {
+ for (int i = 0; i < object.getMemberEnds().size(); i++) {
+ if (!(object.getMemberEnds().get(i) instanceof ExtensionEnd)) {
result.add((object.getMemberEnds().get(i)).getType());
}
}
@@ -139,7 +124,6 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { return result;
};
-
@Override
public java.util.Collection<?> caseAssociationClass(org.eclipse.uml2.uml.AssociationClass object) {
return object.getEndTypes();
@@ -147,9 +131,7 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { @Override
public java.util.Collection<?> caseElementImport(org.eclipse.uml2.uml.ElementImport object) {
- ArrayList result = new ArrayList();
- result.add(object.getImportedElement());
- return result;
+ return Collections.singleton(object.getImportedElement());
};
@Override
@@ -159,23 +141,18 @@ public class ProfileLinkMappingHelper implements ILinkMappingHelper { @Override
public java.util.Collection<?> caseInterfaceRealization(org.eclipse.uml2.uml.InterfaceRealization object) {
- ArrayList result = new ArrayList();
- result.add(object.getContract());
- return result;
+ return Collections.singleton(object.getContract());
};
@Override
public java.util.Collection<?> caseProfileApplication(org.eclipse.uml2.uml.ProfileApplication object) {
- ArrayList result = new ArrayList();
- result.add(object.getAppliedProfile());
- return result;
+ return Collections.singleton(object.getAppliedProfile());
};
@Override
public java.util.Collection<?> caseTemplateBinding(org.eclipse.uml2.uml.TemplateBinding object) {
return object.getTargets();
};
-
});
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomCreationRoleEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomCreationRoleEditPolicy.java index d5c7356a929..fd9be3bb6e1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomCreationRoleEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomCreationRoleEditPolicy.java @@ -11,7 +11,6 @@ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
-
package org.eclipse.papyrus.uml.diagram.profile.custom.policies;
import java.util.ArrayList;
@@ -19,7 +18,6 @@ import java.util.Iterator; import java.util.List;
import org.eclipse.draw2d.geometry.Point;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.transaction.util.TransactionUtil;
@@ -35,6 +33,7 @@ import org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand; import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
import org.eclipse.gmf.runtime.diagram.core.util.ViewUtil;
import org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand;
import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editparts.GroupEditPart;
@@ -42,6 +41,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; import org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart;
import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
@@ -50,7 +50,6 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomMetaClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomSemanticCreateCommand;
-import org.eclipse.papyrus.uml.diagram.profile.custom.helper.MetaclassHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.requests.CustomCreateElementRequestAdapter;
import org.eclipse.papyrus.uml.diagram.profile.custom.requests.CustomCreateViewAndElementRequest;
import org.eclipse.papyrus.uml.diagram.profile.custom.requests.CustomCreateViewAndElementRequest.ViewAndElementDescriptor;
@@ -60,8 +59,6 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassEditPartCN; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartTN;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.ElementImport;
import org.eclipse.uml2.uml.Profile;
/**
@@ -72,26 +69,17 @@ import org.eclipse.uml2.uml.Profile; *
*
*/
-
-
public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy {
-
/**
* the IDs of the metaclasses
*/
private int[] metaclassesEP_ID = { MetaclassEditPart.VISUAL_ID, MetaclassEditPartCN.VISUAL_ID };
-
/**
* list the metaclasses EditPart
*/
private ArrayList<String> metaclassesEP_ID_List = new ArrayList<String>();
/**
- * the requestAdapterList
- */
- private ArrayList<CreateElementRequestAdapter> requestAdapterList;
-
- /**
*
* Constructor.
*
@@ -99,7 +87,6 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra public CustomCreationRoleEditPolicy() {
super();
init(this.metaclassesEP_ID);
- this.requestAdapterList = new ArrayList<CreateElementRequestAdapter>();
}
/**
@@ -107,7 +94,7 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra * @param metaclassesID
*/
private void init(int[] metaclassesID) {
- for(int i = 0; i < metaclassesID.length; i++) {
+ for (int i = 0; i < metaclassesID.length; i++) {
this.metaclassesEP_ID_List.add(new String(new Integer(metaclassesID[i]).toString()));
}
}
@@ -123,80 +110,65 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra */
@Override
protected Command getCreateElementAndViewCommand(CreateViewAndElementRequest request) {
- //we test if it's a command to create a metaclass
- if(!(this.metaclassesEP_ID_List.contains((request).getViewDescriptors().get(0).getSemanticHint()))) {
+ // we test if it's a command to create a metaclass
+ if (!(this.metaclassesEP_ID_List.contains((request).getViewDescriptors().get(0).getSemanticHint()))) {
return super.getCreateElementAndViewCommand(request);
}
-
// get the element descriptor
CreateElementRequestAdapter requestAdapter = request.getViewAndElementDescriptor().getCreateElementRequestAdapter();
-
/**
* We create our own request!
*/
- CustomCreateElementRequestAdapter customRequestAdapter = new CustomCreateElementRequestAdapter((CreateElementRequest)requestAdapter.getAdapter(CreateElementRequest.class));
- CustomCreateViewAndElementRequest.ViewAndElementDescriptor viewDescriptor = new ViewAndElementDescriptor(customRequestAdapter, request.getViewDescriptors().get(0).getViewKind(), request.getViewDescriptors().get(0).getSemanticHint(), request.getViewDescriptors().get(0).getPreferencesHint());
+ CustomCreateElementRequestAdapter customRequestAdapter = new CustomCreateElementRequestAdapter((CreateElementRequest) requestAdapter.getAdapter(CreateElementRequest.class));
+ CustomCreateViewAndElementRequest.ViewAndElementDescriptor viewDescriptor = new ViewAndElementDescriptor(customRequestAdapter, request.getViewDescriptors().get(0).getViewKind(), request.getViewDescriptors().get(0).getSemanticHint(), request
+ .getViewDescriptors().get(0).getPreferencesHint());
CustomCreateViewAndElementRequest requestNEW = new CustomCreateViewAndElementRequest(viewDescriptor);
requestNEW.setExtendedData(request.getExtendedData());
requestNEW.setLocation(request.getLocation());
-
-
// get the semantic request
- CreateElementRequest createElementRequest = (CreateElementRequest)customRequestAdapter.getAdapter(CreateElementRequest.class, 0);
-
- //createElementRequest = customCreateElementRequest;
- if(createElementRequest.getContainer() == null) {
+ CreateElementRequest createElementRequest = (CreateElementRequest) customRequestAdapter.getAdapter(CreateElementRequest.class, 0);
+ // createElementRequest = customCreateElementRequest;
+ if (createElementRequest.getContainer() == null) {
// complete the semantic request by filling in the host's semantic
// element as the context
- View view = (View)getHost().getModel();
+ View view = (View) getHost().getModel();
EObject hostElement = ViewUtil.resolveSemanticElement(view);
-
- if(hostElement == null && view.getElement() == null) {
+ if (hostElement == null && view.getElement() == null) {
hostElement = view;
}
-
// Returns null if host is unresolvable so that trying to create a
// new element in an unresolved shape will not be allowed.
- if(hostElement == null) {
+ if (hostElement == null) {
return null;
}
createElementRequest.setContainer(hostElement);
}
-
// get the create element command based on the elementdescriptor's
// request
- //Command createElementCommand = getHost().getCommand(new EditCommandRequestWrapper((CreateElementRequest)requestAdapter.getAdapter(CreateElementRequest.class), request.getExtendedData()));
- Command createElementCommand = getHost().getCommand(new EditCommandRequestWrapper((CreateElementRequest)customRequestAdapter.getAdapter(CreateElementRequest.class, 0), request.getExtendedData()));
-
- if(createElementCommand == null) {
+ // Command createElementCommand = getHost().getCommand(new EditCommandRequestWrapper((CreateElementRequest)requestAdapter.getAdapter(CreateElementRequest.class), request.getExtendedData()));
+ Command createElementCommand = getHost().getCommand(new EditCommandRequestWrapper((CreateElementRequest) customRequestAdapter.getAdapter(CreateElementRequest.class, 0), request.getExtendedData()));
+ if (createElementCommand == null) {
return UnexecutableCommand.INSTANCE;
}
- if(!createElementCommand.canExecute()) {
+ if (!createElementCommand.canExecute()) {
return createElementCommand;
}
// create the semantic create wrapper command
- Profile profile = (Profile)createElementRequest.getContainer();
-
+ Profile profile = (Profile) createElementRequest.getContainer();
/**
* We use our custom command
*/
TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(profile);
- CustomSemanticCreateCommand semanticCommand = new CustomSemanticCreateCommand(domain, customRequestAdapter, profile);
-
+ CustomSemanticCreateCommand semanticCommand = new CustomSemanticCreateCommand(domain, customRequestAdapter, profile);
Command viewCommand = getCreateCommand(requestNEW);
- //Command refreshConnectionCommand = getHost().getCommand(new RefreshConnectionsRequest(((List)request.getNewObject())));
-
-
+ // Command refreshConnectionCommand = getHost().getCommand(new RefreshConnectionsRequest(((List)request.getNewObject())));
// form the compound command and return
CompositeCommand cc = new CompositeCommand(semanticCommand.getLabel());
cc.compose(semanticCommand);
cc.compose(new CommandProxy(viewCommand));
-
-
- // if(refreshConnectionCommand != null) {
- // cc.compose(new CommandProxy(refreshConnectionCommand));
- // }
-
+ // if(refreshConnectionCommand != null) {
+ // cc.compose(new CommandProxy(refreshConnectionCommand));
+ // }
return new ICommandProxy(cc);
}
@@ -210,18 +182,16 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra */
@Override
public Command getCommand(Request request) {
- if(understandsRequest(request)) {
- if(request instanceof CreateViewAndElementRequest) {
- if(this.metaclassesEP_ID_List.contains(((CreateViewAndElementRequest)request).getViewDescriptors().get(0).getSemanticHint())) {
-
- //get the correct location for the new metaclass
- Point location = ((CreateViewAndElementRequest)request).getLocation().getCopy();
- ((GraphicalEditPart)getHost()).getContentPane().translateToRelative(location);
- ((GraphicalEditPart)getHost()).getContentPane().translateFromParent(location);
- location.translate(((GraphicalEditPart)getHost()).getContentPane().getClientArea().getLocation().getNegated());
- ((CreateViewAndElementRequest)request).setLocation(location);
-
- return getCreateElementAndViewCommand((CreateViewAndElementRequest)request);
+ if (understandsRequest(request)) {
+ if (request instanceof CreateViewAndElementRequest) {
+ if (this.metaclassesEP_ID_List.contains(((CreateViewAndElementRequest) request).getViewDescriptors().get(0).getSemanticHint())) {
+ // get the correct location for the new metaclass
+ Point location = ((CreateViewAndElementRequest) request).getLocation().getCopy();
+ ((GraphicalEditPart) getHost()).getContentPane().translateToRelative(location);
+ ((GraphicalEditPart) getHost()).getContentPane().translateFromParent(location);
+ location.translate(((GraphicalEditPart) getHost()).getContentPane().getClientArea().getLocation().getNegated());
+ ((CreateViewAndElementRequest) request).setLocation(location);
+ return getCreateElementAndViewCommand((CreateViewAndElementRequest) request);
}
}
return super.getCommand(request);
@@ -241,26 +211,21 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra * </OL>
*
* @param request
- * a create request (understands instances of {@link CreateViewRequest}).
+ * a create request (understands instances of {@link CreateViewRequest}).
* @param metaclasses
* @return a command to satisfy the request; <tt>null</tt> if the request
* is not understood.
*/
-
-
-
private Command getCreateCommand(CustomCreateViewAndElementRequest request) {
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
+ TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
CompositeTransactionalCommand cc = new CompositeTransactionalCommand(editingDomain, DiagramUIMessages.AddCommand_Label);
-
- Iterator descriptors = request.getViewDescriptors().iterator();
- while(descriptors.hasNext()) {
- CustomCreateViewRequest.ViewDescriptor descriptorNEW = (CustomCreateViewRequest.ViewDescriptor)descriptors.next();
- CustomMetaClassCreateCommand createCommand = new CustomMetaClassCreateCommand(editingDomain, descriptorNEW, (View)(getHost().getModel()), request.getLocation());
+ Iterator<?> descriptors = request.getViewDescriptors().iterator();
+ while (descriptors.hasNext()) {
+ CustomCreateViewRequest.ViewDescriptor descriptorNEW = (CustomCreateViewRequest.ViewDescriptor) descriptors.next();
+ CustomMetaClassCreateCommand createCommand = new CustomMetaClassCreateCommand(editingDomain, descriptorNEW, (View) (getHost().getModel()), request.getLocation());
cc.compose(createCommand);
}
return new ICommandProxy(cc.reduce());
-
}
/** Return a command to reparent both the semantic and view elements. */
@@ -268,34 +233,32 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra * return a command to reparent both the semantic and view elements.
*
* @param request
- * the request
+ * the request
* @return command
*/
@Override
protected Command getReparentCommand(ChangeBoundsRequest request) {
-
- Iterator editParts = request.getEditParts().iterator();
- View container = (View)getHost().getAdapter(View.class);
+ Iterator<?> editParts = request.getEditParts().iterator();
+ View container = (View) getHost().getAdapter(View.class);
EObject context = container == null ? null : ViewUtil.resolveSemanticElement(container);
CompositeCommand cc = new CompositeCommand(DiagramUIMessages.AddCommand_Label);
- while(editParts.hasNext()) {
- EditPart ep = (EditPart)editParts.next();
- if(ep instanceof LabelEditPart) {
+ while (editParts.hasNext()) {
+ EditPart ep = (EditPart) editParts.next();
+ if (ep instanceof LabelEditPart) {
continue;
}
- if(ep instanceof GroupEditPart) {
- cc.compose(getReparentGroupCommand((GroupEditPart)ep));
+ if (ep instanceof GroupEditPart) {
+ cc.compose(getReparentGroupCommand((GroupEditPart) ep));
}
- View view = (View)ep.getAdapter(View.class);
- if(view == null) {
+ View view = (View) ep.getAdapter(View.class);
+ if (view == null) {
continue;
}
-
EObject semantic = ViewUtil.resolveSemanticElement(view);
- if(semantic == null) {
- cc.compose(getReparentViewCommand((IGraphicalEditPart)ep));
- } else if(context != null && shouldReparent(semantic, context)) {
- cc.compose(getReparentCommand((IGraphicalEditPart)ep));
+ if (semantic == null) {
+ cc.compose(getReparentViewCommand((IGraphicalEditPart) ep));
+ } else if (context != null && shouldReparent(semantic, context)) {
+ cc.compose(getReparentCommand((IGraphicalEditPart) ep));
}
}
return cc.isEmpty() ? null : new ICommandProxy(cc.reduce());
@@ -306,50 +269,18 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra * elements.
*
* @param gep
- * the editpart being reparented
+ * the editpart being reparented
* @return A CompositeCommand2 that will reparent both the semantic and notation elements.
*/
@Override
protected ICommand getReparentCommand(IGraphicalEditPart gep) {
- if(!(gep instanceof MetaclassEditPart) && !(gep instanceof MetaclassEditPartCN)) {
+ if (!(gep instanceof MetaclassEditPart) && !(gep instanceof MetaclassEditPartCN)) {
return super.getReparentCommand(gep);
}
- if(!(getHost() instanceof ProfilePackageableElementCompartmentEditPartTN) && !(getHost() instanceof ProfilePackageableElementCompartmentEditPartCN) && !(getHost() instanceof ProfileDiagramEditPart)) {
+ if (!(getHost() instanceof ProfilePackageableElementCompartmentEditPartTN) && !(getHost() instanceof ProfilePackageableElementCompartmentEditPartCN) && !(getHost() instanceof ProfileDiagramEditPart)) {
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
}
-
CompositeCommand cc = new CompositeCommand(DiagramUIMessages.AddCommand_Label);
- View container = (View)getHost().getModel();
- EObject context = ViewUtil.resolveSemanticElement(container);
- View view = (View)gep.getModel();
- EObject element = ViewUtil.resolveSemanticElement(view);
- TransactionalEditingDomain editingDomain = ((IGraphicalEditPart)getHost()).getEditingDomain();
-
- String qName = null;
- EditPart parent = gep.getParent();
- EditPart profileEP = null;
- // Profile parentProfile = null;
- //TODO : faire une fonction!
- //ce code est déjà utilisé dans CustomMetaclassItemSemanticEditPolicy (et pê aussi ailleurs encore)
- /**
- * Obtain the parent profile
- */
- Profile parentProfile = MetaclassHelper.getParentProfile(gep.getParent());
-
- EObject elementToMove = gep.getPrimaryView().getElement();
- if(elementToMove instanceof Class) {
- qName = ((Class)elementToMove).getQualifiedName();
- }
-
- EList<ElementImport> elements = parentProfile.getElementImports();
- for(ElementImport elementImport : elements) {
- if(elementImport.getImportedElement().getQualifiedName().equals(qName)) {
- element = elementImport;
- break;
- }
- }
-
-
cc.compose(getReparentViewCommand(gep));
return cc;
}
@@ -358,48 +289,41 @@ public class CustomCreationRoleEditPolicy extends org.eclipse.gmf.runtime.diagra * Return the command to reparent the supplied editpart's view only.
*
* @param gep
- * the editpart being reparented
+ * the editpart being reparented
* @return A command to reparent the notation element.
*/
@Override
protected ICommand getReparentViewCommand(IGraphicalEditPart gep) {
- if(!(gep instanceof MetaclassEditPart) && !(gep instanceof MetaclassEditPartCN)) {
+ if (!(gep instanceof MetaclassEditPart) && !(gep instanceof MetaclassEditPartCN)) {
return super.getReparentViewCommand(gep);
}
-
CompositeCommand deleteViewCmd = new CompositeCommand("Reparent one metaclass view and delete the others"); //$NON-NLS-1$
-
-
/*
* If a metaclass (ElementImport) has dropped many times, we need to reparent the selected view and delete the others!
*
* The RemoveOrphanViewEditPolicy can't make it, because it runs too early and short-circuits the AddCommand
*/
-
/**
* 1/ get the element
*
*/
- View metaclassView = (View)gep.getModel();
+ View metaclassView = (View) gep.getModel();
EObject element = metaclassView.getElement();
-
/**
* 2/ get all views for this element view
*/
-
- List<View> elementViews = DiagramEditPartsUtil.getEObjectViews(element);
-
+ List<?> elementViews = DiagramEditPartsUtil.getEObjectViews(element);
/**
* 3/ delete all the view excepted one
*/
- for(View view : elementViews) {
- if(view != metaclassView) {
- deleteViewCmd.add(new DeleteCommand(gep.getEditingDomain(), view));
+ for (Object view : elementViews) {
+ if (view instanceof View) {
+ if (view != metaclassView) {
+ deleteViewCmd.add(new DeleteCommand(gep.getEditingDomain(), (View) view));
+ }
}
}
-
- View parent = (View)getHost().getModel();
-
+ View parent = (View) getHost().getModel();
deleteViewCmd.add(new AddCommand(gep.getEditingDomain(), new EObjectAdapter(parent), new EObjectAdapter(metaclassView)));
return deleteViewCmd;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomGraphicalNodeEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomGraphicalNodeEditPolicy.java index 89d6142a053..761176a1634 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomGraphicalNodeEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/CustomGraphicalNodeEditPolicy.java @@ -1,7 +1,7 @@ /*****************************************************************************
* Copyright (c) 2008 CEA LIST.
*
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@ *
* Contributors:
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted code from the class diagram
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted code from the class diagram
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.profile.custom.policies;
@@ -21,7 +21,6 @@ import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdap import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
import org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest;
-import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateUnspecifiedTypeConnectionRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.papyrus.uml.diagram.profile.custom.helper.MultiAssociationHelper;
@@ -30,7 +29,7 @@ import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes; /**
* This class is used to launch command to create associationClass
- *
+ *
* @author Patrick Tessier
*/
public class CustomGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy {
@@ -46,59 +45,39 @@ public class CustomGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy { public static final String CONNECTOR_CREATE_REQUEST_TARGET_PARENT = "TARGET_PARENT"; //$NON-NLS-1$
/**
- *
+ *
* {@inheritDoc}
*/
@Override
public Command getCommand(Request request) {
-
// we have to distinguish the case where this is an association class
if(REQ_CONNECTION_END.equals(request.getType())) {
if(request instanceof CreateConnectionViewAndElementRequest) {
// default behavior
Command c = getConnectionAndRelationshipCompleteCommand((CreateConnectionViewAndElementRequest)request);
-
// case of associationClass
CreateElementRequestAdapter requestAdapter = ((CreateConnectionViewAndElementRequest)request).getConnectionViewAndElementDescriptor().getCreateElementRequestAdapter();
CreateRelationshipRequest createElementRequest = (CreateRelationshipRequest)requestAdapter.getAdapter(CreateRelationshipRequest.class);
- /*
- * if(UMLElementTypes.AssociationClass_4017.equals(createElementRequest.getElementType())) {
- * AssociationClassHelper associationClassHelper = new AssociationClassHelper(getEditingDomain());
- * return associationClassHelper.getAssociationClassElementCommand(((CreateConnectionViewAndElementRequest)request), c);
- *
- * } else
- */if(UMLElementTypes.Dependency_4018.equals(createElementRequest.getElementType())) {
+ if(UMLElementTypes.Dependency_4018.equals(createElementRequest.getElementType())) {
MultiDependencyHelper multiDependencyHelper = new MultiDependencyHelper(getEditingDomain());
return multiDependencyHelper.getCommand(((CreateConnectionViewAndElementRequest)request), c);
-
} else if(UMLElementTypes.Association_4019.equals(createElementRequest.getElementType())) {
MultiAssociationHelper multiAssociationHelper = new MultiAssociationHelper(getEditingDomain());
return multiAssociationHelper.getCommand(((CreateConnectionViewAndElementRequest)request), c);
-
} else {
return c;
}
}
- if(request instanceof CreateConnectionViewRequest) {
- Command c = getConnectionCompleteCommand((CreateConnectionViewRequest)request);
- // if((((CreateConnectionViewRequest)request).getConnectionViewDescriptor().getSemanticHint().equals(((IHintedType)UMLElementTypes.Link_4023).getSemanticHint()))) {
- //
- // ContainmentHelper containmentHelper = new ContainmentHelper(getEditingDomain());
- //
- // return containmentHelper.getContainmentElementCommand((CreateConnectionViewRequest)request, c);
- //
- // }
- } else if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
+ if(request instanceof CreateUnspecifiedTypeConnectionRequest) {
return getUnspecifiedConnectionCompleteCommand((CreateUnspecifiedTypeConnectionRequest)request);
}
}
-
return super.getCommand(request);
}
/**
* used to obtain the transactional edit domain
- *
+ *
* @return the current transactional edit domain
*/
private TransactionalEditingDomain getEditingDomain() {
@@ -107,22 +86,12 @@ public class CustomGraphicalNodeEditPolicy extends GraphicalNodeEditPolicy { @Override
protected Command getReconnectSourceCommand(ReconnectRequest request) {
-
- // if(request.getConnectionEditPart() instanceof GeneralizationSetEditPart) {
- // GeneralizationSetHelper generalizationSetHelper = new GeneralizationSetHelper(getEditingDomain());
- // return generalizationSetHelper.getReconnectSourceCommand(request, super.getConnectableEditPart());
- // }
return super.getReconnectSourceCommand(request);
}
@Override
protected Command getReconnectTargetCommand(ReconnectRequest request) {
Command command = super.getReconnectTargetCommand(request);
- // if(request.getConnectionEditPart() instanceof GeneralizationSetEditPart) {
- // GeneralizationSetHelper generalizationSetHelper = new GeneralizationSetHelper(getEditingDomain());
- // return generalizationSetHelper.getMoveTarget(request, command, super.getConnectableEditPart(), super.getConnectionTargetAnchor(request));
- // }
return command;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java index 6fd2b9f7c43..b1933d106f6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/ProfileDiagramDragDropEditPolicy.java @@ -82,7 +82,6 @@ import org.eclipse.uml2.uml.Type; * The Class ClassDiagramDragDropEditPolicy.
*/
public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEditPolicy {
-
/**
* Instantiates a new class diagram drag drop edit policy.
*/
@@ -139,207 +138,129 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * binary association that is dropped.
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visualid
+ * the node visualid
*
* @return the command
*/
protected Command dropAssociation(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- Collection endtypes = ProfileLinkMappingHelper.getInstance().getSource(semanticLink);
- if(endtypes.size() == 2) {
- Element source = (Element)endtypes.toArray()[0];
- Element target = (Element)endtypes.toArray()[1];
+ Collection<?> endtypes = ProfileLinkMappingHelper.getInstance().getSource(semanticLink);
+ if (endtypes.size() == 2) {
+ Element source = (Element) endtypes.toArray()[0];
+ Element target = (Element) endtypes.toArray()[1];
return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop Association"), source, target, 4001, dropRequest.getLocation(), semanticLink)); //$NON-NLS-1$
}
- if(endtypes.size() > 2) {
+ if (endtypes.size() > 2) {
MultiAssociationHelper associationHelper = new MultiAssociationHelper(getEditingDomain());
- return associationHelper.dropMultiAssociation((Association)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return associationHelper.dropMultiAssociation((Association) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
return UnexecutableCommand.INSTANCE;
-
}
/**
* this method send a Command that create views for associationClass
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visualid
+ * the node visualid
*
* @return the command
*/
- // protected Command dropAssociationClass(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- // AssociationClassHelper associationClassHelper = new AssociationClassHelper(getEditingDomain());
- // return associationClassHelper.dropAssociationClass((AssociationClass)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
- // }
-
+ // protected Command dropAssociationClass(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
+ // AssociationClassHelper associationClassHelper = new AssociationClassHelper(getEditingDomain());
+ // return associationClassHelper.dropAssociationClass((AssociationClass)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ // }
/**
* this method send a command to create views to display
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visualid
+ * the node visualid
*
* @return the command
*/
protected Command dropDependency(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
- Collection sources = ProfileLinkMappingHelper.getInstance().getSource(semanticLink);
- Collection targets = ProfileLinkMappingHelper.getInstance().getTarget(semanticLink);
- if(sources.size() == 1 && targets.size() == 1) {
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
+ Collection<?> sources = ProfileLinkMappingHelper.getInstance().getSource(semanticLink);
+ Collection<?> targets = ProfileLinkMappingHelper.getInstance().getTarget(semanticLink);
+ if (sources.size() == 1 && targets.size() == 1) {
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
return new ICommandProxy(dropBinaryLink(new CompositeCommand("drop Association"), source, target, 4008, dropRequest.getLocation(), semanticLink)); //$NON-NLS-1$
}
- if(sources.size() > 1 || targets.size() > 1) {
+ if (sources.size() > 1 || targets.size() > 1) {
MultiDependencyHelper dependencyHelper = new MultiDependencyHelper(getEditingDomain());
- return dependencyHelper.dropMutliDependency((Dependency)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
+ return dependencyHelper.dropMutliDependency((Dependency) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView());
}
return UnexecutableCommand.INSTANCE;
}
- // protected Command outlineDropContainedClass(DropObjectsRequest dropRequest, Element semanticObject, int nodeVISUALID) {
- // ContainmentHelper containmentHelper = new ContainmentHelper(getEditingDomain());
- // Element owner = (Element)semanticObject.getOwner();
- // boolean ownerviewexist = false;
- // Collection<EditPart> editPartSet = getViewer().getEditPartRegistry().values();
- // Iterator<EditPart> editPartIterator = editPartSet.iterator();
- // while(editPartIterator.hasNext()) {
- // EditPart currentEditPart = editPartIterator.next();
- // if((currentEditPart instanceof ClassEditPart)) {
- // if(((GraphicalEditPart)currentEditPart).resolveSemanticElement().equals(owner)) {
- // ownerviewexist = true;
- // }
- // }
- // }
- //
- // if(ownerviewexist) {
- // return containmentHelper.outlineDropContainedClass((Class)semanticObject, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView());
- // } else {
- // return new ICommandProxy(getDefaultDropNodeCommand(nodeVISUALID, dropRequest.getLocation(), semanticObject));
- // }
- //
- // }
-
- // protected Command compartmentDropContainedClass(DropObjectsRequest dropRequest, Element semanticObject, int nodeVISUALID) {
- // ContainmentHelper containmentHelper = new ContainmentHelper(getEditingDomain());
- // CompositeCommand cc = new CompositeCommand("compartmentDropContainedClass");
- // Point location = dropRequest.getLocation().getCopy();
- // ((GraphicalEditPart)getHost()).getContentPane().translateToRelative(location);
- // ((GraphicalEditPart)getHost()).getContentPane().translateFromParent(location);
- // location.translate(((GraphicalEditPart)getHost()).getContentPane().getClientArea().getLocation().getNegated());
- // cc = getDefaultDropNodeCommand(nodeVISUALID, location, semanticObject);
- // GraphicalEditPart owner = null;
- // Collection<EditPart> editPartSet = getViewer().getEditPartRegistry().values();
- // Iterator<EditPart> editPartIterator = editPartSet.iterator();
- // while(editPartIterator.hasNext()) {
- // EditPart currentEditPart = editPartIterator.next();
- // if(currentEditPart instanceof ClassEditPart) {
- // if(((GraphicalEditPart)currentEditPart).resolveSemanticElement().equals(semanticObject)) {
- // View view = (View)currentEditPart.getModel();
- // EList<ConnectorImpl> listlink = view.getTargetEdges();
- // Iterator<ConnectorImpl> addedlinkIterator = listlink.iterator();
- // while(addedlinkIterator.hasNext()) {
- // ConnectorImpl currentconnector = addedlinkIterator.next();
- // ShapeImpl containmenetshape = (ShapeImpl)currentconnector.getSource();
- // if(containmenetshape.getType().equals("3032")) {
- // /* The containment circle node is deleted only if any other link is connected */
- // if(containmenetshape.getSourceEdges().size() == 1) {
- // cc.compose(new DeleteCommand(getEditingDomain(), (View)containmenetshape));
- //
- // }
- // }
- // }
- // cc.add(new DeleteCommand(getEditingDomain(), (View)((GraphicalEditPart)currentEditPart).getModel()));
- //
- //
- // }
- // }
- // }
- //
- // return new ICommandProxy(cc);
- // }
-
/**
* {@inheritedDoc}
*/
@Override
protected Command getSpecificDropCommand(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID, int linkVISUALID) {
// /!\ Warning the order is important! test on the superclass and AssociationNode is a super class for ExtensionEditPart!
- switch(linkVISUALID) {
+ switch (linkVISUALID) {
case ElementImportEditPart.VISUAL_ID:
return dropElementImport(dropRequest, semanticElement, nodeVISUALID);
case ExtensionEditPart.VISUAL_ID:
return dropExtension(dropRequest, semanticElement, linkVISUALID);
default:
-
}
- switch(nodeVISUALID) {
+ switch (nodeVISUALID) {
case 2014:
return dropDependency(dropRequest, semanticElement, nodeVISUALID);
- // case 2013:
- // return dropAssociationClass(dropRequest, semanticLink, nodeVISUALID);
case 2015:
return dropAssociation(dropRequest, semanticElement, nodeVISUALID);
- // case 3014:
- // return compartmentDropContainedClass(dropRequest, semanticLink, nodeVISUALID);
- // case 2008:
- // return outlineDropContainedClass(dropRequest, semanticLink, nodeVISUALID);
-
case CommentEditPart.VISUAL_ID:
case CommentEditPartCN.VISUAL_ID:
return dropComment(dropRequest, semanticElement, nodeVISUALID);
-
case ConstraintEditPart.VISUAL_ID:
case ConstraintEditPartCN.VISUAL_ID:
return dropConstraint(dropRequest, semanticElement, nodeVISUALID);
-
case MetaclassEditPart.VISUAL_ID:
case MetaclassEditPartCN.VISUAL_ID:
return dropMetaclass(dropRequest, semanticElement, nodeVISUALID);
default:
return UnexecutableCommand.INSTANCE;
}
-
-
}
/**
* Returns the command to drop the metaclass
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticElement
- * the metaclass to drop
+ * the metaclass to drop
* @param nodeVISUALID
- * the node VISUAL ID
+ * the node VISUAL ID
* @return
* the command to drop the metaclass
*/
protected Command dropMetaclass(DropObjectsRequest dropRequest, Element semanticElement, int nodeVISUALID) {
- //we test if the element to drop is a Class or a Metaclass
- if(Util.isMetaclass((Type)semanticElement)) {
+ // we test if the element to drop is a Class or a Metaclass
+ if (Util.isMetaclass((Type) semanticElement)) {
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
CompositeCommand dropCommand = super.getDefaultDropNodeCommand(nodeVISUALID, dropRequest.getLocation(), semanticElement);
cc.compose(dropCommand);
Object returnedValue = dropCommand.getCommandResult().getReturnValue();
- if(returnedValue instanceof ArrayList<?>) {//we look for the view descriptor of the created metaclass
- ViewDescriptor desc = (ViewDescriptor)((ArrayList<?>)returnedValue).get(0);
-
- //we set the stereotype to visible
+ if (returnedValue instanceof ArrayList<?>) {// we look for the view descriptor of the created metaclass
+ ViewDescriptor desc = (ViewDescriptor) ((ArrayList<?>) returnedValue).get(0);
+ // we set the stereotype to visible
SetStereotypeVisibleOnMetaclassCommand command = new SetStereotypeVisibleOnMetaclassCommand(getEditingDomain(), "Apply Stereotype", null, semanticElement, desc); //$NON-NLS-1$
- if(command.canExecute()) {
+ if (command.canExecute()) {
cc.compose(command);
}
-
}
return new ICommandProxy(cc);
} else {
@@ -351,25 +272,27 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * Returns the command to drop the Comment + the link to attach it to its annotated elements
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visual id
+ * the node visual id
*
* @return the command
*/
protected Command dropComment(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Package)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Package)) {
return UnexecutableCommand.INSTANCE;
}
- if(nodeVISUALID == CommentEditPart.VISUAL_ID) {
- return getDropCommentCommand((Comment)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Comment_1002, (IHintedType)UMLElementTypes.CommentAnnotatedElement_1022);
- } else if(nodeVISUALID == CommentEditPartCN.VISUAL_ID) {
- return getDropCommentCommand((Comment)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Comment_1007, (IHintedType)UMLElementTypes.CommentAnnotatedElement_1022);
+ if (nodeVISUALID == CommentEditPart.VISUAL_ID) {
+ return getDropCommentCommand((Comment) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Comment_1002,
+ (IHintedType) UMLElementTypes.CommentAnnotatedElement_1022);
+ } else if (nodeVISUALID == CommentEditPartCN.VISUAL_ID) {
+ return getDropCommentCommand((Comment) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Comment_1007,
+ (IHintedType) UMLElementTypes.CommentAnnotatedElement_1022);
}
return UnexecutableCommand.INSTANCE;
}
@@ -378,30 +301,31 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * Returns the command to drop the Constraint + the link to attach it to its contrainted elements
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param nodeVISUALID
- * the node visual id
+ * the node visual id
*
* @return the command
*/
protected Command dropConstraint(DropObjectsRequest dropRequest, Element semanticLink, int nodeVISUALID) {
// Test canvas element
- GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart)getHost();
+ GraphicalEditPart graphicalParentEditPart = (GraphicalEditPart) getHost();
EObject graphicalParentObject = graphicalParentEditPart.resolveSemanticElement();
- if(!(graphicalParentObject instanceof org.eclipse.uml2.uml.Package)) {
+ if (!(graphicalParentObject instanceof org.eclipse.uml2.uml.Package)) {
return UnexecutableCommand.INSTANCE;
}
- if(nodeVISUALID == ConstraintEditPart.VISUAL_ID) {
- return getDropConstraintCommand((Constraint)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Constraint_1014, (IHintedType)UMLElementTypes.ConstraintConstrainedElement_4014);
- } else if(nodeVISUALID == ConstraintEditPartCN.VISUAL_ID) {
- return getDropConstraintCommand((Constraint)semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart)getHost()).getNotationView(), (IHintedType)UMLElementTypes.Constraint_1028, (IHintedType)UMLElementTypes.ConstraintConstrainedElement_4014);
+ if (nodeVISUALID == ConstraintEditPart.VISUAL_ID) {
+ return getDropConstraintCommand((Constraint) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Constraint_1014,
+ (IHintedType) UMLElementTypes.ConstraintConstrainedElement_4014);
+ } else if (nodeVISUALID == ConstraintEditPartCN.VISUAL_ID) {
+ return getDropConstraintCommand((Constraint) semanticLink, getViewer(), getDiagramPreferencesHint(), dropRequest.getLocation(), ((GraphicalEditPart) getHost()).getNotationView(), (IHintedType) UMLElementTypes.Constraint_1028,
+ (IHintedType) UMLElementTypes.ConstraintConstrainedElement_4014);
}
return UnexecutableCommand.INSTANCE;
}
-
/**
* Gets the editing domain.
*
@@ -409,7 +333,7 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd */
@Override
protected TransactionalEditingDomain getEditingDomain() {
- return ((IGraphicalEditPart)getHost()).getEditingDomain();
+ return ((IGraphicalEditPart) getHost()).getEditingDomain();
}
/**
@@ -417,29 +341,24 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * this method send a command to create views to display to drop an extension link
*
* @param dropRequest
- * the drop request
+ * the drop request
* @param semanticLink
- * the semantic link
+ * the semantic link
* @param linkVISUALID
- * hte link visualid
+ * hte link visualid
* @return
*/
protected Command dropExtension(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
Collection<?> sources = ProfileLinkMappingHelper.getInstance().getSource(semanticLink);
Collection<?> targets = ProfileLinkMappingHelper.getInstance().getTarget(semanticLink);
-
- Element source = (Element)sources.toArray()[0];
- Element target = (Element)targets.toArray()[0];
-
- if(sources.size() != 1 && targets.size() != 1) {
+ Element source = (Element) sources.toArray()[0];
+ Element target = (Element) targets.toArray()[0];
+ if (sources.size() != 1 && targets.size() != 1) {
return UnexecutableCommand.INSTANCE;
}
-
return new ICommandProxy(dropBinaryLinkExtension(new CompositeCommand("drop Extension"), source, target, ExtensionEditPart.VISUAL_ID, dropRequest.getLocation(), semanticLink)); //$NON-NLS-1$
}
-
-
/**
* the drop is possible only if the container of the dropped element is the same that the host!!!
*
@@ -449,17 +368,13 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * @return
*/
protected Command dropElementImport(DropObjectsRequest dropRequest, Element semanticLink, int linkVISUALID) {
- if(semanticLink instanceof ElementImport) {
- if(((ElementImport)semanticLink).getImportedElement() instanceof Class) {
-
- Class metaclass = (Class)((ElementImport)semanticLink).getImportedElement();
-
+ if (semanticLink instanceof ElementImport) {
+ if (((ElementImport) semanticLink).getImportedElement() instanceof Class) {
+ Class metaclass = (Class) ((ElementImport) semanticLink).getImportedElement();
/**
* get the container for the element
*/
EObject container = semanticLink.eContainer();
-
-
/**
* get the view of the container
*/
@@ -467,25 +382,19 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd /**
* get the host's model
*/
-
CompositeCommand cc = new CompositeCommand("Drop"); //$NON-NLS-1$
IAdaptable elementAdapter = new EObjectAdapter(metaclass);
-
ViewDescriptor descriptor;
-
- //we create the view command
- if(containerView.get(0).equals(getHost().getModel())) {//we are on the diagram
- descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(MetaclassEditPart.VISUAL_ID)).getSemanticHint(), ViewUtil.APPEND, true, getDiagramPreferencesHint());
+ // we create the view command
+ if (containerView.get(0).equals(getHost().getModel())) {// we are on the diagram
+ descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType) getUMLElementType(MetaclassEditPart.VISUAL_ID)).getSemanticHint(), ViewUtil.APPEND, true, getDiagramPreferencesHint());
} else {
- descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType)getUMLElementType(MetaclassEditPartCN.VISUAL_ID)).getSemanticHint(), ViewUtil.APPEND, true, getDiagramPreferencesHint());
+ descriptor = new ViewDescriptor(elementAdapter, Node.class, ((IHintedType) getUMLElementType(MetaclassEditPartCN.VISUAL_ID)).getSemanticHint(), ViewUtil.APPEND, true, getDiagramPreferencesHint());
}
-
- CreateCommand createCommand = new CreateCommand(getEditingDomain(), descriptor, ((View)(getHost().getModel())));
+ CreateCommand createCommand = new CreateCommand(getEditingDomain(), descriptor, ((View) (getHost().getModel())));
cc.compose(createCommand);
-
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)createCommand.getCommandResult().getReturnValue(), dropRequest.getLocation()); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) createCommand.getCommandResult().getReturnValue(), dropRequest.getLocation()); //$NON-NLS-1$
cc.compose(setBoundsCommand);
-
/*
* we set the stereotype <<metaclass>> visible
* we can not call AppliedStereotypeHelper.getAddAppliedStereotypeCommand here,
@@ -493,18 +402,16 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * null :
* the view is not yet created!!!
*/
- if(createCommand.canExecute()) {
- SetStereotypeVisibleOnMetaclassCommand stereotypeCommand = new SetStereotypeVisibleOnMetaclassCommand(getEditingDomain(), "Set Stereotype Visible", null, semanticLink, (ViewDescriptor)createCommand.getCommandResult().getReturnValue()); //$NON-NLS-1$
- if(stereotypeCommand.canExecute()) {
+ if (createCommand.canExecute()) {
+ SetStereotypeVisibleOnMetaclassCommand stereotypeCommand = new SetStereotypeVisibleOnMetaclassCommand(getEditingDomain(), "Set Stereotype Visible", null, semanticLink, (ViewDescriptor) createCommand.getCommandResult().getReturnValue()); //$NON-NLS-1$
+ if (stereotypeCommand.canExecute()) {
cc.add(stereotypeCommand);
}
}
return new ICommandProxy(cc);
}
}
-
return UnexecutableCommand.INSTANCE;
-
}
/**
@@ -514,80 +421,67 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * target views do not exist, these views will be created.
*
* @param cc
- * the composite command that will contain the set of command to create the binary
- * link
+ * the composite command that will contain the set of command to create the binary
+ * link
* @param source
- * the source the element source of the link
+ * the source the element source of the link
* @param target
- * the target the element target of the link
+ * the target the element target of the link
* @param linkVISUALID
- * the link VISUALID used to create the view
+ * the link VISUALID used to create the view
* @param location
- * the location the location where the view will be be created
+ * the location the location where the view will be be created
* @param semanticLink
- * the semantic link that will be attached to the view
+ * the semantic link that will be attached to the view
*
* @return the composite command
*/
public CompositeCommand dropBinaryLinkExtension(CompositeCommand cc, Element source, Element target, int linkVISUALID, Point location, Element semanticLink) {
// look for editpart
-
- GraphicalEditPart sourceEditPart = (GraphicalEditPart)lookForEditPartSource(source);
- GraphicalEditPart targetEditPart = (GraphicalEditPart)lookForEditPartTarget(target, semanticLink);
-
+ GraphicalEditPart sourceEditPart = (GraphicalEditPart) lookForEditPartSource(source);
+ GraphicalEditPart targetEditPart = (GraphicalEditPart) lookForEditPartTarget(target, semanticLink);
// descriptor of the link
- CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), getDiagramPreferencesHint());
-
+ CreateConnectionViewRequest.ConnectionViewDescriptor linkdescriptor = new CreateConnectionViewRequest.ConnectionViewDescriptor(getUMLElementType(linkVISUALID), ((IHintedType) getUMLElementType(linkVISUALID)).getSemanticHint(),
+ getDiagramPreferencesHint());
IAdaptable sourceAdapter = null;
IAdaptable targetAdapter = null;
EList<Adapter> e = source.eAdapters();
-
- if(sourceEditPart == null) {
+ if (sourceEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
-
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(source), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
-
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y + 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
-
-
- sourceAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
+ sourceAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
} else {
sourceAdapter = new SemanticAdapter(null, sourceEditPart.getModel());
}
- if(targetEditPart == null) {
+ if (targetEditPart == null) {
// creation of the node
- ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart)getHost()).getDiagramPreferencesHint());
-
+ ViewDescriptor descriptor = new ViewDescriptor(new EObjectAdapter(target), Node.class, null, ViewUtil.APPEND, true, ((IGraphicalEditPart) getHost()).getDiagramPreferencesHint());
// get the command and execute it.
- CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart)getHost()).getEditingDomain(), descriptor, ((View)getHost().getModel()));
+ CreateCommand nodeCreationCommand = new CreateCommand(((IGraphicalEditPart) getHost()).getEditingDomain(), descriptor, ((View) getHost().getModel()));
cc.compose(nodeCreationCommand);
-
- SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
-
+ SetBoundsCommand setBoundsCommand = new SetBoundsCommand(getEditingDomain(), "move", (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue(), new Point(location.x, location.y - 100)); //$NON-NLS-1$
cc.compose(setBoundsCommand);
- targetAdapter = (IAdaptable)nodeCreationCommand.getCommandResult().getReturnValue();
-
+ targetAdapter = (IAdaptable) nodeCreationCommand.getCommandResult().getReturnValue();
} else {
targetAdapter = new SemanticAdapter(null, targetEditPart.getModel());
}
-
- CommonDeferredCreateConnectionViewCommand aLinkCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType)getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter, targetAdapter, getViewer(), getDiagramPreferencesHint(), linkdescriptor, null);
+ CommonDeferredCreateConnectionViewCommand aLinkCommand = new CommonDeferredCreateConnectionViewCommand(getEditingDomain(), ((IHintedType) getUMLElementType(linkVISUALID)).getSemanticHint(), sourceAdapter, targetAdapter, getViewer(),
+ getDiagramPreferencesHint(), linkdescriptor, null);
aLinkCommand.setElement(semanticLink);
-
cc.compose(aLinkCommand);
return cc;
-
}
/**
* Look for editPart from its semantic.
*
* @param semantic
- * the semantic
+ * the semantic
*
* @return the edits the part or null if not found
*/
@@ -595,10 +489,9 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd Collection<EditPart> editPartSet = getHost().getViewer().getEditPartRegistry().values();
Iterator<EditPart> editPartIterator = editPartSet.iterator();
EditPart existedEditPart = null;
- while(editPartIterator.hasNext() && existedEditPart == null) {
+ while (editPartIterator.hasNext() && existedEditPart == null) {
EditPart currentEditPart = editPartIterator.next();
-
- if(isEditPartTypeAdapted(currentEditPart.getClass(), semantic.eClass()) && semantic.equals(((GraphicalEditPart)currentEditPart).resolveSemanticElement())) {
+ if (isEditPartTypeAdapted(currentEditPart.getClass(), semantic.eClass()) && semantic.equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
existedEditPart = currentEditPart;
}
}
@@ -609,7 +502,7 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * Look for editPart from its semantic and its container.
*
* @param semantic
- * the semantic
+ * the semantic
*
* @return the edits the part or null if not found
*/
@@ -618,11 +511,10 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd Collection<EditPart> editPartSet2 = getTheFirstLevel(semanticLink);
Iterator<EditPart> editPartIterator = editPartSet.iterator();
EditPart existedEditPart = null;
-
- while(editPartIterator.hasNext() && existedEditPart == null) {
+ while (editPartIterator.hasNext() && existedEditPart == null) {
EditPart currentEditPart = editPartIterator.next();
- if(editPartSet2.contains(currentEditPart)) {
- if(isEditPartTypeAdapted(currentEditPart.getClass(), semantic.eClass()) && semantic.equals(((GraphicalEditPart)currentEditPart).resolveSemanticElement())) {
+ if (editPartSet2.contains(currentEditPart)) {
+ if (isEditPartTypeAdapted(currentEditPart.getClass(), semantic.eClass()) && semantic.equals(((GraphicalEditPart) currentEditPart).resolveSemanticElement())) {
existedEditPart = currentEditPart;
}
}
@@ -634,16 +526,16 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd * Check if the edit part type is the best one to represent an object of the given EClass type
*
* @param editPartClass
- * the type of EditPart which may represent a semantic element
+ * the type of EditPart which may represent a semantic element
* @param eClass
- * the EClass type of the represented semantic element
+ * the EClass type of the represented semantic element
* @return true if an edit part of this type should be selected
*/
private boolean isEditPartTypeAdapted(java.lang.Class<? extends EditPart> editPartClass, EClass eClass) {
- if(DiagramEditPart.class.isAssignableFrom(editPartClass) || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
+ if (DiagramEditPart.class.isAssignableFrom(editPartClass) || CompartmentEditPart.class.isAssignableFrom(editPartClass)) {
// the edit part is disqualified, as a compartment or a diagram can not be dropped
return false;
- } else if(GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
+ } else if (GraphicalEditPart.class.isAssignableFrom(editPartClass)) {
// check the edit part type against advised ones
return isEditPartTypeSuitableForEClass(editPartClass.asSubclass(GraphicalEditPart.class), eClass);
} else {
@@ -653,36 +545,30 @@ public class ProfileDiagramDragDropEditPolicy extends OldCommonDiagramDragDropEd }
private Collection<EditPart> getTheFirstLevel(Element semanticLink) {
-
EObject linkContainer = semanticLink.eContainer();
EditPart currentEditPart = null;
Collection<EditPart> profileContents = new ArrayList<EditPart>();
-
Collection<EditPart> editPartSet = getHost().getViewer().getEditPartRegistry().values();
Iterator<EditPart> editPartIterator = editPartSet.iterator();
- //Je recherche les éléments qui ont le même parent que mon extension
- while(editPartIterator.hasNext()) {
+ // Je recherche les éléments qui ont le même parent que mon extension
+ while (editPartIterator.hasNext()) {
currentEditPart = editPartIterator.next();
- if(currentEditPart.getParent() != null) {
+ if (currentEditPart.getParent() != null) {
Object model = currentEditPart.getParent().getModel();
- if(model instanceof Node) {
- EObject parent = ((Node)model).getElement();
- if(parent.equals(linkContainer)) {
+ if (model instanceof Node) {
+ EObject parent = ((Node) model).getElement();
+ if (parent.equals(linkContainer)) {
profileContents.add(currentEditPart);
}
}
- if(model instanceof Diagram) {
- EObject parent = ((Diagram)model).getElement();
- if(parent.equals(linkContainer)) {
+ if (model instanceof Diagram) {
+ EObject parent = ((Diagram) model).getElement();
+ if (parent.equals(linkContainer)) {
profileContents.add(currentEditPart);
}
}
}
-
-
-
}
-
return profileContents;
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java new file mode 100644 index 00000000000..3fba1048369 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicy.java @@ -0,0 +1,67 @@ +/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted code from the class diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomAssociationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.DataTypeItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * this a specialization to manage creation of association and associationClass
+ */
+public class CustomClassItemSemanticEditPolicy extends DataTypeItemSemanticEditPolicy {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new CustomAssociationReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ //forbid creation of association branch from it.
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getStartCreateRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java new file mode 100644 index 00000000000..e907da7edb3 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/policies/itemsemantic/CustomClassItemSemanticEditPolicyCN.java @@ -0,0 +1,67 @@ +/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Adapted code from the class diagram
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomAssociationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.DataTypeItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * this a specialization to manage creation of association and associationClass
+ */
+public class CustomClassItemSemanticEditPolicyCN extends DataTypeItemSemanticEditPolicyCN {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return super.getCompleteCreateRelationshipCommand(req);
+ }
+
+ @Override
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new CustomAssociationReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ if(UMLElementTypes.Association_4001 == req.getElementType()) {
+ return getGEFWrapper(new org.eclipse.papyrus.uml.diagram.profile.custom.commands.CustomAssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ //forbid creation of association branch from it.
+ if(UMLElementTypes.Association_4019 == req.getElementType()) {
+ return UnexecutableCommand.INSTANCE;
+ }
+
+ return super.getStartCreateRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateElementRequestAdapter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateElementRequestAdapter.java index 82cc1bd49bf..a7edf5075e1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateElementRequestAdapter.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateElementRequestAdapter.java @@ -11,7 +11,6 @@ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
-
package org.eclipse.papyrus.uml.diagram.profile.custom.requests;
import java.util.ArrayList;
@@ -25,63 +24,46 @@ import org.eclipse.gmf.runtime.emf.core.util.PackageUtil; import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
-
public class CustomCreateElementRequestAdapter extends org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter {
-
-
/**
* The request to create a new element.
*/
private final CreateElementRequest createElementRequest;
-
-
-
private ArrayList<CreateElementRequestAdapter> listRequestAdapter;
/**
* Constructs a new adapter.
*
* @param createElementRequest
- * the request to create a new element.
+ * the request to create a new element.
*/
public CustomCreateElementRequestAdapter(CreateElementRequest createElementRequest) {
super(createElementRequest);
this.createElementRequest = createElementRequest;
-
listRequestAdapter = new ArrayList<CreateElementRequestAdapter>();
listRequestAdapter.add(new CreateElementRequestAdapter(createElementRequest));
-
}
-
-
-
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
-
- public Object getAdapter(java.lang.Class adapter, int i) {
- if(adapter.isInstance(listRequestAdapter.get(i).getAdapter(CreateElementRequest.class))) {
+ public Object getAdapter(java.lang.Class<?> adapter, int i) {
+ if (adapter.isInstance(listRequestAdapter.get(i).getAdapter(CreateElementRequest.class))) {
return listRequestAdapter.get(i).getAdapter(CreateElementRequest.class);
}
-
- if(adapter.isInstance(getNewElement(i))) {
+ if (adapter.isInstance(getNewElement(i))) {
return getNewElement(i);
}
- if(adapter.isInstance(getElementType(i))) {
+ if (adapter.isInstance(getElementType(i))) {
return getElementType(i);
}
-
- //Is this correct?
- if(adapter.isInstance(this)) {
+ // Is this correct?
+ if (adapter.isInstance(this)) {
return this;
}
-
-
return Platform.getAdapterManager().getAdapter(listRequestAdapter.get(i).getAdapter(CreateElementRequest.class), adapter);
-
}
/**
@@ -90,14 +72,11 @@ public class CustomCreateElementRequestAdapter extends org.eclipse.gmf.runtime.d * @return the new element
*/
private EObject getNewElement(int i) {
- return ((CreateElementRequest)listRequestAdapter.get(i).getAdapter(CreateElementRequest.class)).getNewElement();
-
+ return ((CreateElementRequest) listRequestAdapter.get(i).getAdapter(CreateElementRequest.class)).getNewElement();
}
-
public CreateElementRequest getRequest(int i) {
- return ((CreateElementRequest)listRequestAdapter.get(i).getAdapter(CreateElementRequest.class));
-
+ return ((CreateElementRequest) listRequestAdapter.get(i).getAdapter(CreateElementRequest.class));
}
/**
@@ -106,21 +85,19 @@ public class CustomCreateElementRequestAdapter extends org.eclipse.gmf.runtime.d * @return the element type
*/
private IElementType getElementType(int i) {
- return ((CreateElementRequest)listRequestAdapter.get(i).getAdapter(CreateElementRequest.class)).getElementType();
-
+ return ((CreateElementRequest) listRequestAdapter.get(i).getAdapter(CreateElementRequest.class)).getElementType();
}
/**
* Sets the new element that has been created in response to this request.
*
* @param newElement
- * the new element
+ * the new element
*/
-
@Override
public void setNewElement(EObject newElement) {
- if(listRequestAdapter.size() == 1 && ((CreateElementRequest)listRequestAdapter.get(0).getAdapter(CreateElementRequest.class)).getNewElement() == null) {
- //the request exists yet!!!
+ if (listRequestAdapter.size() == 1 && ((CreateElementRequest) listRequestAdapter.get(0).getAdapter(CreateElementRequest.class)).getNewElement() == null) {
+ // the request exists yet!!!
listRequestAdapter.get(0).setNewElement(newElement);
} else {
CreateElementRequest req = new CreateElementRequest(createElementRequest.getEditingDomain(), createElementRequest.getContainer(), createElementRequest.getElementType(), createElementRequest.getContainmentFeature());
@@ -135,7 +112,6 @@ public class CustomCreateElementRequestAdapter extends org.eclipse.gmf.runtime.d * @see org.eclipse.gmf.runtime.emf.core.internal.util.IProxyEObject#getProxyClassID()
*/
public Object getProxyClassID(int i) {
-
return getNewElement(i) == null ? null : PackageUtil.getID(EMFCoreUtil.getProxyClass(getNewElement(i)));
}
@@ -145,7 +121,7 @@ public class CustomCreateElementRequestAdapter extends org.eclipse.gmf.runtime.d * @see org.eclipse.gmf.runtime.emf.core.internal.util.IProxyEObject#resolve()
*/
public EObject resolve(int i) {
- return getNewElement(i) == null ? null : EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(((CreateElementRequest)listRequestAdapter.get(i).getAdapter(CreateElementRequest.class)).getContainer()), getNewElement(i));
+ return getNewElement(i) == null ? null : EMFCoreUtil.resolve(TransactionUtil.getEditingDomain(((CreateElementRequest) listRequestAdapter.get(i).getAdapter(CreateElementRequest.class)).getContainer()), getNewElement(i));
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewAndElementRequest.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewAndElementRequest.java index 09a7984ea71..aab47f5a4e4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewAndElementRequest.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewAndElementRequest.java @@ -11,10 +11,6 @@ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
-
-
-
-
package org.eclipse.papyrus.uml.diagram.profile.custom.requests;
import java.util.Map;
@@ -33,23 +29,20 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; *
* This class was created to use the CustomCreateElementRequestAdapter (used in the CustomCreateViewRequest)
*/
-
public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest {
-
/**
* An extended view descriptor that takes an <code>ElementDescriptor</code> instead of <code>IAdaptable</code> as the element adapter
*/
public static class ViewAndElementDescriptor extends ViewDescriptor {
-
/**
* Constructor for ViewAndElementDescriptor.
*
* @param requestAdapter
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, PreferencesHint preferencesHint) {
super(requestAdapter, preferencesHint);
@@ -61,7 +54,7 @@ public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest { * @param requestAdapter
* @param viewkind
*/
- public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, Class viewkind, PreferencesHint preferencesHint) {
+ public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, Class<?> viewkind, PreferencesHint preferencesHint) {
super(requestAdapter, viewkind, preferencesHint);
}
@@ -72,7 +65,7 @@ public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest { * @param viewkind
* @param semanticHint
*/
- public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, Class viewkind, String semanticHint, PreferencesHint preferencesHint) {
+ public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, Class<?> viewkind, String semanticHint, PreferencesHint preferencesHint) {
super(requestAdapter, viewkind, semanticHint, preferencesHint);
}
@@ -84,7 +77,7 @@ public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest { * @param semanticHint
* @param index
*/
- public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, Class viewKind, String semanticHint, int index, PreferencesHint preferencesHint) {
+ public ViewAndElementDescriptor(CustomCreateElementRequestAdapter requestAdapter, Class<?> viewKind, String semanticHint, int index, PreferencesHint preferencesHint) {
super(requestAdapter, viewKind, semanticHint, index, preferencesHint);
}
@@ -94,11 +87,10 @@ public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest { * @return ElementDescriptor
*/
public CustomCreateElementRequestAdapter getCreateElementRequestAdapter() {
- return (CustomCreateElementRequestAdapter)getElementAdapter();
+ return (CustomCreateElementRequestAdapter) getElementAdapter();
}
}
-
/**
* Constructor for CreateViewAndElementRequest.
*
@@ -113,10 +105,10 @@ public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest { *
* @param type
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
public CustomCreateViewAndElementRequest(IElementType type, PreferencesHint preferencesHint) {
super(new ViewAndElementDescriptor(new CustomCreateElementRequestAdapter(new CreateElementRequest(type)), preferencesHint));
@@ -128,43 +120,37 @@ public class CustomCreateViewAndElementRequest extends CustomCreateViewRequest { * @param type
* @param context
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
public CustomCreateViewAndElementRequest(IElementType type, EObject context, PreferencesHint preferencesHint) {
super(new ViewAndElementDescriptor(new CustomCreateElementRequestAdapter(new CreateElementRequest(TransactionUtil.getEditingDomain(context), context, type)), preferencesHint));
}
-
/**
* Method getViewAndElementDescriptor.
*
* @return ViewAndElementDescriptor
*/
public ViewAndElementDescriptor getViewAndElementDescriptor() {
- return (ViewAndElementDescriptor)getViewDescriptors().get(0);
+ return (ViewAndElementDescriptor) getViewDescriptors().get(0);
}
-
/**
* Propagates setting the parameters to the <code>CreateElementRequest</code> in my {@link #getViewAndElementDescriptor()}.
*/
+ @SuppressWarnings("rawtypes")
@Override
public void setExtendedData(Map map) {
-
super.setExtendedData(map);
-
ViewAndElementDescriptor descriptor = getViewAndElementDescriptor();
-
- if(descriptor != null) {
+ if (descriptor != null) {
CreateElementRequestAdapter adapter = descriptor.getCreateElementRequestAdapter();
-
- if(adapter != null) {
- CreateElementRequest request = (CreateElementRequest)adapter.getAdapter(CreateElementRequest.class);
-
- if(request != null) {
+ if (adapter != null) {
+ CreateElementRequest request = (CreateElementRequest) adapter.getAdapter(CreateElementRequest.class);
+ if (request != null) {
request.getParameters().clear();
request.addParameters(map);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewRequest.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewRequest.java index 4401c286e30..3f4e25f3e82 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewRequest.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/custom-src/org/eclipse/papyrus/uml/diagram/profile/custom/requests/CustomCreateViewRequest.java @@ -11,7 +11,6 @@ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
*
*****************************************************************************/
-
package org.eclipse.papyrus.uml.diagram.profile.custom.requests;
import java.util.ArrayList;
@@ -37,7 +36,6 @@ import org.eclipse.gmf.runtime.notation.View; *
*/
public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequest {
-
/**
* A view descriptor that contains attributes needed to create the view The
* class is also a mutable adapter that initially adapts to nothing, but
@@ -46,26 +44,18 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * to this request) This is how GEF works!!
*/
public static class ViewDescriptor implements IAdaptable {
-
/** the element adapter */
private final IAdaptable elementAdapter;
-
-
/** the view kind */
- private final Class viewKind;
-
+ private final Class<?> viewKind;
/** the semantic hint */
private String semanticHint;
-
/** the index */
private final int index;
-
/** The underlying view element */
private View view;
-
/** persisted view flag. */
private boolean _persisted;
-
/**
* The hint used to find the appropriate preference store from which general
* diagramming preference values for properties of shapes, connections, and
@@ -78,12 +68,12 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Creates a new view descriptor using element adapter
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
public ViewDescriptor(IAdaptable elementAdapter, PreferencesHint preferencesHint) {
this(elementAdapter, Node.class, preferencesHint);
@@ -93,17 +83,17 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Creates a new view descriptor using element adapter and a view kind
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param viewkind
- * the kind of the view to be created (a concrete class
- * derived from IView)
+ * the kind of the view to be created (a concrete class
+ * derived from IView)
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
- public ViewDescriptor(IAdaptable elementAdapter, Class viewkind, PreferencesHint preferencesHint) {
+ public ViewDescriptor(IAdaptable elementAdapter, Class<?> viewkind, PreferencesHint preferencesHint) {
this(elementAdapter, viewkind, "", preferencesHint); //$NON-NLS-1$
}
@@ -111,20 +101,20 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Creates a new view descriptor using element adapter and a view kind
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param viewkind
- * the kind of the view to be created (a concrete class
- * derived from IView)
+ * the kind of the view to be created (a concrete class
+ * derived from IView)
* @param persisted
- * indicates if the view will be created as a persisted
- * view or transient
+ * indicates if the view will be created as a persisted
+ * view or transient
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
- public ViewDescriptor(IAdaptable elementAdapter, Class viewkind, boolean persisted, PreferencesHint preferencesHint) {
+ public ViewDescriptor(IAdaptable elementAdapter, Class<?> viewkind, boolean persisted, PreferencesHint preferencesHint) {
this(elementAdapter, viewkind, "", persisted, preferencesHint); //$NON-NLS-1$
}
@@ -133,18 +123,18 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * a factory hint
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param viewkind
- * the kind of the view to be created
+ * the kind of the view to be created
* @param semanticHint
- * the semantic hint of the view
+ * the semantic hint of the view
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
- public ViewDescriptor(IAdaptable elementAdapter, Class viewkind, String semanticHint, PreferencesHint preferencesHint) {
+ public ViewDescriptor(IAdaptable elementAdapter, Class<?> viewkind, String semanticHint, PreferencesHint preferencesHint) {
this(elementAdapter, viewkind, semanticHint, ViewUtil.APPEND, preferencesHint);
}
@@ -153,21 +143,21 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * a factory hint
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param viewkind
- * the kind of the view to be created
+ * the kind of the view to be created
* @param semanticHint
- * the semantic hint of the view
+ * the semantic hint of the view
* @param persisted
- * indicates if the view will be created as a persisted
- * view or transient
+ * indicates if the view will be created as a persisted
+ * view or transient
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
- public ViewDescriptor(IAdaptable elementAdapter, Class viewkind, String semanticHint, boolean persisted, PreferencesHint preferencesHint) {
+ public ViewDescriptor(IAdaptable elementAdapter, Class<?> viewkind, String semanticHint, boolean persisted, PreferencesHint preferencesHint) {
this(elementAdapter, viewkind, semanticHint, ViewUtil.APPEND, persisted, preferencesHint);
}
@@ -178,15 +168,15 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Same as calling <code>new ViewDescriptor(elementAdapter, viewKind, factoryHint, index, true);</code>
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param viewKind
- * the kind of the view to be created (a concrete class derived from View)
+ * the kind of the view to be created (a concrete class derived from View)
* @param factoryHint
- * the semantic hint of the view
+ * the semantic hint of the view
* @param index
- * the index of the view in its parent's children collection
+ * the index of the view in its parent's children collection
*/
- public ViewDescriptor(IAdaptable elementAdapter, Class viewKind, String factoryHint, int index, PreferencesHint preferencesHint) {
+ public ViewDescriptor(IAdaptable elementAdapter, Class<?> viewKind, String factoryHint, int index, PreferencesHint preferencesHint) {
this(elementAdapter, viewKind, factoryHint, index, true, preferencesHint);
}
@@ -195,21 +185,19 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * view kind, factory hint, index and persistence flag.
*
* @param elementAdapter
- * the element adapter referened by the view
+ * the element adapter referened by the view
* @param viewKind
- * the kind of the view to be created (a concrete class derived from View)
+ * the kind of the view to be created (a concrete class derived from View)
* @param semanticHint
- * the semantic hint of the view
+ * the semantic hint of the view
* @param index
- * the index of the view in its parent's children collection
+ * the index of the view in its parent's children collection
* @param persisted
- * set <true> to create a persisted (attached) view; <tt>false</tt> to create a detached (non-persisted) view.
+ * set <true> to create a persisted (attached) view; <tt>false</tt> to create a detached (non-persisted) view.
*/
- public ViewDescriptor(IAdaptable elementAdapter, Class viewKind, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
-
+ public ViewDescriptor(IAdaptable elementAdapter, Class<?> viewKind, String semanticHint, int index, boolean persisted, PreferencesHint preferencesHint) {
Assert.isNotNull(viewKind);
Assert.isTrue(index >= ViewUtil.APPEND);
-
this.elementAdapter = elementAdapter;
this.viewKind = viewKind;
this.semanticHint = semanticHint;
@@ -223,8 +211,9 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ *
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(Class)
*/
+ @SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
- if(adapter.isInstance(view))
+ if (adapter.isInstance(view))
return view;
return null;
}
@@ -261,7 +250,7 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ *
* @return Class
*/
- public Class getViewKind() {
+ public Class<?> getViewKind() {
return viewKind;
}
@@ -304,27 +293,21 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ return preferencesHint;
}
-
-
public IAdaptable getElementAdapter(int i) {
- if(elementAdapter instanceof CustomCreateElementRequestAdapter) {
- return ((CustomCreateElementRequestAdapter)elementAdapter).getRequestAdapterDUMMY(i);
+ if (elementAdapter instanceof CustomCreateElementRequestAdapter) {
+ return ((CustomCreateElementRequestAdapter) elementAdapter).getRequestAdapterDUMMY(i);
} else {
return getElementAdapter();
}
-
}
public ArrayList<CreateElementRequestAdapter> getRequestAdapters() {
- if(elementAdapter instanceof CustomCreateElementRequestAdapter) {
- return ((CustomCreateElementRequestAdapter)elementAdapter).getRequestAdapters();
+ if (elementAdapter instanceof CustomCreateElementRequestAdapter) {
+ return ((CustomCreateElementRequestAdapter) elementAdapter).getRequestAdapters();
} else {
return null;
}
-
}
-
-
}
/**
@@ -336,12 +319,12 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Convenience constructor for CreateViewRequest using a <code>IElement</code>
*
* @param element
- * a semantic element
+ * a semantic element
* @param preferencesHint
- * The preference hint that is to be used to find the appropriate
- * preference store from which to retrieve diagram preference
- * values. The preference hint is mapped to a preference store in
- * the preference registry <@link DiagramPreferencesRegistry>.
+ * The preference hint that is to be used to find the appropriate
+ * preference store from which to retrieve diagram preference
+ * values. The preference hint is mapped to a preference store in
+ * the preference registry <@link DiagramPreferencesRegistry>.
*/
public CustomCreateViewRequest(EObject element, PreferencesHint preferencesHint) {
this(new ViewDescriptor(new EObjectAdapter(element), preferencesHint));
@@ -351,7 +334,7 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Constructor for CreateViewRequest using a <code>ViewDescriptor</code>
*
* @param viewDescriptor
- * a view descriptor
+ * a view descriptor
*/
public CustomCreateViewRequest(ViewDescriptor viewDescriptor) {
this(Collections.singletonList(viewDescriptor));
@@ -361,7 +344,7 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Constructor for CreateViewRequest using a list of <code>ViewDescriptor</code> s
*
* @param viewDescriptors
- * a list of view descriptors
+ * a list of view descriptors
*/
public CustomCreateViewRequest(List<? extends ViewDescriptor> viewDescriptors) {
Assert.isNotNull(viewDescriptors);
@@ -373,9 +356,9 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Constructor for CreateViewRequest using a request type and a <code>ViewDescriptor</code>
*
* @param type
- * request type
+ * request type
* @param viewDescriptor
- * a view descriptor
+ * a view descriptor
*/
public CustomCreateViewRequest(Object type, ViewDescriptor viewDescriptor) {
this(type, Collections.singletonList(viewDescriptor));
@@ -385,9 +368,9 @@ public class CustomCreateViewRequest extends org.eclipse.gef.requests.CreateRequ * Constructor for CreateViewRequest using a request type and list of <code>ViewDescriptor</code> s
*
* @param type
- * the request type
+ * the request type
* @param viewDescriptors
- * a list of view descriptors
+ * a list of view descriptors
*/
public CustomCreateViewRequest(Object type, List<? extends ViewDescriptor> viewDescriptors) {
super(type);
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties index 9db9d8d6f44..2d467511ac9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/messages.properties @@ -90,17 +90,23 @@ Edges2Group_title=Edges Edges2Group_desc=Edges Stereotype5CreationTool_title=Stereotype Stereotype5CreationTool_desc=Add new Stereotype -ImportMetaclass6CreationTool_title=Import Metaclass -ImportMetaclass6CreationTool_desc=Import a new Metaclass -Enumeration7CreationTool_title=Enumeration -Enumeration7CreationTool_desc=Create new Enumeration -DataType8CreationTool_title=DataType -DataType8CreationTool_desc=Create new DataType -PrimitiveType9CreationTool_title=PrimitiveType -PrimitiveType9CreationTool_desc=Create new PrimitiveType -Property10CreationTool_title=Property -Property10CreationTool_desc=Add new property -Operation11CreationTool_title=Operation -Operation11CreationTool_desc=Add new operation -EnumerationLiteral12CreationTool_title=EnumerationLiteral -EnumerationLiteral12CreationTool_desc=Add new EnumerationLiteral +Class6CreationTool_title=Class +Class6CreationTool_desc=Create a new Class +ImportMetaclass7CreationTool_title=Import Metaclass +ImportMetaclass7CreationTool_desc=Import a new Metaclass +Enumeration8CreationTool_title=Enumeration +Enumeration8CreationTool_desc=Create new Enumeration +DataType9CreationTool_title=DataType +DataType9CreationTool_desc=Create new DataType +PrimitiveType10CreationTool_title=PrimitiveType +PrimitiveType10CreationTool_desc=Create new PrimitiveType +Property11CreationTool_title=Property +Property11CreationTool_desc=Add new property +Operation12CreationTool_title=Operation +Operation12CreationTool_desc=Add new operation +EnumerationLiteral13CreationTool_title=EnumerationLiteral +EnumerationLiteral13CreationTool_desc=Add new EnumerationLiteral +ClassAttributeCompartmentEditPart_title=attributes +ClassAttributeCompartmentEditPartCN_title=attributes +ClassOperationCompartmentEditPart_title=operations +ClassOperationCompartmentEditPartCN_title=operations diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen index 25bd305dc4b..9f863580be4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/model/profilediagram.gmfgen @@ -1,3407 +1,1304 @@ <?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel"
- xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
- <gmfgen:GenEditorGenerator
- packageNamePrefix="org.eclipse.papyrus.uml.diagram.profile"
- modelID="PapyrusUMLProfileDiagram"
- domainFileExtension="PapyrusUMLProfile"
- dynamicTemplates="true"
- templateDirectory="/org.eclipse.papyrus.def/xtend/"
- copyrightText="Copyright (c) 2014 CEA LIST.

All rights reserved. This program and the accompanying materials
are 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:
 Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation

">
- <diagram
- visualID="1000"
- editPartClassName="ProfileDiagramEditPart"
- itemSemanticEditPolicyClassName="ProfileDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicy"
- creationWizardIconPath="icons/obj16/UMLDiagramFile.gif"
- validationEnabled="true"
- validationDecorators="true"
- liveValidationUIFeedback="true"
- synchronized="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="ProfileDiagram"
- editHelperClassName="ProfileDiagramEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
- <domainDiagramElement
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
- <childNodes
- visualID="3026"
- editPartClassName="PrimitiveTypeEditPartCN"
- itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN"
- createCommandClassName="PrimitiveTypeCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gmfgen="http://www.eclipse.org/gmf/2009/GenModel" xmlns:papyrusgmfgenextension="http://www.eclipse.org/papyrus/2009/papyrusgmfgenextension">
+ <gmfgen:GenEditorGenerator packageNamePrefix="org.eclipse.papyrus.uml.diagram.profile" modelID="PapyrusUMLProfileDiagram" domainFileExtension="PapyrusUMLProfile" dynamicTemplates="true" templateDirectory="/org.eclipse.papyrus.def/xtend/" copyrightText="Copyright (c) 2014 CEA LIST.

All rights reserved. This program and the accompanying materials
are 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:
 CEA LIST - Initial API and implementation">
+ <diagram visualID="1000" editPartClassName="ProfileDiagramEditPart" itemSemanticEditPolicyClassName="ProfileDiagramItemSemanticEditPolicy" canonicalEditPolicyClassName="ModelCanonicalEditPolicy" creationWizardIconPath="icons/obj16/UMLDiagramFile.gif" validationEnabled="true" validationDecorators="true" liveValidationUIFeedback="true" synchronized="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="ProfileDiagram" editHelperClassName="ProfileDiagramEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.draw2d.FreeformLayer"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <domainDiagramElement href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
+ <childNodes visualID="3026" editPartClassName="PrimitiveTypeEditPartCN" itemSemanticEditPolicyClassName="PrimitiveTypeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PrimitiveTypeCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="PrimitiveTypeGraphicalNodeEditPolicyCN" createCommandClassName="PrimitiveTypeCreateCommandCN" containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="50"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicyCN"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5058"
- editPartClassName="PrimitiveTypeNameEditPartCN"
- itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicyCN"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5058" editPartClassName="PrimitiveTypeNameEditPartCN" itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicyCN" elementIcon="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3019"
- editPartClassName="DataTypeOperationEditPart"
- itemSemanticEditPolicyClassName="DataTypeOperationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypeOperationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DataTypeOperationGraphicalNodeEditPolicy"
- createCommandClassName="DataTypeOperationCreateCommand"
- containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.14">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.DataTypeOperation_3019"
- displayName="Operation"
- editHelperClassName="DataTypeOperationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="OperationFigureDescriptor"
- classBody="
/**
 * @generated
 */
public class OperationFigureDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {




	/**
	 * @generated
	 */
	public OperationFigureDescriptor() {
				this.setText("");

this.setFont(THIS_FONT);


	}






}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), "Arial", 10, org.eclipse.swt.SWT.NORMAL);

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="3019" editPartClassName="DataTypeOperationEditPart" itemSemanticEditPolicyClassName="DataTypeOperationItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeOperationCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DataTypeOperationGraphicalNodeEditPolicy" createCommandClassName="DataTypeOperationCreateCommand" containers="/0/@diagram/@compartments.15 /0/@diagram/@compartments.14">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.DataTypeOperation_3019" displayName="Operation" editHelperClassName="DataTypeOperationEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedOperation"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labelModelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</labelModelFacet>
</childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="1037"
- containers="/0/@diagram/@compartments.11 /0/@diagram/@compartments.10">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="LiteralEnumerationDescriptor"
- classBody="
/**
 * @generated
 */
public class LiteralEnumerationDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {




	/**
	 * @generated
	 */
	public LiteralEnumerationDescriptor() {
				this.setText("");

this.setFont(THIS_FONT);


	}






}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), "Arial", 10, org.eclipse.swt.SWT.NORMAL);

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
+ <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="1037" containers="/0/@diagram/@compartments.11 /0/@diagram/@compartments.10">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/EnumerationLiteral"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration/ownedLiteral"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/EnumerationLiteral"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration/ownedLiteral"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labelModelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</labelModelFacet>
</childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3018"
- editPartClassName="DataTypePropertyEditPart"
- itemSemanticEditPolicyClassName="DataTypePropertyItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypePropertyCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DataTypePropertyGraphicalNodeEditPolicy"
- createCommandClassName="DataTypePropertyCreateCommand"
- containers="/0/@diagram/@compartments.12 /0/@diagram/@compartments.13">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.DataTypeProperty_3018"
- displayName="Property"
- editHelperClassName="DataTypePropertyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="PropertyFigureDescriptor"
- classBody="
/**
 * @generated
 */
public class PropertyFigureDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {




	/**
	 * @generated
	 */
	public PropertyFigureDescriptor() {
				this.setText("");

this.setFont(THIS_FONT);


	}






}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), "Arial", 10, org.eclipse.swt.SWT.NORMAL);

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="3018" editPartClassName="DataTypePropertyEditPart" itemSemanticEditPolicyClassName="DataTypePropertyItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypePropertyCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DataTypePropertyGraphicalNodeEditPolicy" createCommandClassName="DataTypePropertyCreateCommand" containers="/0/@diagram/@compartments.12 /0/@diagram/@compartments.13">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.DataTypeProperty_3018" displayName="Property" editHelperClassName="DataTypePropertyEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType/ownedAttribute"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labelModelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</labelModelFacet>
</childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3002"
- editPartClassName="ClassPropertyEditPart"
- itemSemanticEditPolicyClassName="ClassPropertyItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassPropertyCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ClassPropertyGraphicalNodeEditPolicy"
- createCommandClassName="ClassPropertyCreateCommand"
- containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.4">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.ClassProperty_3002"
- displayName="Property"
- editHelperClassName="ClassPropertyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="PropertyFigureDescriptor"
- classBody="
/**
 * @generated
 */
public class PropertyFigureDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {




	/**
	 * @generated
	 */
	public PropertyFigureDescriptor() {
				this.setText("");

this.setFont(THIS_FONT);


	}






}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), "Arial", 10, org.eclipse.swt.SWT.NORMAL);

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
+ <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="3002" editPartClassName="ClassPropertyEditPart" itemSemanticEditPolicyClassName="ClassPropertyItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassPropertyCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ClassPropertyGraphicalNodeEditPolicy" createCommandClassName="ClassPropertyCreateCommand" containers="/0/@diagram/@compartments.5 /0/@diagram/@compartments.4 /0/@diagram/@compartments.16 /0/@diagram/@compartments.17">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.ClassProperty_3002" displayName="Property" editHelperClassName="ClassPropertyEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypePropertyDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.PropertyLabelEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Property"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/StructuredClassifier/ownedAttribute"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labelModelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</labelModelFacet>
</childNodes>
- <childNodes
- xsi:type="gmfgen:GenChildLabelNode"
- visualID="3020"
- editPartClassName="ClassOperationEditPart"
- itemSemanticEditPolicyClassName="ClassOperationItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ClassOperationCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ClassOperationGraphicalNodeEditPolicy"
- createCommandClassName="ClassOperationCreateCommand"
- containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.ClassOperation_3020"
- displayName="Operation"
- editHelperClassName="ClassOperationEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="OperationFigureDescriptor"
- classBody="
/**
 * @generated
 */
public class OperationFigureDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel {




	/**
	 * @generated
	 */
	public OperationFigureDescriptor() {
				this.setText("");

this.setFont(THIS_FONT);


	}






}

/**
 * @generated
 */
static final org.eclipse.swt.graphics.Font THIS_FONT = new org.eclipse.swt.graphics.Font(org.eclipse.swt.widgets.Display.getCurrent(), "Arial", 10, org.eclipse.swt.SWT.NORMAL);

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
+ <childNodes xsi:type="gmfgen:GenChildLabelNode" visualID="3020" editPartClassName="ClassOperationEditPart" itemSemanticEditPolicyClassName="ClassOperationItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassOperationCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ClassOperationGraphicalNodeEditPolicy" createCommandClassName="ClassOperationCreateCommand" containers="/0/@diagram/@compartments.7 /0/@diagram/@compartments.6 /0/@diagram/@compartments.18 /0/@diagram/@compartments.19">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.ClassOperation_3020" displayName="Operation" editHelperClassName="ClassOperationEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AbstractAppliedStereotypeDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypeOperationDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.OperationLabelEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Operation"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class/ownedOperation"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labelModelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labelModelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</labelModelFacet>
</childNodes>
- <childNodes
- visualID="1023"
- editPartClassName="StereotypeEditPartCN"
- itemSemanticEditPolicyClassName="StereotypeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="StereotypeCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.5 /0/@diagram/@compartments.7"
- graphicalNodeEditPolicyClassName="StereotypeGraphicalNodeEditPolicyCN"
- createCommandClassName="StereotypeCreateCommandCN"
- containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Stereotype_1023"
- displayName="Stereotype"
- editHelperClassName="StereotypeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.StereotypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
+ <childNodes visualID="1023" editPartClassName="StereotypeEditPartCN" itemSemanticEditPolicyClassName="StereotypeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="StereotypeCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.5 /0/@diagram/@compartments.7" graphicalNodeEditPolicyClassName="StereotypeGraphicalNodeEditPolicyCN" createCommandClassName="StereotypeCreateCommandCN" containers="/0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Stereotype_1023" displayName="Stereotype" editHelperClassName="StereotypeEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.StereotypeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeItemSemanticEditPolicyCN"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Stereotype"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Stereotype"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1046"
- editPartClassName="StereotypeNameEditPartCN"
- itemSemanticEditPolicyClassName="StereotypeNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="1046" editPartClassName="StereotypeNameEditPartCN" itemSemanticEditPolicyClassName="StereotypeNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="3028"
- editPartClassName="MetaclassEditPartCN"
- itemSemanticEditPolicyClassName="MetaclassItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="MetaclassCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="MetaclassGraphicalNodeEditPolicyCN"
- createCommandClassName="MetaclassCreateCommandCN"
- containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Metaclass_3028"
- displayName="Metaclass"
- editHelperClassName="MetaclassEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
+ <childNodes visualID="3010" editPartClassName="ClassEditPartCN" itemSemanticEditPolicyClassName="ClassItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.17 /0/@diagram/@compartments.19" graphicalNodeEditPolicyClassName="ClassGraphicalNodeEditPolicyCN" createCommandClassName="ClassCreateCommandCN" containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Class" metamodelType="/0/@diagram/@topLevelNodes.3/@elementType" editHelperAdviceClassName=""/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomMetaclassItemSemanticEditPolicyCN"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5062"
- editPartClassName="MetaclassNameEditPartCN"
- itemSemanticEditPolicyClassName="MetaclassNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labels visualID="5014" editPartClassName="ClassNameEditPartCN" itemSemanticEditPolicyClassName="ClassNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
+ </viewmap>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="" editorPattern="" editPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="1007"
- editPartClassName="CommentEditPartCN"
- itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN"
- createCommandClassName="CommentCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.CommentCN_1007"
- displayName="Comment"
- editHelperClassName="CommentEditHelperCN"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <childNodes visualID="3028" editPartClassName="MetaclassEditPartCN" itemSemanticEditPolicyClassName="MetaclassItemSemanticEditPolicyCN" canonicalEditPolicyClassName="MetaclassCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="MetaclassGraphicalNodeEditPolicyCN" createCommandClassName="MetaclassCreateCommandCN" containers="/0/@diagram/@compartments.2 /0/@diagram/@compartments.3">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Metaclass_3028" displayName="Metaclass" editHelperClassName="MetaclassEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="50"/>
+ </viewmap>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomMetaclassItemSemanticEditPolicyCN"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.2">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1008"
- editPartClassName="CommentBodyEditPartCN"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5062" editPartClassName="MetaclassNameEditPartCN" itemSemanticEditPolicyClassName="MetaclassNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
+ </childNodes>
+ <childNodes visualID="1007" editPartClassName="CommentEditPartCN" itemSemanticEditPolicyClassName="CommentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="CommentCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="CommentGraphicalNodeEditPolicyCN" createCommandClassName="CommentCreateCommandCN" containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.CommentCN_1007" displayName="Comment" editHelperClassName="CommentEditHelperCN"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <modelFacet>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ </initializers>
+ </modelElementInitializer>
+ </modelFacet>
+ <labels visualID="1008" editPartClassName="CommentBodyEditPartCN" itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getCornerBentFigure" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.3" viewPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="1027"
- editPartClassName="ModelEditPartCN"
- itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.9"
- graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyCN"
- createCommandClassName="ModelCreateCommandCN"
- containers="/0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Model"
- metamodelType="/0/@diagram/@topLevelNodes.6/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
+ <childNodes visualID="1027" editPartClassName="ModelEditPartCN" itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ModelCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.9" graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyCN" createCommandClassName="ModelCreateCommandCN" containers="/0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.0 /0/@diagram/@compartments.1">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Model" metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="50"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1056"
- editPartClassName="ModelNameEditPartCN"
- itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="1056" editPartClassName="ModelNameEditPartCN" itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="1024"
- editPartClassName="ProfileEditPartCN"
- itemSemanticEditPolicyClassName="ProfileItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ProfileCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.3"
- graphicalNodeEditPolicyClassName="ProfileGraphicalNodeEditPolicyCN"
- createCommandClassName="ProfileCreateCommandCN"
- containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.0 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Profile"
- metamodelType="/0/@diagram/@topLevelNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ProfileFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
+ <childNodes visualID="1024" editPartClassName="ProfileEditPartCN" itemSemanticEditPolicyClassName="ProfileItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ProfileCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.3" graphicalNodeEditPolicyClassName="ProfileGraphicalNodeEditPolicyCN" createCommandClassName="ProfileCreateCommandCN" containers="/0/@diagram/@compartments.1 /0/@diagram/@compartments.0 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Profile" metamodelType="/0/@diagram/@topLevelNodes.8/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ProfileFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="200" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1050"
- editPartClassName="ProfileNameEditPartCN"
- itemSemanticEditPolicyClassName="ProfileNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="1050" editPartClassName="ProfileNameEditPartCN" itemSemanticEditPolicyClassName="ProfileNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="1012"
- editPartClassName="PackageEditPartCN"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.11"
- compartments="/0/@diagram/@compartments.1"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN"
- createCommandClassName="PackageCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@childNodes.11 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.9 /0/@diagram/@compartments.8">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.PackageCN_1012"
- displayName="Package"
- editHelperClassName="PackageEditHelperCN"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
+ <childNodes visualID="1012" editPartClassName="PackageEditPartCN" itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PackageCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.12" compartments="/0/@diagram/@compartments.1" graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicyCN" createCommandClassName="PackageCreateCommandCN" containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@childNodes.12 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.9 /0/@diagram/@compartments.8">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.PackageCN_1012" displayName="Package" editHelperClassName="PackageEditHelperCN"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="50"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1010"
- editPartClassName="PackageNameEditPartCN"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="1010" editPartClassName="PackageNameEditPartCN" itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="1028"
- editPartClassName="ConstraintEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN"
- graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN"
- createCommandClassName="ConstraintCreateCommandCN"
- containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.8 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.1 /0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="Constraint"
- editHelperClassName="ConstraintEditHelperCN"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <childNodes visualID="1028" editPartClassName="ConstraintEditPartCN" itemSemanticEditPolicyClassName="ConstraintItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ConstraintCanonicalEditPolicyCN" graphicalNodeEditPolicyClassName="ConstraintGraphicalNodeEditPolicyCN" createCommandClassName="ConstraintCreateCommandCN" containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.8 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.1 /0/@diagram/@compartments.0">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="Constraint" editHelperClassName="ConstraintEditHelperCN"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1059"
- editPartClassName="ConstraintNameEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labels visualID="1059" editPartClassName="ConstraintNameEditPartCN" itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="5064"
- editPartClassName="ConstraintBodyEditPartCN"
- itemSemanticEditPolicyClassName="ConstraintBodyItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.5">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <labels visualID="5064" editPartClassName="ConstraintBodyEditPartCN" itemSemanticEditPolicyClassName="ConstraintBodyItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getConstraintFigure" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.5">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="3025"
- editPartClassName="EnumerationEditPartCN"
- itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="EnumerationCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.10"
- graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicyCN"
- createCommandClassName="EnumerationCreateCommandCN"
- containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.8 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.1 /0/@diagram/@compartments.0">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Enumeration"
- metamodelType="/0/@diagram/@topLevelNodes.9/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
+ <childNodes visualID="3025" editPartClassName="EnumerationEditPartCN" itemSemanticEditPolicyClassName="EnumerationItemSemanticEditPolicyCN" canonicalEditPolicyClassName="EnumerationCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.10" graphicalNodeEditPolicyClassName="EnumerationGraphicalNodeEditPolicyCN" createCommandClassName="EnumerationCreateCommandCN" containers="/0/@diagram/@compartments.9 /0/@diagram/@compartments.8 /0/@diagram/@compartments.3 /0/@diagram/@compartments.2 /0/@diagram/@compartments.1 /0/@diagram/@compartments.0">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Enumeration" metamodelType="/0/@diagram/@topLevelNodes.10/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicyCN"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5055"
- editPartClassName="EnumerationNameEditPartCN"
- itemSemanticEditPolicyClassName="EnumerationNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5055" editPartClassName="EnumerationNameEditPartCN" itemSemanticEditPolicyClassName="EnumerationNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <childNodes
- visualID="3027"
- editPartClassName="DataTypeEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DataTypeCanonicalEditPolicyCN"
- compartments="/0/@diagram/@compartments.13 /0/@diagram/@compartments.15"
- graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicyCN"
- createCommandClassName="DataTypeCreateCommandCN"
- containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.11/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
+ <childNodes visualID="3027" editPartClassName="DataTypeEditPartCN" itemSemanticEditPolicyClassName="DataTypeItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeCanonicalEditPolicyCN" compartments="/0/@diagram/@compartments.13 /0/@diagram/@compartments.15" graphicalNodeEditPolicyClassName="DataTypeGraphicalNodeEditPolicyCN" createCommandClassName="DataTypeCreateCommandCN" containers="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.12/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicyCN"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicyCN"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5061"
- editPartClassName="DataTypeNameEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicyCN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5061" editPartClassName="DataTypeNameEditPartCN" itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicyCN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</childNodes>
- <topLevelNodes
- visualID="2014"
- editPartClassName="DependencyNodeEditPart"
- itemSemanticEditPolicyClassName="DependencyNodeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DependencyNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="DependencyNodeGraphicalNodeEditPolicy"
- createCommandClassName="DependencyNodeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Dependency_2014"
- displayName="Dependency"
- editHelperClassName="DependencyEditHelper"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="DependencyNodeDescriptor"
- classBody="
/**
 * @generated
 */
public class DependencyNodeDescriptor extends org.eclipse.draw2d.Ellipse {




	/**
	 * @generated
	 */
	public DependencyNodeDescriptor() {
					this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
	this.setBackgroundColor(org.eclipse.draw2d.ColorConstants.black);
this.setMaximumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(10)
, getMapMode().DPtoLP(10)
));
this.setMinimumSize(new org.eclipse.draw2d.geometry.Dimension(getMapMode().DPtoLP(10)
, getMapMode().DPtoLP(10)
));
	}


	/**
	 * @generated
	 */
	private boolean myUseLocalCoordinates = false;

	/**
	 * @generated
	 */
	protected boolean useLocalCoordinates() {
		return myUseLocalCoordinates;
	}

	/**
	 * @generated
	 */
	protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
		myUseLocalCoordinates = useLocalCoordinates;
	}





}

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"
- fixedBackground="true"/>
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="10"
- height="10"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ <topLevelNodes visualID="2014" editPartClassName="DependencyNodeEditPart" itemSemanticEditPolicyClassName="DependencyNodeItemSemanticEditPolicy" canonicalEditPolicyClassName="DependencyNodeCanonicalEditPolicy" graphicalNodeEditPolicyClassName="DependencyNodeGraphicalNodeEditPolicy" createCommandClassName="DependencyNodeCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Dependency_2014" displayName="Dependency" editHelperClassName="DependencyEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="10" height="10"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
</modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="1"
- editPartClassName="MultiDependencyLabelEditPart"
- itemSemanticEditPolicyClassName="MultiDependencyLabelItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="1" editPartClassName="MultiDependencyLabelEditPart" itemSemanticEditPolicyClassName="MultiDependencyLabelItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2015"
- editPartClassName="AssociationNodeEditPart"
- itemSemanticEditPolicyClassName="AssociationNodeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="AssociationNodeCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="AssociationNodeGraphicalNodeEditPolicy"
- createCommandClassName="AssociationNodeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="AssociationNode"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="AssociationNodeDescriptor"
- classBody="
/**
 * @generated
 */
public class AssociationNodeDescriptor extends org.eclipse.draw2d.Shape {




	/**
	 * @generated
	 */
	public AssociationNodeDescriptor() {
				this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(5)
, getMapMode().DPtoLP(0)
));this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(10), getMapMode().DPtoLP(5)));
this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(5)
, getMapMode().DPtoLP(10)
));
this.addPoint(new org.eclipse.draw2d.geometry.Point(getMapMode().DPtoLP(0)
, getMapMode().DPtoLP(5)
));
this.setFill(true);
	this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black);
	this.setBackgroundColor(org.eclipse.draw2d.ColorConstants.white);
	}
	/**
	 * @generated
	 */
	private final org.eclipse.draw2d.geometry.PointList myTemplate = new org.eclipse.draw2d.geometry.PointList();
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.geometry.Rectangle myTemplateBounds;
	
	/**
	 * @generated
	 */
	public void addPoint(org.eclipse.draw2d.geometry.Point point){
		myTemplate.addPoint(point);
		myTemplateBounds = null;
	}
	
	/**
	 * @generated
	 */
	protected void fillShape(org.eclipse.draw2d.Graphics graphics) {
		org.eclipse.draw2d.geometry.Rectangle bounds = getBounds();
		graphics.pushState();
		graphics.translate(bounds.x, bounds.y);
		graphics.fillPolygon(scalePointList());
		graphics.popState();
	}
	
	/**
	 * @generated
	 */
	protected void outlineShape(org.eclipse.draw2d.Graphics graphics) {
		org.eclipse.draw2d.geometry.Rectangle bounds = getBounds();
		graphics.pushState();
		graphics.translate(bounds.x, bounds.y);
		graphics.drawPolygon(scalePointList());
		graphics.popState();
	}
	
	/**
	 * @generated
	 */
	private org.eclipse.draw2d.geometry.Rectangle getTemplateBounds(){
		if (myTemplateBounds == null){
			myTemplateBounds = myTemplate.getBounds().getCopy().union(0, 0);
			//just safety -- we are going to use this as divider 
			if (myTemplateBounds.width < 1){
				myTemplateBounds.width = 1;
			}
			if (myTemplateBounds.height < 1){
				myTemplateBounds.height = 1;
			}
		}
		return myTemplateBounds;
	}
	
	/**
	 * @generated
	 */
	private int[] scalePointList() {
		org.eclipse.draw2d.geometry.Rectangle pointsBounds = getTemplateBounds();
		org.eclipse.draw2d.geometry.Rectangle actualBounds = getBounds();

		float xScale = ((float) actualBounds.width) / pointsBounds.width;
		float yScale = ((float) actualBounds.height) / pointsBounds.height;

		if (xScale == 1 && yScale == 1) {
			return myTemplate.toIntArray();
		}
		int[] scaled = (int[]) myTemplate.toIntArray().clone();
		for (int i = 0; i < scaled.length; i += 2) {
			scaled[i] = (int) Math.floor(scaled[i] * xScale);
			scaled[i + 1] = (int) Math.floor(scaled[i + 1] * yScale);
		}
		return scaled;
	}






}

">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedForeground="true"
- fixedBackground="true"/>
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
+ <topLevelNodes visualID="2015" editPartClassName="AssociationNodeEditPart" itemSemanticEditPolicyClassName="AssociationNodeItemSemanticEditPolicy" canonicalEditPolicyClassName="AssociationNodeCanonicalEditPolicy" graphicalNodeEditPolicyClassName="AssociationNodeGraphicalNodeEditPolicy" createCommandClassName="AssociationNodeCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="AssociationNode"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="20" height="20"/>
+ </viewmap>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy"/>
+ <modelFacet>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ </modelFacet>
+ </topLevelNodes>
+ <topLevelNodes visualID="1026" editPartClassName="StereotypeEditPart" itemSemanticEditPolicyClassName="StereotypeItemSemanticEditPolicy" canonicalEditPolicyClassName="StereotypeCanonicalEditPolicy" compartments="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6" graphicalNodeEditPolicyClassName="StereotypeGraphicalNodeEditPolicy" createCommandClassName="StereotypeCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Stereotype_1026" displayName="Stereotype" editHelperClassName="StereotypeEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.StereotypeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Stereotype"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </initializers>
+ </modelElementInitializer>
</modelFacet>
+ <labels visualID="1034" editPartClassName="StereotypeNameEditPart" itemSemanticEditPolicyClassName="StereotypeNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
+ </viewmap>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ </modelFacet>
+ </labels>
</topLevelNodes>
- <topLevelNodes
- visualID="1026"
- editPartClassName="StereotypeEditPart"
- itemSemanticEditPolicyClassName="StereotypeItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StereotypeCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6"
- graphicalNodeEditPolicyClassName="StereotypeGraphicalNodeEditPolicy"
- createCommandClassName="StereotypeCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Stereotype_1026"
- displayName="Stereotype"
- editHelperClassName="StereotypeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.StereotypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
+ <topLevelNodes visualID="2008" editPartClassName="ClassEditPart" itemSemanticEditPolicyClassName="ClasseItemSemanticEditPolicy" compartments="/0/@diagram/@compartments.18 /0/@diagram/@compartments.16" graphicalNodeEditPolicyClassName="ClassGraphicalNodeEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Class_2008" displayName="Class" editHelperClassName="ClassEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomStereotypeItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy.SHOW_HIDE_CLASSIFIER_CONTENTS_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideClassifierContentsEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Stereotype"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/ownedStereotype"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1034"
- editPartClassName="StereotypeNameEditPart"
- itemSemanticEditPolicyClassName="StereotypeNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5029" editPartClassName="ClassNameEditPart" itemSemanticEditPolicyClassName="ClassNameItemSemanticEditPolicy" elementIcon="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="1031"
- editPartClassName="MetaclassEditPart"
- itemSemanticEditPolicyClassName="MetaclassItemSemanticEditPolicy"
- canonicalEditPolicyClassName="MetaclassCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="MetaclassGraphicalNodeEditPolicy"
- createCommandClassName="MetaclassCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Metaclass_1031"
- displayName="Metaclass"
- metamodelType="/0/@diagram/@childNodes.7/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
+ <topLevelNodes visualID="1031" editPartClassName="MetaclassEditPart" itemSemanticEditPolicyClassName="MetaclassItemSemanticEditPolicy" canonicalEditPolicyClassName="MetaclassCanonicalEditPolicy" graphicalNodeEditPolicyClassName="MetaclassGraphicalNodeEditPolicy" createCommandClassName="MetaclassCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Metaclass_1031" displayName="Metaclass" metamodelType="/0/@diagram/@childNodes.8/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="50"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomMetaclassItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomMetaclassItemSemanticEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.2">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Class"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.2">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/isAbstract"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1084"
- editPartClassName="MetaclassNameEditPart"
- itemSemanticEditPolicyClassName="MetaclassNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labels visualID="1084" editPartClassName="MetaclassNameEditPart" itemSemanticEditPolicyClassName="MetaclassNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="1002"
- editPartClassName="CommentEditPart"
- itemSemanticEditPolicyClassName="CommentEditPartItemSemanticEditPolicy"
- canonicalEditPolicyClassName="CommentEditPartCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="CommentEditPartGraphicalNodeEditPolicy"
- createCommandClassName="CommentEditPartCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Comment_1002"
- displayName="Comment"
- editHelperClassName="CommentEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <topLevelNodes visualID="1002" editPartClassName="CommentEditPart" itemSemanticEditPolicyClassName="CommentEditPartItemSemanticEditPolicy" canonicalEditPolicyClassName="CommentEditPartCanonicalEditPolicy" graphicalNodeEditPolicyClassName="CommentEditPartGraphicalNodeEditPolicy" createCommandClassName="CommentEditPartCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Comment_1002" displayName="Comment" editHelperClassName="CommentEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.0">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Element/ownedComment"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.0">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="3"
- editPartClassName="CommentBodyEditPart"
- itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getCornerBentFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="3" editPartClassName="CommentBodyEditPart" itemSemanticEditPolicyClassName="CommentBodyItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getCornerBentFigure" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.HTMLCornerBentFigure">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.3">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.3">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/body"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="1014">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="Constraint"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <topLevelNodes visualID="1014">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="Constraint"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.7">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.7">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1015"
- editPartClassName="ConstraintNameEditPart"
- itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <labels visualID="1015" editPartClassName="ConstraintNameEditPart" itemSemanticEditPolicyClassName="ConstraintNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="5063"
- editPartClassName="ConstraintBodyEditPart"
- itemSemanticEditPolicyClassName="ConstraintBodyItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getConstraintFigure"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.5">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
+ <labels visualID="5063" editPartClassName="ConstraintBodyEditPart" itemSemanticEditPolicyClassName="ConstraintBodyItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getConstraintFigure" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.5">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/specification"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2005"
- editPartClassName="ModelEditPartTN"
- itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ModelCanonicalEditPolicyTN"
- compartments="/0/@diagram/@compartments.8"
- graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyTN"
- createCommandClassName="ModelCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
+ <topLevelNodes visualID="2005" editPartClassName="ModelEditPartTN" itemSemanticEditPolicyClassName="ModelItemSemanticEditPolicyTN" canonicalEditPolicyClassName="ModelCanonicalEditPolicyTN" compartments="/0/@diagram/@compartments.8" graphicalNodeEditPolicyClassName="ModelGraphicalNodeEditPolicyTN" createCommandClassName="ModelCreateCommandTN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="200" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Model"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5020"
- editPartClassName="ModelNameEditPart"
- itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5020" editPartClassName="ModelNameEditPart" itemSemanticEditPolicyClassName="ModelNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="1030"
- editPartClassName="ProfileEditPartTN"
- itemSemanticEditPolicyClassName="ProfileItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ProfileCanonicalEditPolicyTN"
- compartments="/0/@diagram/@compartments.2"
- graphicalNodeEditPolicyClassName="ProfileGraphicalNodeEditPolicyTN"
- createCommandClassName="ProfileCreateCommandTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Profile_1030"
- displayName="Profile"
- editHelperClassName="ProfileEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ProfileFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
+ <topLevelNodes visualID="1030" editPartClassName="ProfileEditPartTN" itemSemanticEditPolicyClassName="ProfileItemSemanticEditPolicyTN" canonicalEditPolicyClassName="ProfileCanonicalEditPolicyTN" compartments="/0/@diagram/@compartments.2" graphicalNodeEditPolicyClassName="ProfileGraphicalNodeEditPolicyTN" createCommandClassName="ProfileCreateCommandTN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Profile_1030" displayName="Profile" editHelperClassName="ProfileEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.ProfileFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="200" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="1047"
- editPartClassName="ProfileNameEditPartTN"
- itemSemanticEditPolicyClassName="ProfileNameItemSemanticEditPolicyTN">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="1047" editPartClassName="ProfileNameEditPartTN" itemSemanticEditPolicyClassName="ProfileNameItemSemanticEditPolicyTN">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2007"
- editPartClassName="PackageEditPart"
- itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackageCanonicalEditPolicy"
- compartments="/0/@diagram/@compartments.0"
- graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicy"
- createCommandClassName="PackageCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Package_1004"
- displayName="Package"
- editHelperClassName="PackageEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="200"
- height="100"/>
+ <topLevelNodes visualID="2007" editPartClassName="PackageEditPart" itemSemanticEditPolicyClassName="PackageItemSemanticEditPolicy" canonicalEditPolicyClassName="PackageCanonicalEditPolicy" compartments="/0/@diagram/@compartments.0" graphicalNodeEditPolicyClassName="PackageGraphicalNodeEditPolicy" createCommandClassName="PackageCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.Package_1004" displayName="Package" editHelperClassName="PackageEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="200" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5026"
- editPartClassName="PackageNameEditPart"
- itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5026" editPartClassName="PackageNameEditPart" itemSemanticEditPolicyClassName="PackageNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2006"
- compartments="/0/@diagram/@compartments.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
+ <topLevelNodes visualID="2006" compartments="/0/@diagram/@compartments.11">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.EnumerationFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomEnumerationItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Enumeration"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5023">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5023">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2009">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@childNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="50"/>
+ <topLevelNodes visualID="2009">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@childNodes.0/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.PrimitiveTypeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="50"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomPrimitiveTypeItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PrimitiveType"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5032"
- editPartClassName="PrimitiveTypeNameEditPart"
- itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicy"
- elementIcon="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5032" editPartClassName="PrimitiveTypeNameEditPart" itemSemanticEditPolicyClassName="PrimitiveTypeNameItemSemanticEditPolicy" elementIcon="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2010"
- compartments="/0/@diagram/@compartments.12 /0/@diagram/@compartments.14">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.DataType_2010"
- displayName="DataType"
- editHelperClassName="DataTypeEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="100"
- height="100"/>
+ <topLevelNodes visualID="2010" compartments="/0/@diagram/@compartments.12 /0/@diagram/@compartments.14">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" uniqueIdentifier="org.eclipse.papyrus.uml.diagram.profile.DataType_2010" displayName="DataType" editHelperClassName="DataTypeEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DataTypeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="100" height="100"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RESIZE_BORDER_ITEMS""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RESIZE_BORDER_ITEMS"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomDataTypeItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/DataType"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
</modelFacet>
- <labels
- visualID="5035"
- editPartClassName="DataTypeNameEditPart"
- itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:StyleAttributes"
- fixedFont="true"/>
+ <labels visualID="5035" editPartClassName="DataTypeNameEditPart" itemSemanticEditPolicyClassName="DataTypeNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:StyleAttributes" fixedFont="true"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <topLevelNodes
- visualID="2016"
- editPartClassName="ShortCutDiagramEditPart"
- itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy"
- canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy"
- graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy"
- createCommandClassName="ShortCutDiagramCreateCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="ShortCutDiagram"
- editHelperClassName="ShortCutDiagramEditHelper"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
- <attributes
- xsi:type="gmfgen:DefaultSizeAttributes"
- width="20"
- height="20"/>
+ <topLevelNodes visualID="2016" editPartClassName="ShortCutDiagramEditPart" itemSemanticEditPolicyClassName="ShortCutDiagramItemSemanticEditPolicy" canonicalEditPolicyClassName="ShortCutDiagramCanonicalEditPolicy" graphicalNodeEditPolicyClassName="ShortCutDiagramGraphicalNodeEditPolicy" createCommandClassName="ShortCutDiagramCreateCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="ShortCutDiagram" editHelperClassName="ShortCutDiagramEditHelper"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.node.DiagramNodeFigure">
+ <attributes xsi:type="gmfgen:DefaultSizeAttributes" width="20" height="20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy.SHOW_HIDE_LABEL_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideLabelEditPolicy"/>
<modelFacet>
- <metaClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
+ <metaClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram"/>
</modelFacet>
- <labels
- xsi:type="gmfgen:GenExternalNodeLabel"
- visualID="2"
- editPartClassName="DiagramNameEditPart"
- itemSemanticEditPolicyClassName="DiagramNameItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
+ <labels xsi:type="gmfgen:GenExternalNodeLabel" visualID="2" editPartClassName="DiagramNameEditPart" itemSemanticEditPolicyClassName="DiagramNameItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Profile"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Diagram/name"/>
</modelFacet>
</labels>
</topLevelNodes>
- <links
- visualID="1013"
- editPartClassName="ExtensionEditPart">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"
- displayName="Extension"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.ExtensionFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ExtensionCustomNameEditPolicy.SPECIFIC_EXTENSION_NAME_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ExtensionCustomNameEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomExtensionItemSemanticEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extension"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/ownedEnd"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extension/metaclass"/>
+ <links visualID="1013" editPartClassName="ExtensionEditPart">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:MetamodelType" displayName="Extension"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.ExtensionFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ExtensionCustomNameEditPolicy.SPECIFIC_EXTENSION_NAME_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ExtensionCustomNameEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomExtensionItemSemanticEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extension"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/ownedEnd"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Extension/metaclass"/>
</modelFacet>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.5"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.6"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.5" targetEnd="/0/@expressionProviders/@providers.0/@expressions.6"/>
</links>
- <links
- visualID="4001">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Association"
- metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.AssociationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <links visualID="4001">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Association" metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.AssociationFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
</modelFacet>
- <labels
- visualID="6001"
- editPartClassName="AssociationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="AssociationAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
+ <labels visualID="6001" editPartClassName="AssociationAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="AssociationAppliedStereotypeItemSemanticEditPolicy" readOnly="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAppliedStereotypeLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="60"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="<<{0}>>"
- editorPattern="<<{0}>>"
- editPattern="<<{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.1" viewPattern="<<{0}>>" editorPattern="<<{0}>>" editPattern="<<{0}>>">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6002">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAssociationNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
+ <labels visualID="6002">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAssociationNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="20"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" editPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6003"
- editPartClassName="AssociationRoleTargetEditPart"
- itemSemanticEditPolicyClassName="AssociationRoleTargetItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleTargetLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
+ <labels visualID="6003" editPartClassName="AssociationRoleTargetEditPart" itemSemanticEditPolicyClassName="AssociationRoleTargetItemSemanticEditPolicy" readOnly="true" alignment="SOURCE">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getRoleTargetLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="srcRole{0}" editorPattern="srcRole{0}" editPattern="srcRole{0}">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6005"
- editPartClassName="AssociationRoleSourceEditPart"
- itemSemanticEditPolicyClassName="AssociationRoleSourceItemSemanticEditPolicy"
- readOnly="true"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleSourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
+ <labels visualID="6005" editPartClassName="AssociationRoleSourceEditPart" itemSemanticEditPolicyClassName="AssociationRoleSourceItemSemanticEditPolicy" readOnly="true" alignment="TARGET">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getRoleSourceLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="-20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="targMul{0}"
- editorPattern="targMul{0}"
- editPattern="targMul{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="targMul{0}" editorPattern="targMul{0}" editPattern="targMul{0}">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6033"
- editPartClassName="AssociationMultiplicitySourceEditPart"
- itemSemanticEditPolicyClassName="AssociationMultiplicitySourceItemSemanticEditPolicy"
- alignment="TARGET">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getMultiplicitySourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
+ <labels visualID="6033" editPartClassName="AssociationMultiplicitySourceEditPart" itemSemanticEditPolicyClassName="AssociationMultiplicitySourceItemSemanticEditPolicy" alignment="TARGET">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getMultiplicitySourceLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceMultiplicityEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="srcMul{0}"
- editorPattern="srcMul{0}"
- editPattern="srcMul{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndSourceMultiplicityEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="srcMul{0}" editorPattern="srcMul{0}" editPattern="srcMul{0}">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6034"
- editPartClassName="AssociationMultiplicityTargetEditPart"
- itemSemanticEditPolicyClassName="AssociationMultiplicityTargetItemSemanticEditPolicy"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getMultiplicityTargetLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
+ <labels visualID="6034" editPartClassName="AssociationMultiplicityTargetEditPart" itemSemanticEditPolicyClassName="AssociationMultiplicityTargetItemSemanticEditPolicy" alignment="SOURCE">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getMultiplicityTargetLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="-20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="srcMul{0}"
- editorPattern="srcMul{0}"
- editPattern="srcMul{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="srcMul{0}" editorPattern="srcMul{0}" editPattern="srcMul{0}">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.10"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.11"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.10" targetEnd="/0/@expressionProviders/@providers.0/@expressions.11"/>
</links>
- <links
- visualID="1045">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication/applyingPackage"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication/appliedProfile"/>
+ <links visualID="1045">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/profileApplication"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication/applyingPackage"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ProfileApplication/appliedProfile"/>
</modelFacet>
</links>
- <links
- visualID="4019"
- editPartClassName="AssociationBranchEditPart"
- itemSemanticEditPolicyClassName="AssociationBranchItemSemanticEditPolicy"
- createCommandClassName="AssociationBranchCreateCommand"
- reorientCommandClassName="AssociationBranchReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="AssociationBranch"
- metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.AssociationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationBranchItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <links visualID="4019" editPartClassName="AssociationBranchEditPart" itemSemanticEditPolicyClassName="AssociationBranchItemSemanticEditPolicy" createCommandClassName="AssociationBranchCreateCommand" reorientCommandClassName="AssociationBranchReorientCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="AssociationBranch" metamodelType="/0/@diagram/@topLevelNodes.1/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.AssociationFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationBranchItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Association/endType"/>
</modelFacet>
- <labels
- visualID="6024"
- editPartClassName="AssociationBranchRoleEditPart"
- itemSemanticEditPolicyClassName="AssociationBranchRoleItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getRoleSourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="-20"/>
+ <labels visualID="6024" editPartClassName="AssociationBranchRoleEditPart" itemSemanticEditPolicyClassName="AssociationBranchRoleItemSemanticEditPolicy" readOnly="true" alignment="SOURCE">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getRoleSourceLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="-20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.4"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.4" viewPattern="srcRole{0}" editorPattern="srcRole{0}" editPattern="srcRole{0}">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6035"
- editPartClassName="AssociationBranchMultiplicityEditPart"
- itemSemanticEditPolicyClassName="AssociationBranchMultiplicityItemSemanticEditPolicy"
- readOnly="true"
- alignment="SOURCE">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getMultiplicitySourceLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="20"/>
+ <labels visualID="6035" editPartClassName="AssociationBranchMultiplicityEditPart" itemSemanticEditPolicyClassName="AssociationBranchMultiplicityItemSemanticEditPolicy" readOnly="true" alignment="SOURCE">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getMultiplicitySourceLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="20"/>
</viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="srcRole{0}"
- editorPattern="srcRole{0}"
- editPattern="srcRole{0}">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.DisplayAssociationEndTargetMultiplicityEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="srcRole{0}" editorPattern="srcRole{0}" editPattern="srcRole{0}">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.10"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.11"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.10" targetEnd="/0/@expressionProviders/@providers.0/@expressions.11"/>
</links>
- <links
- visualID="4002">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomGeneralizationItemSemanticEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
+ <links visualID="4002">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.GeneralizationFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomGeneralizationItemSemanticEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Classifier/generalization"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/general"/>
</modelFacet>
- <labels
- visualID="6007"
- editPartClassName="GeneralizationAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="GeneralizationAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
+ <labels visualID="6007" editPartClassName="GeneralizationAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="GeneralizationAppliedStereotypeItemSemanticEditPolicy" readOnly="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAppliedStereotypeLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="60"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- viewPattern="<<{0}>>"
- editorPattern="<<{0}>>"
- editPattern="<<{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" viewPattern="<<{0}>>" editorPattern="<<{0}>>" editPattern="<<{0}>>">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Generalization/isSubstitutable"/>
</modelFacet>
</labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.8"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.9"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.8" targetEnd="/0/@expressionProviders/@providers.0/@expressions.9"/>
</links>
- <links
- visualID="4008">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <links visualID="4008">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLinkLabelDisplayEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
</modelFacet>
- <labels
- visualID="6026">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
+ <labels visualID="6026">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="40"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0"
- editPattern="">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0" editPattern="">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <labels
- visualID="6027"
- editPartClassName="DependencyAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="DependencyAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
+ <labels visualID="6027" editPartClassName="DependencyAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="DependencyAppliedStereotypeItemSemanticEditPolicy" readOnly="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAppliedStereotypeLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="60"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="<<{0}>>"
- editorPattern="<<{0}>>"
- editPattern="<<{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.1" viewPattern="<<{0}>>" editorPattern="<<{0}>>" editPattern="<<{0}>>">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</modelFacet>
</labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.12"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.13"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.12" targetEnd="/0/@expressionProviders/@providers.0/@expressions.13"/>
</links>
- <links
- visualID="4018"
- editPartClassName="DependencyBranchEditPart"
- itemSemanticEditPolicyClassName="DependencyBranchItemSemanticEditPolicy"
- createCommandClassName="DependencyBranchCreateCommand"
- reorientCommandClassName="DependencyBranchReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.1">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
+ <links visualID="4018" editPartClassName="DependencyBranchEditPart" itemSemanticEditPolicyClassName="DependencyBranchItemSemanticEditPolicy" createCommandClassName="DependencyBranchCreateCommand" reorientCommandClassName="DependencyBranchReorientCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType" metamodelType="/0/@diagram/@topLevelNodes.0/@elementType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Package/packagedElement"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.1">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/NamedElement/name"/>
</initializers>
</modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/client"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Dependency/supplier"/>
</modelFacet>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.12"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.13"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.12" targetEnd="/0/@expressionProviders/@providers.0/@expressions.13"/>
</links>
- <links
- visualID="1064">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypeElementImportLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
- <modelElementInitializer
- xsi:type="gmfgen:GenFeatureSeqInitializer">
- <initializers
- xsi:type="gmfgen:GenFeatureValueSpec"
- value="/0/@expressionProviders/@providers.0/@expressions.4">
- <feature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
+ <links visualID="1064">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.AppliedStereotypeElementImportLabelDisplayEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/elementImport"/>
+ <modelElementInitializer xsi:type="gmfgen:GenFeatureSeqInitializer">
+ <initializers xsi:type="gmfgen:GenFeatureValueSpec" value="/0/@expressionProviders/@providers.0/@expressions.4">
+ <feature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
</initializers>
</modelElementInitializer>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/importingNamespace"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/importedElement"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/importingNamespace"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/importedElement"/>
</modelFacet>
- <labels
- visualID="6020">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getNameLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="40"/>
+ <labels visualID="6020">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getNameLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="40"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.0">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.0">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
</modelFacet>
</labels>
- <labels
- visualID="6021"
- editPartClassName="AppliedStereotypeElementImportEditPart"
- itemSemanticEditPolicyClassName="AppliedStereotypeElementImportItemSemanticEditPolicy">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
+ <labels visualID="6021" editPartClassName="AppliedStereotypeElementImportEditPart" itemSemanticEditPolicyClassName="AppliedStereotypeElementImportItemSemanticEditPolicy">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAppliedStereotypeLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="60"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.1"
- viewPattern="<<{0}>>"
- editorPattern="<<{0}>>"
- editPattern="<<{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.1" viewPattern="<<{0}>>" editorPattern="<<{0}>>" editPattern="<<{0}>>">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/ElementImport/alias"/>
</modelFacet>
</labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.14"
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.15"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.14" targetEnd="/0/@expressionProviders/@providers.0/@expressions.15"/>
</links>
- <links
- visualID="1065">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:MetamodelType"/>
- <viewmap
- xsi:type="gmfgen:FigureViewmap"
- figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageImportLabelDisplayEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:TypeLinkModelFacet">
- <metaClass
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport"/>
- <containmentMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
- <childMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
- <sourceMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importingNamespace"/>
- <targetMetaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importedPackage"/>
+ <links visualID="1065">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:MetamodelType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.DashedEdgeFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypePackageImportLabelDisplayEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:TypeLinkModelFacet">
+ <metaClass href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport"/>
+ <containmentMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
+ <childMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Namespace/packageImport"/>
+ <sourceMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importingNamespace"/>
+ <targetMetaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/importedPackage"/>
</modelFacet>
- <labels
- visualID="6022"
- editPartClassName="PackageImportAppliedStereotypeEditPart"
- itemSemanticEditPolicyClassName="PackageImportAppliedStereotypeItemSemanticEditPolicy"
- readOnly="true">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAppliedStereotypeLabel"
- figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
- <attributes
- xsi:type="gmfgen:LabelOffsetAttributes"
- y="60"/>
+ <labels visualID="6022" editPartClassName="PackageImportAppliedStereotypeEditPart" itemSemanticEditPolicyClassName="PackageImportAppliedStereotypeItemSemanticEditPolicy" readOnly="true">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAppliedStereotypeLabel" figureQualifiedClassName="org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel">
+ <attributes xsi:type="gmfgen:LabelOffsetAttributes" y="60"/>
</viewmap>
- <modelFacet
- xsi:type="gmfgen:FeatureLabelModelFacet"
- parser="/0/@labelParsers/@implementations.2"
- viewPattern="<<{0}>>"
- editorPattern="<<{0}>>"
- editPattern="<<{0}>>">
- <metaFeatures
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/visibility"/>
+ <modelFacet xsi:type="gmfgen:FeatureLabelModelFacet" parser="/0/@labelParsers/@implementations.2" viewPattern="<<{0}>>" editorPattern="<<{0}>>" editPattern="<<{0}>>">
+ <metaFeatures href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/PackageImport/visibility"/>
</modelFacet>
</labels>
- <creationConstraints
- sourceEnd="/0/@expressionProviders/@providers.0/@expressions.16"/>
+ <creationConstraints sourceEnd="/0/@expressionProviders/@providers.0/@expressions.16"/>
</links>
- <links
- visualID="1022"
- editPartClassName="CommentAnnotatedElementEditPart"
- itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy"
- createCommandClassName="CommentAnnotatedElementCreateCommand"
- reorientCommandClassName="CommentAnnotatedElementReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="CommentLinkDescriptor"
- classBody="
/**
 * @generated
 */
public class CommentLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public CommentLinkDescriptor() {
		this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);

	}




}

">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
+ <links visualID="1022" editPartClassName="CommentAnnotatedElementEditPart" itemSemanticEditPolicyClassName="CommentAnnotatedElementItemSemanticEditPolicy" createCommandClassName="CommentAnnotatedElementCreateCommand" reorientCommandClassName="CommentAnnotatedElementReorientCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Comment/annotatedElement"/>
</modelFacet>
- <creationConstraints
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.17"/>
+ <creationConstraints targetEnd="/0/@expressionProviders/@providers.0/@expressions.17"/>
</links>
- <links
- visualID="4014">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="CommentLinkDescriptor"
- classBody="
/**
 * @generated
 */
public class CommentLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public CommentLinkDescriptor() {
		this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASH);

	}




}

">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
+ <links visualID="4014">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/constrainedElement"/>
</modelFacet>
- <creationConstraints
- targetEnd="/0/@expressionProviders/@providers.0/@expressions.18"/>
+ <creationConstraints targetEnd="/0/@expressionProviders/@providers.0/@expressions.18"/>
</links>
- <links
- visualID="8500"
- editPartClassName="ContextLinkEditPart"
- itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy"
- createCommandClassName="ContextLinkCreateCommand"
- reorientCommandClassName="ContextLinkReorientCommand">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
- <elementType
- xsi:type="gmfgen:SpecializationType"
- displayName="Undefined"/>
- <viewmap
- xsi:type="gmfgen:InnerClassViewmap"
- className="ContextLinkDescriptor"
- classBody="
/**
 * @generated
 */
public class ContextLinkDescriptor extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx {




	/**
	 * @generated
	 */
	public ContextLinkDescriptor() {
		this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_DASHDOT);

	}




}

">
- <requiredPluginIDs>org.eclipse.gmf.runtime.draw2d.ui</requiredPluginIDs>
- </viewmap>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
- <modelFacet
- xsi:type="gmfgen:FeatureLinkModelFacet">
- <metaFeature
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
+ <links visualID="8500" editPartClassName="ContextLinkEditPart" itemSemanticEditPolicyClassName="ContextLinkItemSemanticEditPolicy" createCommandClassName="ContextLinkCreateCommand" reorientCommandClassName="ContextLinkReorientCommand">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Edge"/>
+ <elementType xsi:type="gmfgen:SpecializationType" displayName="Undefined"/>
+ <viewmap xsi:type="gmfgen:FigureViewmap" figureQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.figure.CustomContextLinkFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy"/>
+ <modelFacet xsi:type="gmfgen:FeatureLinkModelFacet">
+ <metaFeature href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#//uml/Constraint/context"/>
</modelFacet>
</links>
- <compartments
- visualID="1005"
- editPartClassName="PackagePackageableElementCompartmentEditPart"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.6"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.8"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <compartments visualID="1005" editPartClassName="PackagePackageableElementCompartmentEditPart" itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7" title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.9" listLayout="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ </compartments>
+ <compartments visualID="11" editPartClassName="PackagePackageableElementCompartmentEditPartCN" itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7" title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.12" listLayout="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ </compartments>
+ <compartments visualID="1042" editPartClassName="ProfilePackageableElementCompartmentEditPartTN" itemSemanticEditPolicyClassName="ProfilePackageableElementCompartmentItemSemanticEditPolicyTN" canonicalEditPolicyClassName="ProfilePackageableElementCompartmentCanonicalEditPolicyTN" childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.7" title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.8" listLayout="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ </compartments>
+ <compartments visualID="1051" editPartClassName="ProfilePackageableElementCompartmentEditPartCN" itemSemanticEditPolicyClassName="ProfilePackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ProfilePackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.7" title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.11" listLayout="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ </compartments>
+ <compartments visualID="1071" editPartClassName="StereotypeAttributeCompartmentEditPart" itemSemanticEditPolicyClassName="StereotypeAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="StereotypeAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.4" title="attributes" node="/0/@diagram/@topLevelNodes.2">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAttributeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="11"
- editPartClassName="PackagePackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="PackagePackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="PackagePackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.6"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@childNodes.11"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <compartments visualID="1052" editPartClassName="StereotypeAttributeCompartmentEditPartCN" itemSemanticEditPolicyClassName="StereotypeAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="StereotypeAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.4" title="attributes" node="/0/@diagram/@childNodes.6">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAttributeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1042"
- editPartClassName="ProfilePackageableElementCompartmentEditPartTN"
- itemSemanticEditPolicyClassName="ProfilePackageableElementCompartmentItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ProfilePackageableElementCompartmentCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.7"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.7"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <compartments visualID="1019" editPartClassName="StereotypeOperationCompartmentEditPart" itemSemanticEditPolicyClassName="StereotypeOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="StereotypeOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.5" title="operations" node="/0/@diagram/@topLevelNodes.2">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getOperationCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1051"
- editPartClassName="ProfilePackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ProfilePackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ProfilePackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.6 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.8 /0/@diagram/@childNodes.7"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@childNodes.10"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <compartments visualID="1053" editPartClassName="StereotypeOperationCompartmentEditPartCN" itemSemanticEditPolicyClassName="StereotypeOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="StereotypeOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.5" title="operations" node="/0/@diagram/@childNodes.6">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getOperationCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1071"
- editPartClassName="StereotypeAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="StereotypeAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StereotypeAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.4"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="1057" editPartClassName="ModelPackageableElementCompartmentEditPartTN" itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyTN" canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyTN" childNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7" title="packaged elements" canCollapse="false" node="/0/@diagram/@topLevelNodes.7" listLayout="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
</compartments>
- <compartments
- visualID="1052"
- editPartClassName="StereotypeAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="StereotypeAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="StereotypeAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.4"
- title="attributes"
- node="/0/@diagram/@childNodes.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="1058" editPartClassName="ModelPackageableElementCompartmentEditPartCN" itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.14 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.15 /0/@diagram/@childNodes.7" title="packaged elements" canCollapse="false" node="/0/@diagram/@childNodes.10" listLayout="false">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getPackageableElementFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
</compartments>
- <compartments
- visualID="1019"
- editPartClassName="StereotypeOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="StereotypeOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="StereotypeOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.5"
- title="operations"
- node="/0/@diagram/@topLevelNodes.2">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="1062" editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN" itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.2" title="literals" node="/0/@diagram/@childNodes.14">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getEnumerationLiteralCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1053"
- editPartClassName="StereotypeOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="StereotypeOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="StereotypeOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.5"
- title="operations"
- node="/0/@diagram/@childNodes.6">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="1063" editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart" itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.2" title="literals" node="/0/@diagram/@topLevelNodes.10">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getEnumerationLiteralCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1057"
- editPartClassName="ModelPackageableElementCompartmentEditPartTN"
- itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyTN"
- canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyTN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@topLevelNodes.6"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <compartments visualID="1067" editPartClassName="DataTypeAttributeCompartmentEditPart" itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.3" title="attributes" node="/0/@diagram/@topLevelNodes.12">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAttributeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1058"
- editPartClassName="ModelPackageableElementCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="ModelPackageableElementCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="ModelPackageableElementCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.8 /0/@diagram/@childNodes.9 /0/@diagram/@childNodes.10 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.13 /0/@diagram/@childNodes.0 /0/@diagram/@childNodes.14"
- title="packaged elements"
- canCollapse="false"
- node="/0/@diagram/@childNodes.9"
- listLayout="false">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getPackageableElementFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.common.editpolicies.CustomContainerEditPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomCreationRoleEditPolicy"/>
+ <compartments visualID="1069" editPartClassName="DataTypeAttributeCompartmentEditPartCN" itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.3" title="attributes" node="/0/@diagram/@childNodes.15">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAttributeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1062"
- editPartClassName="EnumerationEnumerationLiteralCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.2"
- title="literals"
- node="/0/@diagram/@childNodes.13">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getEnumerationLiteralCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="1068" editPartClassName="DataTypeOperationCompartmentEditPart" itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.1" title="operations" node="/0/@diagram/@topLevelNodes.12">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getOperationCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1063"
- editPartClassName="EnumerationEnumerationLiteralCompartmentEditPart"
- itemSemanticEditPolicyClassName="EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="EnumerationEnumerationLiteralCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.2"
- title="literals"
- node="/0/@diagram/@topLevelNodes.9">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getEnumerationLiteralCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="1070" editPartClassName="DataTypeOperationCompartmentEditPartCN" itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.1" title="operations" node="/0/@diagram/@childNodes.15">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getOperationCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1067"
- editPartClassName="DataTypeAttributeCompartmentEditPart"
- itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.3"
- title="attributes"
- node="/0/@diagram/@topLevelNodes.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="7017" editPartClassName="ClassAttributeCompartmentEditPart" itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.4" title="attributes" node="/0/@diagram/@topLevelNodes.3">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAttributeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1069"
- editPartClassName="DataTypeAttributeCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeAttributeCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DataTypeAttributeCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.3"
- title="attributes"
- node="/0/@diagram/@childNodes.14">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getAttributeCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="7011" editPartClassName="ClassAttributeCompartmentEditPartCN" itemSemanticEditPolicyClassName="ClassAttributeCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassAttributeCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.4" title="attributes" node="/0/@diagram/@childNodes.7">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getAttributeCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1068"
- editPartClassName="DataTypeOperationCompartmentEditPart"
- itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicy"
- canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicy"
- childNodes="/0/@diagram/@childNodes.1"
- title="operations"
- node="/0/@diagram/@topLevelNodes.11">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="7018" editPartClassName="ClassOperationCompartmentEditPart" itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicy" canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicy" childNodes="/0/@diagram/@childNodes.5" title="operations" node="/0/@diagram/@topLevelNodes.3">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getOperationCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
- <compartments
- visualID="1070"
- editPartClassName="DataTypeOperationCompartmentEditPartCN"
- itemSemanticEditPolicyClassName="DataTypeOperationCompartmentItemSemanticEditPolicyCN"
- canonicalEditPolicyClassName="DataTypeOperationCompartmentCanonicalEditPolicyCN"
- childNodes="/0/@diagram/@childNodes.1"
- title="operations"
- node="/0/@diagram/@childNodes.14">
- <diagramRunTimeClass
- href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
- <viewmap
- xsi:type="gmfgen:ParentAssignedViewmap"
- getterName="getOperationCompartmentFigure"
- figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key=""RemoveOrphanView""
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
- <behaviour
- xsi:type="gmfgen:CustomBehaviour"
- key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE"
- editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
+ <compartments visualID="7012" editPartClassName="ClassOperationCompartmentEditPartCN" itemSemanticEditPolicyClassName="ClassOperationCompartmentItemSemanticEditPolicyCN" canonicalEditPolicyClassName="ClassOperationCompartmentCanonicalEditPolicyCN" childNodes="/0/@diagram/@childNodes.5" title="operations" node="/0/@diagram/@childNodes.7">
+ <diagramRunTimeClass href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
+ <viewmap xsi:type="gmfgen:ParentAssignedViewmap" getterName="getOperationCompartmentFigure" figureQualifiedClassName="org.eclipse.draw2d.RectangleFigure"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key=""RemoveOrphanView"" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy"/>
+ <behaviour xsi:type="gmfgen:CustomBehaviour" key="org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE" editPolicyQualifiedClassName="org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy"/>
</compartments>
<palette>
- <groups
- title="Nodes"
- description="Nodes"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Package"
- description="Create a new Package"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif"
- genNodes="/0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.11"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Profile"
- description="Add a new Profile"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif"
- genNodes="/0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Comment"
- description="Create new comment"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif"
- genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.8"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Constraint"
- description="Create a constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif"
- genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.12"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Stereotype"
- description="Add new Stereotype"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif"
- qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Import Metaclass"
- description="Import a new Metaclass"
- largeIconPath="/icons/Metaclass.gif"
- smallIconPath="/icons/Metaclass.gif"
- genNodes="/0/@diagram/@topLevelNodes.3 /0/@diagram/@childNodes.7"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Enumeration"
- description="Create new Enumeration"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
- genNodes="/0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.13"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="DataType"
- description="Create new DataType"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
- genNodes="/0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.14"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="PrimitiveType"
- description="Create new PrimitiveType"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
- genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Property"
- description="Add new property"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- qualifiedToolName=""
- genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Operation"
- description="Add new operation"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
- genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.5"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="EnumerationLiteral"
- description="Add new EnumerationLiteral"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
- genNodes="/0/@diagram/@childNodes.2"/>
+ <groups title="Nodes" description="Nodes" largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif">
+ <entries xsi:type="gmfgen:ToolEntry" title="Package" description="Create a new Package" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Package.gif" genNodes="/0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.12"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Profile" description="Add a new Profile" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Profile.gif" genNodes="/0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.11"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Comment" description="Create new comment" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Comment.gif" genNodes="/0/@diagram/@topLevelNodes.5 /0/@diagram/@childNodes.9"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Constraint" description="Create a constraint" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Constraint.gif" genNodes="/0/@diagram/@topLevelNodes.6 /0/@diagram/@childNodes.13"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Stereotype" description="Add new Stereotype" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif" qualifiedToolName="" genNodes="/0/@diagram/@childNodes.6 /0/@diagram/@topLevelNodes.2"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Class" description="Create a new Class" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif" createMethodName="createClass6CreationTool" genNodes="/0/@diagram/@childNodes.7 /0/@diagram/@topLevelNodes.3"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Import Metaclass" description="Import a new Metaclass" largeIconPath="/icons/Metaclass.gif" smallIconPath="/icons/Metaclass.gif" genNodes="/0/@diagram/@topLevelNodes.4 /0/@diagram/@childNodes.8"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Enumeration" description="Create new Enumeration" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif" genNodes="/0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.14"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="DataType" description="Create new DataType" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif" genNodes="/0/@diagram/@topLevelNodes.12 /0/@diagram/@childNodes.15"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="PrimitiveType" description="Create new PrimitiveType" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif" genNodes="/0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.0"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Property" description="Add new property" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif" qualifiedToolName="" genNodes="/0/@diagram/@childNodes.4 /0/@diagram/@childNodes.3"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Operation" description="Add new operation" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif" genNodes="/0/@diagram/@childNodes.1 /0/@diagram/@childNodes.5"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="EnumerationLiteral" description="Add new EnumerationLiteral" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif" genNodes="/0/@diagram/@childNodes.2"/>
</groups>
- <groups
- title="Edges"
- description="Edges"
- largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif"
- createMethodName="createEdges2Group">
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Extension"
- description="Add an Extension"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extension.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extension.gif"
- genLinks="/0/@diagram/@links.0"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Generalization"
- description="Create a generalization"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif"
- genLinks="/0/@diagram/@links.4"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Link"
- description="Create a link for Comment, Constraint"
- largeIconPath="icons/obj16/Link.gif"
- smallIconPath="icons/obj16/Link.gif"
- genLinks="/0/@diagram/@links.9 /0/@diagram/@links.10"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ProfileApplication"
- description="Create a ProfileApplication"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif"
- genLinks="/0/@diagram/@links.2"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="Association"
- description="Create an Association"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- genLinks="/0/@diagram/@links.1"/>
- <entries
- xsi:type="gmfgen:ToolEntry"
- title="ContextLink"
- description="Creation of a context link for a Constraint"
- largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif"
- createMethodName="createContextLink6CreationTool"
- genLinks="/0/@diagram/@links.11"/>
+ <groups title="Edges" description="Edges" largeIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" smallIconPath="platform:/plugin/org.eclipse.gmf.runtime.diagram.ui/icons/group.gif" createMethodName="createEdges2Group">
+ <entries xsi:type="gmfgen:ToolEntry" title="Extension" description="Add an Extension" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extension.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Extension.gif" genLinks="/0/@diagram/@links.0"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Generalization" description="Create a generalization" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Generalization.gif" genLinks="/0/@diagram/@links.4"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Link" description="Create a link for Comment, Constraint" largeIconPath="icons/obj16/Link.gif" smallIconPath="icons/obj16/Link.gif" genLinks="/0/@diagram/@links.9 /0/@diagram/@links.10"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="ProfileApplication" description="Create a ProfileApplication" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/ProfileApplication.gif" genLinks="/0/@diagram/@links.2"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="Association" description="Create an Association" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" genLinks="/0/@diagram/@links.1"/>
+ <entries xsi:type="gmfgen:ToolEntry" title="ContextLink" description="Creation of a context link for a Constraint" largeIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" smallIconPath="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Association.gif" createMethodName="createContextLink6CreationTool" genLinks="/0/@diagram/@links.11"/>
</groups>
</palette>
- <preferencePages
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.general"
- name="UML Diagram">
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.appearance"
- name="Appearance"
- kind="Appearance"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.connections"
- name="Connections"
- kind="Connections"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.printing"
- name="Printing"
- kind="Printing"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.rulersAndGrid"
- name="RulersAndGrid"
- kind="RulersAndGrid"/>
- <children
- xsi:type="gmfgen:GenStandardPreferencePage"
- iD="org.eclipse.uml2.uml.diagram.pathmaps"
- name="Pathmaps"
- kind="Pathmaps"/>
+ <preferencePages xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.general" name="UML Diagram">
+ <children xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.appearance" name="Appearance" kind="Appearance"/>
+ <children xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.connections" name="Connections" kind="Connections"/>
+ <children xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.printing" name="Printing" kind="Printing"/>
+ <children xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.rulersAndGrid" name="RulersAndGrid" kind="RulersAndGrid"/>
+ <children xsi:type="gmfgen:GenStandardPreferencePage" iD="org.eclipse.uml2.uml.diagram.pathmaps" name="Pathmaps" kind="Pathmaps"/>
</preferencePages>
</diagram>
- <plugin
- iD="org.eclipse.papyrus.uml.diagram.profile"
- name="PapyrusUMLProfileDiagram"
- provider="CEA LIST">
+ <plugin iD="org.eclipse.papyrus.uml.diagram.profile" name="PapyrusUMLProfileDiagram" provider="CEA LIST">
<requiredPlugins>org.eclipse.draw2d</requiredPlugins>
<requiredPlugins>org.eclipse.gmf.runtime.draw2d.ui</requiredPlugins>
</plugin>
@@ -3409,259 +1306,77 @@ <navigator/>
<diagramUpdater/>
<propertySheet>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="apparence"
- label="Apparence"/>
- <tabs
- xsi:type="gmfgen:GenStandardPropertyTab"
- iD="diagram"
- label="Rulers & Grid"/>
- <tabs
- xsi:type="gmfgen:GenCustomPropertyTab"
- iD="domain"
- label="Core">
- <filter
- xsi:type="gmfgen:TypeTabFilter">
+ <tabs xsi:type="gmfgen:GenStandardPropertyTab" iD="apparence" label="Apparence"/>
+ <tabs xsi:type="gmfgen:GenStandardPropertyTab" iD="diagram" label="Rulers & Grid"/>
+ <tabs xsi:type="gmfgen:GenCustomPropertyTab" iD="domain" label="Core">
+ <filter xsi:type="gmfgen:TypeTabFilter">
<types>org.eclipse.gmf.runtime.notation.View</types>
<types>org.eclipse.gef.EditPart</types>
<generatedTypes>abstractNavigatorItem</generatedTypes>
</filter>
</tabs>
</propertySheet>
- <domainGenModel
- href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
+ <domainGenModel href="../../../plugin/org.eclipse.uml2.uml/model/UML.genmodel#/"/>
<expressionProviders>
- <providers
- xsi:type="gmfgen:GenJavaExpressionProvider"
- injectExpressionBody="true">
- <expressions
- body="return it.getBody();"/>
- <expressions
- body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrementFromBase(it.eClass().getName(), it.getOwner().eContents());"/>
- <expressions
- body="//isAbstract = true
return true;"/>
- <expressions
- body="return "Metaclass";"/>
- <expressions
- body="if (it.getImportedElement() != null) {
			return (it.getImportedElement().getLabel());
		}
		return "elementimport";"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//ExtensionSource
/**we can't make a test here, because, the source must be a Property (ExtensionEnd) and it's a Stereotype
 * 
 * @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
*/"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//ExtensionTarget

/**we can't make a test here, because, the source must be a Property (ExtensionEnd) and it's a Stereotype
 * 
 * @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
*/"/>
- <expressions
- body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();
literalString.setValue("");
return literalString;"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//GeneralizationSource
				if(!(source instanceof org.eclipse.uml2.uml.Classifier)) {
					return false;
				}
				if(org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass(source)) {
					return false;
				}
				if(source instanceof org.eclipse.uml2.uml.Extension){
					return false; //meaningless
				}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//GeneralizationTarget
if(target != null) {
					if(!(target instanceof org.eclipse.uml2.uml.Classifier)) {
						return false;
					}
					if(Util.isMetaclass(target)) {
						return false;
					}
					if(target instanceof org.eclipse.uml2.uml.Extension){
						return false;//meaningless
					}
				}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//AssociationSource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//AssociationTarget
if(target!=null){
	if(target instanceof org.eclipse.uml2.uml.Extension){
		return false;
	}
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//DependencySource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//DependencyTarget 
if(target!=null){
	if(target instanceof org.eclipse.uml2.uml.Extension){
		return false;
	}
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//ElementImportSource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//ElementImportTarget
if(target!=null){
	if(target instanceof org.eclipse.uml2.uml.Extension){
		return false;
	}
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//PackageImportSource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//AnnotatedElementLink target
if((target instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)target)) {
	return false;
}"/>
- <expressions
- xsi:type="gmfgen:GenConstraint"
- body="//ConstraintedElementLink
if((target instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)target)) {
	return false;
}"/>
+ <providers xsi:type="gmfgen:GenJavaExpressionProvider" injectExpressionBody="true">
+ <expressions body="return it.getBody();"/>
+ <expressions body="return org.eclipse.papyrus.uml.tools.utils.NamedElementUtil.getDefaultNameWithIncrementFromBase(it.eClass().getName(), it.getOwner().eContents());"/>
+ <expressions body="//isAbstract = true
return true;"/>
+ <expressions body="return "Metaclass";"/>
+ <expressions body="if (it.getImportedElement() != null) {
			return (it.getImportedElement().getLabel());
		}
		return "elementimport";"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//ExtensionSource
/**we can't make a test here, because, the source must be a Property (ExtensionEnd) and it's a Stereotype
 * 
 * @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
*/"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//ExtensionTarget

/**we can't make a test here, because, the source must be a Property (ExtensionEnd) and it's a Stereotype
 * 
 * @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
*/"/>
+ <expressions body="org.eclipse.uml2.uml.LiteralString literalString=org.eclipse.uml2.uml.UMLFactory.eINSTANCE.createLiteralString();
literalString.setValue("");
return literalString;"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//GeneralizationSource
				if(!(source instanceof org.eclipse.uml2.uml.Classifier)) {
					return false;
				}
				if(org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass(source)) {
					return false;
				}
				if(source instanceof org.eclipse.uml2.uml.Extension){
					return false; //meaningless
				}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//GeneralizationTarget
if(target != null) {
					if(!(target instanceof org.eclipse.uml2.uml.Classifier)) {
						return false;
					}
					if(Util.isMetaclass(target)) {
						return false;
					}
					if(target instanceof org.eclipse.uml2.uml.Extension){
						return false;//meaningless
					}
				}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//AssociationSource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//AssociationTarget
if(target!=null){
	if(target instanceof org.eclipse.uml2.uml.Extension){
		return false;
	}
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//DependencySource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//DependencyTarget 
if(target!=null){
	if(target instanceof org.eclipse.uml2.uml.Extension){
		return false;
	}
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//ElementImportSource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//ElementImportTarget
if(target!=null){
	if(target instanceof org.eclipse.uml2.uml.Extension){
		return false;
	}
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//PackageImportSource
if((source instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)source)) {
	return false;
}
if(source instanceof org.eclipse.uml2.uml.Extension){
	return false;
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//AnnotatedElementLink target
if((target instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)target)) {
	return false;
}"/>
+ <expressions xsi:type="gmfgen:GenConstraint" body="//ConstraintedElementLink
if((target instanceof org.eclipse.uml2.uml.Type) && org.eclipse.papyrus.uml.profile.utils.Util.isMetaclass((org.eclipse.uml2.uml.Type)target)) {
	return false;
}"/>
</providers>
</expressionProviders>
- <labelParsers
- extensibleViaService="true">
- <implementations
- xsi:type="gmfgen:PredefinedParser"
- uses="/0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labelModelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@childNodes.3/@labelModelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.5/@modelFacet /0/@diagram/@links.1/@labels.3/@modelFacet /0/@diagram/@childNodes.4/@labelModelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labelModelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.4/@modelFacet /0/@diagram/@links.1/@labels.2/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@links.8/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.packageimport.PackageImportVisibilityParser"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
- <implementations
- xsi:type="gmfgen:ExternalParser"
- uses="/0/@diagram/@links.3/@labels.0/@modelFacet"/>
- <implementations
- xsi:type="gmfgen:CustomParser"
- uses="/0/@diagram/@childNodes.12/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.5/@labels.1/@modelFacet"
- qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
+ <labelParsers extensibleViaService="true">
+ <implementations xsi:type="gmfgen:PredefinedParser" uses="/0/@diagram/@topLevelNodes.9/@labels.0/@modelFacet /0/@diagram/@childNodes.12/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.2/@labels.0/@modelFacet /0/@diagram/@links.4/@labels.0/@modelFacet /0/@diagram/@childNodes.6/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.8/@labels.0/@modelFacet /0/@diagram/@childNodes.11/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.7/@labels.0/@modelFacet /0/@diagram/@childNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.13/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.10/@labels.0/@modelFacet /0/@diagram/@childNodes.2/@labelModelFacet /0/@diagram/@childNodes.14/@labels.0/@modelFacet /0/@diagram/@childNodes.15/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.12/@labels.0/@modelFacet /0/@diagram/@childNodes.1/@labelModelFacet /0/@diagram/@childNodes.3/@labelModelFacet /0/@diagram/@topLevelNodes.4/@labels.0/@modelFacet /0/@diagram/@links.5/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.5/@modelFacet /0/@diagram/@links.1/@labels.3/@modelFacet /0/@diagram/@childNodes.4/@labelModelFacet /0/@diagram/@links.7/@labels.0/@modelFacet /0/@diagram/@childNodes.5/@labelModelFacet /0/@diagram/@childNodes.8/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.13/@labels.0/@modelFacet /0/@diagram/@childNodes.0/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.11/@labels.0/@modelFacet /0/@diagram/@links.1/@labels.4/@modelFacet /0/@diagram/@links.1/@labels.2/@modelFacet /0/@diagram/@links.3/@labels.1/@modelFacet /0/@diagram/@childNodes.7/@labels.0/@modelFacet /0/@diagram/@topLevelNodes.3/@labels.0/@modelFacet"/>
+ <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@links.5/@labels.1/@modelFacet /0/@diagram/@links.1/@labels.0/@modelFacet /0/@diagram/@links.7/@labels.1/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.stereotype.AppliedStereotypeParser"/>
+ <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@links.8/@labels.0/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.packageimport.PackageImportVisibilityParser"/>
+ <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@topLevelNodes.5/@labels.0/@modelFacet /0/@diagram/@childNodes.9/@labels.0/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.CommentParser"/>
+ <implementations xsi:type="gmfgen:ExternalParser" uses="/0/@diagram/@links.3/@labels.0/@modelFacet"/>
+ <implementations xsi:type="gmfgen:CustomParser" uses="/0/@diagram/@childNodes.13/@labels.1/@modelFacet /0/@diagram/@topLevelNodes.6/@labels.1/@modelFacet" qualifiedName="org.eclipse.papyrus.uml.diagram.common.parser.ConstraintParser"/>
</labelParsers>
- <contextMenus
- context="/0/@diagram">
- <items
- xsi:type="gmfgen:LoadResourceAction"/>
+ <contextMenus context="/0/@diagram">
+ <items xsi:type="gmfgen:LoadResourceAction"/>
</contextMenus>
</gmfgen:GenEditorGenerator>
- <papyrusgmfgenextension:PapyrusExtensionRootNode
- comment="Papyrus specific extension for GMFGen">
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Label in charge to display applied stereotypes"
- genView="/0/@diagram/@links.5/@labels.1 /0/@diagram/@links.4/@labels.0 /0/@diagram/@links.1/@labels.0 /0/@diagram/@links.8/@labels.0 /0/@diagram/@links.7/@labels.1"
- name="StereotypeApplication"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Manage the class"
- genView="/0/@diagram/@topLevelNodes.3 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.7"
- name="Extended class editpart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart">
- <propRefreshHook
- comment="set the figure active when the feature of the of a class is true"
- triggeringCondition="resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof org.eclipse.emf.ecore.EAttribute)&& ((org.eclipse.emf.ecore.EAttribute) (event.getFeature())).getName().equals("isActive")"
- action="((org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue())"/>
+ <papyrusgmfgenextension:PapyrusExtensionRootNode comment="Papyrus specific extension for GMFGen">
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="Label in charge to display applied stereotypes" genView="/0/@diagram/@links.5/@labels.1 /0/@diagram/@links.4/@labels.0 /0/@diagram/@links.1/@labels.0 /0/@diagram/@links.8/@labels.0 /0/@diagram/@links.7/@labels.1" name="StereotypeApplication"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="Manage the class" genView="/0/@diagram/@topLevelNodes.4 /0/@diagram/@topLevelNodes.2 /0/@diagram/@childNodes.6 /0/@diagram/@childNodes.8" name="Extended class editpart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart">
+ <propRefreshHook comment="set the figure active when the feature of the of a class is true" triggeringCondition="resolveSemanticElement().equals(event.getNotifier()) && (event.getFeature() instanceof org.eclipse.emf.ecore.EAttribute)&& ((org.eclipse.emf.ecore.EAttribute) (event.getFeature())).getName().equals("isActive")" action="((org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure) getFigure()).setActive(event.getNewBooleanValue())"/>
</extensionNodes>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Elements that inherits Classifier"
- genView="/0/@diagram/@childNodes.14 /0/@diagram/@topLevelNodes.11 /0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.10 /0/@diagram/@topLevelNodes.9 /0/@diagram/@childNodes.13"
- name="Classifier inheritance"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="adding to manange otherNamedElement"
- genView="/0/@diagram/@topLevelNodes.8 /0/@diagram/@topLevelNodes.7 /0/@diagram/@childNodes.11 /0/@diagram/@childNodes.10 /0/@diagram /0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.6"
- name="OtherNamedElementEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="Label in charge to display applied stereotypes on links"
- genView="/0/@diagram/@links.4 /0/@diagram/@links.0 /0/@diagram/@links.5 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.2"
- name="ExtendedUMLLinks"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for compartment"
- genView="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.5 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.14 /0/@diagram/@compartments.13 /0/@diagram/@compartments.15"
- name="ResizeableListCompartmentEditPart"
- superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="used to add its own superclass"
- genView="/0/@diagram/@links.1"
- name="AbstractAssociationEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.profile.custom.edit.parts.AbstractAssociationEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="add superclass for short cut"
- genView="/0/@diagram/@topLevelNodes.12"
- name="AbstractShortCutDiagramEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="abstract association branch for the association"
- genView="/0/@diagram/@links.3"
- name="AbstractAssociationBranchEditPart"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.profile.custom.edit.parts.AbstractAssociationBranchEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension for constraint "
- genView="/0/@diagram/@childNodes.12 /0/@diagram/@topLevelNodes.5"
- name="ConstraintEditPart extension"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:ExtendedGenView"
- comment="this is an extension to manage the comment"
- genView="/0/@diagram/@childNodes.8 /0/@diagram/@topLevelNodes.4"
- name="comment extended node"
- superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:AdditionalEditPartCandies"
- comment="add the basic helper to remove all application of stereotypes"
- baseEditHelperPackage="org.eclipse.papyrus.uml.diagram.common.helper"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CompartmentTitleVisibilityPreference"
- comment="Hidden Title Compartments"
- visibleByDefault="false"
- compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Stereotype"
- role="Stereotype"
- iconPathRole="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif"
- linkLabels="/0/@diagram/@links.5/@labels.1 /0/@diagram/@links.4/@labels.0 /0/@diagram/@links.8/@labels.0 /0/@diagram/@links.7/@labels.1"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Name true"
- role="Name"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
- externalNodeLabels="/0/@diagram/@topLevelNodes.12/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="SourceMultiplicity"
- role="SourceMultiplicity"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/MultiplicityHandler.gif"
- linkLabels="/0/@diagram/@links.1/@labels.4"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="TargetMultiplicity"
- role="TargetMultiplicity"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/MultiplicityHandler.gif"
- linkLabels="/0/@diagram/@links.1/@labels.5"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="SourceRole"
- role="SourceRole"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/role.gif"
- linkLabels="/0/@diagram/@links.1/@labels.3"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="TargetRole"
- role="TargetRole"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/role.gif"
- linkLabels="/0/@diagram/@links.1/@labels.2"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Alias"
- role="Alias"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/alias.png"
- linkLabels="/0/@diagram/@links.7/@labels.0"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:CompartmentVisibilityPreference"
- comment="Hidden Compartments in preference"
- visibleByDefault="false"
- compartments="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Stereotype false"
- role="Stereotype"
- iconPathRole="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif"
- linkLabels="/0/@diagram/@links.1/@labels.0"
- visibleByDefault="false"/>
- <extensionNodes
- xsi:type="papyrusgmfgenextension:LabelVisibilityPreference"
- comment="Name false"
- role="Name"
- iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png"
- linkLabels="/0/@diagram/@links.1/@labels.1 /0/@diagram/@links.5/@labels.0"
- visibleByDefault="false"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="Elements that inherits Classifier" genView="/0/@diagram/@childNodes.15 /0/@diagram/@topLevelNodes.12 /0/@diagram/@childNodes.0 /0/@diagram/@topLevelNodes.11 /0/@diagram/@topLevelNodes.10 /0/@diagram/@childNodes.14" name="Classifier inheritance" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="adding to manange otherNamedElement" genView="/0/@diagram/@topLevelNodes.9 /0/@diagram/@topLevelNodes.8 /0/@diagram/@childNodes.12 /0/@diagram/@childNodes.11 /0/@diagram /0/@diagram/@childNodes.10 /0/@diagram/@topLevelNodes.7" name="OtherNamedElementEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="Label in charge to display applied stereotypes on links" genView="/0/@diagram/@links.4 /0/@diagram/@links.0 /0/@diagram/@links.5 /0/@diagram/@links.7 /0/@diagram/@links.8 /0/@diagram/@links.2" name="ExtendedUMLLinks" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.UMLConnectionNodeEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="add superclass for compartment" genView="/0/@diagram/@compartments.4 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.5 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.14 /0/@diagram/@compartments.13 /0/@diagram/@compartments.15" name="ResizeableListCompartmentEditPart" superOwnedEditPart="org.eclipse.papyrus.infra.gmfdiag.common.editpart.ResizeableListCompartmentEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="used to add its own superclass" genView="/0/@diagram/@links.1" name="AbstractAssociationEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.profile.custom.edit.parts.AbstractAssociationEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="add superclass for short cut" genView="/0/@diagram/@topLevelNodes.13" name="AbstractShortCutDiagramEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="abstract association branch for the association" genView="/0/@diagram/@links.3" name="AbstractAssociationBranchEditPart" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.profile.custom.edit.parts.AbstractAssociationBranchEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="this is an extension for constraint " genView="/0/@diagram/@childNodes.13 /0/@diagram/@topLevelNodes.6" name="ConstraintEditPart extension" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:ExtendedGenView" comment="this is an extension to manage the comment" genView="/0/@diagram/@childNodes.9 /0/@diagram/@topLevelNodes.5" name="comment extended node" superOwnedEditPart="org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:AdditionalEditPartCandies" comment="add the basic helper to remove all application of stereotypes" baseEditHelperPackage="org.eclipse.papyrus.uml.diagram.common.helper"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:CompartmentTitleVisibilityPreference" comment="Hidden Title Compartments" visibleByDefault="false" compartments="/0/@diagram/@compartments.0 /0/@diagram/@compartments.1 /0/@diagram/@compartments.2 /0/@diagram/@compartments.3 /0/@diagram/@compartments.4 /0/@diagram/@compartments.5 /0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.8 /0/@diagram/@compartments.9 /0/@diagram/@compartments.10 /0/@diagram/@compartments.11 /0/@diagram/@compartments.12 /0/@diagram/@compartments.13 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="Stereotype" role="Stereotype" iconPathRole="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif" linkLabels="/0/@diagram/@links.5/@labels.1 /0/@diagram/@links.4/@labels.0 /0/@diagram/@links.8/@labels.0 /0/@diagram/@links.7/@labels.1"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="Name true" role="Name" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png" externalNodeLabels="/0/@diagram/@topLevelNodes.13/@labels.0"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="SourceMultiplicity" role="SourceMultiplicity" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/MultiplicityHandler.gif" linkLabels="/0/@diagram/@links.1/@labels.4" visibleByDefault="false"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="TargetMultiplicity" role="TargetMultiplicity" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/MultiplicityHandler.gif" linkLabels="/0/@diagram/@links.1/@labels.5"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="SourceRole" role="SourceRole" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/role.gif" linkLabels="/0/@diagram/@links.1/@labels.3" visibleByDefault="false"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="TargetRole" role="TargetRole" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/role.gif" linkLabels="/0/@diagram/@links.1/@labels.2"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="Alias" role="Alias" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/alias.png" linkLabels="/0/@diagram/@links.7/@labels.0"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:CompartmentVisibilityPreference" comment="Hidden Compartments in preference" visibleByDefault="false" compartments="/0/@diagram/@compartments.6 /0/@diagram/@compartments.7 /0/@diagram/@compartments.14 /0/@diagram/@compartments.15"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="Stereotype false" role="Stereotype" iconPathRole="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Stereotype.gif" linkLabels="/0/@diagram/@links.1/@labels.0" visibleByDefault="false"/>
+ <extensionNodes xsi:type="papyrusgmfgenextension:LabelVisibilityPreference" comment="Name false" role="Name" iconPathRole="platform:/plugin/org.eclipse.papyrus.uml.diagram.common/icons/label_role/name.png" linkLabels="/0/@diagram/@links.1/@labels.1 /0/@diagram/@links.5/@labels.0" visibleByDefault="false"/>
</papyrusgmfgenextension:PapyrusExtensionRootNode>
</xmi:XMI>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties index ab264c3543b..51f5615a582 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.properties @@ -84,3 +84,5 @@ prefpage.org.eclipse.uml2.uml.diagram.pathmaps=Pathmaps metatype.name.PrimitiveType_3026=PrimitiveType metatype.name.PrimitiveType_2009=PrimitiveType metatype.name.ConstraintContext_8500=Undefined +metatype.name.Class_2008=Class +metatype.name.Class_3010=Class diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml index d0c9d3f107f..7d166dbbcc8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/plugin.xml @@ -95,8 +95,18 @@ </entry>
<entry
defineOnly="true"
+ description="Create a new Class"
+ id="createClass6CreationTool"
+ kind="tool"
+ label="Class"
+ large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif"
+ path=""
+ small_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Class.gif">
+ </entry>
+ <entry
+ defineOnly="true"
description="Import a new Metaclass"
- id="createImportMetaclass6CreationTool"
+ id="createImportMetaclass7CreationTool"
kind="tool"
label="Import Metaclass"
large_icon="/icons/Metaclass.gif"
@@ -106,7 +116,7 @@ <entry
defineOnly="true"
description="Create new Enumeration"
- id="createEnumeration7CreationTool"
+ id="createEnumeration8CreationTool"
kind="tool"
label="Enumeration"
large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Enumeration.gif"
@@ -116,7 +126,7 @@ <entry
defineOnly="true"
description="Create new DataType"
- id="createDataType8CreationTool"
+ id="createDataType9CreationTool"
kind="tool"
label="DataType"
large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/DataType.gif"
@@ -126,7 +136,7 @@ <entry
defineOnly="true"
description="Create new PrimitiveType"
- id="createPrimitiveType9CreationTool"
+ id="createPrimitiveType10CreationTool"
kind="tool"
label="PrimitiveType"
large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/PrimitiveType.gif"
@@ -136,7 +146,7 @@ <entry
defineOnly="true"
description="Add new property"
- id="createProperty10CreationTool"
+ id="createProperty11CreationTool"
kind="tool"
label="Property"
large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
@@ -146,7 +156,7 @@ <entry
defineOnly="true"
description="Add new operation"
- id="createOperation11CreationTool"
+ id="createOperation12CreationTool"
kind="tool"
label="Operation"
large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Operation.gif"
@@ -156,7 +166,7 @@ <entry
defineOnly="true"
description="Add new EnumerationLiteral"
- id="createEnumerationLiteral12CreationTool"
+ id="createEnumerationLiteral13CreationTool"
kind="tool"
label="EnumerationLiteral"
large_icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/EnumerationLiteral.gif"
@@ -277,31 +287,35 @@ path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createImportMetaclass6CreationTool"
+ id="createClass6CreationTool"
+ path="/createNodes1Group">
+ </predefinedEntry>
+ <predefinedEntry
+ id="createImportMetaclass7CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createEnumeration7CreationTool"
+ id="createEnumeration8CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createDataType8CreationTool"
+ id="createDataType9CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createPrimitiveType9CreationTool"
+ id="createPrimitiveType10CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createProperty10CreationTool"
+ id="createProperty11CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createOperation11CreationTool"
+ id="createOperation12CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<predefinedEntry
- id="createEnumerationLiteral12CreationTool"
+ id="createEnumerationLiteral13CreationTool"
path="/createNodes1Group">
</predefinedEntry>
<entry
@@ -354,17 +368,17 @@ <?gmfgen generated="true"?>
<initializer class="org.eclipse.papyrus.uml.diagram.profile.preferences.DiagramPreferenceInitializer"/>
</extension>
- +
<extension point="org.eclipse.gmf.runtime.diagram.core.viewProviders" id="view-provider">
<?gmfgen generated="true"?>
<viewProvider class="org.eclipse.papyrus.uml.diagram.profile.providers.UMLViewProvider">
<Priority name="Lowest"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Diagram" semanticHints="PapyrusUMLProfileDiagram"/>
- <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/>
+ <context viewClass="org.eclipse.gmf.runtime.notation.Node" semanticHints="2014,2015,1026,2008,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3010,3028,1007,1027,1024,1012,1028,3025,3027"/>
<context viewClass="org.eclipse.gmf.runtime.notation.Edge" semanticHints="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014,8500"/>
</viewProvider>
</extension>
- +
<extension point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders" id="ep-provider">
<?gmfgen generated="true"?>
<editpartProvider class="org.eclipse.papyrus.uml.diagram.profile.providers.UMLEditPartProvider">
@@ -373,16 +387,16 @@ <method name="getType()" value="PapyrusUMLProfileDiagram"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-nodes">
- <method name="getType()" value="2014,2015,1026,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3028,1007,1027,1024,1012,1028,3025,3027"/>
+ <method name="getType()" value="2014,2015,1026,2008,1031,1002,1014,2005,1030,2007,2006,2009,2010,2016,3026,3019,1037,3018,3002,3020,1023,3010,3028,1007,1027,1024,1012,1028,3025,3027"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Edge" id="generated-links">
<method name="getType()" value="1013,4001,1045,4019,4002,4008,4018,1064,1065,1022,4014,8500"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-labels">
- <method name="getType()" value="1,1034,1084,3,1015,5063,5020,1047,5026,5023,5032,5035,2,5058,1046,5062,1008,1056,1050,1010,1059,5064,5055,5061"/>
+ <method name="getType()" value="1,1034,5029,1084,3,1015,5063,5020,1047,5026,5023,5032,5035,2,5058,1046,5014,5062,1008,1056,1050,1010,1059,5064,5055,5061"/>
</object>
<object class="org.eclipse.gmf.runtime.notation.Node" id="generated-compartments">
- <method name="getType()" value="1005,11,1042,1051,1071,1052,1019,1053,1057,1058,1062,1063,1067,1069,1068,1070"/>
+ <method name="getType()" value="1005,11,1042,1051,1071,1052,1019,1053,1057,1058,1062,1063,1067,1069,1068,1070,7017,7011,7018,7012"/>
</object>
<context views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments"/>
</editpartProvider>
@@ -439,16 +453,16 @@ views="generated-diagram,generated-nodes,generated-links,generated-labels,generated-compartments">
</context>
</editpartProvider>
- </extension> - - + </extension>
+
+
<extension point="org.eclipse.gmf.runtime.common.ui.services.iconProviders" id="icon-provider">
<?gmfgen generated="true"?>
<IconProvider class="org.eclipse.papyrus.uml.diagram.profile.providers.UMLIconProvider">
<Priority name="Lowest"/>
</IconProvider>
</extension>
- +
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypes" id="element-types">
<?gmfgen generated="true"?>
<metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
@@ -492,6 +506,16 @@ </metamodelType>
</metamodel>
<metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <metamodelType
+ id="org.eclipse.papyrus.uml.diagram.profile.Class_2008"
+ name="%metatype.name.Class_2008"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
+ eclass="Class"
+ edithelper="org.eclipse.papyrus.uml.diagram.profile.edit.helpers.ClassEditHelper">
+ <param name="semanticHint" value="2008"/>
+ </metamodelType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
<specializationType
id="org.eclipse.papyrus.uml.diagram.profile.Metaclass_1031"
name="%metatype.name.Class_1031"
@@ -660,6 +684,15 @@ </metamodelType>
</metamodel>
<metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ <specializationType
+ id="org.eclipse.papyrus.uml.diagram.profile.Class_3010"
+ name="%metatype.name.Class_3010"
+ kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType">
+ <specializes id="org.eclipse.papyrus.uml.diagram.profile.Class_2008"/>
+ <param name="semanticHint" value="3010"/>
+ </specializationType>
+ </metamodel>
+ <metamodel nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
<metamodelType
id="org.eclipse.papyrus.uml.diagram.profile.Metaclass_3028"
name="%metatype.name.Class_3028"
@@ -849,7 +882,7 @@ </specializationType>
</metamodel>
</extension>
- +
<extension point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings" id="element-types-bindings">
<?gmfgen generated="true"?>
<clientContext id="org.eclipse.papyrus.uml.diagram.profile.TypeContext">
@@ -864,6 +897,7 @@ <elementType ref="org.eclipse.papyrus.uml.diagram.profile.Dependency_2014"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Association_2015"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Stereotype_1026"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.profile.Class_2008"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Metaclass_1031"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Comment_1002"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Constraint_1014"/>
@@ -881,6 +915,7 @@ <elementType ref="org.eclipse.papyrus.uml.diagram.profile.ClassProperty_3002"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.ClassOperation_3020"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Stereotype_1023"/>
+ <elementType ref="org.eclipse.papyrus.uml.diagram.profile.Class_3010"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Metaclass_3028"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.CommentCN_1007"/>
<elementType ref="org.eclipse.papyrus.uml.diagram.profile.Model_1027"/>
@@ -913,7 +948,7 @@ id="org.eclipse.papyrus.uml.diagram.profile.updateDiagram"
name="%update.diagram.name"/>
</extension>
- +
<extension point="org.eclipse.ui.bindings" id="update-cmd-binding">
<?gmfgen generated="true"?>
<key
@@ -922,7 +957,7 @@ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="F5"/>
</extension>
- +
<extension point="org.eclipse.ui.menus" id="context-menus">
<?gmfgen generated="true"?>
@@ -958,7 +993,7 @@ language="profile"
label="UML Profile Diagram">
</creationCommand>
- </extension> + </extension>
<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
<?gmfgen generated="true"?>
<propertyContributor
@@ -969,7 +1004,7 @@ <propertyCategory category="extra"/>
</propertyContributor>
</extension>
- +
<extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
<?gmfgen generated="true"?>
<propertyTabs contributorId="org.eclipse.papyrus.uml.diagram.profile">
@@ -983,7 +1018,7 @@ label="%tab.domain"/>
</propertyTabs>
</extension>
- +
<extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
<?gmfgen generated="true"?>
<propertySections contributorId="org.eclipse.papyrus.uml.diagram.profile">
@@ -1011,7 +1046,7 @@ categoryId="org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorID"
defaultHandler="org.eclipse.papyrus.uml.diagram.profile.part.LoadResourceAction"/>
</extension>
- +
<extension point="org.eclipse.ui.handlers" id="menu-handlers">
<?gmfgen generated="true"?>
</extension>
@@ -1023,7 +1058,7 @@ startKind="startup"
useClassTypeAsKey="true">
</service>
-</extension> +</extension>
<extension point="org.eclipse.ui.preferencePages" id="prefpages">
<?gmfgen generated="true"?>
<page
@@ -1056,7 +1091,7 @@ class="org.eclipse.papyrus.uml.diagram.profile.part.UMLUriEditorInputTester">
</propertyTester>
</extension>
- +
<extension point="org.eclipse.ui.navigator.viewer" id="navigator-viewbinding">
<?gmfgen generated="true"?>
<viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
@@ -1072,7 +1107,7 @@ </includes>
</viewerActionBinding>
</extension>
- +
<extension point="org.eclipse.ui.navigator.navigatorContent" id="navigator-content">
<?gmfgen generated="true"?>
<navigatorContent
@@ -1142,7 +1177,7 @@ </enablement>
</actionProvider>
</extension>
- +
<extension point="org.eclipse.ui.navigator.linkHelper" id="navigator-linkhelper">
<?gmfgen generated="true"?>
<linkHelper
@@ -1179,8 +1214,9 @@ id="profile"
label="Profile">
</diagramCategory>
-</extension> -
<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
+</extension>
+
+<extension point="org.eclipse.gmf.runtime.common.ui.services.parserProviders" id="parser-provider">
<?gmfgen generated="true"?>
<ParserProvider class="org.eclipse.papyrus.uml.diagram.profile.providers.UMLParserProvider">
<Priority name="Lowest"/>
@@ -1208,16 +1244,16 @@ </decoratorProvider>
</extension>
- - - - - - - - +
+
+
+
+
+
+
+
<!-- optionally, specify keybindings -->
<extension
point="org.eclipse.gmf.runtime.diagram.ui.editpolicyProviders">
@@ -1398,5 +1434,5 @@ </diagramMappings>
- </extension> + </extension>
</plugin>
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java index 0a61cc5c967..63522499bd9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationBranchCreateCommand.java @@ -89,9 +89,7 @@ public class AssociationBranchCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
@@ -154,5 +152,4 @@ public class AssociationBranchCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java index 82ec1d93e20..a91aec08bee 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationCreateCommand.java @@ -89,9 +89,7 @@ public class AssociationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
@@ -154,5 +152,4 @@ public class AssociationCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java index b59c7179907..67f430bc989 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/AssociationNodeCreateCommand.java @@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class AssociationNodeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getAssociation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Association newElement = UMLFactory.eINSTANCE.createAssociation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,19 +80,13 @@ public class AssociationNodeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -117,5 +104,4 @@ public class AssociationNodeCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java new file mode 100644 index 00000000000..df9b3858718 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommand.java @@ -0,0 +1,110 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ClassCreateCommand extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ClassCreateCommand(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if(container instanceof View) {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Class newElement = UMLFactory.eINSTANCE.createClass();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+ ElementInitializers.getInstance().init_Class_2008(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Class newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if(configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java new file mode 100644 index 00000000000..c1512900728 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassCreateCommandCN.java @@ -0,0 +1,110 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.viewpoints.policy.ModelAddData;
+import org.eclipse.papyrus.infra.viewpoints.policy.PolicyChecker;
+import org.eclipse.papyrus.uml.diagram.profile.providers.ElementInitializers;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * @generated
+ */
+public class ClassCreateCommandCN extends EditElementCommand {
+
+ /**
+ * @generated
+ */
+ private Diagram diagram = null;
+
+ /**
+ * @generated
+ */
+ public ClassCreateCommandCN(CreateElementRequest req, Diagram diagram) {
+ super(req.getLabel(), null, req);
+ this.diagram = diagram;
+ }
+
+ /**
+ * FIXME: replace with setElementToEdit()
+ * @generated
+ */
+ protected EObject getElementToEdit() {
+ EObject container = ((CreateElementRequest)getRequest()).getContainer();
+ if(container instanceof View) {
+ container = ((View)container).getElement();
+ }
+ return container;
+ }
+
+ /**
+ * @generated
+ */
+ public boolean canExecute() {
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
+ return data.isPermitted();
+ }
+
+ /**
+ * @generated
+ */
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ Class newElement = UMLFactory.eINSTANCE.createClass();
+ EObject target = getElementToEdit();
+ ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
+ if(data.isPermitted()) {
+ if(data.isPathDefined()) {
+ if(!data.execute(target, newElement))
+ return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
+ } else {
+ Package qualifiedTarget = (Package)target;
+ qualifiedTarget.getPackagedElements().add(newElement);
+ }
+ } else {
+ return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
+ }
+ ElementInitializers.getInstance().init_Class_3010(newElement);
+ doConfigure(newElement, monitor, info);
+ ((CreateElementRequest)getRequest()).setNewElement(newElement);
+ return CommandResult.newOKCommandResult(newElement);
+ }
+
+ /**
+ * @generated
+ */
+ protected void doConfigure(Class newElement, IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ IElementType elementType = ((CreateElementRequest)getRequest()).getElementType();
+ ConfigureRequest configureRequest = new ConfigureRequest(getEditingDomain(), newElement, elementType);
+ configureRequest.setClientContext(((CreateElementRequest)getRequest()).getClientContext());
+ configureRequest.addParameters(getRequest().getParameters());
+ ICommand configureCommand = elementType.getEditCommand(configureRequest);
+ if(configureCommand != null && configureCommand.canExecute()) {
+ configureCommand.execute(monitor, info);
+ }
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java index 337c258f933..cfb643982fa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassOperationCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Operation; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ClassOperationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ClassOperationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Class qualifiedTarget = (Class)target;
qualifiedTarget.getOwnedOperations().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Operation_3020(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ClassOperationCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java index 3c80dbade84..0e72f51c66e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ClassPropertyCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.StructuredClassifier; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ClassPropertyCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Property newElement = UMLFactory.eINSTANCE.createProperty();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ClassPropertyCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
StructuredClassifier qualifiedTarget = (StructuredClassifier)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Property_3002(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ClassPropertyCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java index 435f6793da1..bc3ac0a0b3d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementCreateCommand.java @@ -75,15 +75,12 @@ public class CommentAnnotatedElementCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getAnnotatedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java index 4db5f3daeb6..0bef382f5be 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentAnnotatedElementReorientCommand.java @@ -158,5 +158,4 @@ public class CommentAnnotatedElementReorientCommand extends EditElementCommand { protected Element getNewTarget() {
return (Element)newEnd;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java index d64bb838bd7..5ca750477e6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class CommentCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class CommentCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Element qualifiedTarget = (Element)target;
qualifiedTarget.getOwnedComments().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Comment_1007(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class CommentCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java index 413d59c131d..593ff38f1ca 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/CommentEditPartCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Element; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class CommentEditPartCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getComment());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Comment newElement = UMLFactory.eINSTANCE.createComment();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class CommentEditPartCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Element qualifiedTarget = (Element)target;
qualifiedTarget.getOwnedComments().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Comment_1002(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class CommentEditPartCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java index b645391714a..33071ee2341 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementCreateCommand.java @@ -75,15 +75,12 @@ public class ConstraintConstrainedElementCreateCommand extends EditElementComman if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().getConstrainedElements().add(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java index cb22bc71350..de3b4f5751c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintConstrainedElementReorientCommand.java @@ -158,5 +158,4 @@ public class ConstraintConstrainedElementReorientCommand extends EditElementComm protected Element getNewTarget() {
return (Element)newEnd;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java index 5b4be588e20..101d2f2f981 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ConstraintCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ConstraintCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Constraint_1014(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ConstraintCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java index 836dafb564e..04bfe228107 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ConstraintCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ConstraintCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getConstraint());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Constraint newElement = UMLFactory.eINSTANCE.createConstraint();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ConstraintCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Constraint_1028(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ConstraintCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java index f44a6b52b28..8c7240ea8ab 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkCreateCommand.java @@ -75,15 +75,12 @@ public class ContextLinkCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
if(getSource() != null && getTarget() != null) {
getSource().setContext(getTarget());
}
return CommandResult.newOKCommandResult();
-
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java index c23e627f096..933bf7f797b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ContextLinkReorientCommand.java @@ -157,5 +157,4 @@ public class ContextLinkReorientCommand extends EditElementCommand { protected Namespace getNewTarget() {
return (Namespace)newEnd;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java index 83fd15cd159..043fc1ad697 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DataType_2010(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypeCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java index e072ce05c07..1d205fd190c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDataType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
DataType newElement = UMLFactory.eINSTANCE.createDataType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_DataType_3027(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypeCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java index 97cd607f769..5c7b65deb8a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypeOperationCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Operation; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypeOperationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getOperation());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Operation newElement = UMLFactory.eINSTANCE.createOperation();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypeOperationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
DataType qualifiedTarget = (DataType)target;
qualifiedTarget.getOwnedOperations().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Operation_3019(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypeOperationCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java index ef02018fdcf..8dc32e87276 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DataTypePropertyCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Property; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class DataTypePropertyCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProperty());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Property newElement = UMLFactory.eINSTANCE.createProperty();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class DataTypePropertyCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
DataType qualifiedTarget = (DataType)target;
qualifiedTarget.getOwnedAttributes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Property_3018(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class DataTypePropertyCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java index 7e00f3964c5..6becd0049d1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyBranchCreateCommand.java @@ -91,7 +91,6 @@ public class DependencyBranchCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -100,7 +99,6 @@ public class DependencyBranchCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class DependencyBranchCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java index e4333b4baa4..4d0a46b8329 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyCreateCommand.java @@ -91,7 +91,6 @@ public class DependencyCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
getContainer().getPackagedElements().add(newElement);
newElement.getClients().add(getSource());
@@ -100,7 +99,6 @@ public class DependencyCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class DependencyCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java index 2c1215acf3a..6e47d944af6 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/DependencyNodeCreateCommand.java @@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class DependencyNodeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getDependency());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Dependency newElement = UMLFactory.eINSTANCE.createDependency();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,19 +80,13 @@ public class DependencyNodeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -117,5 +104,4 @@ public class DependencyNodeCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java index 459304750b9..f531a696af7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ElementImportCreateCommand.java @@ -91,7 +91,6 @@ public class ElementImportCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
ElementImport newElement = UMLFactory.eINSTANCE.createElementImport();
getContainer().getElementImports().add(newElement);
newElement.setImportingNamespace(getSource());
@@ -100,7 +99,6 @@ public class ElementImportCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -163,5 +161,4 @@ public class ElementImportCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java index 22748d14264..ccb341040d1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class EnumerationCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class EnumerationCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Enumeration_2006(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class EnumerationCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java index 1704ad8e8b3..f9a2d9397d2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class EnumerationCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumeration());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Enumeration newElement = UMLFactory.eINSTANCE.createEnumeration();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class EnumerationCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Enumeration_3025(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class EnumerationCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java index 2b2f82b3955..90a36c78006 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/EnumerationLiteralCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.EnumerationLiteral; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getEnumerationLiteral());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
EnumerationLiteral newElement = UMLFactory.eINSTANCE.createEnumerationLiteral();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Enumeration qualifiedTarget = (Enumeration)target;
qualifiedTarget.getOwnedLiterals().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_EnumerationLiteral_1037(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class EnumerationLiteralCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java index 472a45314de..61bcf8f5407 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ExtensionCreateCommand.java @@ -90,9 +90,7 @@ public class ExtensionCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
throw new UnsupportedOperationException();
-
}
/**
@@ -155,5 +153,4 @@ public class ExtensionCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java index 374a61bf617..bb95c473e55 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/GeneralizationCreateCommand.java @@ -80,14 +80,12 @@ public class GeneralizationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
Generalization newElement = UMLFactory.eINSTANCE.createGeneralization();
getSource().getGeneralizations().add(newElement);
newElement.setGeneral(getTarget());
doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -126,5 +124,4 @@ public class GeneralizationCreateCommand extends EditElementCommand { protected Classifier getTarget() {
return (Classifier)target;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java index a54a9777929..e698793eb37 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class MetaclassCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Class newElement = UMLFactory.eINSTANCE.createClass();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class MetaclassCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Class_1031(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class MetaclassCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java index dc044af0094..471c2834f65 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/MetaclassCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class MetaclassCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getClass_());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Class newElement = UMLFactory.eINSTANCE.createClass();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class MetaclassCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Class_3028(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class MetaclassCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java index 334dba2223c..337158936fe 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ModelCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Model newElement = UMLFactory.eINSTANCE.createModel();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ModelCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Model_1027(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ModelCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java index 7a2425853ad..30d7893401c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ModelCreateCommandTN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ModelCreateCommandTN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getModel());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Model newElement = UMLFactory.eINSTANCE.createModel();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ModelCreateCommandTN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Model_2005(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ModelCreateCommandTN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java index eb8eafca6c8..a1b13c36b9a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommand.java @@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class PackageCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Package newElement = UMLFactory.eINSTANCE.createPackage();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,20 +80,14 @@ public class PackageCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Package_2007(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -118,5 +105,4 @@ public class PackageCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java index a650d8f4221..b4ab8bcadc3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageCreateCommandCN.java @@ -32,8 +32,6 @@ import org.eclipse.uml2.uml.Package; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -65,21 +63,16 @@ public class PackageCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPackage());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Package newElement = UMLFactory.eINSTANCE.createPackage();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -87,20 +80,14 @@ public class PackageCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Package_1012(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -118,5 +105,4 @@ public class PackageCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java index 1af43e5c7f7..8755f84dd5f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PackageImportCreateCommand.java @@ -90,7 +90,6 @@ public class PackageImportCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
PackageImport newElement = UMLFactory.eINSTANCE.createPackageImport();
getContainer().getPackageImports().add(newElement);
newElement.setImportingNamespace(getSource());
@@ -98,7 +97,6 @@ public class PackageImportCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -161,5 +159,4 @@ public class PackageImportCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java index 1ebdcb58836..5c7da76fde8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.PrimitiveType; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_PrimitiveType_2009(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class PrimitiveTypeCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java index 855860cd936..b3b6eb13e7a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/PrimitiveTypeCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.PrimitiveType; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getPrimitiveType());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
PrimitiveType newElement = UMLFactory.eINSTANCE.createPrimitiveType();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_PrimitiveType_3026(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class PrimitiveTypeCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java index 6f5c56b6477..084a930496c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileApplicationCreateCommand.java @@ -90,7 +90,6 @@ public class ProfileApplicationCreateCommand extends EditElementCommand { if(!canExecute()) {
throw new ExecutionException("Invalid arguments in create link command"); //$NON-NLS-1$
}
-
ProfileApplication newElement = UMLFactory.eINSTANCE.createProfileApplication();
getContainer().getProfileApplications().add(newElement);
newElement.setApplyingPackage(getSource());
@@ -98,7 +97,6 @@ public class ProfileApplicationCreateCommand extends EditElementCommand { doConfigure(newElement, monitor, info);
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
-
}
/**
@@ -161,5 +159,4 @@ public class ProfileApplicationCreateCommand extends EditElementCommand { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java index 4f561d691c8..26cd4d76830 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Profile; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ProfileCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProfile());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Profile newElement = UMLFactory.eINSTANCE.createProfile();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ProfileCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Profile_1024(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ProfileCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java index 4ffa4c99cf6..e06a3852537 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ProfileCreateCommandTN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Profile; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class ProfileCreateCommandTN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getProfile());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Profile newElement = UMLFactory.eINSTANCE.createProfile();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class ProfileCreateCommandTN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getPackagedElements().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Profile_1030(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class ProfileCreateCommandTN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java index e0609b812cb..efeb85148ba 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/ShortCutDiagramCreateCommand.java @@ -28,8 +28,6 @@ import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.NotationFactory;
import org.eclipse.gmf.runtime.notation.View;
-
-
/**
* @generated
*/
@@ -42,7 +40,6 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand { */
public ShortCutDiagramCreateCommand(CreateElementRequest req, Diagram diagram) {
super(req.getLabel(), null, req);
- this.diagram = diagram;
}
/**
@@ -68,7 +65,6 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand { * @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
// Uncomment to put "phantom" objects into the diagram file.
// org.eclipse.emf.ecore.resource.Resource resource =
// ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer().eResource();
@@ -78,10 +74,7 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand { Resource resource = getElementToEdit().eResource();
Diagram newElement = NotationFactory.eINSTANCE.createDiagram();
resource.getContents().add(newElement);
-
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -99,5 +92,4 @@ public class ShortCutDiagramCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java index 91bdf5c11ef..d3d00a90c91 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommand.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Stereotype; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class StereotypeCreateCommand extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStereotype());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Stereotype newElement = UMLFactory.eINSTANCE.createStereotype();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class StereotypeCreateCommand extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getOwnedStereotypes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Stereotype_1026(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class StereotypeCreateCommand extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java index c5113e1f432..5452526d7a7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/commands/StereotypeCreateCommandCN.java @@ -33,8 +33,6 @@ import org.eclipse.uml2.uml.Stereotype; import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
-
-
/**
* @generated
*/
@@ -66,21 +64,16 @@ public class StereotypeCreateCommandCN extends EditElementCommand { * @generated
*/
public boolean canExecute() {
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target.eClass(), UMLPackage.eINSTANCE.getStereotype());
return data.isPermitted();
-
-
}
/**
* @generated
*/
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-
Stereotype newElement = UMLFactory.eINSTANCE.createStereotype();
-
EObject target = getElementToEdit();
ModelAddData data = PolicyChecker.getCurrent().getChildAddData(diagram, target, newElement);
if(data.isPermitted()) {
@@ -88,20 +81,14 @@ public class StereotypeCreateCommandCN extends EditElementCommand { if(!data.execute(target, newElement))
return CommandResult.newErrorCommandResult("Failed to follow the policy-specified for the insertion of the new element");
} else {
-
Package qualifiedTarget = (Package)target;
qualifiedTarget.getOwnedStereotypes().add(newElement);
-
}
} else {
return CommandResult.newErrorCommandResult("The active policy restricts the addition of this element");
}
-
-
ElementInitializers.getInstance().init_Stereotype_1023(newElement);
-
doConfigure(newElement, monitor, info);
-
((CreateElementRequest)getRequest()).setNewElement(newElement);
return CommandResult.newOKCommandResult(newElement);
}
@@ -119,5 +106,4 @@ public class StereotypeCreateCommandCN extends EditElementCommand { configureCommand.execute(monitor, info);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java new file mode 100644 index 00000000000..8ba38cf9988 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/ClassEditHelper.java @@ -0,0 +1,20 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.helpers;
+
+import org.eclipse.papyrus.uml.diagram.common.helper.UMLBaseEditHelper;
+
+/**
+ * @generated
+ */
+public class ClassEditHelper extends UMLBaseEditHelper {
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java index 88f4878d19a..6a563bf9b73 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/helpers/UMLBaseEditHelper.java @@ -19,9 +19,4 @@ import org.eclipse.gmf.tooling.runtime.edit.helpers.GeneratedEditHelperBase; * @generated
*/
public class UMLBaseEditHelper extends GeneratedEditHelperBase {
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java index 5e235ad7778..9bf8ddaaf2e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AppliedStereotypeElementImportEditPart.java @@ -121,8 +121,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart }
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart }
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class AppliedStereotypeElementImportEditPart extends PapyrusLabelEditPart // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java index 9af712a1e2b..5f47e777e6c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationAppliedStereotypeEditPart.java @@ -121,8 +121,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i }
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i }
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class AssociationAppliedStereotypeEditPart extends PapyrusLabelEditPart i // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java index dc4a0e5fd70..6547f6bd710 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchEditPart.java @@ -116,5 +116,4 @@ public class AssociationBranchEditPart extends AbstractAssociationBranchEditPart public AssociationFigure getPrimaryShape() {
return (AssociationFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java index e7bc40ab4f6..7127e3ba179 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchMultiplicityEditPart.java @@ -122,8 +122,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart }
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart }
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationBranchMultiplicityEditPart extends PapyrusLabelEditPart // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java index a567067f239..632121c0b3d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationBranchRoleEditPart.java @@ -122,8 +122,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen }
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen }
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationBranchRoleEditPart extends PapyrusLabelEditPart implemen // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java index e2abcf54224..75df4180077 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationEditPart.java @@ -142,5 +142,4 @@ public class AssociationEditPart extends AbstractAssociationEditPart implements public AssociationFigure getPrimaryShape() {
return (AssociationFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java index 20a5ee7afb5..74600483f2a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicitySourceEditPart.java @@ -122,8 +122,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart return ConnectionLocator.TARGET;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -633,7 +625,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -718,7 +709,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart }
}
-
/**
* @generated
*/
@@ -748,7 +738,6 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart }
}
}
-
super.handleNotificationEvent(event);
}
@@ -759,5 +748,4 @@ public class AssociationMultiplicitySourceEditPart extends PapyrusLabelEditPart // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java index a782f787cf6..71c5996ec66 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationMultiplicityTargetEditPart.java @@ -122,8 +122,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -633,7 +625,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -718,7 +709,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart }
}
-
/**
* @generated
*/
@@ -748,7 +738,6 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart }
}
}
-
super.handleNotificationEvent(event);
}
@@ -759,5 +748,4 @@ public class AssociationMultiplicityTargetEditPart extends PapyrusLabelEditPart // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java index 5922ff006e8..6248d9388ed 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNameEditPart.java @@ -121,8 +121,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe }
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe }
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class AssociationNameEditPart extends PapyrusLabelEditPart implements ITe // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java index 55065db2cb9..2c73d8f0063 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationNodeEditPart.java @@ -34,7 +34,10 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.DiamondNode;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomAssociationNodeItemSemanticEditPolicy;
@@ -45,7 +48,7 @@ import org.eclipse.swt.graphics.Color; /**
* @generated
*/
-public class AssociationNodeEditPart extends ShapeNodeEditPart {
+public class AssociationNodeEditPart extends NodeEditPart {
/**
* @generated
@@ -107,40 +110,29 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { return lep;
}
-
-
-
/**
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new AssociationNodeDescriptor();
+ return primaryShape = new DiamondNode();
}
/**
* AssociationNodeDescriptor
* @generated
*/
- public AssociationNodeDescriptor getPrimaryShape() {
- return (AssociationNodeDescriptor)primaryShape;
+ public DiamondNode getPrimaryShape() {
+ return (DiamondNode)primaryShape;
}
-
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "AssociationNode";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -150,12 +142,7 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -187,14 +174,11 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -205,115 +189,4 @@ public class AssociationNodeEditPart extends ShapeNodeEditPart { ((NodeFigure)primaryShape).setLineStyle(style);
}
}
-
-
-
-
-
- /**
- * @generated
- */
- public class AssociationNodeDescriptor extends Shape {
-
-
-
-
- /**
- * @generated
- */
- public AssociationNodeDescriptor() {
- this.addPoint(new Point(getMapMode().DPtoLP(5), getMapMode().DPtoLP(0)));
- this.addPoint(new Point(getMapMode().DPtoLP(10), getMapMode().DPtoLP(5)));
- this.addPoint(new Point(getMapMode().DPtoLP(5), getMapMode().DPtoLP(10)));
- this.addPoint(new Point(getMapMode().DPtoLP(0), getMapMode().DPtoLP(5)));
- this.setFill(true);
- this.setForegroundColor(ColorConstants.black);
- this.setBackgroundColor(ColorConstants.white);
- }
-
- /**
- * @generated
- */
- private final PointList myTemplate = new PointList();
-
- /**
- * @generated
- */
- private Rectangle myTemplateBounds;
-
- /**
- * @generated
- */
- public void addPoint(Point point) {
- myTemplate.addPoint(point);
- myTemplateBounds = null;
- }
-
- /**
- * @generated
- */
- protected void fillShape(Graphics graphics) {
- Rectangle bounds = getBounds();
- graphics.pushState();
- graphics.translate(bounds.x, bounds.y);
- graphics.fillPolygon(scalePointList());
- graphics.popState();
- }
-
- /**
- * @generated
- */
- protected void outlineShape(Graphics graphics) {
- Rectangle bounds = getBounds();
- graphics.pushState();
- graphics.translate(bounds.x, bounds.y);
- graphics.drawPolygon(scalePointList());
- graphics.popState();
- }
-
- /**
- * @generated
- */
- private Rectangle getTemplateBounds() {
- if(myTemplateBounds == null) {
- myTemplateBounds = myTemplate.getBounds().getCopy().union(0, 0);
- //just safety -- we are going to use this as divider
- if(myTemplateBounds.width < 1) {
- myTemplateBounds.width = 1;
- }
- if(myTemplateBounds.height < 1) {
- myTemplateBounds.height = 1;
- }
- }
- return myTemplateBounds;
- }
-
- /**
- * @generated
- */
- private int[] scalePointList() {
- Rectangle pointsBounds = getTemplateBounds();
- Rectangle actualBounds = getBounds();
-
- float xScale = ((float)actualBounds.width) / pointsBounds.width;
- float yScale = ((float)actualBounds.height) / pointsBounds.height;
-
- if(xScale == 1 && yScale == 1) {
- return myTemplate.toIntArray();
- }
- int[] scaled = (int[])myTemplate.toIntArray().clone();
- for(int i = 0; i < scaled.length; i += 2) {
- scaled[i] = (int)Math.floor(scaled[i] * xScale);
- scaled[i + 1] = (int)Math.floor(scaled[i + 1] * yScale);
- }
- return scaled;
- }
-
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java index e8b2373f918..85900b89955 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleSourceEditPart.java @@ -122,8 +122,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen return ConnectionLocator.TARGET;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen }
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen }
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationRoleSourceEditPart extends PapyrusLabelEditPart implemen // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java index 5dff1c118d0..bbff6f0fe79 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/AssociationRoleTargetEditPart.java @@ -122,8 +122,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -156,7 +154,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen return ConnectionLocator.SOURCE;
}
-
/**
* @generated
*/
@@ -324,7 +321,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -411,9 +407,7 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -446,7 +440,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -454,7 +447,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -710,7 +702,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen }
}
-
/**
* @generated
*/
@@ -740,7 +731,6 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen }
}
}
-
super.handleNotificationEvent(event);
}
@@ -751,5 +741,4 @@ public class AssociationRoleTargetEditPart extends PapyrusLabelEditPart implemen // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java new file mode 100644 index 00000000000..36a05504682 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPart.java @@ -0,0 +1,128 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassAttributeCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7017;
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassAttributeCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassAttributeCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java new file mode 100644 index 00000000000..4e15881979d --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassAttributeCompartmentEditPartCN.java @@ -0,0 +1,128 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassAttributeCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7011;
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassAttributeCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassAttributeCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java new file mode 100644 index 00000000000..f6128f53351 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPart.java @@ -0,0 +1,301 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeNodeLabelDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClasseItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ClassEditPart extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 2008;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ClassEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClasseItemSemanticEditPolicy());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomClassItemSemanticEditPolicy());
+ installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new ClassifierFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure
+ * @generated
+ */
+ public ClassifierFigure getPrimaryShape() {
+ return (ClassifierFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPart) {
+ ((ClassNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassOperationCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassAttributeCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPart) {
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ pane.remove(((ClassOperationCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPart) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ pane.remove(((ClassAttributeCompartmentEditPart)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if(addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if(removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if(editPart instanceof ClassOperationCompartmentEditPart) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ if(editPart instanceof ClassAttributeCompartmentEditPart) {
+ return getPrimaryShape().getAttributeCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ * @param nodeShape instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if(nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if(contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color) {
+ if(primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if(primaryShape instanceof NodeFigure) {
+ ((NodeFigure)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(type == UMLElementTypes.Operation_3020) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID));
+ }
+ if(type == UMLElementTypes.Property_3002) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java new file mode 100644 index 00000000000..f4bdaf9dc9f --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassEditPartCN.java @@ -0,0 +1,298 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.editpolicies.LayoutEditPolicy;
+import org.eclipse.gef.editpolicies.NonResizableEditPolicy;
+import org.eclipse.gef.requests.CreateRequest;
+import org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure;
+import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.QualifiedNameDisplayEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShowHideCompartmentEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.itemsemantic.CustomClassItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.swt.graphics.Color;
+
+/**
+ * @generated
+ */
+public class ClassEditPartCN extends NodeEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 3010;
+
+ /**
+ * @generated
+ */
+ protected IFigure contentPane;
+
+ /**
+ * @generated
+ */
+ protected IFigure primaryShape;
+
+ /**
+ * @generated
+ */
+ public ClassEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
+ installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomClassItemSemanticEditPolicyCN());
+ installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
+ installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
+ // XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
+ // removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CONNECTION_HANDLES_ROLE);
+ }
+
+ /**
+ * @generated
+ */
+ protected LayoutEditPolicy createLayoutEditPolicy() {
+ org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LayoutEditPolicy() {
+
+ protected EditPolicy createChildEditPolicy(EditPart child) {
+ EditPolicy result = child.getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(result == null) {
+ result = new NonResizableEditPolicy();
+ }
+ return result;
+ }
+
+ protected Command getMoveChildrenCommand(Request request) {
+ return null;
+ }
+
+ protected Command getCreateCommand(CreateRequest request) {
+ return null;
+ }
+ };
+ return lep;
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createNodeShape() {
+ return primaryShape = new ClassifierFigure();
+ }
+
+ /**
+ * org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure
+ * @generated
+ */
+ public ClassifierFigure getPrimaryShape() {
+ return (ClassifierFigure)primaryShape;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean addFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPartCN) {
+ ((ClassNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassAttributeCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
+ pane.add(((ClassOperationCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean removeFixedChild(EditPart childEditPart) {
+ if(childEditPart instanceof ClassNameEditPartCN) {
+ return true;
+ }
+ if(childEditPart instanceof ClassAttributeCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
+ pane.remove(((ClassAttributeCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ if(childEditPart instanceof ClassOperationCompartmentEditPartCN) {
+ IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
+ pane.remove(((ClassOperationCompartmentEditPartCN)childEditPart).getFigure());
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ protected void addChildVisual(EditPart childEditPart, int index) {
+ if(addFixedChild(childEditPart)) {
+ return;
+ }
+ super.addChildVisual(childEditPart, -1);
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeChildVisual(EditPart childEditPart) {
+ if(removeFixedChild(childEditPart)) {
+ return;
+ }
+ super.removeChildVisual(childEditPart);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure getContentPaneFor(IGraphicalEditPart editPart) {
+ if(editPart instanceof ClassAttributeCompartmentEditPartCN) {
+ return getPrimaryShape().getAttributeCompartmentFigure();
+ }
+ if(editPart instanceof ClassOperationCompartmentEditPartCN) {
+ return getPrimaryShape().getOperationCompartmentFigure();
+ }
+ return getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected NodeFigure createNodePlate() {
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
+ return result;
+ }
+
+ /**
+ * Creates figure for this edit part.
+ *
+ * Body of this method does not depend on settings in generation model
+ * so you may safely remove <i>generated</i> tag and modify it.
+ *
+ * @generated
+ */
+ protected NodeFigure createNodeFigure() {
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
+ }
+
+ /**
+ * Default implementation treats passed figure as content pane.
+ * Respects layout one may have set for generated figure.
+ * @param nodeShape instance of generated figure class
+ * @generated
+ */
+ protected IFigure setupContentPane(IFigure nodeShape) {
+ if(nodeShape.getLayoutManager() == null) {
+ ConstrainedToolbarLayout layout = new ConstrainedToolbarLayout();
+ layout.setSpacing(5);
+ nodeShape.setLayoutManager(layout);
+ }
+ return nodeShape; // use nodeShape itself as contentPane
+ }
+
+ /**
+ * @generated
+ */
+ public IFigure getContentPane() {
+ if(contentPane != null) {
+ return contentPane;
+ }
+ return super.getContentPane();
+ }
+
+ /**
+ * @generated
+ */
+ protected void setForegroundColor(Color color) {
+ if(primaryShape != null) {
+ primaryShape.setForegroundColor(color);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineWidth(int width) {
+ super.setLineWidth(width);
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLineType(int style) {
+ if(primaryShape instanceof NodeFigure) {
+ ((NodeFigure)primaryShape).setLineStyle(style);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getPrimaryChildEditPart() {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassNameEditPartCN.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ if(request instanceof CreateViewAndElementRequest) {
+ CreateElementRequestAdapter adapter = ((CreateViewAndElementRequest)request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
+ IElementType type = (IElementType)adapter.getAdapter(IElementType.class);
+ if(type == UMLElementTypes.Property_3002) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPartCN.VISUAL_ID));
+ }
+ if(type == UMLElementTypes.Operation_3020) {
+ return getChildBySemanticHint(UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPartCN.VISUAL_ID));
+ }
+ }
+ return super.getTargetEditPart(request);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java new file mode 100644 index 00000000000..0f798ca3168 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPart.java @@ -0,0 +1,803 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLParserProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Feature;
+
+/**
+ * @generated
+ */
+public class ClassNameEditPart extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5029;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List<?> parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ * @generated
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ * @generated
+ */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * @generated
+ */
+ public ClassNameEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
+ } else {
+ return ((Label)figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
+ } else {
+ ((Label)figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
+ } else {
+ return ((Label)figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
+ } else {
+ ((Label)figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(IFigure figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public void setParser(IParser parser) {
+ this.parser = parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if(parserElement == null) {
+ return null;
+ }
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for(View view : views) {
+ if(AppearanceHelper.showElementIcon(view)) {
+ return UMLElementTypes.getImage(parserElement.eClass());
+ }
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if(text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if(getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if(value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if(getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if(parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Class_2008, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPart.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch(directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if(configuration == null || configuration.getLanguage() == null) {
+ // Create default edit manager
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
+ initializeDirectEditManager(theRequest);
+ return;
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+ if(Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+ initializeDirectEditManager(theRequest);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if(maskLabelPolicy == null) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if(getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if(accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return (View)getModel();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ * @generated
+ */
+ public int getDirectEditionType() {
+ if(checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if(checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ * @generated
+ */
+ protected boolean checkExtendedEditor() {
+ if(resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ * @generated
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ * @generated
+ */
+ protected void initExtendedEditorConfiguration() {
+ if(configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ * @generated
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ * @param theRequest the direct edit request that starts the direct edit system
+ * @generated
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ refreshLabel();
+ Object feature = event.getFeature();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if(resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ if(event.getNewValue() instanceof EAnnotation && VisualInformationPapyrusConstants.DISPLAY_NAMELABELICON.equals(((EAnnotation)event.getNewValue()).getSource())) {
+ refreshLabel();
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ public void deactivate() {
+ removeOwnerElementListeners();
+ super.deactivate();
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeOwnerElementListeners() {
+ removeListenerFilter(ADD_PARENT_MODEL);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java new file mode 100644 index 00000000000..70bac9b29b8 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassNameEditPartCN.java @@ -0,0 +1,786 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.AccessibleEditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.requests.DirectEditRequest;
+import org.eclipse.gef.tools.DirectEditManager;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParser;
+import org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus;
+import org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry;
+import org.eclipse.gmf.runtime.diagram.ui.requests.RequestConstants;
+import org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser;
+import org.eclipse.gmf.runtime.notation.FontStyle;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.gmf.tooling.runtime.edit.policies.DefaultNodeLabelDragPolicy;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.viewers.ICellEditorValidator;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.extensionpoints.editors.Activator;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IAdvancedEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.ICustomDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IDirectEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.configuration.IPopupEditorConfiguration;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ExtendedDirectEditionDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
+import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
+import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
+import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.UMLTextSelectionEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLParserProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.FontData;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.Feature;
+
+/**
+ * @generated
+ */
+public class ClassNameEditPartCN extends PapyrusCompartmentEditPart implements ITextAwareEditPart, IControlParserForDirectEdit {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 5014;
+
+ /**
+ * @generated
+ */
+ private DirectEditManager manager;
+
+ /**
+ * @generated
+ */
+ private IParser parser;
+
+ /**
+ * @generated
+ */
+ private List<?> parserElements;
+
+ /**
+ * @generated
+ */
+ private String defaultText;
+
+ /**
+ * direct edition mode (default, undefined, registered editor, etc.)
+ * @generated
+ */
+ protected int directEditionMode = IDirectEdition.UNDEFINED_DIRECT_EDITOR;
+
+ /**
+ * configuration from a registered edit dialog
+ * @generated
+ */
+ protected IDirectEditorConfiguration configuration;
+
+ /**
+ * @generated
+ */
+ public ClassNameEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new UMLTextSelectionEditPolicy());
+ installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelTextHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getText();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getText();
+ } else {
+ return ((Label)figure).getText();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelTextHelper(IFigure figure, String text) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setText(text);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setText(text);
+ } else {
+ ((Label)figure).setText(text);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIconHelper(IFigure figure) {
+ if(figure instanceof WrappingLabel) {
+ return ((WrappingLabel)figure).getIcon();
+ } else if(figure instanceof ILabelFigure) {
+ return ((ILabelFigure)figure).getIcon();
+ } else {
+ return ((Label)figure).getIcon();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setLabelIconHelper(IFigure figure, Image icon) {
+ if(figure instanceof WrappingLabel) {
+ ((WrappingLabel)figure).setIcon(icon);
+ } else if(figure instanceof ILabelFigure) {
+ ((ILabelFigure)figure).setIcon(icon);
+ } else {
+ ((Label)figure).setIcon(icon);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabel(IFigure figure) {
+ unregisterVisuals();
+ setFigure(figure);
+ defaultText = getLabelTextHelper(figure);
+ registerVisuals();
+ refreshVisuals();
+ }
+
+ /**
+ * @generated
+ */
+ protected List<?> getModelChildren() {
+ return Collections.EMPTY_LIST;
+ }
+
+ /**
+ * @generated
+ */
+ public IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ public void setParser(IParser parser) {
+ this.parser = parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected EObject getParserElement() {
+ return resolveSemanticElement();
+ }
+
+ /**
+ * @generated
+ */
+ protected Image getLabelIcon() {
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected String getLabelText() {
+ String text = null;
+ EObject parserElement = getParserElement();
+ if(parserElement != null && getParser() != null) {
+ text = getParser().getPrintString(new EObjectAdapter(parserElement), getParserOptions().intValue());
+ }
+ if(text == null || text.length() == 0) {
+ text = defaultText;
+ }
+ return text;
+ }
+
+ /**
+ * @generated
+ */
+ public void setLabelText(String text) {
+ setLabelTextHelper(getFigure(), text);
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public String getEditText() {
+ if(getParserElement() == null || getParser() == null) {
+ return ""; //$NON-NLS-1$
+ }
+ return getParser().getEditString(new EObjectAdapter(getParserElement()), getParserOptions().intValue());
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean isEditable() {
+ return getParser() != null;
+ }
+
+ /**
+ * @generated
+ */
+ public ICellEditorValidator getEditTextValidator() {
+ return new ICellEditorValidator() {
+
+ public String isValid(final Object value) {
+ if(value instanceof String) {
+ final EObject element = getParserElement();
+ final IParser parser = getParser();
+ try {
+ IParserEditStatus valid = (IParserEditStatus)getEditingDomain().runExclusive(new RunnableWithResult.Impl<java.lang.Object>() {
+
+ public void run() {
+ setResult(parser.isValidEditString(new EObjectAdapter(element), (String)value));
+ }
+ });
+ return valid.getCode() == ParserEditStatus.EDITABLE ? null : valid.getMessage();
+ } catch (InterruptedException ie) {
+ ie.printStackTrace();
+ }
+ }
+ // shouldn't get here
+ return null;
+ }
+ };
+ }
+
+ /**
+ * @generated
+ */
+ public IContentAssistProcessor getCompletionProcessor() {
+ if(getParserElement() == null || getParser() == null) {
+ return null;
+ }
+ return getParser().getCompletionProcessor(new EObjectAdapter(getParserElement()));
+ }
+
+ /**
+ * @generated
+ */
+ public ParserOptions getParserOptions() {
+ return ParserOptions.NONE;
+ }
+
+ /**
+ * @generated
+ */
+ public IParser getParser() {
+ if(parser == null) {
+ parser = UMLParserProvider.getParser(UMLElementTypes.Class_3010, getParserElement(), UMLVisualIDRegistry.getType(org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPartCN.VISUAL_ID));
+ }
+ return parser;
+ }
+
+ /**
+ * @generated
+ */
+ protected DirectEditManager getManager() {
+ if(manager == null) {
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ }
+ return manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void setManager(DirectEditManager manager) {
+ this.manager = manager;
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit() {
+ BusyIndicator.showWhile(Display.getDefault(), new java.lang.Runnable() {
+
+ public void run() {
+ getManager().show();
+ }
+ });
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEdit(Point eventLocation) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(eventLocation.getSWTPoint());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void performDirectEdit(char initialCharacter) {
+ if(getManager() instanceof TextDirectEditManager) {
+ ((TextDirectEditManager)getManager()).show(initialCharacter);
+ } else {
+ performDirectEdit();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void performDirectEditRequest(Request request) {
+ final Request theRequest = request;
+ if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
+ directEditionMode = getDirectEditionType();
+ }
+ switch(directEditionMode) {
+ case IDirectEdition.NO_DIRECT_EDITION:
+ // no direct edition mode => does nothing
+ return;
+ case IDirectEdition.EXTENDED_DIRECT_EDITOR:
+ updateExtendedEditorConfiguration();
+ if(configuration == null || configuration.getLanguage() == null) {
+ // Create default edit manager
+ setManager(new MultilineLabelDirectEditManager(this, MultilineLabelDirectEditManager.getTextCellEditorClass(this), UMLEditPartFactory.getTextCellEditorLocator(this)));
+ performDefaultDirectEditorEdit(theRequest);
+ } else {
+ configuration.preEditAction(resolveSemanticElement());
+ Dialog dialog = null;
+ if(configuration instanceof ICustomDirectEditorConfiguration) {
+ setManager(((ICustomDirectEditorConfiguration)configuration).createDirectEditManager(this));
+ initializeDirectEditManager(theRequest);
+ return;
+ } else if(configuration instanceof IPopupEditorConfiguration) {
+ IPopupEditorHelper helper = ((IPopupEditorConfiguration)configuration).createPopupEditorHelper(this);
+ helper.showEditor();
+ return;
+ } else if(configuration instanceof IAdvancedEditorConfiguration) {
+ dialog = ((IAdvancedEditorConfiguration)configuration).createDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), configuration.getTextToEdit(resolveSemanticElement()));
+ } else if(configuration instanceof IDirectEditorConfiguration) {
+ dialog = new ExtendedDirectEditionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), resolveSemanticElement(), ((IDirectEditorConfiguration)configuration).getTextToEdit(resolveSemanticElement()), (IDirectEditorConfiguration)configuration);
+ } else {
+ return;
+ }
+ final Dialog finalDialog = dialog;
+ if(Window.OK == dialog.open()) {
+ TransactionalEditingDomain domain = getEditingDomain();
+ RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
+
+ @Override
+ protected void doExecute() {
+ configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
+ }
+ };
+ domain.getCommandStack().execute(command);
+ }
+ }
+ break;
+ case IDirectEdition.DEFAULT_DIRECT_EDITOR:
+ initializeDirectEditManager(theRequest);
+ break;
+ default:
+ break;
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void initializeDirectEditManager(final Request request) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)request.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshLabel();
+ refreshFont();
+ refreshFontColor();
+ refreshUnderline();
+ refreshStrikeThrough();
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshLabel() {
+ EditPolicy maskLabelPolicy = getEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY);
+ if(maskLabelPolicy == null) {
+ setLabelTextHelper(getFigure(), getLabelText());
+ setLabelIconHelper(getFigure(), getLabelIcon());
+ }
+ Object pdEditPolicy = getEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE);
+ if(pdEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)pdEditPolicy).refreshFeedback();
+ }
+ Object sfEditPolicy = getEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE);
+ if(sfEditPolicy instanceof UMLTextSelectionEditPolicy) {
+ ((UMLTextSelectionEditPolicy)sfEditPolicy).refreshFeedback();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshUnderline() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextUnderline(style.isUnderline());
+ }
+ if(resolveSemanticElement() instanceof Feature) {
+ if(((Feature)resolveSemanticElement()).isStatic()) {
+ ((WrappingLabel)getFigure()).setTextUnderline(true);
+ } else {
+ ((WrappingLabel)getFigure()).setTextUnderline(false);
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshStrikeThrough() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null && getFigure() instanceof WrappingLabel) {
+ ((WrappingLabel)getFigure()).setTextStrikeThrough(style.isStrikeThrough());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshFont() {
+ FontStyle style = (FontStyle)getFontStyleOwnerView().getStyle(NotationPackage.eINSTANCE.getFontStyle());
+ if(style != null) {
+ FontData fontData = new FontData(style.getFontName(), style.getFontHeight(), (style.isBold() ? SWT.BOLD : SWT.NORMAL) | (style.isItalic() ? SWT.ITALIC : SWT.NORMAL));
+ setFont(fontData);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void setFontColor(Color color) {
+ getFigure().setForegroundColor(color);
+ }
+
+ /**
+ * @generated
+ */
+ protected void addSemanticListeners() {
+ if(getParser() instanceof ISemanticParser) {
+ EObject element = resolveSemanticElement();
+ parserElements = ((ISemanticParser)getParser()).getSemanticElementsBeingParsed(element);
+ for(int i = 0; i < parserElements.size(); i++) {
+ addListenerFilter("SemanticModel" + i, this, (EObject)parserElements.get(i)); //$NON-NLS-1$
+ }
+ } else {
+ super.addSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeSemanticListeners() {
+ if(parserElements != null) {
+ for(int i = 0; i < parserElements.size(); i++) {
+ removeListenerFilter("SemanticModel" + i); //$NON-NLS-1$
+ }
+ } else {
+ super.removeSemanticListeners();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected AccessibleEditPart getAccessibleEditPart() {
+ if(accessibleEP == null) {
+ accessibleEP = new AccessibleGraphicalEditPart() {
+
+ public void getName(AccessibleEvent e) {
+ e.result = getLabelTextHelper(getFigure());
+ }
+ };
+ }
+ return accessibleEP;
+ }
+
+ /**
+ * @generated
+ */
+ private View getFontStyleOwnerView() {
+ return (View)getModel();
+ }
+
+ /**
+ * Returns the kind of associated editor for direct edition.
+ *
+ * @return an <code>int</code> corresponding to the kind of direct editor, @see org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition
+ * @generated
+ */
+ public int getDirectEditionType() {
+ if(checkExtendedEditor()) {
+ initExtendedEditorConfiguration();
+ return IDirectEdition.EXTENDED_DIRECT_EDITOR;
+ }
+ if(checkDefaultEdition()) {
+ return IDirectEdition.DEFAULT_DIRECT_EDITOR;
+ }
+ // not a named element. no specific editor => do nothing
+ return IDirectEdition.NO_DIRECT_EDITION;
+ }
+
+ /**
+ * Checks if an extended editor is present.
+ *
+ * @return <code>true</code> if an extended editor is present.
+ * @generated
+ */
+ protected boolean checkExtendedEditor() {
+ if(resolveSemanticElement() != null) {
+ return DirectEditorsUtil.hasSpecificEditorConfiguration(resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if a default direct edition is available
+ *
+ * @return <code>true</code> if a default direct edition is available
+ * @generated
+ */
+ protected boolean checkDefaultEdition() {
+ return (getParser() != null);
+ }
+
+ /**
+ * Initializes the extended editor configuration
+ * @generated
+ */
+ protected void initExtendedEditorConfiguration() {
+ if(configuration == null) {
+ final String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("")) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else {
+ configuration = DirectEditorsUtil.findEditorConfiguration(IDirectEditorsIds.UML_LANGUAGE, resolveSemanticElement().eClass().getInstanceClassName());
+ }
+ }
+ }
+
+ /**
+ * Updates the preference configuration
+ * @generated
+ */
+ protected void updateExtendedEditorConfiguration() {
+ String languagePreferred = Activator.getDefault().getPreferenceStore().getString(IDirectEditorsIds.EDITOR_FOR_ELEMENT + resolveSemanticElement().eClass().getInstanceClassName());
+ if(languagePreferred != null && !languagePreferred.equals("") && !languagePreferred.equals(configuration.getLanguage())) {
+ configuration = DirectEditorsUtil.findEditorConfiguration(languagePreferred, resolveSemanticElement().eClass().getInstanceClassName());
+ } else if(IDirectEditorsIds.SIMPLE_DIRECT_EDITOR.equals(languagePreferred)) {
+ configuration = null;
+ }
+ }
+
+ /**
+ * Performs the direct edit usually used by GMF editors.
+ * @param theRequest the direct edit request that starts the direct edit system
+ * @generated
+ */
+ protected void performDefaultDirectEditorEdit(final Request theRequest) {
+ // initialize the direct edit manager
+ try {
+ getEditingDomain().runExclusive(new Runnable() {
+
+ public void run() {
+ if(isActive() && isEditable()) {
+ if(theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR) instanceof Character) {
+ Character initialChar = (Character)theRequest.getExtendedData().get(RequestConstants.REQ_DIRECTEDIT_EXTENDEDDATA_INITIAL_CHAR);
+ performDirectEdit(initialChar.charValue());
+ } else if((theRequest instanceof DirectEditRequest) && (getEditText().equals(getLabelText()))) {
+ DirectEditRequest editRequest = (DirectEditRequest)theRequest;
+ performDirectEdit(editRequest.getLocation());
+ } else {
+ performDirectEdit();
+ }
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected void addNotationalListeners() {
+ super.addNotationalListeners();
+ addListenerFilter("PrimaryView", this, getPrimaryView()); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeNotationalListeners() {
+ super.removeNotationalListeners();
+ removeListenerFilter("PrimaryView"); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification event) {
+ refreshLabel();
+ Object feature = event.getFeature();
+ if(NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
+ Integer c = (Integer)event.getNewValue();
+ setFontColor(DiagramColorRegistry.getInstance().getColor(c));
+ } else if(NotationPackage.eINSTANCE.getFontStyle_Underline().equals(feature)) {
+ refreshUnderline();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_StrikeThrough().equals(feature)) {
+ refreshStrikeThrough();
+ } else if(NotationPackage.eINSTANCE.getFontStyle_FontHeight().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_FontName().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Bold().equals(feature) || NotationPackage.eINSTANCE.getFontStyle_Italic().equals(feature)) {
+ refreshFont();
+ } else {
+ if(getParser() != null && getParser().isAffectingEvent(event, getParserOptions().intValue())) {
+ refreshLabel();
+ }
+ if(getParser() instanceof ISemanticParser) {
+ ISemanticParser modelParser = (ISemanticParser)getParser();
+ if(modelParser.areSemanticElementsAffected(null, event)) {
+ removeSemanticListeners();
+ if(resolveSemanticElement() != null) {
+ addSemanticListeners();
+ }
+ refreshLabel();
+ }
+ }
+ }
+ super.handleNotificationEvent(event);
+ }
+
+ /**
+ * @generated
+ */
+ protected IFigure createFigure() {
+ // Parent should assign one using setLabel() method
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ private static final String ADD_PARENT_MODEL = "AddParentModel";
+
+ /**
+ * @generated
+ */
+ public void activate() {
+ super.activate();
+ addOwnerElementListeners();
+ }
+
+ /**
+ * @generated
+ */
+ protected void addOwnerElementListeners() {
+ addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
+ }
+
+ /**
+ * @generated
+ */
+ public void deactivate() {
+ removeOwnerElementListeners();
+ super.deactivate();
+ }
+
+ /**
+ * @generated
+ */
+ protected void removeOwnerElementListeners() {
+ removeListenerFilter(ADD_PARENT_MODEL);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java new file mode 100644 index 00000000000..344e9c9a7db --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPart.java @@ -0,0 +1,128 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassOperationCompartmentItemSemanticEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentEditPart extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7018;
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassOperationCompartmentEditPart_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassOperationCompartmentItemSemanticEditPolicy());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java new file mode 100644 index 00000000000..1b210764c0f --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationCompartmentEditPartCN.java @@ -0,0 +1,128 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.parts;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout;
+import org.eclipse.gmf.runtime.notation.NotationPackage;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.DuplicatePasteEditPolicy;
+import org.eclipse.papyrus.uml.diagram.common.editpolicies.PapyrusCreationEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.ProfileDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.custom.policies.RemoveOrphanViewPolicy;
+import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ClassOperationCompartmentItemSemanticEditPolicyCN;
+import org.eclipse.papyrus.uml.diagram.profile.part.Messages;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentEditPartCN extends ListCompartmentEditPart {
+
+ /**
+ * @generated
+ */
+ public static final int VISUAL_ID = 7012;
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentEditPartCN(View view) {
+ super(view);
+ }
+
+ /**
+ * @generated
+ */
+ protected boolean hasModelChildrenChanged(Notification evt) {
+ return false;
+ }
+
+ /**
+ * @generated
+ */
+ public String getCompartmentName() {
+ return Messages.ClassOperationCompartmentEditPartCN_title;
+ }
+
+ /**
+ * @generated
+ */
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new ResizableCompartmentEditPolicy());
+ installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ClassOperationCompartmentItemSemanticEditPolicyCN());
+ installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new DragDropEditPolicy());
+ installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
+ installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
+ }
+
+ /**
+ * @generated
+ */
+ protected void setRatio(Double ratio) {
+ if(getFigure().getParent().getLayoutManager() instanceof ConstrainedToolbarLayout) {
+ super.setRatio(ratio);
+ }
+ }
+
+ /**
+ * @generated
+ */
+ public EditPart getTargetEditPart(Request request) {
+ return super.getTargetEditPart(request);
+ }
+
+ /**
+ * @generated
+ */
+ protected void handleNotificationEvent(Notification notification) {
+ Object feature = notification.getFeature();
+ if(NotationPackage.eINSTANCE.getSize_Width().equals(feature) || NotationPackage.eINSTANCE.getSize_Height().equals(feature) || NotationPackage.eINSTANCE.getLocation_X().equals(feature) || NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
+ refreshBounds();
+ }
+ super.handleNotificationEvent(notification);
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshBounds() {
+ int width = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Width())).intValue();
+ int height = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getSize_Height())).intValue();
+ Dimension size = new Dimension(width, height);
+ int x = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_X())).intValue();
+ int y = ((Integer)getStructuralFeatureValue(NotationPackage.eINSTANCE.getLocation_Y())).intValue();
+ Point loc = new Point(x, y);
+ ((GraphicalEditPart)getParent()).setLayoutConstraint(this, getFigure(), new Rectangle(loc, size));
+ }
+
+ /**
+ * @generated
+ */
+ protected void refreshVisuals() {
+ super.refreshVisuals();
+ refreshBounds();
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java index 746d29c5dd4..8218001024a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassOperationEditPart.java @@ -134,7 +134,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new OperationLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText * @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText }
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class ClassOperationEditPart extends CompartmentEditPart implements IText * @generated
*/
protected IFigure createFigurePrim() {
- return new OperationFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class OperationFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public OperationFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java index 9805e783390..77d4b64c211 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ClassPropertyEditPart.java @@ -134,7 +134,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new PropertyLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA * @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA }
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class ClassPropertyEditPart extends CompartmentEditPart implements ITextA * @generated
*/
protected IFigure createFigurePrim() {
- return new PropertyFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class PropertyFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public PropertyFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java index 3b89e97d9d7..92b702c1f22 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentAnnotatedElementEditPart.java @@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.CommentAnnotatedElementItemSemanticEditPolicy;
@@ -50,10 +51,6 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -63,37 +60,13 @@ public class CommentAnnotatedElementEditPart extends ConnectionEditPart implemen * @generated
*/
protected Connection createConnectionFigure() {
- return new CommentLinkDescriptor();
+ return new SimpleDashedEdgeFigure();
}
/**
* @generated
*/
- public CommentLinkDescriptor getPrimaryShape() {
- return (CommentLinkDescriptor)getFigure();
+ public SimpleDashedEdgeFigure getPrimaryShape() {
+ return (SimpleDashedEdgeFigure)getFigure();
}
-
-
- /**
- * @generated
- */
- public class CommentLinkDescriptor extends PolylineConnectionEx {
-
-
-
-
- /**
- * @generated
- */
- public CommentLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
-
- }
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java index 69b278c177a..d4fc9ec4d3f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPart.java @@ -122,7 +122,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class CommentBodyEditPart extends PapyrusCompartmentEditPart implements I public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java index ed4e5b7d17c..cc9c005577a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentBodyEditPartCN.java @@ -122,7 +122,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class CommentBodyEditPartCN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java index d742ed38009..55f23a99127 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -107,17 +108,14 @@ public class CommentEditPart extends AbstractCommentEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -141,8 +139,6 @@ public class CommentEditPart extends AbstractCommentEditPart { ((CommentBodyEditPart)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -183,21 +179,14 @@ public class CommentEditPart extends AbstractCommentEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Comment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -207,12 +196,7 @@ public class CommentEditPart extends AbstractCommentEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -249,14 +233,11 @@ public class CommentEditPart extends AbstractCommentEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -274,9 +255,4 @@ public class CommentEditPart extends AbstractCommentEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java index b66f8f682c7..1d71972a5a0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/CommentEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractCommentEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -107,17 +108,14 @@ public class CommentEditPartCN extends AbstractCommentEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -141,8 +139,6 @@ public class CommentEditPartCN extends AbstractCommentEditPart { ((CommentBodyEditPartCN)childEditPart).setLabel(getPrimaryShape().getCornerBentFigure());
return true;
}
-
-
return false;
}
@@ -183,21 +179,14 @@ public class CommentEditPartCN extends AbstractCommentEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Comment";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -207,12 +196,7 @@ public class CommentEditPartCN extends AbstractCommentEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -249,14 +233,11 @@ public class CommentEditPartCN extends AbstractCommentEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -274,9 +255,4 @@ public class CommentEditPartCN extends AbstractCommentEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java index 10143251ac8..78689f10c86 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPart.java @@ -122,7 +122,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintBodyEditPart extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java index 08dc55731f1..0b27a18e796 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintBodyEditPartCN.java @@ -122,7 +122,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintBodyEditPartCN extends PapyrusCompartmentEditPart impleme public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java index 7c21f13d789..d2d7d03dc5c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintConstrainedElementEditPart.java @@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.common.figure.edge.SimpleDashedEdgeFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ConstraintConstrainedElementItemSemanticEditPolicy;
@@ -50,10 +51,6 @@ public class ConstraintConstrainedElementEditPart extends ConnectionEditPart imp installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -63,37 +60,13 @@ public class ConstraintConstrainedElementEditPart extends ConnectionEditPart imp * @generated
*/
protected Connection createConnectionFigure() {
- return new CommentLinkDescriptor();
+ return new SimpleDashedEdgeFigure();
}
/**
* @generated
*/
- public CommentLinkDescriptor getPrimaryShape() {
- return (CommentLinkDescriptor)getFigure();
+ public SimpleDashedEdgeFigure getPrimaryShape() {
+ return (SimpleDashedEdgeFigure)getFigure();
}
-
-
- /**
- * @generated
- */
- public class CommentLinkDescriptor extends PolylineConnectionEx {
-
-
-
-
- /**
- * @generated
- */
- public CommentLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASH);
-
- }
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java index f3c04731aa5..b63d587d3ff 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -108,17 +109,14 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -146,8 +144,6 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { ((ConstraintBodyEditPart)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -191,21 +187,14 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Constraint";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -215,12 +204,7 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -257,14 +241,11 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -282,9 +263,4 @@ public class ConstraintEditPart extends AbstractConstraintEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java index 0970e118ba7..d25ac1cfcbb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractConstraintEditPart;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ConstraintFigure;
@@ -104,17 +105,14 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -142,8 +140,6 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { ((ConstraintBodyEditPartCN)childEditPart).setLabel(getPrimaryShape().getConstraintFigure());
return true;
}
-
-
return false;
}
@@ -187,21 +183,14 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Constraint";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(40, 40);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -211,12 +200,7 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -253,14 +237,11 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -278,9 +259,4 @@ public class ConstraintEditPartCN extends AbstractConstraintEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java index dcdfcd390ed..5779525cec9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPart.java @@ -122,7 +122,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintNameEditPart extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java index 5fe8b72a8ff..c8aed569898 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ConstraintNameEditPartCN.java @@ -122,7 +122,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ConstraintNameEditPartCN extends PapyrusCompartmentEditPart impleme public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java index 7d2d90ebd86..489455d5a93 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ContextLinkEditPart.java @@ -21,6 +21,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.ConnectionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.custom.figure.CustomContextLinkFigure;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.ContextLinkItemSemanticEditPolicy;
@@ -50,10 +51,6 @@ public class ContextLinkEditPart extends ConnectionEditPart implements ITreeBran installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -63,37 +60,13 @@ public class ContextLinkEditPart extends ConnectionEditPart implements ITreeBran * @generated
*/
protected Connection createConnectionFigure() {
- return new ContextLinkDescriptor();
+ return new CustomContextLinkFigure();
}
/**
* @generated
*/
- public ContextLinkDescriptor getPrimaryShape() {
- return (ContextLinkDescriptor)getFigure();
+ public CustomContextLinkFigure getPrimaryShape() {
+ return (CustomContextLinkFigure)getFigure();
}
-
-
- /**
- * @generated
- */
- public class ContextLinkDescriptor extends PolylineConnectionEx {
-
-
-
-
- /**
- * @generated
- */
- public ContextLinkDescriptor() {
- this.setLineStyle(Graphics.LINE_DASHDOT);
-
- }
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java index 3be37cf8650..7880ccdf1fa 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPart.java @@ -66,7 +66,6 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm return Messages.DataTypeAttributeCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeAttributeCompartmentEditPart extends ResizeableListCompartm * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java index 7b576b5cc89..f125d8872c0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeAttributeCompartmentEditPartCN.java @@ -66,7 +66,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar return Messages.DataTypeAttributeCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeAttributeCompartmentEditPartCN extends ResizeableListCompar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java index bef204a4d9c..ba324022156 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPart.java @@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -121,17 +122,14 @@ public class DataTypeEditPart extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -155,22 +153,18 @@ public class DataTypeEditPart extends ClassifierEditPart { ((DataTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DataTypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof DataTypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -227,21 +221,14 @@ public class DataTypeEditPart extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "DataType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -251,12 +238,7 @@ public class DataTypeEditPart extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -293,14 +275,11 @@ public class DataTypeEditPart extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -319,8 +298,6 @@ public class DataTypeEditPart extends ClassifierEditPart { return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -337,8 +314,4 @@ public class DataTypeEditPart extends ClassifierEditPart { }
return super.getTargetEditPart(request);
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java index 93cf5b370ee..6748687b521 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeEditPartCN.java @@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -89,7 +90,6 @@ public class DataTypeEditPartCN extends ClassifierEditPart { installEditPolicy("RESIZE_BORDER_ITEMS", new ConstrainedItemBorderLayoutEditPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomDataTypeItemSemanticEditPolicyCN());
- installEditPolicy(AppliedStereotypeLabelDisplayEditPolicy.STEREOTYPE_LABEL_POLICY, new AppliedStereotypeNodeLabelDisplayEditPolicy());
installEditPolicy(QualifiedNameDisplayEditPolicy.QUALIFIED_NAME_POLICY, new QualifiedNameDisplayEditPolicy());
installEditPolicy(ShowHideCompartmentEditPolicy.SHOW_HIDE_COMPARTMENT_POLICY, new ShowHideCompartmentEditPolicy());
// XXX need an SCR to runtime to have another abstract superclass that would let children add reasonable editpolicies
@@ -121,17 +121,14 @@ public class DataTypeEditPartCN extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -155,22 +152,18 @@ public class DataTypeEditPartCN extends ClassifierEditPart { ((DataTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof DataTypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof DataTypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((DataTypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -227,21 +220,14 @@ public class DataTypeEditPartCN extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "DataType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -251,12 +237,7 @@ public class DataTypeEditPartCN extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -293,14 +274,11 @@ public class DataTypeEditPartCN extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -319,8 +297,6 @@ public class DataTypeEditPartCN extends ClassifierEditPart { return getChildBySemanticHint(UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -337,7 +313,4 @@ public class DataTypeEditPartCN extends ClassifierEditPart { }
return super.getTargetEditPart(request);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java index d72afd0c50e..ce6e3e3f9fe 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPart.java @@ -122,7 +122,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class DataTypeNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java index 44c8df3f634..7d8ee346023 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeNameEditPartCN.java @@ -122,7 +122,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class DataTypeNameEditPartCN extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java index c3ac6dde8e4..ff46c867609 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPart.java @@ -66,7 +66,6 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm return Messages.DataTypeOperationCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeOperationCompartmentEditPart extends ResizeableListCompartm * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java index fc317f91c74..8de44cfdccc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationCompartmentEditPartCN.java @@ -66,7 +66,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar return Messages.DataTypeOperationCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class DataTypeOperationCompartmentEditPartCN extends ResizeableListCompar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java index 8bf1cca9870..61dc5a37713 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypeOperationEditPart.java @@ -134,7 +134,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new OperationLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT * @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT }
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class DataTypeOperationEditPart extends CompartmentEditPart implements IT * @generated
*/
protected IFigure createFigurePrim() {
- return new OperationFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class OperationFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public OperationFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java index 7da48448c3e..594880a076b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DataTypePropertyEditPart.java @@ -134,7 +134,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -165,7 +164,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe installEditPolicy(IMaskManagedLabelEditPolicy.MASK_MANAGED_LABEL_EDIT_POLICY, new PropertyLabelEditPolicy());
}
-
/**
* @generated
*/
@@ -333,7 +331,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -420,9 +417,7 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -455,7 +450,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -463,7 +457,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -625,7 +618,7 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe * @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -642,7 +635,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -727,7 +719,6 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe }
}
-
/**
* @generated
*/
@@ -792,47 +783,14 @@ public class DataTypePropertyEditPart extends CompartmentEditPart implements ITe * @generated
*/
protected IFigure createFigurePrim() {
- return new PropertyFigureDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class PropertyFigureDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public PropertyFigureDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java index 96dba6c6a7c..8314df2f160 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyAppliedStereotypeEditPart.java @@ -121,8 +121,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im }
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im }
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class DependencyAppliedStereotypeEditPart extends PapyrusLabelEditPart im // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java index 259b9bc3d81..2eeaa5b7c39 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyBranchEditPart.java @@ -49,10 +49,6 @@ public class DependencyBranchEditPart extends ConnectionEditPart implements ITre installEditPolicy(EditPolicy.GRAPHICAL_NODE_ROLE, new CustomGraphicalNodeEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -71,5 +67,4 @@ public class DependencyBranchEditPart extends ConnectionEditPart implements ITre public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java index 1caa6c5a8db..fb9a04c6116 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyEditPart.java @@ -116,5 +116,4 @@ public class DependencyEditPart extends UMLConnectionNodeEditPart implements ITr public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java index f1739d68f9d..cc1d188c683 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNameEditPart.java @@ -121,8 +121,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex }
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex }
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class DependencyNameEditPart extends PapyrusLabelEditPart implements ITex // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java index 4f091983536..8ca1b1b99f9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DependencyNodeEditPart.java @@ -40,7 +40,10 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.NodeEditPart;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.DependencyNodeFigure;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
import org.eclipse.papyrus.uml.diagram.profile.custom.policies.CustomGraphicalNodeEditPolicy;
import org.eclipse.papyrus.uml.diagram.profile.edit.policies.DependencyNodeItemSemanticEditPolicy;
@@ -51,7 +54,7 @@ import org.eclipse.swt.graphics.Color; /**
* @generated
*/
-public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart {
+public class DependencyNodeEditPart extends NodeEditPart {
/**
* @generated
@@ -124,25 +127,21 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart { return lep;
}
-
-
-
/**
* @generated
*/
protected IFigure createNodeShape() {
- return primaryShape = new DependencyNodeDescriptor();
+ return primaryShape = new DependencyNodeFigure();
}
/**
* DependencyNodeDescriptor
* @generated
*/
- public DependencyNodeDescriptor getPrimaryShape() {
- return (DependencyNodeDescriptor)primaryShape;
+ public DependencyNodeFigure getPrimaryShape() {
+ return (DependencyNodeFigure)primaryShape;
}
-
/**
* @generated
*/
@@ -160,16 +159,10 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart { * @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Dependency";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(10, 10);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -179,12 +172,7 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart { * @generated
*/
protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -216,14 +204,11 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -241,54 +226,4 @@ public class DependencyNodeEditPart extends AbstractBorderedShapeEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(MultiDependencyLabelEditPart.VISUAL_ID));
}
-
-
-
-
-
- /**
- * @generated
- */
- public class DependencyNodeDescriptor extends Ellipse {
-
-
-
-
- /**
- * @generated
- */
- public DependencyNodeDescriptor() {
- this.setForegroundColor(ColorConstants.black);
- this.setBackgroundColor(ColorConstants.black);
- this.setMaximumSize(new Dimension(getMapMode().DPtoLP(10), getMapMode().DPtoLP(10)));
- this.setMinimumSize(new Dimension(getMapMode().DPtoLP(10), getMapMode().DPtoLP(10)));
- }
-
-
- /**
- * @generated
- */
- private boolean myUseLocalCoordinates = false;
-
- /**
- * @generated
- */
- protected boolean useLocalCoordinates() {
- return myUseLocalCoordinates;
- }
-
- /**
- * @generated
- */
- protected void setUseLocalCoordinates(boolean useLocalCoordinates) {
- myUseLocalCoordinates = useLocalCoordinates;
- }
-
-
-
-
-
- }
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java index 0ebb987382c..3379f1feb65 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/DiagramNameEditPart.java @@ -123,8 +123,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -171,7 +169,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
}
-
/**
* @generated
*/
@@ -339,7 +336,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -426,9 +422,7 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -461,7 +455,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -469,7 +462,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -648,7 +640,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -733,7 +724,6 @@ public class DiagramNameEditPart extends LabelEditPart implements ITextAwareEdit }
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java index a2a283a7110..cc228fa2b65 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportAliasEditPart.java @@ -121,8 +121,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +623,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +707,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements }
}
-
/**
* @generated
*/
@@ -746,7 +736,6 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements }
}
}
-
super.handleNotificationEvent(event);
}
@@ -757,5 +746,4 @@ public class ElementImportAliasEditPart extends PapyrusLabelEditPart implements // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java index acee381da7f..d767be60971 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ElementImportEditPart.java @@ -117,5 +117,4 @@ public class ElementImportEditPart extends UMLConnectionNodeEditPart implements public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java index 24bdd4c09aa..013b2adfa96 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPart.java @@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -121,17 +122,14 @@ public class EnumerationEditPart extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -155,15 +153,12 @@ public class EnumerationEditPart extends ClassifierEditPart { ((EnumerationNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPart) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationEnumerationLiteralCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -212,21 +207,14 @@ public class EnumerationEditPart extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Enumeration";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -236,12 +224,7 @@ public class EnumerationEditPart extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -278,14 +261,11 @@ public class EnumerationEditPart extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -304,8 +284,6 @@ public class EnumerationEditPart extends ClassifierEditPart { return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -319,8 +297,4 @@ public class EnumerationEditPart extends ClassifierEditPart { }
return super.getTargetEditPart(request);
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java index 37bfe0630ea..4c98ba1ed5c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEditPartCN.java @@ -33,6 +33,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -119,17 +120,14 @@ public class EnumerationEditPartCN extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -153,15 +151,12 @@ public class EnumerationEditPartCN extends ClassifierEditPart { ((EnumerationNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof EnumerationEnumerationLiteralCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getEnumerationLiteralCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((EnumerationEnumerationLiteralCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -210,21 +205,14 @@ public class EnumerationEditPartCN extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Enumeration";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -234,12 +222,7 @@ public class EnumerationEditPartCN extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -276,14 +259,11 @@ public class EnumerationEditPartCN extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -302,8 +282,6 @@ public class EnumerationEditPartCN extends ClassifierEditPart { return getChildBySemanticHint(UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -317,7 +295,4 @@ public class EnumerationEditPartCN extends ClassifierEditPart { }
return super.getTargetEditPart(request);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java index e70200e5ffc..b9e31186dc0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPart.java @@ -66,7 +66,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends Resizeable return Messages.EnumerationEnumerationLiteralCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends Resizeable installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPart extends Resizeable * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java index 0b265c9dfae..b3bbb29a596 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationEnumerationLiteralCompartmentEditPartCN.java @@ -66,7 +66,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends Resizeab return Messages.EnumerationEnumerationLiteralCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends Resizeab installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class EnumerationEnumerationLiteralCompartmentEditPartCN extends Resizeab * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java index 875a11a6815..1234c8a2dfc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationLiteralEditPart.java @@ -131,7 +131,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -160,7 +159,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy());
}
-
/**
* @generated
*/
@@ -328,7 +326,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -415,9 +412,7 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -450,7 +445,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -458,7 +452,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -620,7 +613,7 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I * @generated
*/
private View getFontStyleOwnerView() {
- return (View)getModel();
+ return getPrimaryView();
}
/**
@@ -637,7 +630,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -722,7 +714,6 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I }
}
-
/**
* @generated
*/
@@ -787,47 +778,14 @@ public class EnumerationLiteralEditPart extends CompartmentEditPart implements I * @generated
*/
protected IFigure createFigurePrim() {
- return new LiteralEnumerationDescriptor();
- }
-
-
- /**
- * @generated
- */
- public class LiteralEnumerationDescriptor extends WrappingLabel {
-
-
-
-
- /**
- * @generated
- */
- public LiteralEnumerationDescriptor() {
- this.setText("");
-
- this.setFont(THIS_FONT);
-
-
- }
-
-
-
-
-
+ return new WrappingLabel();
}
/**
* @generated
*/
- static final Font THIS_FONT = new Font(Display.getCurrent(), "Arial", 10, SWT.NORMAL);
-
-
- /**
- * @generated
- */
@Override
public boolean isSelectable() {
return getFigure().isShowing();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java index 9ee95636634..297b1ecfd5a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPart.java @@ -122,7 +122,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class EnumerationNameEditPart extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java index 3776b29321f..0f717050b42 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/EnumerationNameEditPartCN.java @@ -122,7 +122,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class EnumerationNameEditPartCN extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java index 30dc9d24831..55aa9fa7ec0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ExtensionEditPart.java @@ -50,10 +50,6 @@ public class ExtensionEditPart extends UMLConnectionNodeEditPart implements ITre installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new CustomExtensionItemSemanticEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -72,5 +68,4 @@ public class ExtensionEditPart extends UMLConnectionNodeEditPart implements ITre public ExtensionFigure getPrimaryShape() {
return (ExtensionFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java index 5bbe9d3c4a8..334853310b0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationAppliedStereotypeEditPart.java @@ -121,8 +121,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar }
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar }
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class GeneralizationAppliedStereotypeEditPart extends PapyrusLabelEditPar // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java index 06c2f944afe..407eee37d78 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/GeneralizationEditPart.java @@ -112,5 +112,4 @@ public class GeneralizationEditPart extends UMLConnectionNodeEditPart implements public GeneralizationFigure getPrimaryShape() {
return (GeneralizationFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java index 5aab0be87f8..d24a5d58c12 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPart.java @@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class MetaclassEditPart extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -126,10 +126,8 @@ public class MetaclassEditPart extends ClassifierEditPart { refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -153,8 +151,6 @@ public class MetaclassEditPart extends ClassifierEditPart { ((MetaclassNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -195,21 +191,14 @@ public class MetaclassEditPart extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Metaclass";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -219,12 +208,7 @@ public class MetaclassEditPart extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -261,14 +245,11 @@ public class MetaclassEditPart extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -286,9 +267,4 @@ public class MetaclassEditPart extends ClassifierEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(MetaclassNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java index b294d9675f6..cfa78eaeae8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassEditPartCN.java @@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -112,7 +113,6 @@ public class MetaclassEditPartCN extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -126,10 +126,8 @@ public class MetaclassEditPartCN extends ClassifierEditPart { refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -153,8 +151,6 @@ public class MetaclassEditPartCN extends ClassifierEditPart { ((MetaclassNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -195,21 +191,14 @@ public class MetaclassEditPartCN extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Metaclass";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -219,12 +208,7 @@ public class MetaclassEditPartCN extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -261,14 +245,11 @@ public class MetaclassEditPartCN extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -286,9 +267,4 @@ public class MetaclassEditPartCN extends ClassifierEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(MetaclassNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java index 6a0479af1d0..63eed10bf85 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPart.java @@ -122,7 +122,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class MetaclassNameEditPart extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java index 4e4e5c01920..c3445789a17 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MetaclassNameEditPartCN.java @@ -122,7 +122,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class MetaclassNameEditPartCN extends PapyrusCompartmentEditPart implemen public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java index d9c968d54ff..48ee62c2b3e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ModelEditPartCN extends NamedElementEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ModelEditPartCN extends NamedElementEditPart { ((ModelNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ModelPackageableElementCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ModelPackageableElementCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ModelEditPartCN extends NamedElementEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Model";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ModelEditPartCN extends NamedElementEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ModelEditPartCN extends NamedElementEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ModelEditPartCN extends NamedElementEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java index 87dbe6c81fd..e1d2f55f23e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelEditPartTN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ModelEditPartTN extends NamedElementEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ModelEditPartTN extends NamedElementEditPart { ((ModelNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ModelPackageableElementCompartmentEditPartTN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ModelPackageableElementCompartmentEditPartTN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ModelEditPartTN extends NamedElementEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Model";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ModelEditPartTN extends NamedElementEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ModelEditPartTN extends NamedElementEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ModelEditPartTN extends NamedElementEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java index 3658d98aae9..0406815db38 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPart.java @@ -122,7 +122,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ModelNameEditPart extends PapyrusCompartmentEditPart implements ITe public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java index 847078ebd98..8bf8ae0db12 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelNameEditPartCN.java @@ -122,7 +122,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ModelNameEditPartCN extends PapyrusCompartmentEditPart implements I public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java index 10c66008ab1..c4f8913b12d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartCN.java @@ -53,7 +53,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme super(view);
}
-
/**
* @generated
*/
@@ -61,7 +60,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme return Messages.ModelPackageableElementCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -77,9 +75,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -93,7 +88,6 @@ public class ModelPackageableElementCompartmentEditPartCN extends ShapeCompartme * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java index 4d8ecd851f3..fa0c1f40bae 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ModelPackageableElementCompartmentEditPartTN.java @@ -53,7 +53,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme super(view);
}
-
/**
* @generated
*/
@@ -61,7 +60,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme return Messages.ModelPackageableElementCompartmentEditPartTN_title;
}
-
/**
* @generated
*/
@@ -77,9 +75,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -93,7 +88,6 @@ public class ModelPackageableElementCompartmentEditPartTN extends ShapeCompartme * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java index 2c137d96115..8cd212aa799 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/MultiDependencyLabelEditPart.java @@ -122,8 +122,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -170,7 +168,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText getBorderItemLocator().setConstraint(new Rectangle(x, y, width, height));
}
-
/**
* @generated
*/
@@ -338,7 +335,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -425,9 +421,7 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -460,7 +454,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -468,7 +461,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -647,7 +639,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -732,7 +723,6 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText }
}
-
/**
* @generated
*/
@@ -780,5 +770,4 @@ public class MultiDependencyLabelEditPart extends LabelEditPart implements IText protected IFigure createFigurePrim() {
return new WrappingLabel();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java index aad02c5a9c0..4f345a47a43 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class PackageEditPart extends NamedElementEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class PackageEditPart extends NamedElementEditPart { ((PackageNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof PackagePackageableElementCompartmentEditPart) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((PackagePackageableElementCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class PackageEditPart extends NamedElementEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Package";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class PackageEditPart extends NamedElementEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class PackageEditPart extends NamedElementEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class PackageEditPart extends NamedElementEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java index f8bb9075a1c..637b54831e5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageEditPartCN.java @@ -31,6 +31,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -117,17 +118,14 @@ public class PackageEditPartCN extends NamedElementEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -151,15 +149,12 @@ public class PackageEditPartCN extends NamedElementEditPart { ((PackageNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof PackagePackageableElementCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((PackagePackageableElementCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -208,21 +203,14 @@ public class PackageEditPartCN extends NamedElementEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Package";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -232,12 +220,7 @@ public class PackageEditPartCN extends NamedElementEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -274,14 +257,11 @@ public class PackageEditPartCN extends NamedElementEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -299,9 +279,4 @@ public class PackageEditPartCN extends NamedElementEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java index 3232dbccac6..8c9085a8504 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportAppliedStereotypeEditPart.java @@ -121,8 +121,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart * @generated
*/
protected IDirectEditorConfiguration configuration;
-
-
/**
* @generated
*/
@@ -154,7 +152,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart return ConnectionLocator.MIDDLE;
}
-
/**
* @generated
*/
@@ -322,7 +319,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +405,7 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +438,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +445,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -708,7 +700,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart }
}
-
/**
* @generated
*/
@@ -738,7 +729,6 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart }
}
}
-
super.handleNotificationEvent(event);
}
@@ -749,5 +739,4 @@ public class PackageImportAppliedStereotypeEditPart extends PapyrusLabelEditPart // Parent should assign one using setLabel() method
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java index 47a688ebe18..5d8c295c200 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageImportEditPart.java @@ -111,5 +111,4 @@ public class PackageImportEditPart extends UMLConnectionNodeEditPart implements public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java index f16650a83df..ffef0cbe88f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPart.java @@ -122,7 +122,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class PackageNameEditPart extends PapyrusCompartmentEditPart implements I public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java index f984efc0f2b..586a0bb3702 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackageNameEditPartCN.java @@ -122,7 +122,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class PackageNameEditPartCN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java index 3abeec1e518..8225d880562 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPart.java @@ -52,7 +52,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme return Messages.PackagePackageableElementCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class PackagePackageableElementCompartmentEditPart extends ShapeCompartme * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java index c86baabcf92..98b0207075e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PackagePackageableElementCompartmentEditPartCN.java @@ -52,7 +52,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart return Messages.PackagePackageableElementCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class PackagePackageableElementCompartmentEditPartCN extends ShapeCompart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java index b31fc91a344..72f6d2700bf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPart.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -111,17 +112,14 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -145,8 +143,6 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { ((PrimitiveTypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -187,21 +183,14 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "PrimitiveType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -211,12 +200,7 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -253,14 +237,11 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -278,9 +259,4 @@ public class PrimitiveTypeEditPart extends ClassifierEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java index 9eec1fd62ea..5caa875a776 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -111,17 +112,14 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -145,8 +143,6 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { ((PrimitiveTypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
return false;
}
@@ -187,21 +183,14 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "PrimitiveType";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 50);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -211,12 +200,7 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -253,14 +237,11 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -278,9 +259,4 @@ public class PrimitiveTypeEditPartCN extends ClassifierEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java index 42fa38fad2f..fc92b7e8b1c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPart.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
@@ -126,7 +127,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -144,7 +144,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -246,7 +245,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem }
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -322,7 +321,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +407,7 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +440,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +447,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +625,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +709,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem }
}
-
/**
* @generated
*/
@@ -733,7 +725,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -778,13 +769,11 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -798,7 +787,6 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -807,16 +795,12 @@ public class PrimitiveTypeNameEditPart extends PapyrusCompartmentEditPart implem public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java index 05011f7d133..0eae6d1c23f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/PrimitiveTypeNameEditPartCN.java @@ -61,6 +61,7 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog; import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.NameLabelIconHelper;
import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
@@ -126,7 +127,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -144,7 +144,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -246,7 +245,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl }
List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
for(View view : views) {
- if(NameLabelIconHelper.showLabelIcon(view)) {
+ if(AppearanceHelper.showElementIcon(view)) {
return UMLElementTypes.getImage(parserElement.eClass());
}
}
@@ -322,7 +321,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -409,9 +407,7 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -444,7 +440,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -452,7 +447,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -631,7 +625,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -716,7 +709,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl }
}
-
/**
* @generated
*/
@@ -733,7 +725,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -778,13 +769,11 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -798,7 +787,6 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -807,16 +795,12 @@ public class PrimitiveTypeNameEditPartCN extends PapyrusCompartmentEditPart impl public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java index 74e06f5729b..23a1a1dc1b3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileApplicationEditPart.java @@ -46,10 +46,6 @@ public class ProfileApplicationEditPart extends UMLConnectionNodeEditPart implem installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProfileApplicationItemSemanticEditPolicy());
}
-
-
-
-
/**
* Creates figure for this edit part.
*
@@ -68,5 +64,4 @@ public class ProfileApplicationEditPart extends UMLConnectionNodeEditPart implem public DashedEdgeFigure getPrimaryShape() {
return (DashedEdgeFigure)getFigure();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java index eb13d3b6ce5..9f36f7316d3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileDiagramEditPart.java @@ -50,17 +50,12 @@ public class ProfileDiagramEditPart extends PapyrusDiagramEditPart { */
protected void createDefaultEditPolicies() {
super.createDefaultEditPolicies();
-
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new PapyrusCreationEditPolicy());
installEditPolicy(DuplicatePasteEditPolicy.PASTE_ROLE, new DuplicatePasteEditPolicy());
-
installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new ProfileDiagramItemSemanticEditPolicy());
installEditPolicy("RemoveOrphanView", new RemoveOrphanViewPolicy()); //$NON-NLS-1$
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java index c15a360a54c..c0b51459c08 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartCN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ProfileEditPartCN extends NamedElementEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ProfileEditPartCN extends NamedElementEditPart { ((ProfileNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ProfilePackageableElementCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ProfilePackageableElementCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ProfileEditPartCN extends NamedElementEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Profile";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ProfileEditPartCN extends NamedElementEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ProfileEditPartCN extends NamedElementEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ProfileEditPartCN extends NamedElementEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ProfileNameEditPartCN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java index 7a1c2358cd8..d39a6930296 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileEditPartTN.java @@ -30,6 +30,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.NamedElementEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.AppliedStereotypeLabelDisplayEditPolicy;
@@ -113,17 +114,14 @@ public class ProfileEditPartTN extends NamedElementEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
**/
protected void handleNotificationEvent(Notification event) {
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -147,15 +145,12 @@ public class ProfileEditPartTN extends NamedElementEditPart { ((ProfileNameEditPartTN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof ProfilePackageableElementCompartmentEditPartTN) {
IFigure pane = getPrimaryShape().getPackageableElementFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((ProfilePackageableElementCompartmentEditPartTN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -204,21 +199,14 @@ public class ProfileEditPartTN extends NamedElementEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Profile";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(200, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -228,12 +216,7 @@ public class ProfileEditPartTN extends NamedElementEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -270,14 +253,11 @@ public class ProfileEditPartTN extends NamedElementEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -295,9 +275,4 @@ public class ProfileEditPartTN extends NamedElementEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(ProfileNameEditPartTN.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java index f38de49e71c..bfe120a2b6d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartCN.java @@ -122,7 +122,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ProfileNameEditPartCN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java index 5b36defa6a5..b4f165a9cb3 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfileNameEditPartTN.java @@ -122,7 +122,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class ProfileNameEditPartTN extends PapyrusCompartmentEditPart implements public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java index 3b967ff87d7..970450ebeed 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartCN.java @@ -52,7 +52,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart return Messages.ProfilePackageableElementCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class ProfilePackageableElementCompartmentEditPartCN extends ShapeCompart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java index be9bf7869eb..03f39ce72a4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ProfilePackageableElementCompartmentEditPartTN.java @@ -52,7 +52,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart super(view);
}
-
/**
* @generated
*/
@@ -60,7 +59,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart return Messages.ProfilePackageableElementCompartmentEditPartTN_title;
}
-
/**
* @generated
*/
@@ -75,9 +73,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart installEditPolicy(EditPolicyRoles.CREATION_ROLE, new CustomCreationRoleEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -91,7 +86,6 @@ public class ProfilePackageableElementCompartmentEditPartTN extends ShapeCompart * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java index b7f2ccdf91d..69353c7f897 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/ShortCutDiagramEditPart.java @@ -40,6 +40,7 @@ import org.eclipse.gmf.runtime.notation.Edge; import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.AbstractShortCutDiagramEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ShortCutDiagramEditPolicy;
@@ -130,7 +131,6 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -150,10 +150,8 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { }
}
super.handleNotificationEvent(event);
-
}
-
/**
* @generated
*/
@@ -169,7 +167,6 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { return (DiagramNodeFigure)primaryShape;
}
-
/**
* @generated
*/
@@ -187,16 +184,10 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { * @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "ShortCutDiagram";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(20, 20);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -206,12 +197,7 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { * @generated
*/
protected NodeFigure createMainFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -243,14 +229,11 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -268,9 +251,4 @@ public class ShortCutDiagramEditPart extends AbstractShortCutDiagramEditPart { public EditPart getPrimaryChildEditPart() {
return getChildBySemanticHint(UMLVisualIDRegistry.getType(DiagramNameEditPart.VISUAL_ID));
}
-
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java index 6a91b10cfb8..db3bf16ecdf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPart.java @@ -66,7 +66,6 @@ public class StereotypeAttributeCompartmentEditPart extends ResizeableListCompar return Messages.StereotypeAttributeCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeAttributeCompartmentEditPart extends ResizeableListCompar installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeAttributeCompartmentEditPart extends ResizeableListCompar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java index 04a89d851b2..512580eb161 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeAttributeCompartmentEditPartCN.java @@ -66,7 +66,6 @@ public class StereotypeAttributeCompartmentEditPartCN extends ResizeableListComp return Messages.StereotypeAttributeCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeAttributeCompartmentEditPartCN extends ResizeableListComp installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeAttributeCompartmentEditPartCN extends ResizeableListComp * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java index cc812cac391..b542bcdee42 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPart.java @@ -34,6 +34,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
@@ -122,7 +123,6 @@ public class StereotypeEditPart extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -136,10 +136,8 @@ public class StereotypeEditPart extends ClassifierEditPart { refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -163,22 +161,18 @@ public class StereotypeEditPart extends ClassifierEditPart { ((StereotypeNameEditPart)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof StereotypeAttributeCompartmentEditPart) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeAttributeCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof StereotypeOperationCompartmentEditPart) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeOperationCompartmentEditPart)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -235,21 +229,14 @@ public class StereotypeEditPart extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Stereotype";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -259,12 +246,7 @@ public class StereotypeEditPart extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -301,14 +283,11 @@ public class StereotypeEditPart extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -327,8 +306,6 @@ public class StereotypeEditPart extends ClassifierEditPart { return getChildBySemanticHint(UMLVisualIDRegistry.getType(StereotypeNameEditPart.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -345,8 +322,4 @@ public class StereotypeEditPart extends ClassifierEditPart { }
return super.getTargetEditPart(request);
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java index 072b4416aae..ce1142beb52 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeEditPartCN.java @@ -34,6 +34,7 @@ import org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure; import org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SelectableBorderedNodeFigure;
import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.uml.diagram.common.editparts.ClassifierEditPart;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.ConstrainedItemBorderLayoutEditPolicy;
@@ -122,7 +123,6 @@ public class StereotypeEditPartCN extends ClassifierEditPart { return lep;
}
-
/**
*Papyrus codeGen
*@generated
@@ -136,10 +136,8 @@ public class StereotypeEditPartCN extends ClassifierEditPart { refreshVisuals();
}
}
-
}
-
/**
* @generated
*/
@@ -163,22 +161,18 @@ public class StereotypeEditPartCN extends ClassifierEditPart { ((StereotypeNameEditPartCN)childEditPart).setLabel(getPrimaryShape().getNameLabel());
return true;
}
-
-
if(childEditPart instanceof StereotypeAttributeCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getAttributeCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeAttributeCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
if(childEditPart instanceof StereotypeOperationCompartmentEditPartCN) {
IFigure pane = getPrimaryShape().getOperationCompartmentFigure();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
pane.add(((StereotypeOperationCompartmentEditPartCN)childEditPart).getFigure());
return true;
}
-
return false;
}
@@ -235,21 +229,14 @@ public class StereotypeEditPartCN extends ClassifierEditPart { return getContentPane();
}
-
/**
* @generated
*/
protected NodeFigure createNodePlate() {
- String prefElementId = "Stereotype";
- IPreferenceStore store = UMLDiagramEditorPlugin.getInstance().getPreferenceStore();
- String preferenceConstantWitdh = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.WIDTH);
- String preferenceConstantHeight = PreferenceInitializerForElementHelper.getpreferenceKey(getNotationView(), prefElementId, PreferencesConstantsHelper.HEIGHT);
- DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(store.getInt(preferenceConstantWitdh), store.getInt(preferenceConstantHeight));
-
+ DefaultSizeNodeFigure result = new DefaultSizeNodeFigure(100, 100);
return result;
}
-
/**
* Creates figure for this edit part.
*
@@ -259,12 +246,7 @@ public class StereotypeEditPartCN extends ClassifierEditPart { * @generated
*/
protected NodeFigure createNodeFigure() {
- NodeFigure figure = createNodePlate();
- figure.setLayoutManager(new StackLayout());
- IFigure shape = createNodeShape();
- figure.add(shape);
- contentPane = setupContentPane(shape);
- return figure;
+ return new SelectableBorderedNodeFigure(createMainFigureWithSVG());
}
/**
@@ -301,14 +283,11 @@ public class StereotypeEditPartCN extends ClassifierEditPart { }
}
-
/**
* @generated
*/
protected void setLineWidth(int width) {
- if(primaryShape instanceof NodeFigure) {
- ((NodeFigure)primaryShape).setLineWidth(width);
- }
+ super.setLineWidth(width);
}
/**
@@ -327,8 +306,6 @@ public class StereotypeEditPartCN extends ClassifierEditPart { return getChildBySemanticHint(UMLVisualIDRegistry.getType(StereotypeNameEditPartCN.VISUAL_ID));
}
-
-
/**
* @generated
*/
@@ -345,7 +322,4 @@ public class StereotypeEditPartCN extends ClassifierEditPart { }
return super.getTargetEditPart(request);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java index b022e39d148..f19d066cf02 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPart.java @@ -122,7 +122,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class StereotypeNameEditPart extends PapyrusCompartmentEditPart implement public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java index 24e9df037c9..518b874f996 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeNameEditPartCN.java @@ -122,7 +122,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme */
protected IDirectEditorConfiguration configuration;
-
/**
* @generated
*/
@@ -140,7 +139,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new DefaultNodeLabelDragPolicy());
}
-
/**
* @generated
*/
@@ -308,7 +306,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme ie.printStackTrace();
}
}
-
// shouldn't get here
return null;
}
@@ -395,9 +392,7 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme * @generated
*/
protected void performDirectEditRequest(Request request) {
-
final Request theRequest = request;
-
if(IDirectEdition.UNDEFINED_DIRECT_EDITOR == directEditionMode) {
directEditionMode = getDirectEditionType();
}
@@ -430,7 +425,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme return;
}
final Dialog finalDialog = dialog;
-
if(Window.OK == dialog.open()) {
TransactionalEditingDomain domain = getEditingDomain();
RecordingCommand command = new RecordingCommand(domain, "Edit Label") {
@@ -438,7 +432,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme @Override
protected void doExecute() {
configuration.postEditAction(resolveSemanticElement(), ((ILabelEditorDialog)finalDialog).getValue());
-
}
};
domain.getCommandStack().execute(command);
@@ -617,7 +610,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme if(checkDefaultEdition()) {
return IDirectEdition.DEFAULT_DIRECT_EDITOR;
}
-
// not a named element. no specific editor => do nothing
return IDirectEdition.NO_DIRECT_EDITION;
}
@@ -702,7 +694,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme }
}
-
/**
* @generated
*/
@@ -719,7 +710,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme removeListenerFilter("PrimaryView"); //$NON-NLS-1$
}
-
/**
* @generated
*/
@@ -761,13 +751,11 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme return null;
}
-
/**
* @generated
*/
private static final String ADD_PARENT_MODEL = "AddParentModel";
-
/**
* @generated
*/
@@ -781,7 +769,6 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme */
protected void addOwnerElementListeners() {
addListenerFilter(ADD_PARENT_MODEL, this, ((View)getParent().getModel())); //$NON-NLS-1$
-
}
/**
@@ -790,16 +777,12 @@ public class StereotypeNameEditPartCN extends PapyrusCompartmentEditPart impleme public void deactivate() {
removeOwnerElementListeners();
super.deactivate();
-
}
-
/**
* @generated
*/
protected void removeOwnerElementListeners() {
removeListenerFilter(ADD_PARENT_MODEL);
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java index a20a190c15e..33ca2464088 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPart.java @@ -66,7 +66,6 @@ public class StereotypeOperationCompartmentEditPart extends ResizeableListCompar return Messages.StereotypeOperationCompartmentEditPart_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeOperationCompartmentEditPart extends ResizeableListCompar installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeOperationCompartmentEditPart extends ResizeableListCompar * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java index 009f6f2f6de..b6a9cbb6fcf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/StereotypeOperationCompartmentEditPartCN.java @@ -66,7 +66,6 @@ public class StereotypeOperationCompartmentEditPartCN extends ResizeableListComp return Messages.StereotypeOperationCompartmentEditPartCN_title;
}
-
/**
* @generated
*/
@@ -81,9 +80,6 @@ public class StereotypeOperationCompartmentEditPartCN extends ResizeableListComp installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ProfileDiagramDragDropEditPolicy());
}
-
-
-
/**
* @generated
*/
@@ -97,7 +93,6 @@ public class StereotypeOperationCompartmentEditPartCN extends ResizeableListComp * @generated
*/
public EditPart getTargetEditPart(Request request) {
-
return super.getTargetEditPart(request);
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java index d5a74bef912..33d2fdafeef 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/parts/UMLEditPartFactory.java @@ -39,303 +39,212 @@ public class UMLEditPartFactory implements EditPartFactory { if(model instanceof View) {
View view = (View)model;
switch(UMLVisualIDRegistry.getVisualID(view)) {
-
case ProfileDiagramEditPart.VISUAL_ID:
return new ProfileDiagramEditPart(view);
-
case DependencyNodeEditPart.VISUAL_ID:
return new DependencyNodeEditPart(view);
-
case MultiDependencyLabelEditPart.VISUAL_ID:
return new MultiDependencyLabelEditPart(view);
-
case AssociationNodeEditPart.VISUAL_ID:
return new AssociationNodeEditPart(view);
-
case StereotypeEditPart.VISUAL_ID:
return new StereotypeEditPart(view);
-
case StereotypeNameEditPart.VISUAL_ID:
return new StereotypeNameEditPart(view);
-
+ case ClassEditPart.VISUAL_ID:
+ return new ClassEditPart(view);
+ case ClassNameEditPart.VISUAL_ID:
+ return new ClassNameEditPart(view);
case MetaclassEditPart.VISUAL_ID:
return new MetaclassEditPart(view);
-
case MetaclassNameEditPart.VISUAL_ID:
return new MetaclassNameEditPart(view);
-
case CommentEditPart.VISUAL_ID:
return new CommentEditPart(view);
-
case CommentBodyEditPart.VISUAL_ID:
return new CommentBodyEditPart(view);
-
case ConstraintEditPart.VISUAL_ID:
return new ConstraintEditPart(view);
-
case ConstraintNameEditPart.VISUAL_ID:
return new ConstraintNameEditPart(view);
-
case ConstraintBodyEditPart.VISUAL_ID:
return new ConstraintBodyEditPart(view);
-
case ModelEditPartTN.VISUAL_ID:
return new ModelEditPartTN(view);
-
case ModelNameEditPart.VISUAL_ID:
return new ModelNameEditPart(view);
-
case ProfileEditPartTN.VISUAL_ID:
return new ProfileEditPartTN(view);
-
case ProfileNameEditPartTN.VISUAL_ID:
return new ProfileNameEditPartTN(view);
-
case PackageEditPart.VISUAL_ID:
return new PackageEditPart(view);
-
case PackageNameEditPart.VISUAL_ID:
return new PackageNameEditPart(view);
-
case EnumerationEditPart.VISUAL_ID:
return new EnumerationEditPart(view);
-
case EnumerationNameEditPart.VISUAL_ID:
return new EnumerationNameEditPart(view);
-
case PrimitiveTypeEditPart.VISUAL_ID:
return new PrimitiveTypeEditPart(view);
-
case PrimitiveTypeNameEditPart.VISUAL_ID:
return new PrimitiveTypeNameEditPart(view);
-
case DataTypeEditPart.VISUAL_ID:
return new DataTypeEditPart(view);
-
case DataTypeNameEditPart.VISUAL_ID:
return new DataTypeNameEditPart(view);
-
case ShortCutDiagramEditPart.VISUAL_ID:
return new ShortCutDiagramEditPart(view);
-
case DiagramNameEditPart.VISUAL_ID:
return new DiagramNameEditPart(view);
-
case PrimitiveTypeEditPartCN.VISUAL_ID:
return new PrimitiveTypeEditPartCN(view);
-
case PrimitiveTypeNameEditPartCN.VISUAL_ID:
return new PrimitiveTypeNameEditPartCN(view);
-
case DataTypeOperationEditPart.VISUAL_ID:
return new DataTypeOperationEditPart(view);
-
case EnumerationLiteralEditPart.VISUAL_ID:
return new EnumerationLiteralEditPart(view);
-
case DataTypePropertyEditPart.VISUAL_ID:
return new DataTypePropertyEditPart(view);
-
case ClassPropertyEditPart.VISUAL_ID:
return new ClassPropertyEditPart(view);
-
case ClassOperationEditPart.VISUAL_ID:
return new ClassOperationEditPart(view);
-
case StereotypeEditPartCN.VISUAL_ID:
return new StereotypeEditPartCN(view);
-
case StereotypeNameEditPartCN.VISUAL_ID:
return new StereotypeNameEditPartCN(view);
-
+ case ClassEditPartCN.VISUAL_ID:
+ return new ClassEditPartCN(view);
+ case ClassNameEditPartCN.VISUAL_ID:
+ return new ClassNameEditPartCN(view);
case MetaclassEditPartCN.VISUAL_ID:
return new MetaclassEditPartCN(view);
-
case MetaclassNameEditPartCN.VISUAL_ID:
return new MetaclassNameEditPartCN(view);
-
case CommentEditPartCN.VISUAL_ID:
return new CommentEditPartCN(view);
-
case CommentBodyEditPartCN.VISUAL_ID:
return new CommentBodyEditPartCN(view);
-
case ModelEditPartCN.VISUAL_ID:
return new ModelEditPartCN(view);
-
case ModelNameEditPartCN.VISUAL_ID:
return new ModelNameEditPartCN(view);
-
case ProfileEditPartCN.VISUAL_ID:
return new ProfileEditPartCN(view);
-
case ProfileNameEditPartCN.VISUAL_ID:
return new ProfileNameEditPartCN(view);
-
case PackageEditPartCN.VISUAL_ID:
return new PackageEditPartCN(view);
-
case PackageNameEditPartCN.VISUAL_ID:
return new PackageNameEditPartCN(view);
-
case ConstraintEditPartCN.VISUAL_ID:
return new ConstraintEditPartCN(view);
-
case ConstraintNameEditPartCN.VISUAL_ID:
return new ConstraintNameEditPartCN(view);
-
case ConstraintBodyEditPartCN.VISUAL_ID:
return new ConstraintBodyEditPartCN(view);
-
case EnumerationEditPartCN.VISUAL_ID:
return new EnumerationEditPartCN(view);
-
case EnumerationNameEditPartCN.VISUAL_ID:
return new EnumerationNameEditPartCN(view);
-
case DataTypeEditPartCN.VISUAL_ID:
return new DataTypeEditPartCN(view);
-
case DataTypeNameEditPartCN.VISUAL_ID:
return new DataTypeNameEditPartCN(view);
-
case PackagePackageableElementCompartmentEditPart.VISUAL_ID:
return new PackagePackageableElementCompartmentEditPart(view);
-
case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
return new PackagePackageableElementCompartmentEditPartCN(view);
-
case ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID:
return new ProfilePackageableElementCompartmentEditPartTN(view);
-
case ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID:
return new ProfilePackageableElementCompartmentEditPartCN(view);
-
case StereotypeAttributeCompartmentEditPart.VISUAL_ID:
return new StereotypeAttributeCompartmentEditPart(view);
-
case StereotypeAttributeCompartmentEditPartCN.VISUAL_ID:
return new StereotypeAttributeCompartmentEditPartCN(view);
-
case StereotypeOperationCompartmentEditPart.VISUAL_ID:
return new StereotypeOperationCompartmentEditPart(view);
-
case StereotypeOperationCompartmentEditPartCN.VISUAL_ID:
return new StereotypeOperationCompartmentEditPartCN(view);
-
case ModelPackageableElementCompartmentEditPartTN.VISUAL_ID:
return new ModelPackageableElementCompartmentEditPartTN(view);
-
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
return new ModelPackageableElementCompartmentEditPartCN(view);
-
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPartCN(view);
-
case EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID:
return new EnumerationEnumerationLiteralCompartmentEditPart(view);
-
case DataTypeAttributeCompartmentEditPart.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPart(view);
-
case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
return new DataTypeAttributeCompartmentEditPartCN(view);
-
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
return new DataTypeOperationCompartmentEditPart(view);
-
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
return new DataTypeOperationCompartmentEditPartCN(view);
-
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ return new ClassAttributeCompartmentEditPart(view);
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ return new ClassAttributeCompartmentEditPartCN(view);
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ return new ClassOperationCompartmentEditPart(view);
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ return new ClassOperationCompartmentEditPartCN(view);
case ExtensionEditPart.VISUAL_ID:
return new ExtensionEditPart(view);
-
-
case AssociationEditPart.VISUAL_ID:
return new AssociationEditPart(view);
-
case AssociationAppliedStereotypeEditPart.VISUAL_ID:
return new AssociationAppliedStereotypeEditPart(view);
-
case AssociationNameEditPart.VISUAL_ID:
return new AssociationNameEditPart(view);
-
case AssociationRoleTargetEditPart.VISUAL_ID:
return new AssociationRoleTargetEditPart(view);
-
case AssociationRoleSourceEditPart.VISUAL_ID:
return new AssociationRoleSourceEditPart(view);
-
case AssociationMultiplicitySourceEditPart.VISUAL_ID:
return new AssociationMultiplicitySourceEditPart(view);
-
case AssociationMultiplicityTargetEditPart.VISUAL_ID:
return new AssociationMultiplicityTargetEditPart(view);
-
-
case ProfileApplicationEditPart.VISUAL_ID:
return new ProfileApplicationEditPart(view);
-
-
case AssociationBranchEditPart.VISUAL_ID:
return new AssociationBranchEditPart(view);
-
case AssociationBranchRoleEditPart.VISUAL_ID:
return new AssociationBranchRoleEditPart(view);
-
case AssociationBranchMultiplicityEditPart.VISUAL_ID:
return new AssociationBranchMultiplicityEditPart(view);
-
-
case GeneralizationEditPart.VISUAL_ID:
return new GeneralizationEditPart(view);
-
case GeneralizationAppliedStereotypeEditPart.VISUAL_ID:
return new GeneralizationAppliedStereotypeEditPart(view);
-
-
case DependencyEditPart.VISUAL_ID:
return new DependencyEditPart(view);
-
case DependencyNameEditPart.VISUAL_ID:
return new DependencyNameEditPart(view);
-
case DependencyAppliedStereotypeEditPart.VISUAL_ID:
return new DependencyAppliedStereotypeEditPart(view);
-
-
case DependencyBranchEditPart.VISUAL_ID:
return new DependencyBranchEditPart(view);
-
-
case ElementImportEditPart.VISUAL_ID:
return new ElementImportEditPart(view);
-
case ElementImportAliasEditPart.VISUAL_ID:
return new ElementImportAliasEditPart(view);
-
case AppliedStereotypeElementImportEditPart.VISUAL_ID:
return new AppliedStereotypeElementImportEditPart(view);
-
-
case PackageImportEditPart.VISUAL_ID:
return new PackageImportEditPart(view);
-
case PackageImportAppliedStereotypeEditPart.VISUAL_ID:
return new PackageImportAppliedStereotypeEditPart(view);
-
-
case CommentAnnotatedElementEditPart.VISUAL_ID:
return new CommentAnnotatedElementEditPart(view);
-
-
case ConstraintConstrainedElementEditPart.VISUAL_ID:
return new ConstraintConstrainedElementEditPart(view);
-
-
case ContextLinkEditPart.VISUAL_ID:
return new ContextLinkEditPart(view);
-
}
}
return createUnrecognizedEditPart(context, model);
@@ -357,11 +266,9 @@ public class UMLEditPartFactory implements EditPartFactory { return new MultilineCellEditorLocator((IMultilineEditableFigure)source.getFigure());
} else {
return CellEditorLocatorAccess.INSTANCE.getTextCellEditorLocator(source);
-
}
}
-
/**
* @generated
*/
@@ -403,5 +310,4 @@ public class UMLEditPartFactory implements EditPartFactory { }
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java index abadefbd1f4..f11f46670ea 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationBranchItemSemanticEditPolicy.java @@ -72,7 +72,6 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic super(UMLElementTypes.Association_4019);
}
-
/**
* @generated
*/
@@ -87,7 +86,6 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -293,5 +291,4 @@ public class AssociationBranchItemSemanticEditPolicy extends UMLBaseItemSemantic }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java index 43ce16eec12..efa62ed52d1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationItemSemanticEditPolicy.java @@ -72,7 +72,6 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo super(UMLElementTypes.Association_4001);
}
-
/**
* @generated
*/
@@ -87,7 +86,6 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -293,5 +291,4 @@ public class AssociationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java index 99ae290849a..1f41c5400dc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/AssociationNodeItemSemanticEditPolicy.java @@ -74,8 +74,6 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd super(UMLElementTypes.Association_2015);
}
-
-
/**
* @generated
*/
@@ -98,8 +96,6 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -305,5 +301,4 @@ public class AssociationNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEd }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java new file mode 100644 index 00000000000..1eda0c59a65 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicy.java @@ -0,0 +1,46 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Class_2008);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
+ return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java new file mode 100644 index 00000000000..c552dff164b --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassAttributeCompartmentItemSemanticEditPolicyCN.java @@ -0,0 +1,46 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassPropertyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassAttributeCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassAttributeCompartmentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Class_3010);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
+ return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java new file mode 100644 index 00000000000..dbf6e48d70f --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassItemSemanticEditPolicyCN.java @@ -0,0 +1,373 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Class_3010);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if(annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ protected void addDestroyChildNodesCommand(ICompositeCommand cmd) {
+ View view = (View)getHost().getModel();
+ for(Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node)nit.next();
+ switch(UMLVisualIDRegistry.getVisualID(node)) {
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassPropertyEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassOperationEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new PackageImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ExtensionCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case ExtensionEditPart.VISUAL_ID:
+ return getGEFWrapper(new ExtensionReorientCommand(req));
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationReorientCommand(req));
+ case AssociationBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationBranchReorientCommand(req));
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGEFWrapper(new GeneralizationReorientCommand(req));
+ case DependencyEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyReorientCommand(req));
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyBranchReorientCommand(req));
+ case ElementImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new ElementImportReorientCommand(req));
+ case PackageImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new PackageImportReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java new file mode 100644 index 00000000000..19e0953d970 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicy.java @@ -0,0 +1,46 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassOperationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentItemSemanticEditPolicy() {
+ super(UMLElementTypes.Class_2008);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
+ return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java new file mode 100644 index 00000000000..d5eee625610 --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationCompartmentItemSemanticEditPolicyCN.java @@ -0,0 +1,46 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
+import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassOperationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClassOperationCompartmentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClassOperationCompartmentItemSemanticEditPolicyCN() {
+ super(UMLElementTypes.Class_3010);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateCommand(CreateElementRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return super.getCreateCommand(req);
+ }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
+ return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ return super.getCreateCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java index 23e37f57d33..9c1604ec0b2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassOperationItemSemanticEditPolicy.java @@ -38,8 +38,6 @@ public class ClassOperationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi super(UMLElementTypes.Operation_3020);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class ClassOperationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi }
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java index 486ee9652c6..fc69483d018 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClassPropertyItemSemanticEditPolicy.java @@ -38,8 +38,6 @@ public class ClassPropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEdit super(UMLElementTypes.Property_3002);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class ClassPropertyItemSemanticEditPolicy extends UMLBaseItemSemanticEdit }
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java new file mode 100644 index 00000000000..972f4875f8e --- /dev/null +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ClasseItemSemanticEditPolicy.java @@ -0,0 +1,373 @@ +/**
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * CEA LIST - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.diagram.profile.edit.policies;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.ICompositeCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
+import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest;
+import org.eclipse.gmf.runtime.notation.Edge;
+import org.eclipse.gmf.runtime.notation.Node;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
+import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentAnnotatedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintConstrainedElementReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ContextLinkReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyBranchReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DependencyReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ElementImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ExtensionReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.GeneralizationReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.PackageImportReorientCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ContextLinkEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+
+/**
+ * @generated
+ */
+public class ClasseItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy {
+
+ /**
+ * @generated
+ */
+ public ClasseItemSemanticEditPolicy() {
+ super(UMLElementTypes.Class_2008);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getDestroyElementCommand(DestroyElementRequest req) {
+ View view = (View)getHost().getModel();
+ CompositeTransactionalCommand cmd = new CompositeTransactionalCommand(getEditingDomain(), null);
+ cmd.setTransactionNestingEnabled(true);
+ EAnnotation annotation = view.getEAnnotation("Shortcut");//$NON-NLS-1$
+ if(annotation == null) {
+ // there are indirectly referenced children, need extra commands: false
+ addDestroyChildNodesCommand(cmd);
+ addDestroyShortcutsCommand(cmd, view);
+ // delete host element
+ List<EObject> todestroy = new ArrayList<EObject>();
+ todestroy.add(req.getElementToDestroy());
+ //cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
+ cmd.add(new EMFtoGMFCommandWrapper(new DeleteCommand(getEditingDomain(), todestroy)));
+ } else {
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
+ }
+ return getGEFWrapper(cmd.reduce());
+ }
+
+ /**
+ * @generated
+ */
+ protected void addDestroyChildNodesCommand(ICompositeCommand cmd) {
+ View view = (View)getHost().getModel();
+ for(Iterator<?> nit = view.getChildren().iterator(); nit.hasNext();) {
+ Node node = (Node)nit.next();
+ switch(UMLVisualIDRegistry.getVisualID(node)) {
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassOperationEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ for(Iterator<?> cit = node.getChildren().iterator(); cit.hasNext();) {
+ Node cnode = (Node)cit.next();
+ switch(UMLVisualIDRegistry.getVisualID(cnode)) {
+ case ClassPropertyEditPart.VISUAL_ID:
+ for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
+ Edge outgoingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
+ }
+ }
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCreateRelationshipCommand(CreateRelationshipRequest req) {
+ Command command = req.getTarget() == null ? getStartCreateRelationshipCommand(req) : getCompleteCreateRelationshipCommand(req);
+ return command != null ? command : super.getCreateRelationshipCommand(req);
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getStartCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedStartCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new PackageImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ return null;
+ }
+ return null;
+ }
+
+ /**
+ * @generated
+ */
+ protected Command getCompleteCreateRelationshipCommand(CreateRelationshipRequest req) {
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType == null) {
+ return null;
+ }
+ IElementType baseElementType = requestElementType;
+ boolean isExtendedType = false;
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
+ if(baseElementType != null) {
+ isExtendedType = true;
+ } else {
+ // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
+ baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
+ isExtendedType = true;
+ }
+ }
+ if(UMLElementTypes.Extension_1013 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ExtensionCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4001 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Association_4019 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new AssociationBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Generalization_4002 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new GeneralizationCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4008 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.Dependency_4018 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new DependencyBranchCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ElementImport_1064 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ElementImportCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.PackageImport_1065 == baseElementType) {
+ return null;
+ }
+ if(UMLElementTypes.CommentAnnotatedElement_1022 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new CommentAnnotatedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintConstrainedElement_4014 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ConstraintConstrainedElementCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ if(UMLElementTypes.ConstraintContext_8500 == baseElementType) {
+ if(isExtendedType) {
+ return getExtendedCompleteCreateRelationshipCommand(req, (IExtendedHintedElementType)requestElementType);
+ }
+ return getGEFWrapper(new ContextLinkCreateCommand(req, req.getSource(), req.getTarget()));
+ }
+ return null;
+ }
+
+ /**
+ * Returns command to reorient EClass based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientRelationshipCommand(ReorientRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case ExtensionEditPart.VISUAL_ID:
+ return getGEFWrapper(new ExtensionReorientCommand(req));
+ case AssociationEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationReorientCommand(req));
+ case AssociationBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new AssociationBranchReorientCommand(req));
+ case GeneralizationEditPart.VISUAL_ID:
+ return getGEFWrapper(new GeneralizationReorientCommand(req));
+ case DependencyEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyReorientCommand(req));
+ case DependencyBranchEditPart.VISUAL_ID:
+ return getGEFWrapper(new DependencyBranchReorientCommand(req));
+ case ElementImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new ElementImportReorientCommand(req));
+ case PackageImportEditPart.VISUAL_ID:
+ return getGEFWrapper(new PackageImportReorientCommand(req));
+ }
+ return super.getReorientRelationshipCommand(req);
+ }
+
+ /**
+ * Returns command to reorient EReference based link. New link target or source
+ * should be the domain model element associated with this node.
+ *
+ * @generated
+ */
+ protected Command getReorientReferenceRelationshipCommand(ReorientReferenceRelationshipRequest req) {
+ switch(getVisualID(req)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new CommentAnnotatedElementReorientCommand(req));
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ return getGEFWrapper(new ConstraintConstrainedElementReorientCommand(req));
+ case ContextLinkEditPart.VISUAL_ID:
+ return getGEFWrapper(new ContextLinkReorientCommand(req));
+ }
+ return super.getReorientReferenceRelationshipCommand(req);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java index 204c25cb190..dd2cc469ad0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentAnnotatedElementItemSemanticEditPolicy.java @@ -36,5 +36,4 @@ public class CommentAnnotatedElementItemSemanticEditPolicy extends UMLBaseItemSe protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java index 3682f47cfb9..fbd51f27f3c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentEditPartItemSemanticEditPolicy.java @@ -49,8 +49,6 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd super(UMLElementTypes.Comment_1002);
}
-
-
/**
* @generated
*/
@@ -73,8 +71,6 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -165,5 +161,4 @@ public class CommentEditPartItemSemanticEditPolicy extends UMLBaseItemSemanticEd }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java index 7b61c8a2cf8..62e89ad14bf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/CommentItemSemanticEditPolicyCN.java @@ -49,8 +49,6 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli super(UMLElementTypes.Comment_1007);
}
-
-
/**
* @generated
*/
@@ -73,8 +71,6 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -165,5 +161,4 @@ public class CommentItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java index 8b5b3ceb8ef..1377ef10c62 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintConstrainedElementItemSemanticEditPolicy.java @@ -36,5 +36,4 @@ public class ConstraintConstrainedElementItemSemanticEditPolicy extends UMLBaseI protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java index 1a3d93bbf23..93b2b30cac1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicy.java @@ -62,8 +62,6 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol super(UMLElementTypes.Constraint_1014);
}
-
-
/**
* @generated
*/
@@ -86,8 +84,6 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -240,5 +236,4 @@ public class ConstraintItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java index eabbacb6b19..882cea3fb3f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ConstraintItemSemanticEditPolicyCN.java @@ -62,8 +62,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP super(UMLElementTypes.Constraint_1028);
}
-
-
/**
* @generated
*/
@@ -86,8 +84,6 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -240,5 +236,4 @@ public class ConstraintItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java index 905d11c19aa..29617e158cf 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ContextLinkItemSemanticEditPolicy.java @@ -36,5 +36,4 @@ public class ContextLinkItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo protected Command getDestroyReferenceCommand(DestroyReferenceRequest req) {
return getGEFWrapper(new DestroyReferenceCommand(req));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java index 35a8c7bdd69..eda7ec86ca8 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicy.java @@ -34,7 +34,6 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI super(UMLElementTypes.DataType_2010);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicy extends UMLBaseI if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3018 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3018 == requestElementType) {
return getGEFWrapper(new DataTypePropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java index a358aba6c43..84746dd3ce0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeAttributeCompartmentItemSemanticEditPolicyCN.java @@ -34,7 +34,6 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas super(UMLElementTypes.DataType_3027);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3018 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3018 == requestElementType) {
return getGEFWrapper(new DataTypePropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java index 98d286f74ae..42a7af45613 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicy.java @@ -84,8 +84,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic super(UMLElementTypes.DataType_2010);
}
-
-
/**
* @generated
*/
@@ -122,11 +120,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypePropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -144,11 +137,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypeOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -165,8 +153,6 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic }
}
-
-
/**
* @generated
*/
@@ -372,5 +358,4 @@ public class DataTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolic }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java index 947df98c0eb..fc0238e16de 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeItemSemanticEditPolicyCN.java @@ -84,8 +84,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol super(UMLElementTypes.DataType_3027);
}
-
-
/**
* @generated
*/
@@ -122,11 +120,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypePropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -144,11 +137,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case DataTypeOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -165,8 +153,6 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol }
}
-
-
/**
* @generated
*/
@@ -372,5 +358,4 @@ public class DataTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPol }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java index af5fada501e..ae875a4c543 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicy.java @@ -34,7 +34,6 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI super(UMLElementTypes.DataType_2010);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicy extends UMLBaseI if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3019 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3019 == requestElementType) {
return getGEFWrapper(new DataTypeOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java index 04ed0e0b7ca..cff9529ccf5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationCompartmentItemSemanticEditPolicyCN.java @@ -34,7 +34,6 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas super(UMLElementTypes.DataType_3027);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class DataTypeOperationCompartmentItemSemanticEditPolicyCN extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3019 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3019 == requestElementType) {
return getGEFWrapper(new DataTypeOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java index 3f656745d3d..908d768da76 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypeOperationItemSemanticEditPolicy.java @@ -38,8 +38,6 @@ public class DataTypeOperationItemSemanticEditPolicy extends UMLBaseItemSemantic super(UMLElementTypes.Operation_3019);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class DataTypeOperationItemSemanticEditPolicy extends UMLBaseItemSemantic }
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java index 144940f6c98..e2428a79b18 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DataTypePropertyItemSemanticEditPolicy.java @@ -38,8 +38,6 @@ public class DataTypePropertyItemSemanticEditPolicy extends UMLBaseItemSemanticE super(UMLElementTypes.Property_3018);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class DataTypePropertyItemSemanticEditPolicy extends UMLBaseItemSemanticE }
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java index 4b3be50dc81..d68f165520a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyBranchItemSemanticEditPolicy.java @@ -57,7 +57,6 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE super(UMLElementTypes.Dependency_4018);
}
-
/**
* @generated
*/
@@ -72,7 +71,6 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -211,5 +209,4 @@ public class DependencyBranchItemSemanticEditPolicy extends UMLBaseItemSemanticE }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java index 7fae065942c..ae504815e36 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyItemSemanticEditPolicy.java @@ -57,7 +57,6 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol super(UMLElementTypes.Dependency_4008);
}
-
/**
* @generated
*/
@@ -72,7 +71,6 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -211,5 +209,4 @@ public class DependencyItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java index eef5320301a..8488ea28068 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/DependencyNodeItemSemanticEditPolicy.java @@ -59,8 +59,6 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi super(UMLElementTypes.Dependency_2014);
}
-
-
/**
* @generated
*/
@@ -83,8 +81,6 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -223,5 +219,4 @@ public class DependencyNodeItemSemanticEditPolicy extends UMLBaseItemSemanticEdi }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java index 48fdc3dda26..69436a4fb2a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ElementImportItemSemanticEditPolicy.java @@ -47,7 +47,6 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit super(UMLElementTypes.ElementImport_1064);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class ElementImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java index 50492423176..0da4caeecb4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy.java @@ -34,7 +34,6 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte super(UMLElementTypes.Enumeration_2006);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicy exte if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.EnumerationLiteral_1037 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.EnumerationLiteral_1037 == requestElementType) {
return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java index 44e573194b3..215791a5737 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN.java @@ -34,7 +34,6 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex super(UMLElementTypes.Enumeration_3025);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class EnumerationEnumerationLiteralCompartmentItemSemanticEditPolicyCN ex if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.EnumerationLiteral_1037 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.EnumerationLiteral_1037 == requestElementType) {
return getGEFWrapper(new EnumerationLiteralCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java index f88bb5c1733..e8fb4f5572e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicy.java @@ -82,8 +82,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo super(UMLElementTypes.Enumeration_2006);
}
-
-
/**
* @generated
*/
@@ -120,11 +118,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case EnumerationLiteralEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -141,8 +134,6 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo }
}
-
-
/**
* @generated
*/
@@ -348,5 +339,4 @@ public class EnumerationItemSemanticEditPolicy extends UMLBaseItemSemanticEditPo }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java index 76a20f96a07..23f4d8df53c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationItemSemanticEditPolicyCN.java @@ -82,8 +82,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit super(UMLElementTypes.Enumeration_3025);
}
-
-
/**
* @generated
*/
@@ -120,11 +118,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case EnumerationLiteralEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -141,8 +134,6 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit }
}
-
-
/**
* @generated
*/
@@ -348,5 +339,4 @@ public class EnumerationItemSemanticEditPolicyCN extends UMLBaseItemSemanticEdit }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java index 1298b928c9e..c3b8a3b254e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/EnumerationLiteralItemSemanticEditPolicy.java @@ -38,8 +38,6 @@ public class EnumerationLiteralItemSemanticEditPolicy extends UMLBaseItemSemanti super(UMLElementTypes.EnumerationLiteral_1037);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class EnumerationLiteralItemSemanticEditPolicy extends UMLBaseItemSemanti }
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java index 3515d90c4a0..286cc77efbe 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ExtensionItemSemanticEditPolicy.java @@ -72,7 +72,6 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli super(UMLElementTypes.Extension_1013);
}
-
/**
* @generated
*/
@@ -87,7 +86,6 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -293,5 +291,4 @@ public class ExtensionItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java index 396beeea1b4..17ab3705cff 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/GeneralizationItemSemanticEditPolicy.java @@ -47,7 +47,6 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi super(UMLElementTypes.Generalization_4002);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class GeneralizationItemSemanticEditPolicy extends UMLBaseItemSemanticEdi }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java index 8e4ad3babac..8c15c0575dc 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicy.java @@ -77,8 +77,6 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli super(UMLElementTypes.Class_1031);
}
-
-
/**
* @generated
*/
@@ -101,8 +99,6 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -319,5 +315,4 @@ public class MetaclassItemSemanticEditPolicy extends UMLBaseItemSemanticEditPoli }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java index 35da586cf23..011f900d96b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/MetaclassItemSemanticEditPolicyCN.java @@ -77,8 +77,6 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo super(UMLElementTypes.Class_3028);
}
-
-
/**
* @generated
*/
@@ -101,8 +99,6 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -319,5 +315,4 @@ public class MetaclassItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPo }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java index e32a19ad2fd..c08eb53255b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyCN.java @@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -65,6 +66,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPa import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartCN;
@@ -88,8 +90,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy super(UMLElementTypes.Model_1027);
}
-
-
/**
* @generated
*/
@@ -126,11 +126,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -142,17 +137,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -173,17 +162,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -205,17 +188,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -236,17 +213,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -265,17 +236,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -298,17 +263,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -331,17 +290,11 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -364,7 +317,34 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case ClassEditPartCN.VISUAL_ID:
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case ExtensionEditPart.VISUAL_ID:
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
@@ -376,8 +356,6 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy }
}
-
-
/**
* @generated
*/
@@ -555,5 +533,4 @@ public class ModelItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPolicy }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java index a7bdf0c93d5..ca7e33c9a82 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelItemSemanticEditPolicyTN.java @@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -65,6 +66,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPa import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartTN;
@@ -88,8 +90,6 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy super(UMLElementTypes.Model_2005);
}
-
-
/**
* @generated
*/
@@ -126,11 +126,6 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -142,17 +137,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -173,17 +162,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -205,17 +188,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -236,17 +213,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -265,17 +236,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -298,17 +263,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -331,17 +290,11 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -364,7 +317,34 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy break;
}
}
-
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case ClassEditPartCN.VISUAL_ID:
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case ExtensionEditPart.VISUAL_ID:
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
@@ -376,8 +356,6 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy }
}
-
-
/**
* @generated
*/
@@ -555,5 +533,4 @@ public class ModelItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPolicy }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java index 6046efebcb2..4fa2833a1a5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyCN.java @@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -41,7 +42,6 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends super(UMLElementTypes.Model_1027);
}
-
/**
* @generated
*/
@@ -50,78 +50,33 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyCN extends if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java index 4abdd3f1c79..6098f2185ec 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ModelPackageableElementCompartmentItemSemanticEditPolicyTN.java @@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -41,7 +42,6 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends super(UMLElementTypes.Model_2005);
}
-
/**
* @generated
*/
@@ -50,78 +50,33 @@ public class ModelPackageableElementCompartmentItemSemanticEditPolicyTN extends if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java index 56b2267d1ae..0cceb2f2d92 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageImportItemSemanticEditPolicy.java @@ -47,7 +47,6 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit super(UMLElementTypes.PackageImport_1065);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class PackageImportItemSemanticEditPolicy extends UMLBaseItemSemanticEdit }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java index 2f54afbfd90..8a45f4f940e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicy.java @@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -90,8 +91,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy super(UMLElementTypes.Package_2007);
}
-
-
/**
* @generated
*/
@@ -128,11 +127,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -144,17 +138,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -175,17 +163,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -207,17 +189,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -238,17 +214,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -267,17 +237,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -300,17 +264,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -333,17 +291,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -366,17 +318,11 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -400,7 +346,34 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy break;
}
}
-
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case ClassEditPartCN.VISUAL_ID:
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case ExtensionEditPart.VISUAL_ID:
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
@@ -412,8 +385,6 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy }
}
-
-
/**
* @generated
*/
@@ -591,5 +562,4 @@ public class PackageItemSemanticEditPolicy extends UMLBaseItemSemanticEditPolicy }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java index 6b6b396dae8..7c3780648ee 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackageItemSemanticEditPolicyCN.java @@ -58,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -93,7 +94,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli super(UMLElementTypes.Package_1012);
}
-
/**
* @generated
*/
@@ -102,30 +102,12 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
/**
* @generated
*/
@@ -158,11 +140,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli Node node = (Node)nit.next();
switch(UMLVisualIDRegistry.getVisualID(node)) {
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = node.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -183,7 +160,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), node.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of node as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), node));
@@ -193,11 +169,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -209,17 +180,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -240,17 +205,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -272,17 +231,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -303,17 +256,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -332,17 +279,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -365,17 +306,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -398,17 +333,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -431,17 +360,11 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -465,7 +388,34 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case ClassEditPartCN.VISUAL_ID:
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case ExtensionEditPart.VISUAL_ID:
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
@@ -477,8 +427,6 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
}
-
-
/**
* @generated
*/
@@ -656,5 +604,4 @@ public class PackageItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java index 0a7201a52e6..f982a35d310 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicy.java @@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -42,7 +43,6 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends super(UMLElementTypes.Package_2007);
}
-
/**
* @generated
*/
@@ -51,85 +51,36 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicy extends if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java index 616329531e2..09ae126a4b2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PackagePackageableElementCompartmentItemSemanticEditPolicyCN.java @@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -42,7 +43,6 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend super(UMLElementTypes.Package_1012);
}
-
/**
* @generated
*/
@@ -51,85 +51,36 @@ public class PackagePackageableElementCompartmentItemSemanticEditPolicyCN extend if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java index 6fc687ce933..43f70473a8d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicy.java @@ -74,8 +74,6 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit super(UMLElementTypes.PrimitiveType_2009);
}
-
-
/**
* @generated
*/
@@ -98,8 +96,6 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -305,5 +301,4 @@ public class PrimitiveTypeItemSemanticEditPolicy extends UMLBaseItemSemanticEdit }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java index b998bc75df8..0681ababcae 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/PrimitiveTypeItemSemanticEditPolicyCN.java @@ -74,8 +74,6 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd super(UMLElementTypes.PrimitiveType_3026);
}
-
-
/**
* @generated
*/
@@ -98,8 +96,6 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd return getGEFWrapper(cmd.reduce());
}
-
-
/**
* @generated
*/
@@ -305,5 +301,4 @@ public class PrimitiveTypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEd }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java index 9340b22dfe0..f35202934bb 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileApplicationItemSemanticEditPolicy.java @@ -47,7 +47,6 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti super(UMLElementTypes.ProfileApplication_1045);
}
-
/**
* @generated
*/
@@ -62,7 +61,6 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti //return getGEFWrapper(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
}
-
/**
* @generated
*/
@@ -147,5 +145,4 @@ public class ProfileApplicationItemSemanticEditPolicy extends UMLBaseItemSemanti }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java index a055956c5d9..1db1a600d23 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileDiagramItemSemanticEditPolicy.java @@ -24,6 +24,7 @@ import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType; import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.AssociationNodeCreateCommand;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentEditPartCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommand;
@@ -50,7 +51,6 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi super(UMLElementTypes.Profile_1000);
}
-
/**
* @generated
*/
@@ -59,109 +59,47 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Dependency_2014 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Dependency_2014 == requestElementType) {
return getGEFWrapper(new DependencyNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Association_2015 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Association_2015 == requestElementType) {
return getGEFWrapper(new AssociationNodeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Stereotype_1026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1026 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Class_1031 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Class_2008 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
+ }
+ if(UMLElementTypes.Class_1031 == requestElementType) {
return getGEFWrapper(new MetaclassCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Comment_1002 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1002 == requestElementType) {
return getGEFWrapper(new CommentEditPartCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1014 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1014 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_2005 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_2005 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1030 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1030 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandTN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_2007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_2007 == requestElementType) {
return getGEFWrapper(new PackageCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_2006 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_2006 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_2009 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_2009 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_2010 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_2010 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Diagram_2016 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Diagram_2016 == requestElementType) {
return getGEFWrapper(new ShortCutDiagramCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
@@ -185,7 +123,5 @@ public class ProfileDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEdi public DuplicateAnythingCommand(TransactionalEditingDomain editingDomain, DuplicateElementsRequest req) {
super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap());
}
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java index 672621182e7..ec84e1582ea 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyCN.java @@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -91,8 +92,6 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli super(UMLElementTypes.Profile_1024);
}
-
-
/**
* @generated
*/
@@ -129,11 +128,6 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -157,17 +151,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -188,17 +176,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -220,17 +202,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -251,17 +227,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -280,17 +250,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -313,17 +277,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -346,17 +304,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -379,17 +331,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -401,17 +347,11 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case MetaclassEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -435,7 +375,34 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli break;
}
}
-
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case ClassEditPartCN.VISUAL_ID:
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case ExtensionEditPart.VISUAL_ID:
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
@@ -447,8 +414,6 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
}
-
-
/**
* @generated
*/
@@ -629,5 +594,4 @@ public class ProfileItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditPoli }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java index b053cc9eb0f..b5d96f7491b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfileItemSemanticEditPolicyTN.java @@ -55,6 +55,7 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationC import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ProfileApplicationReorientCommand;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintConstrainedElementEditPart;
@@ -91,8 +92,6 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli super(UMLElementTypes.Profile_1030);
}
-
-
/**
* @generated
*/
@@ -129,11 +128,6 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case StereotypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -157,17 +151,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ModelEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -188,17 +176,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ProfileEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -220,17 +202,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PackageEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -251,17 +227,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case ConstraintEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -280,17 +250,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case EnumerationEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -313,17 +277,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case PrimitiveTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -346,17 +304,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case DataTypeEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -379,17 +331,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case CommentEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -401,17 +347,11 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
break;
case MetaclassEditPartCN.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
Edge incomingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
@@ -435,7 +375,34 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli break;
}
}
-
+ cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
+ // don't need explicit deletion of cnode as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
+ break;
+ case ClassEditPartCN.VISUAL_ID:
+ for(Iterator<?> it = cnode.getTargetEdges().iterator(); it.hasNext();) {
+ Edge incomingLink = (Edge)it.next();
+ switch(UMLVisualIDRegistry.getVisualID(incomingLink)) {
+ case CommentAnnotatedElementEditPart.VISUAL_ID:
+ case ConstraintConstrainedElementEditPart.VISUAL_ID:
+ case ContextLinkEditPart.VISUAL_ID:
+ DestroyReferenceRequest destroyRefReq = new DestroyReferenceRequest(incomingLink.getSource().getElement(), null, incomingLink.getTarget().getElement(), false);
+ cmd.add(new DestroyReferenceCommand(destroyRefReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ case ExtensionEditPart.VISUAL_ID:
+ case AssociationEditPart.VISUAL_ID:
+ case AssociationBranchEditPart.VISUAL_ID:
+ case GeneralizationEditPart.VISUAL_ID:
+ case DependencyEditPart.VISUAL_ID:
+ case DependencyBranchEditPart.VISUAL_ID:
+ case ElementImportEditPart.VISUAL_ID:
+ DestroyElementRequest destroyEltReq = new DestroyElementRequest(incomingLink.getElement(), false);
+ cmd.add(new DestroyElementCommand(destroyEltReq));
+ cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
+ break;
+ }
+ }
cmd.add(new DestroyElementCommand(new DestroyElementRequest(getEditingDomain(), cnode.getElement(), false))); // directlyOwned: true
// don't need explicit deletion of cnode as parent's view deletion would clean child views as well
// cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), cnode));
@@ -447,8 +414,6 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli }
}
-
-
/**
* @generated
*/
@@ -629,5 +594,4 @@ public class ProfileItemSemanticEditPolicyTN extends UMLBaseItemSemanticEditPoli }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java index 42e573f8d74..cf9eff6be3e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyCN.java @@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -43,7 +44,6 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyCN extend super(UMLElementTypes.Profile_1024);
}
-
/**
* @generated
*/
@@ -52,92 +52,39 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyCN extend if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Class_3028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Class_3028 == requestElementType) {
return getGEFWrapper(new MetaclassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java index 18276f32499..c4875d4d881 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ProfilePackageableElementCompartmentItemSemanticEditPolicyTN.java @@ -19,6 +19,7 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; import org.eclipse.papyrus.infra.extendedtypes.types.IExtendedHintedElementType;
import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils;
import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramUtils;
+import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ClassCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.CommentCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.ConstraintCreateCommandCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.commands.DataTypeCreateCommandCN;
@@ -43,7 +44,6 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyTN extend super(UMLElementTypes.Profile_1030);
}
-
/**
* @generated
*/
@@ -52,92 +52,39 @@ public class ProfilePackageableElementCompartmentItemSemanticEditPolicyTN extend if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Stereotype_1023 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Stereotype_1023 == requestElementType) {
return getGEFWrapper(new StereotypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Model_1027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Model_1027 == requestElementType) {
return getGEFWrapper(new ModelCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Profile_1024 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Profile_1024 == requestElementType) {
return getGEFWrapper(new ProfileCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Package_1012 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Package_1012 == requestElementType) {
return getGEFWrapper(new PackageCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Constraint_1028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Constraint_1028 == requestElementType) {
return getGEFWrapper(new ConstraintCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Enumeration_3025 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Enumeration_3025 == requestElementType) {
return getGEFWrapper(new EnumerationCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.PrimitiveType_3026 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.PrimitiveType_3026 == requestElementType) {
return getGEFWrapper(new PrimitiveTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.DataType_3027 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.DataType_3027 == requestElementType) {
return getGEFWrapper(new DataTypeCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Comment_1007 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Comment_1007 == requestElementType) {
return getGEFWrapper(new CommentCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
- if(UMLElementTypes.Class_3028 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Class_3028 == requestElementType) {
return getGEFWrapper(new MetaclassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
-
+ }
+ if(UMLElementTypes.Class_3010 == requestElementType) {
+ return getGEFWrapper(new ClassCreateCommandCN(req, DiagramUtils.getDiagramFrom(getHost())));
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java index cb660d23acb..d9e1a684cc2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/ShortCutDiagramItemSemanticEditPolicy.java @@ -38,8 +38,6 @@ public class ShortCutDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEd super(UMLElementTypes.Diagram_2016);
}
-
-
/**
* @generated
*/
@@ -61,6 +59,4 @@ public class ShortCutDiagramItemSemanticEditPolicy extends UMLBaseItemSemanticEd }
return getGEFWrapper(cmd.reduce());
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java index 15966f5f5d1..ea9fe30e3c5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicy.java @@ -34,7 +34,6 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicy extends UMLBas super(UMLElementTypes.Stereotype_1026);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicy extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3002 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java index e29115e87c7..3c74db6304a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeAttributeCompartmentItemSemanticEditPolicyCN.java @@ -34,7 +34,6 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLB super(UMLElementTypes.Stereotype_1023);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeAttributeCompartmentItemSemanticEditPolicyCN extends UMLB if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Property_3002 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Property_3002 == requestElementType) {
return getGEFWrapper(new ClassPropertyCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java index 199dae79325..41dbacc7c9d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicy.java @@ -87,8 +87,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol super(UMLElementTypes.Stereotype_1026);
}
-
-
/**
* @generated
*/
@@ -125,11 +123,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassPropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -147,11 +140,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -168,8 +156,6 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
}
-
-
/**
* @generated
*/
@@ -386,5 +372,4 @@ public class StereotypeItemSemanticEditPolicy extends UMLBaseItemSemanticEditPol }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java index d1bb770552f..95886b8f4c0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeItemSemanticEditPolicyCN.java @@ -87,8 +87,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP super(UMLElementTypes.Stereotype_1023);
}
-
-
/**
* @generated
*/
@@ -125,11 +123,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassPropertyEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -147,11 +140,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP Node cnode = (Node)cit.next();
switch(UMLVisualIDRegistry.getVisualID(cnode)) {
case ClassOperationEditPart.VISUAL_ID:
-
-
-
-
-
for(Iterator<?> it = cnode.getSourceEdges().iterator(); it.hasNext();) {
Edge outgoingLink = (Edge)it.next();
switch(UMLVisualIDRegistry.getVisualID(outgoingLink)) {
@@ -168,8 +156,6 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP }
}
-
-
/**
* @generated
*/
@@ -386,5 +372,4 @@ public class StereotypeItemSemanticEditPolicyCN extends UMLBaseItemSemanticEditP }
return super.getReorientReferenceRelationshipCommand(req);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java index a1f8c0669c9..c8ff839d32b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicy.java @@ -34,7 +34,6 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicy extends UMLBas super(UMLElementTypes.Stereotype_1026);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicy extends UMLBas if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3020 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java index f39528eff31..c3954857edd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/StereotypeOperationCompartmentItemSemanticEditPolicyCN.java @@ -34,7 +34,6 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicyCN extends UMLB super(UMLElementTypes.Stereotype_1023);
}
-
/**
* @generated
*/
@@ -43,29 +42,9 @@ public class StereotypeOperationCompartmentItemSemanticEditPolicyCN extends UMLB if(requestElementType == null) {
return super.getCreateCommand(req);
}
- IElementType baseElementType = requestElementType;
- boolean isExtendedType = false;
- if(requestElementType instanceof IExtendedHintedElementType) {
- baseElementType = ElementTypeUtils.getClosestDiagramType(requestElementType);
- if(baseElementType != null) {
- isExtendedType = true;
- } else {
- // no reference element type ID. using the closest super element type to give more opportunities, but can lead to bugs.
- baseElementType = ElementTypeUtils.findClosestNonExtendedElementType((IExtendedHintedElementType)requestElementType);
- isExtendedType = true;
- }
- }
-
- if(UMLElementTypes.Operation_3020 == baseElementType) {
- if(isExtendedType) {
- return getExtendedTypeCreationCommand(req, (IExtendedHintedElementType)requestElementType);
- }
+ if(UMLElementTypes.Operation_3020 == requestElementType) {
return getGEFWrapper(new ClassOperationCreateCommand(req, DiagramUtils.getDiagramFrom(getHost())));
-
}
return super.getCreateCommand(req);
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java index e9866404a22..2e210206f9a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLBaseItemSemanticEditPolicy.java @@ -236,7 +236,17 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { * @generated
*/
protected Command getCreateCommand(CreateElementRequest req) {
- // no more usage of the extended types here.
+ IElementType requestElementType = req.getElementType();
+ if(requestElementType instanceof IExtendedHintedElementType) {
+ // try to get a semantic create command from the extended type
+ IElementEditService commandProvider = ElementEditServiceUtils.getCommandProvider(req.getContainer());
+ if(commandProvider != null) {
+ ICommand command = commandProvider.getEditCommand(req);
+ if(command != null && command.canExecute()) {
+ return new ICommandProxy(command);
+ }
+ }
+ }
return null;
}
@@ -281,7 +291,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { }
// RS: End of add code for extended types
-
/**
* @generated
*/
@@ -334,7 +343,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { } else {
return getGEFWrapper(new MoveElementsCommand(req));
}
-
}
/**
@@ -381,7 +389,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { }
}
-
/**
* @generated
*/
@@ -476,7 +483,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistCommentAnnotatedElement_1022(source, target);
}
@@ -489,7 +495,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return false;
}
}
-
return canExistConstraintConstrainedElement_4014(source, target);
}
@@ -505,7 +510,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { if(target != null && (target.getOwnedRules().contains(target))) {
return false;
}
-
return canExistConstraintContext_8500(source, target);
}
@@ -520,7 +524,6 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { * @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
*/
//ExtensionTarget
-
/**we can't make a test here, because, the source must be a Property (ExtensionEnd) and it's a Stereotype
*
* @see org.eclipse.papyrus.uml.diagram.profile.custom.policies.CUMLBaseItemSemanticEditPolicy for the good test!
@@ -756,5 +759,4 @@ public class UMLBaseItemSemanticEditPolicy extends SemanticEditPolicy { return true;
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java index cb17b89efa2..092403465d1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextNonResizableEditPolicy.java @@ -205,7 +205,6 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl /**
* @generated
*/
-
public void refreshFeedback() {
refreshSelectionFeedback();
refreshFocusFeedback();
@@ -235,5 +234,4 @@ public class UMLTextNonResizableEditPolicy extends NonResizableEditPolicyEx impl moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost()));
return Collections.singletonList(moveHandle);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java index 23ab41f3218..c43584305db 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/edit/policies/UMLTextSelectionEditPolicy.java @@ -199,7 +199,6 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I /**
* @generated
*/
-
public void refreshFeedback() {
refreshSelectionFeedback();
refreshFocusFeedback();
@@ -219,5 +218,4 @@ public class UMLTextSelectionEditPolicy extends SelectionEditPolicy implements I }
return hostPositionListener;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java index 9b4fcc84990..2ff0f5305b7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLAbstractNavigatorItem.java @@ -70,5 +70,4 @@ public abstract class UMLAbstractNavigatorItem extends PlatformObject { public Object getParent() {
return myParent;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java index 3c3446c21a7..8f54771183c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorContentProvider.java @@ -144,12 +144,10 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider myWorkspaceSynchronizer.dispose();
myWorkspaceSynchronizer = null;
myViewerRefreshRunnable = null;
-
for(Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource resource = (Resource)it.next();
resource.unload();
}
-
((TransactionalEditingDomain)myEditingDomain).dispose();
myEditingDomain = null;
}
@@ -214,7 +212,6 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider Resource resource = myEditingDomain.getResourceSet().getResource(fileURI, true);
return wrapEObjects(myAdapterFctoryContentProvier.getChildren(resource), parentElement);
}
-
if(parentElement instanceof UMLDomainNavigatorItem) {
return wrapEObjects(myAdapterFctoryContentProvier.getChildren(((UMLDomainNavigatorItem)parentElement).getEObject()), parentElement);
}
@@ -251,5 +248,4 @@ public class UMLDomainNavigatorContentProvider implements ICommonContentProvider public boolean hasChildren(Object element) {
return element instanceof IFile || getChildren(element).length > 0;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java index 2315214ef5c..43dd86abed1 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorItem.java @@ -46,7 +46,6 @@ public class UMLDomainNavigatorItem extends PlatformObject { return domainNavigatorItem.getPropertySourceProvider().getPropertySource(eObject);
}
}
-
return null;
}
@@ -118,5 +117,4 @@ public class UMLDomainNavigatorItem extends PlatformObject { public int hashCode() {
return EcoreUtil.getURI(getEObject()).hashCode();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java index 693f7cc77fa..977209bdc9b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLDomainNavigatorLabelProvider.java @@ -103,5 +103,4 @@ public class UMLDomainNavigatorLabelProvider implements ICommonLabelProvider { public String getDescription(Object anElement) {
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java index fd2c5561352..7ca26450347 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorActionProvider.java @@ -147,7 +147,6 @@ public class UMLNavigatorActionProvider extends CommonActionProvider { if(myDiagram == null || myDiagram.eResource() == null) {
return;
}
-
IEditorInput editorInput = getEditorInput(myDiagram);
IWorkbenchPage page = myViewerSite.getPage();
try {
@@ -175,7 +174,5 @@ public class UMLNavigatorActionProvider extends CommonActionProvider { IEditorInput editorInput = new URIEditorInput(uri, editorName);
return editorInput;
}
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java index 5b17947d4a1..d58c08ea778 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorContentProvider.java @@ -133,8 +133,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { });
}
-
-
/**
* @generated
*/
@@ -142,12 +140,10 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { myWorkspaceSynchronizer.dispose();
myWorkspaceSynchronizer = null;
myViewerRefreshRunnable = null;
-
for(Iterator<Resource> it = myEditingDomain.getResourceSet().getResources().iterator(); it.hasNext();) {
Resource resource = (Resource)it.next();
resource.unload();
}
-
((TransactionalEditingDomain)myEditingDomain).dispose();
myEditingDomain = null;
}
@@ -219,12 +215,10 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { }
return result.toArray();
}
-
if(parentElement instanceof UMLNavigatorGroup) {
UMLNavigatorGroup group = (UMLNavigatorGroup)parentElement;
return group.getChildren();
}
-
if(parentElement instanceof UMLNavigatorItem) {
UMLNavigatorItem navigatorItem = (UMLNavigatorItem)parentElement;
if(navigatorItem.isLeaf() || !isOwnView(navigatorItem.getView())) {
@@ -232,7 +226,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { }
return getViewChildren(navigatorItem.getView(), parentElement);
}
-
return EMPTY_ARRAY;
}
@@ -245,7 +238,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { return EMPTY_ARRAY;
}
-
/**
* @generated
*/
@@ -253,7 +245,6 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { return ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
-
/**
* @generated
*/
@@ -271,5 +262,4 @@ public class UMLNavigatorContentProvider implements ICommonContentProvider { public boolean hasChildren(Object element) {
return element instanceof IFile || getChildren(element).length > 0;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java index aaca8e48a64..82f577e15be 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorGroup.java @@ -106,5 +106,4 @@ public class UMLNavigatorGroup extends UMLAbstractNavigatorItem { public int hashCode() {
return getGroupName().hashCode();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java index 6e0152eb105..e40ae84ce6d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorItem.java @@ -96,5 +96,4 @@ public class UMLNavigatorItem extends UMLAbstractNavigatorItem { public int hashCode() {
return EcoreUtil.getURI(getView()).hashCode();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java index 12b0fbc344e..1ea9afe7dc7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLabelProvider.java @@ -63,7 +63,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL UMLNavigatorGroup group = (UMLNavigatorGroup)element;
return UMLDiagramEditorPlugin.getInstance().getBundledImage(group.getIcon());
}
-
if(element instanceof UMLNavigatorItem) {
UMLNavigatorItem navigatorItem = (UMLNavigatorItem)element;
if(!isOwnView(navigatorItem.getView())) {
@@ -71,8 +70,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL }
return getImage(navigatorItem.getView());
}
-
-
return super.getImage(element);
}
@@ -93,7 +90,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL image = UMLElementTypes.getImage(elementType);
imageRegistry.put(key, image);
}
-
if(image == null) {
image = imageRegistry.get("Navigator?ImageNotFound"); //$NON-NLS-1$
imageRegistry.put(key, image);
@@ -109,7 +105,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL UMLNavigatorGroup group = (UMLNavigatorGroup)element;
return group.getGroupName();
}
-
if(element instanceof UMLNavigatorItem) {
UMLNavigatorItem navigatorItem = (UMLNavigatorItem)element;
if(!isOwnView(navigatorItem.getView())) {
@@ -117,8 +112,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL }
return getText(navigatorItem.getView());
}
-
-
return super.getText(element);
}
@@ -132,7 +125,6 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL return getUnknownElementText(view);
}
-
/**
* @generated
*/
@@ -178,5 +170,4 @@ public class UMLNavigatorLabelProvider extends LabelProvider implements ICommonL private boolean isOwnView(View view) {
return ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java index 6d00ca4881a..cd0e589f8e9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorLinkHelper.java @@ -63,7 +63,6 @@ public class UMLNavigatorLinkHelper implements ILinkHelper { * @generated
*/
public IStructuredSelection findSelection(IEditorInput anInput) {
- IDiagramDocument document = UMLDiagramEditorPlugin.getInstance().getDocumentProvider().getDiagramDocument(anInput);
return StructuredSelection.EMPTY;
}
@@ -77,7 +76,6 @@ public class UMLNavigatorLinkHelper implements ILinkHelper { if(false == aSelection.getFirstElement() instanceof UMLAbstractNavigatorItem) {
return;
}
-
UMLAbstractNavigatorItem abstractNavigatorItem = (UMLAbstractNavigatorItem)aSelection.getFirstElement();
View navigatorView = null;
if(abstractNavigatorItem instanceof UMLNavigatorItem) {
@@ -111,5 +109,4 @@ public class UMLNavigatorLinkHelper implements ILinkHelper { }
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java index f92cfcd648b..326a7af387d 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/navigator/UMLNavigatorSorter.java @@ -36,5 +36,4 @@ public class UMLNavigatorSorter extends ViewerSorter { }
return GROUP_CATEGORY;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java index 44ee95c5ebf..2e0d5c6275a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/parsers/MessageFormatParser.java @@ -199,5 +199,4 @@ public class MessageFormatParser extends AbstractAttributeParser { EObject element = (EObject)adapter.getAdapter(EObject.class);
return getViewProcessor().format(getValues(element), new StringBuffer(), new FieldPosition(0)).toString();
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java index 1234fbe8748..4f54b81a24e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/DiagramEditorContextMenuProvider.java @@ -32,7 +32,6 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider */
private IWorkbenchPart part;
-
/**
* @generated
*/
@@ -41,7 +40,6 @@ public class DiagramEditorContextMenuProvider extends DiagramContextMenuProvider this.part = part;
}
-
/**
* @generated
*/
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java index a977692a4c3..11dd7faa8ea 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/LoadResourceAction.java @@ -28,5 +28,4 @@ public class LoadResourceAction extends DefaultLoadResourceAction { public Object execute(ExecutionEvent event) throws ExecutionException {
return super.execute(event);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java index 3eb79b94ec4..26720741e5a 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/Messages.java @@ -33,7 +33,6 @@ public class Messages extends NLS { private Messages() {
}
-
/**
* @generated
*/
@@ -327,72 +326,82 @@ public class Messages extends NLS { /**
* @generated
*/
- public static String ImportMetaclass6CreationTool_title;
+ public static String Class6CreationTool_title;
/**
* @generated
*/
- public static String ImportMetaclass6CreationTool_desc;
+ public static String Class6CreationTool_desc;
/**
* @generated
*/
- public static String Enumeration7CreationTool_title;
+ public static String ImportMetaclass7CreationTool_title;
/**
* @generated
*/
- public static String Enumeration7CreationTool_desc;
+ public static String ImportMetaclass7CreationTool_desc;
/**
* @generated
*/
- public static String DataType8CreationTool_title;
+ public static String Enumeration8CreationTool_title;
/**
* @generated
*/
- public static String DataType8CreationTool_desc;
+ public static String Enumeration8CreationTool_desc;
/**
* @generated
*/
- public static String PrimitiveType9CreationTool_title;
+ public static String DataType9CreationTool_title;
/**
* @generated
*/
- public static String PrimitiveType9CreationTool_desc;
+ public static String DataType9CreationTool_desc;
/**
* @generated
*/
- public static String Property10CreationTool_title;
+ public static String PrimitiveType10CreationTool_title;
/**
* @generated
*/
- public static String Property10CreationTool_desc;
+ public static String PrimitiveType10CreationTool_desc;
/**
* @generated
*/
- public static String Operation11CreationTool_title;
+ public static String Property11CreationTool_title;
/**
* @generated
*/
- public static String Operation11CreationTool_desc;
+ public static String Property11CreationTool_desc;
/**
* @generated
*/
- public static String EnumerationLiteral12CreationTool_title;
+ public static String Operation12CreationTool_title;
/**
* @generated
*/
- public static String EnumerationLiteral12CreationTool_desc;
+ public static String Operation12CreationTool_desc;
+
+ /**
+ * @generated
+ */
+ public static String EnumerationLiteral13CreationTool_title;
+
+ /**
+ * @generated
+ */
+ public static String EnumerationLiteral13CreationTool_desc;
/**
* @generated
@@ -537,6 +546,26 @@ public class Messages extends NLS { /**
* @generated
*/
+ public static String ClassAttributeCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String ClassAttributeCompartmentEditPartCN_title;
+
+ /**
+ * @generated
+ */
+ public static String ClassOperationCompartmentEditPart_title;
+
+ /**
+ * @generated
+ */
+ public static String ClassOperationCompartmentEditPartCN_title;
+
+ /**
+ * @generated
+ */
public static String CommandName_OpenDiagram;
/**
@@ -558,6 +587,5 @@ public class Messages extends NLS { * @generated
*/
public static String UMLModelingAssistantProviderMessage;
-
//TODO: put accessor fields manually
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java index a41cc68ac2a..836771ca611 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ModelElementSelectionPage.java @@ -28,9 +28,6 @@ public class ModelElementSelectionPage extends DefaultModelElementSelectionPage super(UMLDiagramEditorPlugin.getInstance().getItemProvidersAdapterFactory(), pageName);
}
-
-
-
/**
* Override to provide custom model element description.
* @generated
@@ -38,7 +35,4 @@ public class ModelElementSelectionPage extends DefaultModelElementSelectionPage protected String getSelectionTitle() {
return Messages.ModelElementSelectionPageMessage;
}
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java index b9cf05600f5..34aaafa6da7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLCreationWizard.java @@ -116,7 +116,6 @@ public class UMLCreationWizard extends Wizard implements INewWizard { diagramModelFilePage.setTitle(Messages.UMLCreationWizard_DiagramModelFilePageTitle);
diagramModelFilePage.setDescription(Messages.UMLCreationWizard_DiagramModelFilePageDescription);
addPage(diagramModelFilePage);
-
domainModelFilePage = new UMLCreationWizardPage("DomainModelFile", getSelection(), "PapyrusUMLProfile") { //$NON-NLS-1$ //$NON-NLS-2$
public void setVisible(boolean visible) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java index f8c14b442f0..548f1dde5d0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramActionBarContributor.java @@ -29,7 +29,6 @@ public class UMLDiagramActionBarContributor extends DiagramActionBarContributor /**
* @generated
*/
-
protected Class<UMLDiagramEditor> getEditorClass() {
return UMLDiagramEditor.class;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java index 2c0093538db..b8f7906f3a0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramContentInitializer.java @@ -28,6 +28,12 @@ import org.eclipse.gmf.runtime.notation.View; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPart;
@@ -151,6 +157,16 @@ public class UMLDiagramContentInitializer { /**
* @generated
*/
+ private void createClass_2008Children(View view) {
+ myDomain2NotationMap.put(view.getElement(), view);
+ myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_2008OutgoingLinks(view));
+ createClassOperations_7018Children(getCompartment(view, ClassOperationCompartmentEditPart.VISUAL_ID));
+ createClassAttributes_7017Children(getCompartment(view, ClassAttributeCompartmentEditPart.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
private void createClass_1031Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_1031OutgoingLinks(view));
@@ -295,6 +311,16 @@ public class UMLDiagramContentInitializer { /**
* @generated
*/
+ private void createClass_3010Children(View view) {
+ myDomain2NotationMap.put(view.getElement(), view);
+ myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_3010OutgoingLinks(view));
+ createClassAttributes_7011Children(getCompartment(view, ClassAttributeCompartmentEditPartCN.VISUAL_ID));
+ createClassOperations_7012Children(getCompartment(view, ClassOperationCompartmentEditPartCN.VISUAL_ID));
+ }
+
+ /**
+ * @generated
+ */
private void createClass_3028Children(View view) {
myDomain2NotationMap.put(view.getElement(), view);
myLinkDescriptors.addAll(UMLDiagramUpdater.getClass_3028OutgoingLinks(view));
@@ -529,6 +555,46 @@ public class UMLDiagramContentInitializer { /**
* @generated
*/
+ private void createClassAttributes_7017Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassAttributes_7017SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void createClassAttributes_7011Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassAttributes_7011SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void createClassOperations_7018Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassOperations_7018SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
+ private void createClassOperations_7012Children(View view) {
+ Collection childNodeDescriptors = UMLDiagramUpdater.getClassOperations_7012SemanticChildren(view);
+ for(Iterator it = childNodeDescriptors.iterator(); it.hasNext();) {
+ createNode(view, (UMLNodeDescriptor)it.next());
+ }
+ }
+
+ /**
+ * @generated
+ */
private void createNode(View parentView, UMLNodeDescriptor nodeDescriptor) {
final String nodeType = UMLVisualIDRegistry.getType(nodeDescriptor.getVisualID());
Node node = ViewService.createNode(parentView, nodeDescriptor.getModelElement(), nodeType, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
@@ -542,6 +608,9 @@ public class UMLDiagramContentInitializer { case StereotypeEditPart.VISUAL_ID:
createStereotype_1026Children(node);
return;
+ case ClassEditPart.VISUAL_ID:
+ createClass_2008Children(node);
+ return;
case MetaclassEditPart.VISUAL_ID:
createClass_1031Children(node);
return;
@@ -593,6 +662,9 @@ public class UMLDiagramContentInitializer { case StereotypeEditPartCN.VISUAL_ID:
createStereotype_1023Children(node);
return;
+ case ClassEditPartCN.VISUAL_ID:
+ createClass_3010Children(node);
+ return;
case MetaclassEditPartCN.VISUAL_ID:
createClass_3028Children(node);
return;
@@ -690,5 +762,4 @@ public class UMLDiagramContentInitializer { }
return null;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java index dc5eb7dcaa3..058ff3b924c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditor.java @@ -78,7 +78,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
public static final String CONTEXT_ID = "org.eclipse.papyrus.uml.diagram.profile.ui.diagramContext"; //$NON-NLS-1$
-
/**
* @generated
*/
@@ -109,17 +108,13 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
public UMLDiagramEditor(ServicesRegistry servicesRegistry, Diagram diagram) throws ServiceException {
super(servicesRegistry, diagram);
-
// adds a listener to the palette service, which reacts to palette customizations
PapyrusPaletteService.getInstance().addProviderChangeListener(this);
-
// Share the same editing provider
editingDomain = servicesRegistry.getService(TransactionalEditingDomain.class);
documentProvider = new GmfMultiDiagramDocumentProvider(editingDomain);
-
// overrides editing domain created by super constructor
setDocumentProvider(documentProvider);
-
}
/**
@@ -158,7 +153,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh return UMLDiagramEditorPlugin.ID;
}
-
/**
* @generated
*/
@@ -231,12 +225,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh return new ShowInContext(getEditorInput(), getNavigatorSelection());
}
-
/**
* @generated
*/
private ISelection getNavigatorSelection() {
- IDiagramDocument document = getDiagramDocument();
return StructuredSelection.EMPTY;
}
@@ -250,8 +242,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh getSite().registerContextMenu(ActionIds.DIAGRAM_EDITOR_CONTEXT_MENU, provider, getDiagramGraphicalViewer());
}
-
-
/**
* @generated
*/
@@ -299,7 +289,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh dirtyState.dispose();
dirtyState = null;
}
-
super.setUndoContext(context);
}
@@ -327,12 +316,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh // remove palette service listener
// remove preference listener
PapyrusPaletteService.getInstance().removeProviderChangeListener(this);
-
if(dirtyState != null) {
dirtyState.dispose();
dirtyState = null;
}
-
super.dispose();
}
@@ -343,8 +330,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh return getEditDomain().getPaletteViewer();
}
-
-
/**
* @generated
*/
@@ -368,13 +353,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
protected void configurePaletteViewer(PaletteViewer viewer) {
super.configurePaletteViewer(viewer);
-
// customize menu...
viewer.setContextMenu(new PapyrusPaletteContextMenuProvider(viewer));
-
viewer.getKeyHandler().setParent(getPaletteKeyHandler());
viewer.getControl().addMouseListener(getPaletteMouseListener());
-
// Add a transfer drag target listener that is supported on
// palette template entries whose template is a creation tool.
// This will enable drag and drop of the palette shape creation
@@ -395,9 +377,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * @return Palette Key Handler for the palette
*/
private KeyHandler getPaletteKeyHandler() {
-
if(paletteKeyHandler == null) {
-
paletteKeyHandler = new KeyHandler() {
/**
@@ -411,27 +391,18 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * @return <code>true</code> if KeyEvent was handled in some way
*/
public boolean keyReleased(KeyEvent event) {
-
if(event.keyCode == SWT.Selection) {
-
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
if(toolSupportsAccessibility(tool)) {
-
tool.keyUp(event, getDiagramGraphicalViewer());
-
// deactivate current selection
getPaletteViewer().setActiveTool(null);
-
return true;
}
-
}
return super.keyReleased(event);
}
-
};
-
}
return paletteKeyHandler;
}
@@ -440,9 +411,7 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh * @return Palette Mouse listener for the palette
*/
private MouseListener getPaletteMouseListener() {
-
if(paletteMouseListener == null) {
-
paletteMouseListener = new MouseListener() {
/**
@@ -459,13 +428,10 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh */
public void mouseDoubleClick(MouseEvent e) {
Tool tool = getPaletteViewer().getActiveTool().createTool();
-
if(toolSupportsAccessibility(tool)) {
-
tool.setViewer(getDiagramGraphicalViewer());
tool.setEditDomain(getDiagramGraphicalViewer().getEditDomain());
tool.mouseDoubleClick(e, getDiagramGraphicalViewer());
-
// Current active tool should be deactivated,
// but if it is down here it will get
// reactivated deep in GEF palette code after
@@ -485,14 +451,11 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh getPaletteViewer().setActiveTool(null);
clearActiveTool = false;
}
-
}
};
-
}
return paletteMouseListener;
}
-
};
}
@@ -510,7 +473,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh @Override
protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
-
// Enable Drop
getDiagramGraphicalViewer().addDropTargetListener(new DropTargetListener(getDiagramGraphicalViewer(), LocalSelectionTransfer.getTransfer()) {
@@ -525,7 +487,6 @@ public class UMLDiagramEditor extends UmlGmfDiagramEditor implements IProviderCh return getEditingDomain();
}
});
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java index e4125be5c57..b289fbd673c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorPlugin.java @@ -29,6 +29,7 @@ import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory;
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
+import org.eclipse.gmf.tooling.runtime.LogHelper;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
@@ -53,6 +54,11 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { /**
* @generated
*/
+ private LogHelper myLogHelper;
+
+ /**
+ * @generated
+ */
public static final PreferencesHint DIAGRAM_PREFERENCES_HINT = new PreferencesHint(ID);
/**
@@ -96,7 +102,6 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { adapterFactory = createAdapterFactory();
DiagramPreferenceInitializer diagramPreferenceInitializer = new DiagramPreferenceInitializer();
diagramPreferenceInitializer.initializeDefaultPreferences();
-
}
/**
@@ -126,7 +131,6 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { return store;
}
-
/**
* @generated
*/
@@ -269,10 +273,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
public void logError(String error, Throwable throwable) {
- if(error == null && throwable != null) {
+ if (error == null && throwable != null) {
error = throwable.getMessage();
}
- getLog().log(new Status(IStatus.ERROR, UMLDiagramEditorPlugin.ID, IStatus.OK, error, throwable));
+ getLog().log(new Status(
+ IStatus.ERROR,
+ UMLDiagramEditorPlugin.ID,
+ IStatus.OK,
+ error, throwable));
debug(error, throwable);
}
@@ -287,10 +295,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
public void logInfo(String message, Throwable throwable) {
- if(message == null && throwable != null) {
+ if (message == null && throwable != null) {
message = throwable.getMessage();
}
- getLog().log(new Status(IStatus.INFO, UMLDiagramEditorPlugin.ID, IStatus.OK, message, throwable));
+ getLog().log(new Status(
+ IStatus.INFO,
+ UMLDiagramEditorPlugin.ID,
+ IStatus.OK,
+ message, throwable));
debug(message, throwable);
}
@@ -298,14 +310,14 @@ public class UMLDiagramEditorPlugin extends AbstractUIPlugin { * @generated
*/
private void debug(String message, Throwable throwable) {
- if(!isDebugging()) {
+ if (!isDebugging()) {
return;
}
- if(message != null) {
+ if (message != null) {
System.err.println(message);
}
- if(throwable != null) {
+ if (throwable != null) {
throwable.printStackTrace();
}
}
-}
+}
\ No newline at end of file diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java index 0c6ae7ad673..c17811dde1f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramEditorUtil.java @@ -115,7 +115,6 @@ public class UMLDiagramEditorUtil { return DefaultDiagramEditorUtil.getUniqueFileName(containerFullPath, fileName, extension, DefaultDiagramEditorUtil.EXISTS_IN_WORKSPACE);
}
-
/**
* Runs the wizard in a dialog.
*
@@ -149,19 +148,16 @@ public class UMLDiagramEditorUtil { protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Profile model = createInitialModel();
attachModelToResource(model, modelResource);
-
Diagram diagram = ViewService.createDiagram(model, ProfileDiagramEditPart.MODEL_ID, UMLDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT);
if(diagram != null) {
diagramResource.getContents().add(diagram);
diagram.setName(diagramName);
diagram.setElement(model);
}
-
try {
modelResource.save(org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorUtil.getSaveOptions());
diagramResource.save(org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramEditorUtil.getSaveOptions());
} catch (IOException e) {
-
UMLDiagramEditorPlugin.getInstance().logError("Unable to store model and diagram resources", e); //$NON-NLS-1$
}
return CommandResult.newOKCommandResult();
@@ -202,7 +198,6 @@ public class UMLDiagramEditorUtil { */
public static void selectElementsInDiagram(IDiagramWorkbenchPart diagramPart, List<EditPart> editParts) {
diagramPart.getDiagramGraphicalViewer().deselectAll();
-
EditPart firstPrimary = null;
for(EditPart nextPart : editParts) {
diagramPart.getDiagramGraphicalViewer().appendSelection(nextPart);
@@ -210,7 +205,6 @@ public class UMLDiagramEditorUtil { firstPrimary = nextPart;
}
}
-
if(!editParts.isEmpty()) {
diagramPart.getDiagramGraphicalViewer().reveal(firstPrimary != null ? firstPrimary : (EditPart)editParts.get(0));
}
@@ -222,7 +216,6 @@ public class UMLDiagramEditorUtil { private static int findElementsInDiagramByID(DiagramEditPart diagramPart, EObject element, List<EditPart> editPartCollector) {
IDiagramGraphicalViewer viewer = (IDiagramGraphicalViewer)diagramPart.getViewer();
final int intialNumOfEditParts = editPartCollector.size();
-
if(element instanceof View) { // support notation element lookup
EditPart editPart = (EditPart)viewer.getEditPartRegistry().get(element);
if(editPart != null) {
@@ -230,7 +223,6 @@ public class UMLDiagramEditorUtil { return 1;
}
}
-
String elementID = EMFCoreUtil.getProxyID(element);
@SuppressWarnings("unchecked")
List<EditPart> associatedParts = viewer.findEditPartsForElement(elementID, IGraphicalEditPart.class);
@@ -244,7 +236,6 @@ public class UMLDiagramEditorUtil { editPartCollector.add(nextPart);
}
}
-
if(intialNumOfEditParts == editPartCollector.size()) {
if(!associatedParts.isEmpty()) {
editPartCollector.add(associatedParts.get(0));
@@ -265,7 +256,6 @@ public class UMLDiagramEditorUtil { if(targetElement.eResource() instanceof XMLResource) {
hasStructuralURI = ((XMLResource)targetElement.eResource()).getID(targetElement) == null;
}
-
View view = null;
LinkedList<EditPart> editPartHolder = new LinkedList<EditPart>();
if(hasStructuralURI && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
@@ -274,7 +264,6 @@ public class UMLDiagramEditorUtil { EditPart editPart = editPartHolder.get(0);
view = editPart.getModel() instanceof View ? (View)editPart.getModel() : null;
}
-
return (view == null) ? diagramEditPart.getDiagramView() : view;
}
@@ -322,7 +311,6 @@ public class UMLDiagramEditorUtil { }
}
}
-
buildElement2ViewMap(scope, element2ViewMap, elementSet);
}
return element2ViewMap;
@@ -335,7 +323,6 @@ public class UMLDiagramEditorUtil { if(elements.size() == element2ViewMap.size()) {
return true;
}
-
if(parentView.isSetElement() && !element2ViewMap.containsKey(parentView.getElement()) && elements.contains(parentView.getElement())) {
element2ViewMap.put(parentView.getElement(), parentView);
if(elements.size() == element2ViewMap.size()) {
@@ -355,5 +342,4 @@ public class UMLDiagramEditorUtil { return complete;
}
} //LazyElement2ViewMap
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java index ae7322e45a7..27c03a9f41e 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdateCommand.java @@ -62,7 +62,6 @@ public class UMLDiagramUpdateCommand implements IHandler { CanonicalEditPolicy nextEditPolicy = (CanonicalEditPolicy)it.next();
nextEditPolicy.refresh();
}
-
}
}
return null;
@@ -87,5 +86,4 @@ public class UMLDiagramUpdateCommand implements IHandler { */
public void removeHandlerListener(IHandlerListener handlerListener) {
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java index 83d6a4ecaf9..e27fe6b7d76 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDiagramUpdater.java @@ -27,6 +27,12 @@ import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassAttributeCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationCompartmentEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
@@ -156,6 +162,14 @@ public class UMLDiagramUpdater { return getDataTypeOperations_1068SemanticChildren(view);
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
return getDataTypeOperations_1070SemanticChildren(view);
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ return getClassAttributes_7017SemanticChildren(view);
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ return getClassAttributes_7011SemanticChildren(view);
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ return getClassOperations_7018SemanticChildren(view);
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ return getClassOperations_7012SemanticChildren(view);
}
return Collections.emptyList();
}
@@ -180,6 +194,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
if(visualID == MetaclassEditPart.VISUAL_ID) {
result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
@@ -304,6 +322,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedStereotypes().iterator(); it.hasNext();) {
Stereotype childElement = (Stereotype)it.next();
@@ -368,6 +390,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedStereotypes().iterator(); it.hasNext();) {
Stereotype childElement = (Stereotype)it.next();
@@ -436,6 +462,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
Comment childElement = (Comment)it.next();
@@ -504,6 +534,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
for(Iterator<?> it = modelElement.getOwnedComments().iterator(); it.hasNext();) {
Comment childElement = (Comment)it.next();
@@ -664,6 +698,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -720,6 +758,10 @@ public class UMLDiagramUpdater { result.add(new UMLNodeDescriptor(childElement, visualID));
continue;
}
+ if(visualID == ClassEditPartCN.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
}
return result;
}
@@ -868,6 +910,101 @@ public class UMLDiagramUpdater { return result;
}
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassAttributes_7017SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassPropertyEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassAttributes_7011SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedAttributes().iterator(); it.hasNext();) {
+ Property childElement = (Property)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassPropertyEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassOperations_7018SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedOperations().iterator(); it.hasNext();) {
+ Operation childElement = (Operation)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassOperationEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
+
+ /**
+ * @generated
+ */
+ public static List<UMLNodeDescriptor> getClassOperations_7012SemanticChildren(View view) {
+ if(false == view.eContainer() instanceof View) {
+ return Collections.emptyList();
+ }
+ View containerView = (View)view.eContainer();
+ if(!containerView.isSetElement()) {
+ return Collections.emptyList();
+ }
+ Class modelElement = (Class)containerView.getElement();
+ LinkedList<UMLNodeDescriptor> result = new LinkedList<UMLNodeDescriptor>();
+ for(Iterator<?> it = modelElement.getOwnedOperations().iterator(); it.hasNext();) {
+ Operation childElement = (Operation)it.next();
+ int visualID = UMLVisualIDRegistry.getNodeVisualID(view, childElement);
+ if(visualID == ClassOperationEditPart.VISUAL_ID) {
+ result.add(new UMLNodeDescriptor(childElement, visualID));
+ continue;
+ }
+ }
+ return result;
+ }
/**
* @generated
@@ -882,6 +1019,8 @@ public class UMLDiagramUpdater { return getAssociation_2015ContainedLinks(view);
case StereotypeEditPart.VISUAL_ID:
return getStereotype_1026ContainedLinks(view);
+ case ClassEditPart.VISUAL_ID:
+ return getClass_2008ContainedLinks(view);
case MetaclassEditPart.VISUAL_ID:
return getClass_1031ContainedLinks(view);
case CommentEditPart.VISUAL_ID:
@@ -916,6 +1055,8 @@ public class UMLDiagramUpdater { return getOperation_3020ContainedLinks(view);
case StereotypeEditPartCN.VISUAL_ID:
return getStereotype_1023ContainedLinks(view);
+ case ClassEditPartCN.VISUAL_ID:
+ return getClass_3010ContainedLinks(view);
case MetaclassEditPartCN.VISUAL_ID:
return getClass_3028ContainedLinks(view);
case CommentEditPartCN.VISUAL_ID:
@@ -965,6 +1106,8 @@ public class UMLDiagramUpdater { return getAssociation_2015IncomingLinks(view);
case StereotypeEditPart.VISUAL_ID:
return getStereotype_1026IncomingLinks(view);
+ case ClassEditPart.VISUAL_ID:
+ return getClass_2008IncomingLinks(view);
case MetaclassEditPart.VISUAL_ID:
return getClass_1031IncomingLinks(view);
case CommentEditPart.VISUAL_ID:
@@ -999,6 +1142,8 @@ public class UMLDiagramUpdater { return getOperation_3020IncomingLinks(view);
case StereotypeEditPartCN.VISUAL_ID:
return getStereotype_1023IncomingLinks(view);
+ case ClassEditPartCN.VISUAL_ID:
+ return getClass_3010IncomingLinks(view);
case MetaclassEditPartCN.VISUAL_ID:
return getClass_3028IncomingLinks(view);
case CommentEditPartCN.VISUAL_ID:
@@ -1048,6 +1193,8 @@ public class UMLDiagramUpdater { return getAssociation_2015OutgoingLinks(view);
case StereotypeEditPart.VISUAL_ID:
return getStereotype_1026OutgoingLinks(view);
+ case ClassEditPart.VISUAL_ID:
+ return getClass_2008OutgoingLinks(view);
case MetaclassEditPart.VISUAL_ID:
return getClass_1031OutgoingLinks(view);
case CommentEditPart.VISUAL_ID:
@@ -1082,6 +1229,8 @@ public class UMLDiagramUpdater { return getOperation_3020OutgoingLinks(view);
case StereotypeEditPartCN.VISUAL_ID:
return getStereotype_1023OutgoingLinks(view);
+ case ClassEditPartCN.VISUAL_ID:
+ return getClass_3010OutgoingLinks(view);
case MetaclassEditPartCN.VISUAL_ID:
return getClass_3028OutgoingLinks(view);
case CommentEditPartCN.VISUAL_ID:
@@ -1171,6 +1320,18 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_2008ContainedLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_1031ContainedLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -1365,6 +1526,18 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_3010ContainedLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_3028ContainedLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -1605,6 +1778,26 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_2008IncomingLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Extension_1013(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4001(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_1031IncomingLinks(View view) {
Class modelElement = (Class)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -1842,6 +2035,26 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_3010IncomingLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getIncomingTypeModelFacetLinks_Extension_1013(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4001(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Association_4019(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Generalization_4002(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4008(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_Dependency_4018(modelElement, crossReferencer));
+ result.addAll(getIncomingTypeModelFacetLinks_ElementImport_1064(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Comment_AnnotatedElement_1022(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_ConstrainedElement_4014(modelElement, crossReferencer));
+ result.addAll(getIncomingFeatureModelFacetLinks_Constraint_Context_8500(modelElement, crossReferencer));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_3028IncomingLinks(View view) {
Class modelElement = (Class)view.getElement();
CrossReferenceAdapter crossReferencer = CrossReferenceAdapter.getCrossReferenceAdapter(view.eResource().getResourceSet());
@@ -2157,6 +2370,22 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_2008OutgoingLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4001(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4019(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4018(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_1031OutgoingLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -2360,6 +2589,22 @@ public class UMLDiagramUpdater { /**
* @generated
*/
+ public static List<UMLLinkDescriptor> getClass_3010OutgoingLinks(View view) {
+ Class modelElement = (Class)view.getElement();
+ LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4001(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Association_4019(modelElement));
+ result.addAll(getContainedTypeModelFacetLinks_Generalization_4002(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4008(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_Dependency_4018(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_ElementImport_1064(modelElement));
+ result.addAll(getOutgoingTypeModelFacetLinks_PackageImport_1065(modelElement));
+ return result;
+ }
+
+ /**
+ * @generated
+ */
public static List<UMLLinkDescriptor> getClass_3028OutgoingLinks(View view) {
Class modelElement = (Class)view.getElement();
LinkedList<UMLLinkDescriptor> result = new LinkedList<UMLLinkDescriptor>();
@@ -2583,7 +2828,7 @@ public class UMLDiagramUpdater { continue;
}
Class dst = link.getMetaclass();
- List sources = link.getOwnedEnds();
+ List<?> sources = link.getOwnedEnds();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Property) {
continue;
@@ -2608,13 +2853,13 @@ public class UMLDiagramUpdater { if(AssociationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2660,13 +2905,13 @@ public class UMLDiagramUpdater { if(AssociationBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2711,13 +2956,13 @@ public class UMLDiagramUpdater { if(DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -2742,13 +2987,13 @@ public class UMLDiagramUpdater { if(DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -2815,7 +3060,7 @@ public class UMLDiagramUpdater { if(ExtensionEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getOwnedEnds();
+ List<?> sources = link.getOwnedEnds();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Property) {
continue;
@@ -2840,7 +3085,7 @@ public class UMLDiagramUpdater { if(AssociationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2885,7 +3130,7 @@ public class UMLDiagramUpdater { if(AssociationBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -2915,7 +3160,6 @@ public class UMLDiagramUpdater { }
Classifier container = (Classifier)link.eContainer();
result.add(new UMLLinkDescriptor(container, target, link, UMLElementTypes.Generalization_4002, GeneralizationEditPart.VISUAL_ID));
-
}
return result;
}
@@ -2934,7 +3178,7 @@ public class UMLDiagramUpdater { if(DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -2959,7 +3203,7 @@ public class UMLDiagramUpdater { if(DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -3078,13 +3322,13 @@ public class UMLDiagramUpdater { if(AssociationEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -3160,13 +3404,13 @@ public class UMLDiagramUpdater { if(AssociationBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getEndTypes();
+ List<?> targets = link.getEndTypes();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof Type) {
continue;
}
Type dst = (Type)theTarget;
- List sources = link.getEndTypes();
+ List<?> sources = link.getEndTypes();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof Type) {
continue;
@@ -3206,13 +3450,13 @@ public class UMLDiagramUpdater { if(DependencyEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -3252,13 +3496,13 @@ public class UMLDiagramUpdater { if(DependencyBranchEditPart.VISUAL_ID != UMLVisualIDRegistry.getLinkWithClassVisualID(link)) {
continue;
}
- List targets = link.getSuppliers();
+ List<?> targets = link.getSuppliers();
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
if(false == theTarget instanceof NamedElement) {
continue;
}
NamedElement dst = (NamedElement)theTarget;
- List sources = link.getClients();
+ List<?> sources = link.getClients();
Object theSource = sources.size() == 1 ? sources.get(0) : null;
if(false == theSource instanceof NamedElement) {
continue;
@@ -3389,7 +3633,6 @@ public class UMLDiagramUpdater { /**
* @generated
*/
-
public List<UMLNodeDescriptor> getSemanticChildren(View view) {
return UMLDiagramUpdater.getSemanticChildren(view);
}
@@ -3397,7 +3640,6 @@ public class UMLDiagramUpdater { /**
* @generated
*/
-
public List<UMLLinkDescriptor> getContainedLinks(View view) {
return UMLDiagramUpdater.getContainedLinks(view);
}
@@ -3405,7 +3647,6 @@ public class UMLDiagramUpdater { /**
* @generated
*/
-
public List<UMLLinkDescriptor> getIncomingLinks(View view) {
return UMLDiagramUpdater.getIncomingLinks(view);
}
@@ -3413,10 +3654,8 @@ public class UMLDiagramUpdater { /**
* @generated
*/
-
public List<UMLLinkDescriptor> getOutgoingLinks(View view) {
return UMLDiagramUpdater.getOutgoingLinks(view);
}
};
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java index cdeeb5ec7b7..87bb35c3a42 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLDocumentProvider.java @@ -82,7 +82,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
IEditorInput editorInput = (IEditorInput)element;
IDiagramDocument document = (IDiagramDocument)createDocument(editorInput);
-
ResourceSetInfo info = new ResourceSetInfo(document, editorInput);
info.setModificationStamp(computeModificationStamp(info));
info.fStatus = null;
@@ -175,9 +174,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi public void setTarget(Notifier newTarget) {
myTarger = newTarget;
}
-
});
-
return editingDomain;
}
@@ -201,7 +198,8 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
if(!resource.isLoaded()) {
try {
- Map options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ Map<?, ?> options = new HashMap(GMFResourceFactory.getDefaultLoadOptions());
// @see 171060
// options.put(org.eclipse.emf.ecore.xmi.XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
resource.load(options);
@@ -217,7 +215,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi return;
}
} else {
- for(Iterator it = resource.getContents().iterator(); it.hasNext();) {
+ for(Iterator<EObject> it = resource.getContents().iterator(); it.hasNext();) {
Object rootElement = it.next();
if(rootElement instanceof Diagram) {
document.setContent((Diagram)rootElement);
@@ -302,7 +300,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
ResourcesPlugin.getWorkspace().validateEdit((IFile[])files2Validate.toArray(new IFile[files2Validate.size()]), computationContext);
}
-
super.doValidateState(element, computationContext);
}
@@ -474,7 +471,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi private ISchedulingRule computeSchedulingRule(IResource toCreateOrModify) {
if(toCreateOrModify.exists())
return ResourcesPlugin.getWorkspace().getRuleFactory().modifyRule(toCreateOrModify);
-
IResource parent = toCreateOrModify;
do {
/*
@@ -486,7 +482,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi toCreateOrModify = parent;
parent = toCreateOrModify.getParent();
} while(parent != null && !parent.exists());
-
return ResourcesPlugin.getWorkspace().getRuleFactory().createRule(toCreateOrModify);
}
@@ -594,7 +589,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
}
changedResource.unload();
-
fireElementContentAboutToBeReplaced(info.getEditorInput());
removeUnchangedElementListeners(info.getEditorInput(), info);
info.fStatus = null;
@@ -914,9 +908,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
return true;
}
-
}
-
}
/**
@@ -954,7 +946,7 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi Resource resource = (Resource)notification.getNotifier();
if(resource.isLoaded()) {
boolean modified = false;
- for(Iterator/*<org.eclipse.emf.ecore.resource.Resource>*/it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
+ for(Iterator<Resource> it = myInfo.getLoadedResourcesIterator(); it.hasNext() && !modified;) {
Resource nextResource = (Resource)it.next();
if(nextResource.isLoaded()) {
modified = nextResource.isModified();
@@ -972,7 +964,6 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
if(dirtyStateChanged) {
fireElementDirtyStateChanged(myInfo.getEditorInput(), modified);
-
if(!modified) {
myInfo.setModificationStamp(computeModificationStamp(myInfo));
}
@@ -981,7 +972,5 @@ public class UMLDocumentProvider extends AbstractDocumentProvider implements IDi }
}
}
-
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java index 1d39ac68774..c44b651a22b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLLinkDescriptor.java @@ -35,5 +35,4 @@ public class UMLLinkDescriptor extends UpdaterLinkDescriptor { public UMLLinkDescriptor(EObject source, EObject destination, EObject linkElement, IElementType elementType, int linkVID) {
super(source, destination, linkElement, elementType, linkVID);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java index 04b4b5e1774..88943a00002 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLMatchingStrategy.java @@ -34,7 +34,6 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy { } catch (PartInitException e) {
return false;
}
-
if(editorInput.equals(input)) {
return true;
}
@@ -43,5 +42,4 @@ public class UMLMatchingStrategy implements IEditorMatchingStrategy { }
return false;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java index 00ec67372c5..e87dc2e8c5b 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNewDiagramFileWizard.java @@ -69,7 +69,6 @@ public class UMLNewDiagramFileWizard extends Wizard { assert domainModelURI != null : "Domain model uri must be specified"; //$NON-NLS-1$
assert diagramRoot != null : "Doagram root element must be specified"; //$NON-NLS-1$
assert editingDomain != null : "Editing domain must be specified"; //$NON-NLS-1$
-
myFileCreationPage = new WizardNewFileCreationPage(Messages.UMLNewDiagramFileWizard_CreationPageName, StructuredSelection.EMPTY);
myFileCreationPage.setTitle(Messages.UMLNewDiagramFileWizard_CreationPageTitle);
myFileCreationPage.setDescription(NLS.bind(Messages.UMLNewDiagramFileWizard_CreationPageDescription, ProfileDiagramEditPart.MODEL_ID));
@@ -85,12 +84,10 @@ public class UMLNewDiagramFileWizard extends Wizard { }
myFileCreationPage.setContainerFullPath(filePath);
myFileCreationPage.setFileName(UMLDiagramEditorUtil.getUniqueFileName(filePath, fileName, "PapyrusUMLProfile_diagram")); //$NON-NLS-1$
-
diagramRootElementSelectionPage = new DiagramRootElementSelectionPage(Messages.UMLNewDiagramFileWizard_RootSelectionPageName);
diagramRootElementSelectionPage.setTitle(Messages.UMLNewDiagramFileWizard_RootSelectionPageTitle);
diagramRootElementSelectionPage.setDescription(Messages.UMLNewDiagramFileWizard_RootSelectionPageDescription);
diagramRootElementSelectionPage.setModelElement(diagramRoot);
-
myEditingDomain = editingDomain;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java index 3c5b5af9ebd..efbb87c9759 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLNodeDescriptor.java @@ -27,5 +27,4 @@ public class UMLNodeDescriptor extends UpdaterNodeDescriptor { public UMLNodeDescriptor(EObject modelElement, int visualID) {
super(modelElement, visualID);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java index 63817582520..279c01fdaa2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLPaletteFactory.java @@ -29,7 +29,6 @@ import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes; public class UMLPaletteFactory extends PaletteFactory.Adapter {
//RS: New Palette generation
-
//Generates the ID for the tool elements
//Generate the tool factory (if(ID) createtool...)
/**
@@ -60,37 +59,42 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private final static String CREATEIMPORTMETACLASS6CREATIONTOOL = "createImportMetaclass6CreationTool";//$NON-NLS-1$
+ private final static String CREATECLASS6CREATIONTOOL = "createClass6CreationTool";//$NON-NLS-1$
+
+ /**
+ * @generated
+ */
+ private final static String CREATEIMPORTMETACLASS7CREATIONTOOL = "createImportMetaclass7CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEENUMERATION7CREATIONTOOL = "createEnumeration7CreationTool";//$NON-NLS-1$
+ private final static String CREATEENUMERATION8CREATIONTOOL = "createEnumeration8CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEDATATYPE8CREATIONTOOL = "createDataType8CreationTool";//$NON-NLS-1$
+ private final static String CREATEDATATYPE9CREATIONTOOL = "createDataType9CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEPRIMITIVETYPE9CREATIONTOOL = "createPrimitiveType9CreationTool";//$NON-NLS-1$
+ private final static String CREATEPRIMITIVETYPE10CREATIONTOOL = "createPrimitiveType10CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEPROPERTY10CREATIONTOOL = "createProperty10CreationTool";//$NON-NLS-1$
+ private final static String CREATEPROPERTY11CREATIONTOOL = "createProperty11CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEOPERATION11CREATIONTOOL = "createOperation11CreationTool";//$NON-NLS-1$
+ private final static String CREATEOPERATION12CREATIONTOOL = "createOperation12CreationTool";//$NON-NLS-1$
/**
* @generated
*/
- private final static String CREATEENUMERATIONLITERAL12CREATIONTOOL = "createEnumerationLiteral12CreationTool";//$NON-NLS-1$
+ private final static String CREATEENUMERATIONLITERAL13CREATIONTOOL = "createEnumerationLiteral13CreationTool";//$NON-NLS-1$
/**
* @generated
@@ -126,7 +130,6 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { * @generated
*/
public UMLPaletteFactory() {
-
}
/**
@@ -148,26 +151,29 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { if(toolId.equals(CREATESTEREOTYPE5CREATIONTOOL)) {
return createStereotype5CreationTool();
}
- if(toolId.equals(CREATEIMPORTMETACLASS6CREATIONTOOL)) {
- return createImportMetaclass6CreationTool();
+ if(toolId.equals(CREATECLASS6CREATIONTOOL)) {
+ return createClass6CreationTool();
+ }
+ if(toolId.equals(CREATEIMPORTMETACLASS7CREATIONTOOL)) {
+ return createImportMetaclass7CreationTool();
}
- if(toolId.equals(CREATEENUMERATION7CREATIONTOOL)) {
- return createEnumeration7CreationTool();
+ if(toolId.equals(CREATEENUMERATION8CREATIONTOOL)) {
+ return createEnumeration8CreationTool();
}
- if(toolId.equals(CREATEDATATYPE8CREATIONTOOL)) {
- return createDataType8CreationTool();
+ if(toolId.equals(CREATEDATATYPE9CREATIONTOOL)) {
+ return createDataType9CreationTool();
}
- if(toolId.equals(CREATEPRIMITIVETYPE9CREATIONTOOL)) {
- return createPrimitiveType9CreationTool();
+ if(toolId.equals(CREATEPRIMITIVETYPE10CREATIONTOOL)) {
+ return createPrimitiveType10CreationTool();
}
- if(toolId.equals(CREATEPROPERTY10CREATIONTOOL)) {
- return createProperty10CreationTool();
+ if(toolId.equals(CREATEPROPERTY11CREATIONTOOL)) {
+ return createProperty11CreationTool();
}
- if(toolId.equals(CREATEOPERATION11CREATIONTOOL)) {
- return createOperation11CreationTool();
+ if(toolId.equals(CREATEOPERATION12CREATIONTOOL)) {
+ return createOperation12CreationTool();
}
- if(toolId.equals(CREATEENUMERATIONLITERAL12CREATIONTOOL)) {
- return createEnumerationLiteral12CreationTool();
+ if(toolId.equals(CREATEENUMERATIONLITERAL13CREATIONTOOL)) {
+ return createEnumerationLiteral13CreationTool();
}
if(toolId.equals(CREATEEXTENSION1CREATIONTOOL)) {
return createExtension1CreationTool();
@@ -195,12 +201,10 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { * @generated
*/
public Object getTemplate(String templateId) {
-
// default return: null
return null;
}
-
/**
* @generated
*/
@@ -259,7 +263,18 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createImportMetaclass6CreationTool() {
+ private Tool createClass6CreationTool() {
+ List<IElementType> types = new ArrayList<IElementType>(2);
+ types.add(UMLElementTypes.Class_3010);
+ types.add(UMLElementTypes.Class_2008);
+ Tool tool = new AspectUnspecifiedTypeCreationTool(types);
+ return tool;
+ }
+
+ /**
+ * @generated
+ */
+ private Tool createImportMetaclass7CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Class_1031);
types.add(UMLElementTypes.Class_3028);
@@ -270,7 +285,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createEnumeration7CreationTool() {
+ private Tool createEnumeration8CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Enumeration_2006);
types.add(UMLElementTypes.Enumeration_3025);
@@ -281,7 +296,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createDataType8CreationTool() {
+ private Tool createDataType9CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.DataType_2010);
types.add(UMLElementTypes.DataType_3027);
@@ -292,7 +307,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createPrimitiveType9CreationTool() {
+ private Tool createPrimitiveType10CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.PrimitiveType_2009);
types.add(UMLElementTypes.PrimitiveType_3026);
@@ -303,7 +318,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createProperty10CreationTool() {
+ private Tool createProperty11CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Property_3002);
types.add(UMLElementTypes.Property_3018);
@@ -314,7 +329,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createOperation11CreationTool() {
+ private Tool createOperation12CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(2);
types.add(UMLElementTypes.Operation_3019);
types.add(UMLElementTypes.Operation_3020);
@@ -325,7 +340,7 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { /**
* @generated
*/
- private Tool createEnumerationLiteral12CreationTool() {
+ private Tool createEnumerationLiteral13CreationTool() {
List<IElementType> types = new ArrayList<IElementType>(1);
types.add(UMLElementTypes.EnumerationLiteral_1037);
Tool tool = new AspectUnspecifiedTypeCreationTool(types);
@@ -392,5 +407,4 @@ public class UMLPaletteFactory extends PaletteFactory.Adapter { Tool tool = new AspectUnspecifiedTypeConnectionTool(types);
return tool;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java index 7c120b80806..ac59ee8cfcd 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLUriEditorInputTester.java @@ -31,5 +31,4 @@ public class UMLUriEditorInputTester extends PropertyTester { URIEditorInput editorInput = (URIEditorInput)receiver;
return "PapyrusUMLProfile_diagram".equals(editorInput.getURI().fileExtension()); //$NON-NLS-1$
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java index 6c3c15617b8..d4e0a3bd232 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/UMLVisualIDRegistry.java @@ -1,15 +1,15 @@ /*
* Copyright (c) 2014 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are 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:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *
+ *
+ *
*/
package org.eclipse.papyrus.uml.diagram.profile.part;
@@ -20,106 +20,20 @@ import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.gmf.runtime.notation.NotationPackage;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.gmf.tooling.runtime.structure.DiagramStructure;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AppliedStereotypeElementImportEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchMultiplicityEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchRoleEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationMultiplicitySourceEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationMultiplicityTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleSourceEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleTargetEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintBodyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintBodyEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ConstraintNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeAttributeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypeOperationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DataTypePropertyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyBranchEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DependencyNodeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.DiagramNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportAliasEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ElementImportEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationEnumerationLiteralCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationLiteralEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.EnumerationNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ExtensionEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.GeneralizationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MetaclassNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ModelPackageableElementCompartmentEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.MultiDependencyLabelEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportAppliedStereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageImportEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackageNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PackagePackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.PrimitiveTypeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileApplicationEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfileNameEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ProfilePackageableElementCompartmentEditPartTN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ShortCutDiagramEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeAttributeCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeAttributeCompartmentEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeNameEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeNameEditPartCN;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeOperationCompartmentEditPart;
-import org.eclipse.papyrus.uml.diagram.profile.edit.parts.StereotypeOperationCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.common.util.Util;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.*;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Type;
import org.eclipse.uml2.uml.UMLPackage;
/**
* This registry is used to determine which type of visual object should be
* created for the corresponding Diagram, Node, ChildNode or Link represented
* by a domain model object.
- *
+ *
* @generated
*/
public class UMLVisualIDRegistry {
@@ -151,7 +65,7 @@ public class UMLVisualIDRegistry { while(view != diagram) {
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if(annotation != null) {
- return (String)annotation.getDetails().get("modelID"); //$NON-NLS-1$
+ return annotation.getDetails().get("modelID"); //$NON-NLS-1$
}
view = (View)view.eContainer();
}
@@ -190,7 +104,8 @@ public class UMLVisualIDRegistry { }
/**
- * @generated
+ * @generated NOT
+ * we manually test if it's a class or a metaclass
*/
public static int getNodeVisualID(View containerView, EObject domainElement) {
if(domainElement == null) {
@@ -222,7 +137,12 @@ public class UMLVisualIDRegistry { return StereotypeEditPart.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
- return MetaclassEditPart.VISUAL_ID;
+ if(domainElement instanceof Type) {
+ if(Util.isMetaclass((Type)domainElement)) {
+ return MetaclassEditPart.VISUAL_ID;
+ }
+ }
+ return ClassEditPart.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
return CommentEditPart.VISUAL_ID;
@@ -285,6 +205,9 @@ public class UMLVisualIDRegistry { if(UMLPackage.eINSTANCE.getStereotype().isSuperTypeOf(domainElement.eClass())) {
return StereotypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
@@ -314,6 +237,9 @@ public class UMLVisualIDRegistry { if(UMLPackage.eINSTANCE.getStereotype().isSuperTypeOf(domainElement.eClass())) {
return StereotypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getStereotype().isSuperTypeOf(domainElement.eClass())) {
@@ -344,7 +270,12 @@ public class UMLVisualIDRegistry { return CommentEditPartCN.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
- return MetaclassEditPartCN.VISUAL_ID;
+ if(domainElement instanceof Type) {
+ if(Util.isMetaclass((Type)domainElement)) {
+ return MetaclassEditPartCN.VISUAL_ID;
+ }
+ }
+ return ClassEditPartCN.VISUAL_ID;
}
break;
case ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID:
@@ -376,7 +307,12 @@ public class UMLVisualIDRegistry { return CommentEditPartCN.VISUAL_ID;
}
if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
- return MetaclassEditPartCN.VISUAL_ID;
+ if(domainElement instanceof Type) {
+ if(Util.isMetaclass((Type)domainElement)) {
+ return MetaclassEditPartCN.VISUAL_ID;
+ }
+ }
+ return ClassEditPartCN.VISUAL_ID;
}
break;
case StereotypeAttributeCompartmentEditPart.VISUAL_ID:
@@ -424,6 +360,9 @@ public class UMLVisualIDRegistry { if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getComment().isSuperTypeOf(domainElement.eClass())) {
@@ -450,6 +389,9 @@ public class UMLVisualIDRegistry { if(UMLPackage.eINSTANCE.getDataType().isSuperTypeOf(domainElement.eClass())) {
return DataTypeEditPartCN.VISUAL_ID;
}
+ if(UMLPackage.eINSTANCE.getClass_().isSuperTypeOf(domainElement.eClass())) {
+ return ClassEditPartCN.VISUAL_ID;
+ }
break;
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
if(UMLPackage.eINSTANCE.getEnumerationLiteral().isSuperTypeOf(domainElement.eClass())) {
@@ -481,6 +423,26 @@ public class UMLVisualIDRegistry { return DataTypeOperationEditPart.VISUAL_ID;
}
break;
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
+ return ClassPropertyEditPart.VISUAL_ID;
+ }
+ break;
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getProperty().isSuperTypeOf(domainElement.eClass())) {
+ return ClassPropertyEditPart.VISUAL_ID;
+ }
+ break;
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
+ return ClassOperationEditPart.VISUAL_ID;
+ }
+ break;
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ if(UMLPackage.eINSTANCE.getOperation().isSuperTypeOf(domainElement.eClass())) {
+ return ClassOperationEditPart.VISUAL_ID;
+ }
+ break;
}
return -1;
}
@@ -514,6 +476,9 @@ public class UMLVisualIDRegistry { if(StereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
if(MetaclassEditPart.VISUAL_ID == nodeVisualID) {
return true;
}
@@ -561,6 +526,17 @@ public class UMLVisualIDRegistry { return true;
}
break;
+ case ClassEditPart.VISUAL_ID:
+ if(ClassNameEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassOperationCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassAttributeCompartmentEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case MetaclassEditPart.VISUAL_ID:
if(MetaclassNameEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -648,6 +624,17 @@ public class UMLVisualIDRegistry { return true;
}
break;
+ case ClassEditPartCN.VISUAL_ID:
+ if(ClassNameEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassAttributeCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ if(ClassOperationCompartmentEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case MetaclassEditPartCN.VISUAL_ID:
if(MetaclassNameEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
@@ -740,6 +727,9 @@ public class UMLVisualIDRegistry { if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case PackagePackageableElementCompartmentEditPartCN.VISUAL_ID:
if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -769,6 +759,9 @@ public class UMLVisualIDRegistry { if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID:
if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -801,6 +794,9 @@ public class UMLVisualIDRegistry { if(MetaclassEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID:
if(StereotypeEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -833,6 +829,9 @@ public class UMLVisualIDRegistry { if(MetaclassEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case StereotypeAttributeCompartmentEditPart.VISUAL_ID:
if(ClassPropertyEditPart.VISUAL_ID == nodeVisualID) {
@@ -879,6 +878,9 @@ public class UMLVisualIDRegistry { if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case ModelPackageableElementCompartmentEditPartCN.VISUAL_ID:
if(CommentEditPartCN.VISUAL_ID == nodeVisualID) {
@@ -905,6 +907,9 @@ public class UMLVisualIDRegistry { if(DataTypeEditPartCN.VISUAL_ID == nodeVisualID) {
return true;
}
+ if(ClassEditPartCN.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
break;
case EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID:
if(EnumerationLiteralEditPart.VISUAL_ID == nodeVisualID) {
@@ -936,6 +941,26 @@ public class UMLVisualIDRegistry { return true;
}
break;
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ if(ClassPropertyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ if(ClassPropertyEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ if(ClassOperationEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
+ if(ClassOperationEditPart.VISUAL_ID == nodeVisualID) {
+ return true;
+ }
+ break;
case AssociationEditPart.VISUAL_ID:
if(AssociationAppliedStereotypeEditPart.VISUAL_ID == nodeVisualID) {
return true;
@@ -1034,14 +1059,13 @@ public class UMLVisualIDRegistry { /**
* User can change implementation of this method to handle some specific
* situations not covered by default logic.
- *
+ *
* @generated
*/
private static boolean isDiagram(Profile element) {
return true;
}
-
/**
* @generated
*/
@@ -1075,6 +1099,10 @@ public class UMLVisualIDRegistry { case DataTypeAttributeCompartmentEditPartCN.VISUAL_ID:
case DataTypeOperationCompartmentEditPart.VISUAL_ID:
case DataTypeOperationCompartmentEditPartCN.VISUAL_ID:
+ case ClassAttributeCompartmentEditPart.VISUAL_ID:
+ case ClassAttributeCompartmentEditPartCN.VISUAL_ID:
+ case ClassOperationCompartmentEditPart.VISUAL_ID:
+ case ClassOperationCompartmentEditPartCN.VISUAL_ID:
return true;
default:
break;
@@ -1165,5 +1193,4 @@ public class UMLVisualIDRegistry { return org.eclipse.papyrus.uml.diagram.profile.part.UMLVisualIDRegistry.isSemanticLeafVisualID(visualID);
}
};
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java index 3146d914afd..248915ad7d2 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/part/ValidateAction.java @@ -44,6 +44,8 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLMarkerNavigationProvider;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLValidationProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
@@ -110,7 +112,11 @@ public class ValidateAction extends Action { * @generated
*/
public static void runNonUIValidation(View view) {
- DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram());
+ Shell shell = Display.getCurrent().getActiveShell();
+ if(shell == null) {
+ shell = new Shell();
+ }
+ DiagramEditPart diagramEditPart = OffscreenEditPartFactory.getInstance().createDiagramEditPart(view.getDiagram(), shell);
runValidation(diagramEditPart, view);
}
@@ -187,11 +193,11 @@ public class ValidateAction extends Action { return;
}
final Diagnostic rootStatus = emfValidationStatus;
- List allDiagnostics = new ArrayList();
+ List<Diagnostic> allDiagnostics = new ArrayList<Diagnostic>();
UMLDiagramEditorUtil.LazyElement2ViewMap element2ViewMap = new UMLDiagramEditorUtil.LazyElement2ViewMap(diagramEditPart.getDiagramView(), collectTargetElements(rootStatus, new HashSet<EObject>(), allDiagnostics));
- for(Iterator it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
+ for(Iterator<Diagnostic> it = emfValidationStatus.getChildren().iterator(); it.hasNext();) {
Diagnostic nextDiagnostic = (Diagnostic)it.next();
- List data = nextDiagnostic.getData();
+ List<?> data = nextDiagnostic.getData();
if(data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
EObject element = (EObject)data.get(0);
View view = UMLDiagramEditorUtil.findView(diagramEditPart, element, element2ViewMap);
@@ -229,10 +235,10 @@ public class ValidateAction extends Action { /**
* @generated
*/
- private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List allConstraintStatuses) {
+ private static Set<EObject> collectTargetElements(IStatus status, Set<EObject> targetElementCollector, List<IConstraintStatus> allConstraintStatuses) {
if(status instanceof IConstraintStatus) {
targetElementCollector.add(((IConstraintStatus)status).getTarget());
- allConstraintStatuses.add(status);
+ allConstraintStatuses.add((IConstraintStatus)status);
}
if(status.isMultiStatus()) {
IStatus[] children = status.getChildren();
@@ -246,8 +252,8 @@ public class ValidateAction extends Action { /**
* @generated
*/
- private static Set<EObject> collectTargetElements(Diagnostic diagnostic, Set<EObject> targetElementCollector, List allDiagnostics) {
- List data = diagnostic.getData();
+ private static Set<EObject> collectTargetElements(Diagnostic diagnostic, Set<EObject> targetElementCollector, List<Diagnostic> allDiagnostics) {
+ List<?> data = diagnostic.getData();
EObject target = null;
if(data != null && !data.isEmpty() && data.get(0) instanceof EObject) {
target = (EObject)data.get(0);
@@ -255,7 +261,7 @@ public class ValidateAction extends Action { allDiagnostics.add(diagnostic);
}
if(diagnostic.getChildren() != null && !diagnostic.getChildren().isEmpty()) {
- for(Iterator it = diagnostic.getChildren().iterator(); it.hasNext();) {
+ for(Iterator<Diagnostic> it = diagnostic.getChildren().iterator(); it.hasNext();) {
collectTargetElements((Diagnostic)it.next(), targetElementCollector, allDiagnostics);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java index cc7f6ac9ebc..ce263b55df9 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/preferences/DiagramPreferenceInitializer.java @@ -32,7 +32,6 @@ public class DiagramPreferenceInitializer extends AbstractPreferenceInitializer DiagramConnectionsPreferencePage.initDefaults(store);
DiagramPrintingPreferencePage.initDefaults(store);
DiagramRulersAndGridPreferencePage.initDefaults(store);
-
}
/**
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java index da96e10a479..bddde53be59 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/ElementInitializers.java @@ -59,6 +59,18 @@ public class ElementInitializers { /**
* @generated
*/
+ public void init_Class_2008(Class instance) {
+ try {
+ Object value_0 = name_Class_2008(instance);
+ instance.setName((String)value_0);
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
public void init_Class_1031(Class instance) {
try {
Object value_0 = isAbstract_Class_1031(instance);
@@ -253,6 +265,18 @@ public class ElementInitializers { /**
* @generated
*/
+ public void init_Class_3010(Class instance) {
+ try {
+ Object value_0 = name_Class_3010(instance);
+ instance.setName((String)value_0);
+ } catch (RuntimeException e) {
+ UMLDiagramEditorPlugin.getInstance().logError("Element initialization failed", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * @generated
+ */
public void init_Class_3028(Class instance) {
try {
Object value_0 = isAbstract_Class_3028(instance);
@@ -406,6 +430,13 @@ public class ElementInitializers { /**
* @generated
*/
+ private String name_Class_2008(Class it) {
+ return NamedElementUtil.getDefaultNameWithIncrementFromBase(it.eClass().getName(), it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
private Boolean isAbstract_Class_1031(Class it) {
//isAbstract = true
return true;
@@ -528,6 +559,13 @@ public class ElementInitializers { /**
* @generated
*/
+ private String name_Class_3010(Class it) {
+ return NamedElementUtil.getDefaultNameWithIncrementFromBase(it.eClass().getName(), it.getOwner().eContents());
+ }
+
+ /**
+ * @generated
+ */
private Boolean isAbstract_Class_3028(Class it) {
//isAbstract = true
return true;
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java index 13dfbd0f678..c83ae8d346c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLEditPartProvider.java @@ -29,5 +29,4 @@ public class UMLEditPartProvider extends DefaultEditPartProvider { public UMLEditPartProvider() {
super(new UMLEditPartFactory(), UMLVisualIDRegistry.TYPED_INSTANCE, ProfileDiagramEditPart.MODEL_ID);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java index 17b64c344a1..88aef624dc4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLElementTypes.java @@ -29,6 +29,8 @@ import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNodeEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentAnnotatedElementEditPart;
@@ -120,6 +122,11 @@ public class UMLElementTypes { /**
* @generated
*/
+ public static final IElementType Class_2008 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Class_2008"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Class_1031 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Metaclass_1031"); //$NON-NLS-1$
/**
@@ -205,6 +212,11 @@ public class UMLElementTypes { /**
* @generated
*/
+ public static final IElementType Class_3010 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Class_3010"); //$NON-NLS-1$
+
+ /**
+ * @generated
+ */
public static final IElementType Class_3028 = getElementType("org.eclipse.papyrus.uml.diagram.profile.Metaclass_3028"); //$NON-NLS-1$
/**
@@ -339,124 +351,48 @@ public class UMLElementTypes { Object type = hint.getAdapter(IElementType.class);
if(elements == null) {
elements = new IdentityHashMap<IElementType, ENamedElement>();
-
elements.put(Profile_1000, UMLPackage.eINSTANCE.getProfile());
-
-
elements.put(Dependency_2014, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Association_2015, UMLPackage.eINSTANCE.getAssociation());
-
-
elements.put(Stereotype_1026, UMLPackage.eINSTANCE.getStereotype());
-
-
+ elements.put(Class_2008, UMLPackage.eINSTANCE.getClass_());
elements.put(Class_1031, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Comment_1002, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(Constraint_1014, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Model_2005, UMLPackage.eINSTANCE.getModel());
-
-
elements.put(Profile_1030, UMLPackage.eINSTANCE.getProfile());
-
-
elements.put(Package_2007, UMLPackage.eINSTANCE.getPackage());
-
-
elements.put(Enumeration_2006, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(PrimitiveType_2009, UMLPackage.eINSTANCE.getPrimitiveType());
-
-
elements.put(DataType_2010, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Diagram_2016, NotationPackage.eINSTANCE.getDiagram());
-
-
elements.put(PrimitiveType_3026, UMLPackage.eINSTANCE.getPrimitiveType());
-
-
elements.put(Operation_3019, UMLPackage.eINSTANCE.getOperation());
-
-
elements.put(EnumerationLiteral_1037, UMLPackage.eINSTANCE.getEnumerationLiteral());
-
-
elements.put(Property_3018, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(Property_3002, UMLPackage.eINSTANCE.getProperty());
-
-
elements.put(Operation_3020, UMLPackage.eINSTANCE.getOperation());
-
-
elements.put(Stereotype_1023, UMLPackage.eINSTANCE.getStereotype());
-
-
+ elements.put(Class_3010, UMLPackage.eINSTANCE.getClass_());
elements.put(Class_3028, UMLPackage.eINSTANCE.getClass_());
-
-
elements.put(Comment_1007, UMLPackage.eINSTANCE.getComment());
-
-
elements.put(Model_1027, UMLPackage.eINSTANCE.getModel());
-
-
elements.put(Profile_1024, UMLPackage.eINSTANCE.getProfile());
-
-
elements.put(Package_1012, UMLPackage.eINSTANCE.getPackage());
-
-
elements.put(Constraint_1028, UMLPackage.eINSTANCE.getConstraint());
-
-
elements.put(Enumeration_3025, UMLPackage.eINSTANCE.getEnumeration());
-
-
elements.put(DataType_3027, UMLPackage.eINSTANCE.getDataType());
-
-
elements.put(Extension_1013, UMLPackage.eINSTANCE.getExtension());
-
-
elements.put(Association_4001, UMLPackage.eINSTANCE.getAssociation());
-
-
elements.put(ProfileApplication_1045, UMLPackage.eINSTANCE.getProfileApplication());
-
-
elements.put(Association_4019, UMLPackage.eINSTANCE.getAssociation());
-
-
elements.put(Generalization_4002, UMLPackage.eINSTANCE.getGeneralization());
-
-
elements.put(Dependency_4008, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(Dependency_4018, UMLPackage.eINSTANCE.getDependency());
-
-
elements.put(ElementImport_1064, UMLPackage.eINSTANCE.getElementImport());
-
-
elements.put(PackageImport_1065, UMLPackage.eINSTANCE.getPackageImport());
-
elements.put(CommentAnnotatedElement_1022, UMLPackage.eINSTANCE.getComment_AnnotatedElement());
-
elements.put(ConstraintConstrainedElement_4014, UMLPackage.eINSTANCE.getConstraint_ConstrainedElement());
-
elements.put(ConstraintContext_8500, UMLPackage.eINSTANCE.getConstraint_Context());
}
return (ENamedElement)elements.get(type);
@@ -479,6 +415,7 @@ public class UMLElementTypes { KNOWN_ELEMENT_TYPES.add(Dependency_2014);
KNOWN_ELEMENT_TYPES.add(Association_2015);
KNOWN_ELEMENT_TYPES.add(Stereotype_1026);
+ KNOWN_ELEMENT_TYPES.add(Class_2008);
KNOWN_ELEMENT_TYPES.add(Class_1031);
KNOWN_ELEMENT_TYPES.add(Comment_1002);
KNOWN_ELEMENT_TYPES.add(Constraint_1014);
@@ -496,6 +433,7 @@ public class UMLElementTypes { KNOWN_ELEMENT_TYPES.add(Property_3002);
KNOWN_ELEMENT_TYPES.add(Operation_3020);
KNOWN_ELEMENT_TYPES.add(Stereotype_1023);
+ KNOWN_ELEMENT_TYPES.add(Class_3010);
KNOWN_ELEMENT_TYPES.add(Class_3028);
KNOWN_ELEMENT_TYPES.add(Comment_1007);
KNOWN_ELEMENT_TYPES.add(Model_1027);
@@ -533,6 +471,8 @@ public class UMLElementTypes { return Association_2015;
case StereotypeEditPart.VISUAL_ID:
return Stereotype_1026;
+ case ClassEditPart.VISUAL_ID:
+ return Class_2008;
case MetaclassEditPart.VISUAL_ID:
return Class_1031;
case CommentEditPart.VISUAL_ID:
@@ -567,6 +507,8 @@ public class UMLElementTypes { return Operation_3020;
case StereotypeEditPartCN.VISUAL_ID:
return Stereotype_1023;
+ case ClassEditPartCN.VISUAL_ID:
+ return Class_3010;
case MetaclassEditPartCN.VISUAL_ID:
return Class_3028;
case CommentEditPartCN.VISUAL_ID:
@@ -640,5 +582,4 @@ public class UMLElementTypes { return org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes.getElement(elementTypeAdapter);
}
};
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java index 9a67e717fd2..cdcac28418c 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLIconProvider.java @@ -27,5 +27,4 @@ public class UMLIconProvider extends DefaultElementTypeIconProvider implements I public UMLIconProvider() {
super(UMLElementTypes.TYPED_INSTANCE);
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java index 785345d5a01..64e73b4312f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLParserProvider.java @@ -38,6 +38,8 @@ import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationMultiplicit import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationNameEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleSourceEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationRoleTargetEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPart;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassNameEditPartCN;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassOperationEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.ClassPropertyEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.CommentBodyEditPart;
@@ -118,6 +120,23 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid /**
* @generated
*/
+ private IParser className_5029Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassName_5029Parser() {
+ if(className_5029Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ className_5029Parser = parser;
+ }
+ return className_5029Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser className_1084Parser;
/**
@@ -420,6 +439,23 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid /**
* @generated
*/
+ private IParser className_5014Parser;
+
+ /**
+ * @generated
+ */
+ private IParser getClassName_5014Parser() {
+ if(className_5014Parser == null) {
+ EAttribute[] features = new EAttribute[]{ UMLPackage.eINSTANCE.getNamedElement_Name() };
+ MessageFormatParser parser = new MessageFormatParser(features);
+ className_5014Parser = parser;
+ }
+ return className_5014Parser;
+ }
+
+ /**
+ * @generated
+ */
private IParser className_5062Parser;
/**
@@ -806,6 +842,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid return getDependencyName_1Parser();
case StereotypeNameEditPart.VISUAL_ID:
return getStereotypeName_1034Parser();
+ case ClassNameEditPart.VISUAL_ID:
+ return getClassName_5029Parser();
case MetaclassNameEditPart.VISUAL_ID:
return getClassName_1084Parser();
case CommentBodyEditPart.VISUAL_ID:
@@ -842,6 +880,8 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid return getOperation_3020Parser();
case StereotypeNameEditPartCN.VISUAL_ID:
return getStereotypeName_1046Parser();
+ case ClassNameEditPartCN.VISUAL_ID:
+ return getClassName_5014Parser();
case MetaclassNameEditPartCN.VISUAL_ID:
return getClassName_5062Parser();
case CommentBodyEditPartCN.VISUAL_ID:
@@ -956,5 +996,4 @@ public class UMLParserProvider extends AbstractProvider implements IParserProvid return super.getAdapter(adapter);
}
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java index c2080483711..e05c89cb8ea 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationDecoratorProvider.java @@ -68,6 +68,4 @@ public class UMLValidationDecoratorProvider extends ValidationDecoratorProvider View view = (View)decoratorTarget.getAdapter(View.class);
return view != null && ProfileDiagramEditPart.MODEL_ID.equals(UMLVisualIDRegistry.getModelID(view));
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java index 6df12be1728..99d87b6323f 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLValidationProvider.java @@ -75,8 +75,4 @@ public class UMLValidationProvider { }
return true;
}
-
-
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java index 427768c049b..e91706e7bee 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/providers/UMLViewProvider.java @@ -58,6 +58,7 @@ import org.eclipse.papyrus.infra.extendedtypes.util.ElementTypeUtils; import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
import org.eclipse.papyrus.infra.gmfdiag.preferences.utils.GradientPreferenceConverter;
import org.eclipse.papyrus.uml.diagram.common.helper.PreferenceInitializerForElementHelper;
+import org.eclipse.papyrus.uml.diagram.profile.edit.parts.*;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AppliedStereotypeElementImportEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationAppliedStereotypeEditPart;
import org.eclipse.papyrus.uml.diagram.profile.edit.parts.AssociationBranchEditPart;
@@ -190,18 +191,15 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { if (op.getViewKind() == Edge.class)
return getEdgeViewClass(op.getSemanticAdapter(), op.getContainerView(), op.getSemanticHint()) != null;
*/
-
// check Diagram Type should be the class diagram
String modelID = UMLVisualIDRegistry.getModelID(op.getContainerView());
if(!getDiagramProvidedId().equals(modelID)) {
return false;
}
-
int visualID = UMLVisualIDRegistry.getVisualID(op.getSemanticHint());
if(Node.class.isAssignableFrom(op.getViewKind())) {
return UMLVisualIDRegistry.canCreateNode(op.getContainerView(), visualID);
}
-
return true;
}
@@ -273,6 +271,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { case DependencyNodeEditPart.VISUAL_ID:
case AssociationNodeEditPart.VISUAL_ID:
case StereotypeEditPart.VISUAL_ID:
+ case ClassEditPart.VISUAL_ID:
case CommentEditPart.VISUAL_ID:
case ConstraintEditPart.VISUAL_ID:
case ModelEditPartTN.VISUAL_ID:
@@ -294,6 +293,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { case ConstraintEditPartCN.VISUAL_ID:
case MetaclassEditPart.VISUAL_ID:
case PrimitiveTypeEditPart.VISUAL_ID:
+ case ClassEditPartCN.VISUAL_ID:
case ModelEditPartCN.VISUAL_ID:
case ProfileEditPartCN.VISUAL_ID:
case EnumerationEditPartCN.VISUAL_ID:
@@ -307,9 +307,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { }
}
}
- return DependencyNodeEditPart.VISUAL_ID == visualID || AssociationNodeEditPart.VISUAL_ID == visualID || StereotypeEditPart.VISUAL_ID == visualID || MetaclassEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || ModelEditPartTN.VISUAL_ID == visualID || ProfileEditPartTN.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || EnumerationEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPart.VISUAL_ID == visualID || DataTypeEditPart.VISUAL_ID == visualID || ShortCutDiagramEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPartCN.VISUAL_ID == visualID || DataTypeOperationEditPart.VISUAL_ID == visualID || EnumerationLiteralEditPart.VISUAL_ID == visualID || DataTypePropertyEditPart.VISUAL_ID == visualID || ClassPropertyEditPart.VISUAL_ID == visualID || ClassOperationEditPart.VISUAL_ID == visualID || StereotypeEditPartCN.VISUAL_ID == visualID || MetaclassEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || ModelEditPartCN.VISUAL_ID == visualID || ProfileEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID || EnumerationEditPartCN.VISUAL_ID == visualID || DataTypeEditPartCN.VISUAL_ID == visualID;
-
-
+ return DependencyNodeEditPart.VISUAL_ID == visualID || AssociationNodeEditPart.VISUAL_ID == visualID || StereotypeEditPart.VISUAL_ID == visualID || ClassEditPart.VISUAL_ID == visualID || MetaclassEditPart.VISUAL_ID == visualID || CommentEditPart.VISUAL_ID == visualID || ConstraintEditPart.VISUAL_ID == visualID || ModelEditPartTN.VISUAL_ID == visualID || ProfileEditPartTN.VISUAL_ID == visualID || PackageEditPart.VISUAL_ID == visualID || EnumerationEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPart.VISUAL_ID == visualID || DataTypeEditPart.VISUAL_ID == visualID || ShortCutDiagramEditPart.VISUAL_ID == visualID || PrimitiveTypeEditPartCN.VISUAL_ID == visualID || DataTypeOperationEditPart.VISUAL_ID == visualID || EnumerationLiteralEditPart.VISUAL_ID == visualID || DataTypePropertyEditPart.VISUAL_ID == visualID || ClassPropertyEditPart.VISUAL_ID == visualID || ClassOperationEditPart.VISUAL_ID == visualID || StereotypeEditPartCN.VISUAL_ID == visualID || ClassEditPartCN.VISUAL_ID == visualID || MetaclassEditPartCN.VISUAL_ID == visualID || CommentEditPartCN.VISUAL_ID == visualID || ModelEditPartCN.VISUAL_ID == visualID || ProfileEditPartCN.VISUAL_ID == visualID || PackageEditPartCN.VISUAL_ID == visualID || ConstraintEditPartCN.VISUAL_ID == visualID || EnumerationEditPartCN.VISUAL_ID == visualID || DataTypeEditPartCN.VISUAL_ID == visualID;
}
/**
@@ -344,7 +342,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { return true;
}
-
/**
* @generated
*/
@@ -376,6 +373,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { return createAssociation_2015(domainElement, containerView, index, persisted, preferencesHint);
case StereotypeEditPart.VISUAL_ID:
return createStereotype_1026(domainElement, containerView, index, persisted, preferencesHint);
+ case ClassEditPart.VISUAL_ID:
+ return createClass_2008(domainElement, containerView, index, persisted, preferencesHint);
case MetaclassEditPart.VISUAL_ID:
return createClass_1031(domainElement, containerView, index, persisted, preferencesHint);
case CommentEditPart.VISUAL_ID:
@@ -410,6 +409,8 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { return createOperation_3020(domainElement, containerView, index, persisted, preferencesHint);
case StereotypeEditPartCN.VISUAL_ID:
return createStereotype_1023(domainElement, containerView, index, persisted, preferencesHint);
+ case ClassEditPartCN.VISUAL_ID:
+ return createClass_3010(domainElement, containerView, index, persisted, preferencesHint);
case MetaclassEditPartCN.VISUAL_ID:
return createClass_3028(domainElement, containerView, index, persisted, preferencesHint);
case CommentEditPartCN.VISUAL_ID:
@@ -471,9 +472,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
public Node createDependency_2014(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
- node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
- node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(DependencyNodeEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -494,9 +493,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { * @generated
*/
public Node createAssociation_2015(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
- Node node = NotationFactory.eINSTANCE.createNode();
- node.getStyles().add(NotationFactory.eINSTANCE.createDescriptionStyle());
- node.getStyles().add(NotationFactory.eINSTANCE.createFontStyle());
+ Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
node.setType(UMLVisualIDRegistry.getType(AssociationNodeEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
@@ -520,7 +517,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Stereotype");
Node label1034 = createLabel(node, UMLVisualIDRegistry.getType(StereotypeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(StereotypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -532,6 +528,26 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { /**
* @generated
*/
+ public Node createClass_2008(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ClassEditPart.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ stampShortcut(containerView, node);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
+ Node label5029 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPart.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPart.VISUAL_ID), true, true, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
public Node createClass_1031(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
@@ -541,7 +557,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Metaclass");
Node label1084 = createLabel(node, UMLVisualIDRegistry.getType(MetaclassNameEditPart.VISUAL_ID));
return node;
@@ -559,7 +574,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label3 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPart.VISUAL_ID));
return node;
@@ -577,7 +591,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label1015 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPart.VISUAL_ID));
Node label5063 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPart.VISUAL_ID));
@@ -596,7 +609,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Model");
Node label5020 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPartTN.VISUAL_ID), false, true, false, false);
@@ -616,7 +628,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Profile");
Node label1047 = createLabel(node, UMLVisualIDRegistry.getType(ProfileNameEditPartTN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ProfilePackageableElementCompartmentEditPartTN.VISUAL_ID), false, true, false, false);
@@ -636,7 +647,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Package");
Node label5026 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPart.VISUAL_ID), false, true, false, false);
@@ -656,7 +666,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5023 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -676,7 +685,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5032 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPart.VISUAL_ID));
return node;
@@ -694,7 +702,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5035 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPart.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPart.VISUAL_ID), true, true, true, true);
@@ -715,7 +722,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { stampShortcut(containerView, node);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "ShortCutDiagram");
Node label2 = createLabel(node, UMLVisualIDRegistry.getType(DiagramNameEditPart.VISUAL_ID));
label2.setLayoutConstraint(NotationFactory.eINSTANCE.createLocation());
@@ -736,7 +742,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "PrimitiveType");
Node label5058 = createLabel(node, UMLVisualIDRegistry.getType(PrimitiveTypeNameEditPartCN.VISUAL_ID));
return node;
@@ -751,7 +756,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setType(UMLVisualIDRegistry.getType(DataTypeOperationEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Operation");
return node;
@@ -766,7 +770,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setType(UMLVisualIDRegistry.getType(EnumerationLiteralEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "EnumerationLiteral");
return node;
@@ -781,7 +784,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setType(UMLVisualIDRegistry.getType(DataTypePropertyEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
return node;
@@ -796,7 +798,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setType(UMLVisualIDRegistry.getType(ClassPropertyEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Property");
return node;
@@ -811,7 +812,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setType(UMLVisualIDRegistry.getType(ClassOperationEditPart.VISUAL_ID));
ViewUtil.insertChildView(containerView, node, index, persisted);
node.setElement(domainElement);
-
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Operation");
return node;
@@ -828,7 +828,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Stereotype");
Node label1046 = createLabel(node, UMLVisualIDRegistry.getType(StereotypeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(StereotypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -840,6 +839,25 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { /**
* @generated
*/
+ public Node createClass_3010(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
+ Shape node = NotationFactory.eINSTANCE.createShape();
+ node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
+ node.setType(UMLVisualIDRegistry.getType(ClassEditPartCN.VISUAL_ID));
+ ViewUtil.insertChildView(containerView, node, index, persisted);
+ node.setElement(domainElement);
+ // initializeFromPreferences
+ final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
+ PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Class");
+ Node label5014 = createLabel(node, UMLVisualIDRegistry.getType(ClassNameEditPartCN.VISUAL_ID));
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
+ createCompartment(node, UMLVisualIDRegistry.getType(ClassOperationCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
+ PreferenceInitializerForElementHelper.initCompartmentsStatusFromPrefs(node, prefStore, "Class");
+ return node;
+ }
+
+ /**
+ * @generated
+ */
public Node createClass_3028(EObject domainElement, View containerView, int index, boolean persisted, PreferencesHint preferencesHint) {
Shape node = NotationFactory.eINSTANCE.createShape();
node.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
@@ -848,7 +866,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Metaclass");
Node label5062 = createLabel(node, UMLVisualIDRegistry.getType(MetaclassNameEditPartCN.VISUAL_ID));
return node;
@@ -865,7 +882,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Comment");
Node label1008 = createLabel(node, UMLVisualIDRegistry.getType(CommentBodyEditPartCN.VISUAL_ID));
return node;
@@ -882,7 +898,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Model");
Node label1056 = createLabel(node, UMLVisualIDRegistry.getType(ModelNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ModelPackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
@@ -901,7 +916,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Profile");
Node label1050 = createLabel(node, UMLVisualIDRegistry.getType(ProfileNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(ProfilePackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
@@ -920,7 +934,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Package");
Node label1010 = createLabel(node, UMLVisualIDRegistry.getType(PackageNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(PackagePackageableElementCompartmentEditPartCN.VISUAL_ID), false, true, false, false);
@@ -939,7 +952,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Constraint");
Node label1059 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintNameEditPartCN.VISUAL_ID));
Node label5064 = createLabel(node, UMLVisualIDRegistry.getType(ConstraintBodyEditPartCN.VISUAL_ID));
@@ -957,7 +969,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "Enumeration");
Node label5055 = createLabel(node, UMLVisualIDRegistry.getType(EnumerationNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(EnumerationEnumerationLiteralCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -976,7 +987,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { node.setElement(domainElement);
// initializeFromPreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(node, prefStore, "DataType");
Node label5061 = createLabel(node, UMLVisualIDRegistry.getType(DataTypeNameEditPartCN.VISUAL_ID));
createCompartment(node, UMLVisualIDRegistry.getType(DataTypeAttributeCompartmentEditPartCN.VISUAL_ID), true, true, true, true);
@@ -1002,13 +1012,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Extension");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1029,7 +1037,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Association");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1065,7 +1072,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6034 = (Location)label6034.getLayoutConstraint();
location6034.setX(0);
location6034.setY(-20);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Association");
return edge;
}
@@ -1087,13 +1093,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ProfileApplication");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1114,7 +1118,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "AssociationBranch");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1130,7 +1133,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6035 = (Location)label6035.getLayoutConstraint();
location6035.setX(0);
location6035.setY(20);
-
return edge;
}
@@ -1151,7 +1153,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Generalization");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1162,7 +1163,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6007 = (Location)label6007.getLayoutConstraint();
location6007.setX(0);
location6007.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Generalization");
return edge;
}
@@ -1184,7 +1184,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Dependency");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1200,7 +1199,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6027 = (Location)label6027.getLayoutConstraint();
location6027.setX(0);
location6027.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "Dependency");
return edge;
}
@@ -1222,13 +1220,11 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "Dependency");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1249,7 +1245,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "ElementImport");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1265,7 +1260,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6021 = (Location)label6021.getLayoutConstraint();
location6021.setX(0);
location6021.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "ElementImport");
return edge;
}
@@ -1287,7 +1281,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(domainElement);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
PreferenceInitializerForElementHelper.initFontStyleFromPrefs(edge, prefStore, "PackageImport");
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
@@ -1298,7 +1291,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { Location location6022 = (Location)label6022.getLayoutConstraint();
location6022.setX(0);
location6022.setY(60);
-
PreferenceInitializerForElementHelper.initLabelVisibilityFromPrefs(edge, prefStore, "PackageImport");
return edge;
}
@@ -1320,12 +1312,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1346,12 +1336,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1372,12 +1360,10 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { edge.setElement(null);
// initializePreferences
final IPreferenceStore prefStore = (IPreferenceStore)preferencesHint.getPreferenceStore();
-
//org.eclipse.gmf.runtime.notation.Routing routing = org.eclipse.gmf.runtime.notation.Routing.get(prefStore.getInt(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE));
//if (routing != null) {
// org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.setStructuralFeatureValue(edge, org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getRoutingStyle_Routing(), routing);
//}
-
return edge;
}
@@ -1416,9 +1402,7 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { } else {
rv = NotationFactory.eINSTANCE.createDecorationNode();
}
-
rv.setLayoutConstraint(NotationFactory.eINSTANCE.createBounds());
-
if(hasTitle) {
TitleStyle ts = NotationFactory.eINSTANCE.createTitleStyle();
rv.getStyles().add(ts);
@@ -1464,7 +1448,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { private void initFontStyleFromPrefs(View view, final IPreferenceStore store, String elementName) {
String fontConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.FONT);
String fontColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FONT);
-
FontStyle viewFontStyle = (FontStyle)view.getStyle(NotationPackage.Literals.FONT_STYLE);
if(viewFontStyle != null) {
FontData fontData = PreferenceConverter.getFontData(store, fontConstant);
@@ -1472,7 +1455,6 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { viewFontStyle.setFontHeight(fontData.getHeight());
viewFontStyle.setBold((fontData.getStyle() & SWT.BOLD) != 0);
viewFontStyle.setItalic((fontData.getStyle() & SWT.ITALIC) != 0);
-
org.eclipse.swt.graphics.RGB fontRGB = PreferenceConverter.getColor(store, fontColorConstant);
viewFontStyle.setFontColor(FigureUtilities.RGBToInteger(fontRGB).intValue());
}
@@ -1494,22 +1476,14 @@ public class UMLViewProvider extends AbstractProvider implements IViewProvider { String fillColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_FILL);
String gradientColorConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.COLOR_GRADIENT);
String gradientPolicyConstant = PreferencesConstantsHelper.getElementConstant(elementName, PreferencesConstantsHelper.GRADIENT_POLICY);
-
-
org.eclipse.swt.graphics.RGB fillRGB = PreferenceConverter.getColor(store, fillColorConstant);
ViewUtil.setStructuralFeatureValue(view, NotationPackage.eINSTANCE.getFillStyle_FillColor(), FigureUtilities.RGBToInteger(fillRGB));
-
-
FillStyle fillStyle = (FillStyle)view.getStyle(NotationPackage.Literals.FILL_STYLE);
- fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());
-
- ;
+ fillStyle.setFillColor(FigureUtilities.RGBToInteger(fillRGB).intValue());;
if(store.getBoolean(gradientPolicyConstant)) {
GradientPreferenceConverter gradientPreferenceConverter = new GradientPreferenceConverter(store.getString(gradientColorConstant));
fillStyle.setGradient(gradientPreferenceConverter.getGradientData());
fillStyle.setTransparency(gradientPreferenceConverter.getTransparency());
}
}
-
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java index 21c0e974da8..c33a5197ea4 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLPropertySection.java @@ -30,5 +30,4 @@ public class UMLPropertySection extends DefaultPropertySection implements IPrope selected = /*super.*/transformSelectionToDomain(selected);
return selected;
}
-
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java index 59de850a53c..b9b5ee0f2f7 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile/src/org/eclipse/papyrus/uml/diagram/profile/sheet/UMLSheetLabelProvider.java @@ -87,5 +87,4 @@ public class UMLSheetLabelProvider extends BaseLabelProvider implements ILabelPr }
return null;
}
-
}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.classpath new file mode 100644 index 00000000000..8a8f1668cdc --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.classpath @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.project new file mode 100644 index 00000000000..e39981d0afa --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.diagram.profile.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..f287d53cf45 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..1a7eecd9484 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/META-INF/MANIFEST.MF @@ -0,0 +1,22 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Profile Tests +Bundle-SymbolicName: org.eclipse.papyrus.diagram.profile.tests +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: org.eclipse.papyrus.diagram.profile.tests.Activator +Bundle-Vendor: Eclipse Modeling Project +Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.0.0", + org.eclipse.papyrus.editor;bundle-version="1.0.0", + org.eclipse.papyrus.uml.diagram.profile;bundle-version="1.0.0", + org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0", + org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", + org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0", + org.eclipse.papyrus.diagram.tests;bundle-version="1.0.0", + org.eclipse.uml2.uml;bundle-version="4.0.0", + org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0", + org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0", + org.junit;bundle-version="4.10.0", + org.eclipse.papyrus.junit.utils;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/build.properties new file mode 100644 index 00000000000..41eb6ade2b4 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/build.properties @@ -0,0 +1,4 @@ +source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch new file mode 100644 index 00000000000..8ad61d4455f --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.diagram.profile.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.diagram.profile.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms40m -Xmx512m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/Activator.java new file mode 100644 index 00000000000..7c1779b0f39 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/Activator.java @@ -0,0 +1,30 @@ +package org.eclipse.papyrus.diagram.profile.tests;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+
+ private static BundleContext context;
+
+ static BundleContext getContext() {
+ return context;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext bundleContext) throws Exception {
+ Activator.context = bundleContext;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext bundleContext) throws Exception {
+ Activator.context = null;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/AllTests.java new file mode 100644 index 00000000000..4acccae20bb --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/AllTests.java @@ -0,0 +1,22 @@ +/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.tests;
+
+import org.eclipse.papyrus.diagram.profile.tests.canonical.AllCanonicalTests;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ AllCanonicalTests.class })
+public class AllTests {
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/IProfileDiagramTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/IProfileDiagramTest.java new file mode 100644 index 00000000000..5d9dec5a963 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/IProfileDiagramTest.java @@ -0,0 +1,21 @@ +/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.tests;
+
+
+
+public abstract interface IProfileDiagramTest {
+
+ public static final String PROJECT_NAME = "ProfileDiagramTestProject";
+
+ public static final String FILE_NAME = "ProfileDiagramTest.profile.di";
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/AllCanonicalTests.java new file mode 100644 index 00000000000..5427a25fafe --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/AllCanonicalTests.java @@ -0,0 +1,21 @@ +/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.tests.canonical;
+
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+@Suite.SuiteClasses({ TestProfileDiagramTopNode.class, TestProfileDiagramChildNode.class })
+public class AllCanonicalTests {
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java new file mode 100644 index 00000000000..857b6e9526a --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java @@ -0,0 +1,95 @@ +/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.tests.canonical;
+
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestChildNode;
+import org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+/**
+ * @author Thibault
+ *
+ */
+import org.junit.Test;
+
+public class TestProfileDiagramChildNode extends TestChildNode {
+
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateProfileDiagramCommand();
+ }
+
+ protected String getProjectName() {
+ return "ProfileDiagramTestProject";
+ }
+
+ protected String getFileName() {
+ return "ProfileDiagramTest.profile.di";
+ }
+
+ @Test
+ public void testToManageClassInPackage() {
+ testToManageNode(UMLElementTypes.Class_3010, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageDatatypeInPackage() {
+ testToManageNode(UMLElementTypes.DataType_3027, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManagePackageInPackage() {
+ testToManageNode(UMLElementTypes.Package_1012, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageStereoTypeInPackage() {
+ testToManageNode(UMLElementTypes.Stereotype_1023, UMLPackage.eINSTANCE.getStereotype(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageProfileInPackage() {
+ testToManageNode(UMLElementTypes.Profile_1024, UMLPackage.eINSTANCE.getProfile(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageClassInProfile() {
+ testToManageNode(UMLElementTypes.Class_3010, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Profile_1030, false);
+ }
+
+ @Test
+ public void testToManageDatatypeInProfile() {
+ testToManageNode(UMLElementTypes.DataType_3027, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Profile_1030, false);
+ }
+
+ @Test
+ public void testToManagePackageInProfile() {
+ testToManageNode(UMLElementTypes.Package_1012, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Profile_1030, false);
+ }
+
+ @Test
+ public void testToManageStereoTypeInProfile() {
+ testToManageNode(UMLElementTypes.Stereotype_1023, UMLPackage.eINSTANCE.getStereotype(), UMLElementTypes.Profile_1030, false);
+ }
+
+ @Test
+ public void testToManageProfileInProfile() {
+ testToManageNode(UMLElementTypes.Profile_1024, UMLPackage.eINSTANCE.getProfile(), UMLElementTypes.Profile_1030, false);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java new file mode 100644 index 00000000000..d01a732bb5e --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java @@ -0,0 +1,71 @@ +/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Thibault Le Ouay (Sherpa Engineering) t.leouay@sherpa-eng.com - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.profile.tests.canonical;
+
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.diagram.tests.canonical.TestTopNode;
+import org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+
+public class TestProfileDiagramTopNode extends TestTopNode {
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return (ICreationCommand)new CreateProfileDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return "ProfileDiagramTestProject";
+ }
+
+ @Override
+ protected String getFileName() {
+ return "ProfileDiagramTest.profile.di";
+ }
+
+ @Test
+ public void testToManageClass() {
+ testToManageNode(UMLElementTypes.Class_2008, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManagePackage() {
+ testToManageNode(UMLElementTypes.Package_2007, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageDataType() {
+ testToManageNode(UMLElementTypes.DataType_2010, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageStereoType() {
+ testToManageNode(UMLElementTypes.Stereotype_1026, UMLPackage.eINSTANCE.getStereotype(), UMLElementTypes.Package_2007, false);
+ }
+
+ @Test
+ public void testToManageProfile() {
+ testToManageNode(UMLElementTypes.Profile_1030, UMLPackage.eINSTANCE.getProfile(), UMLElementTypes.Package_2007, false);
+ }
+}
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF index 54831811859..883507bd8e3 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/META-INF/MANIFEST.MF @@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui, org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
org.eclipse.gmf.runtime.common.core,
- org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.profile
Export-Package: org.eclipse.papyrus.diagram.tests.canonical
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java index 88861b279d0..135bade9d71 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.tests/src/org/eclipse/papyrus/diagram/tests/canonical/AbstractPapyrusTestCase.java @@ -48,6 +48,7 @@ import org.eclipse.papyrus.infra.core.utils.DiResourceSet; import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.papyrus.uml.tools.model.UmlUtils;
import org.eclipse.swt.widgets.Display;
@@ -172,13 +173,17 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { public void run() {
try {
- papyrusEditor.doSave(new NullProgressMonitor());
+ //if the diagram is a Profile we dont save it because we dont need to define it
+ if(!diagramEditPart.getDiagramView().getType().equals("PapyrusUMLProfileDiagram")) {
+ papyrusEditor.doSave(new NullProgressMonitor());
+ }
+
// diResourceSet.save( new NullProgressMonitor());
// diagramEditor.close(true);
papyrusEditor = null;
diagramEditPart = null;
diagramEditor = null;
- page.closeAllEditors(true);
+ page.closeAllEditors(false);
project.delete(true, new NullProgressMonitor());
setResult(true);
} catch (Exception ex) {
@@ -248,7 +253,7 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { root = workspace.getRoot();
/*
* final String timestamp = Long.toString(System.currentTimeMillis());
- *
+ *
* project = root.getProject("DiagramTestProject_" + timestamp); file =
* project.getFile("DiagramTest_" + timestamp + ".di"); //$NON-NLS-2$
*/
@@ -269,44 +274,57 @@ public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest { if(!file.exists()) {
file.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
diResourceSet.createsModels(file);
- new CreateUMLModelCommand().createModel(this.diResourceSet);
- ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
- try {
- registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
- registry.startRegistry();
- } catch (ServiceException ex) {
- // Ignore exceptions
- }
+ if(!file.getName().endsWith(".profile.di")) {
- // Apply the required profiles
- ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
- modifiedFiles.add(file);
- ICommand commandProfiles = new AbstractTransactionalCommand(diResourceSet.getTransactionalEditingDomain(), "Apply profiles", modifiedFiles) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- UmlModel resModel = UmlUtils.getUmlModel(diResourceSet);
- EObject obj;
- try {
- obj = resModel.lookupRoot();
- } catch (NotFoundException e) {
- return CommandResult.newErrorCommandResult(e);
- }
- if(obj instanceof Model) {
- Model model = (Model)obj;
- for(String uri : getRequiredProfiles()) {
- EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri);
- if(definition != null) {
- Profile profile = UMLUtil.getProfile(definition, model);
- model.applyProfile(profile);
+ new CreateUMLModelCommand().createModel(this.diResourceSet);
+
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+
+ // Apply the required profiles
+ ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
+ modifiedFiles.add(file);
+ ICommand commandProfiles = new AbstractTransactionalCommand(diResourceSet.getTransactionalEditingDomain(), "Apply profiles", modifiedFiles) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ UmlModel resModel = UmlUtils.getUmlModel(diResourceSet);
+ EObject obj;
+ try {
+ obj = resModel.lookupRoot();
+ } catch (NotFoundException e) {
+ return CommandResult.newErrorCommandResult(e);
+ }
+ if(obj instanceof Model) {
+ Model model = (Model)obj;
+ for(String uri : getRequiredProfiles()) {
+ EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri);
+ if(definition != null) {
+ Profile profile = UMLUtil.getProfile(definition, model);
+ model.applyProfile(profile);
+ }
}
}
+ return CommandResult.newOKCommandResult();
}
- return CommandResult.newOKCommandResult();
- }
- };
- commandProfiles.execute(new NullProgressMonitor(), null);
+ };
+ commandProfiles.execute(new NullProgressMonitor(), null);
+ } else {
+ new CreateProfileModelCommand().createModel(this.diResourceSet);
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+ }
ICreationCommand command = getDiagramCommandCreation();
command.createDiagram(diResourceSet, null, "DiagramToTest");
diResourceSet.save(new NullProgressMonitor());
|