Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibault Le Ouay2014-04-14 14:59:57 +0000
committerThibault Le Ouay2014-04-18 09:59:28 +0000
commit0040403cbbdb680e2e85c08391631f27679214ea (patch)
tree0fefa04b782f56d08c6ccae36d09c14ae011f7d3 /plugins/developer/org.eclipse.papyrus.def/xtend-gen
parent3dcbee22275fbd39a8bb6db0fe2bc77fa8981ec6 (diff)
downloadorg.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>
Diffstat (limited to 'plugins/developer/org.eclipse.papyrus.def/xtend-gen')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/.gitignore1
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/diagram/editpolicies/OpenDiagram.java376
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/.gitignore1
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend-gen/aspects/xpt/editor/NewDiagramFileWizard.java188
4 files changed, 284 insertions, 282 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;
+ }
+}

Back to the top