Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2009-03-19 08:59:08 -0400
committeratikhomirov2009-03-19 08:59:08 -0400
commit5b9c12d8a4be4d146560cbd30681105f4a594615 (patch)
treed81790289823ade24f8dd36dbfc90b95c66b8769
parent611664b7f3b621226c8289bfb636f90416cadb84 (diff)
downloadorg.eclipse.gmf-tooling-5b9c12d8a4be4d146560cbd30681105f4a594615.tar.gz
org.eclipse.gmf-tooling-5b9c12d8a4be4d146560cbd30681105f4a594615.tar.xz
org.eclipse.gmf-tooling-5b9c12d8a4be4d146560cbd30681105f4a594615.zip
[191653] Char encoding for xpand templates should be UTF-8. Converted GMF templates to use UTF-8
-rw-r--r--plugins/org.eclipse.gmf.codegen/.settings/org.eclipse.core.resources.prefs6
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates-dynmodel/Facility.xpt108
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates-dynmodel/MetaModel.xpt138
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/MetaModel.xpt198
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ChildNodeLabelEditPart.xpt92
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/CompartmentEditPart.xpt76
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/DiagramEditPart.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ExternalNodeLabelEditPart.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkEditPart.xpt60
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkLabelEditPart.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt140
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeLabelEditPart.xpt68
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/actions/CreateShortcutAction.xpt92
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/actions/CustomAction.xpt22
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/actions/LoadResourceAction.xpt36
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/actions/PredefinedAction.xpt14
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt208
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt32
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt122
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt72
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt52
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt154
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt46
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt540
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt44
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt378
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/parsers/AbstractParser.xpt160
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/parsers/ParserProvider.xpt246
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/preferences/CustomPage.xpt80
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/preferences/StandardPage.xpt54
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parsers/CustomParser.xpt46
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parsers/ParserProvider.xpt76
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/parsers/PredefinedParser.xpt246
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/Common.xpt106
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/ConstraintProviders.xpt120
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/Externalizer.xpt148
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/ActionBarAdvisor.xpt280
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/Application.xpt36
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/Perspective.xpt44
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/WizardNewFileCreationPage.xpt96
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchAdvisor.xpt60
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchWindowAdvisor.xpt62
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/application/extensions.xpt58
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkCommand.xpt134
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkUtils.xpt144
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateNodeCommand.xpt180
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateRefLinkCommand.xpt6
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateShortcutDecorationsCommand.xpt30
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkCommand.xpt38
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkUtils.xpt356
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkViewCommand.xpt34
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientRefLinkCommand.xpt40
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/BaseEditHelper.xpt68
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelper.xpt20
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelperAdvice.xpt20
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt140
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/EditPartFactory.xpt74
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt480
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt22
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/CompartmentItemSemanticEditPolicy.xpt36
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt170
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt56
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt44
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/LinkItemSemanticEditPolicy.xpt58
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/NodeItemSemanticEditPolicy.xpt134
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/OpenDiagram.xpt96
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt72
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/childContainerCreateCommand.xpt30
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/linkCommands.xpt118
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/PreferenceInitializer.xpt176
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/extensions.xpt50
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt628
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/LinkDescriptor.xpt102
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/NodeDescriptor.xpt56
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/UpdateCommand.xpt68
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/containerBaseCanonicalMethods.xpt142
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/extensions.xpt20
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/views/Utils.xpt116
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ActionBarContributor.xpt78
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/CreationWizard.xpt162
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/CreationWizardPage.xpt70
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/editor/DeleteElementAction.xpt40
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramContentInitializer.xpt168
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorContextMenuProvider.xpt42
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt278
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DocumentProvider.xpt462
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/Editor.xpt344
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ElementChooser.xpt322
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/InitDiagramFileAction.xpt114
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/MatchingStrategy.xpt28
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ModelElementSelectionPage.xpt118
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/NewDiagramFileWizard.xpt200
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetInfo.xpt278
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetModificationListener.xpt48
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ShortcutCreationWizard.xpt92
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ShortcutPropertyTester.xpt44
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/UriEditorInputTester.xpt32
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ValidateAction.xpt252
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ValidationMarker.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/VisualIDRegistry.xpt432
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/extensions.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/palette/PaletteFactory.xpt416
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/expressions/AbstractExpression.xpt92
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/expressions/OCLExpressionFactory.xpt52
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/expressions/RegexpExpressionFactory.xpt44
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/expressions/getExpression.xpt14
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/AbstractNavigatorItem.xpt66
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/DomainNavigatorContentProvider.xpt94
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/DomainNavigatorItem.xpt96
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/DomainNavigatorLabelProvider.xpt120
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorActionProvider.xpt156
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorContentProvider.xpt452
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorGroup.xpt112
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorItem.xpt92
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLabelProvider.xpt484
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorLinkHelper.xpt118
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorSorter.xpt62
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/extensions.xpt148
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/getEditorInput.xpt34
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/Activator.xpt82
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/build.xpt8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/manifest.xpt62
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/options.xpt14
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/plugin.xpt144
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/properties.xpt64
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/propsheet/LabelProvider.xpt68
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/propsheet/PropertySection.xpt88
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/propsheet/extensions.xpt122
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/EditPartProvider.xpt54
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ElementInitializers.xpt238
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ElementTypes.xpt234
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/IconProvider.xpt26
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/MarkerNavigationProvider.xpt44
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricProvider.xpt338
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricsResultView.xpt138
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt212
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ShortcutsDecoratorProvider.xpt92
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ValidationDecoratorProvider.xpt170
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/providers/ValidationProvider.xpt248
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ViewProvider.xpt406
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/extensions.xpt206
142 files changed, 9142 insertions, 9142 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.gmf.codegen/.settings/org.eclipse.core.resources.prefs
index 1e5ea32e7..f9fa809a1 100644
--- a/plugins/org.eclipse.gmf.codegen/.settings/org.eclipse.core.resources.prefs
+++ b/plugins/org.eclipse.gmf.codegen/.settings/org.eclipse.core.resources.prefs
@@ -1,4 +1,4 @@
-#Mon Mar 16 19:29:31 CET 2009
+#Thu Mar 19 13:57:48 CET 2009
eclipse.preferences.version=1
-encoding/templates=ISO-8859-1
-encoding/templates-dynmodel=ISO-8859-1
+encoding/templates=UTF-8
+encoding/templates-dynmodel=UTF-8
diff --git a/plugins/org.eclipse.gmf.codegen/templates-dynmodel/Facility.xpt b/plugins/org.eclipse.gmf.codegen/templates-dynmodel/Facility.xpt
index 1457d6ed3..87a0dd0b4 100644
--- a/plugins/org.eclipse.gmf.codegen/templates-dynmodel/Facility.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates-dynmodel/Facility.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,72 +10,72 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION Facility»
+«EXTENSION Facility»
-«DEFINE Main FOR gmfgen::DynamicModelAccess-»
-package «packageName»;
+«DEFINE Main FOR gmfgen::DynamicModelAccess-»
+package «packageName»;
-public class «className» {
+public class «className» {
- «EXPAND field(self) FOREACH editorGen.getAllDomainGenPackages(false)-»
+ «EXPAND field(self) FOREACH editorGen.getAllDomainGenPackages(false)-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EPackage ePackage;
- «EXPAND xpt::Common::generatedMemberComment»
- private «className»(org.eclipse.emf.ecore.EPackage ePackage) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ private «className»(org.eclipse.emf.ecore.EPackage ePackage) {
this.ePackage = ePackage;
}
- «EXPAND getMethod(self) FOREACH editorGen.getAllDomainGenPackages(false)-»
+ «EXPAND getMethod(self) FOREACH editorGen.getAllDomainGenPackages(false)-»
- «EXPAND getRegistryMethod»
+ «EXPAND getRegistryMethod»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean isInstance(Object obj, String metaClassName) {
org.eclipse.emf.ecore.EClass metaClass = getEClass(metaClassName);
return obj instanceof org.eclipse.emf.ecore.EObject && metaClass.isSuperTypeOf(((org.eclipse.emf.ecore.EObject) obj).eClass());
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EObject newInstance(String metaClassName) {
return this.ePackage.getEFactoryInstance().create(getEClass(metaClassName));
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EClass getEClass(String metaClassName) {
- «EXPAND xpt::Common::_assert('metaClassName != null')-»
+ «EXPAND xpt::Common::_assert('metaClassName != null')-»
org.eclipse.emf.ecore.EClass metaClass = findMetaClass(metaClassName);
assertMetaClass(metaClass, metaClassName);
return metaClass;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EStructuralFeature getEFeature(String metaClassName, String metaFeatureName) {
- «EXPAND xpt::Common::_assert('metaFeatureName != null')-»
+ «EXPAND xpt::Common::_assert('metaFeatureName != null')-»
org.eclipse.emf.ecore.EClass metaClass = getEClass(metaClassName);
org.eclipse.emf.ecore.EStructuralFeature f = metaClass.getEStructuralFeature(metaFeatureName);
assertMetaFeature(f, metaClass, metaFeatureName);
return f;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EAttribute getEAttribute(String metaClassName, String metaFeatureName) {
return (org.eclipse.emf.ecore.EAttribute) getEFeature(metaClassName, metaFeatureName);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EReference getEReference(String metaClassName, String metaFeatureName) {
return (org.eclipse.emf.ecore.EReference) getEFeature(metaClassName, metaFeatureName);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EDataType getEDataType(String metaClassName) {
- «EXPAND xpt::Common::_assert('metaClassName != null')-»
+ «EXPAND xpt::Common::_assert('metaClassName != null')-»
org.eclipse.emf.ecore.EClassifier c = this.ePackage.getEClassifier(metaClassName);
if (false == c instanceof org.eclipse.emf.ecore.EDataType) {
return null;
@@ -83,9 +83,9 @@ public class «className» {
return (org.eclipse.emf.ecore.EDataType) c;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.emf.ecore.EEnum getEEnum(String metaClassName) {
- «EXPAND xpt::Common::_assert('metaClassName != null')-»
+ «EXPAND xpt::Common::_assert('metaClassName != null')-»
org.eclipse.emf.ecore.EClassifier c = this.ePackage.getEClassifier(metaClassName);
if (false == c instanceof org.eclipse.emf.ecore.EEnum) {
return null;
@@ -93,7 +93,7 @@ public class «className» {
return (org.eclipse.emf.ecore.EEnum) c;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.emf.ecore.EClass findMetaClass(String name) {
org.eclipse.emf.ecore.EClassifier c = this.ePackage.getEClassifier(name);
if (false == c instanceof org.eclipse.emf.ecore.EClass) {
@@ -102,56 +102,56 @@ public class «className» {
return (org.eclipse.emf.ecore.EClass) c;
}
- «EXPAND xpt::Common::generatedMemberComment('Default implementation throws IllegalStateException if metaclass is null')»
+ «EXPAND xpt::Common::generatedMemberComment('Default implementation throws IllegalStateException if metaclass is null')»
private void assertMetaClass(org.eclipse.emf.ecore.EClass metaClass, String metaClassName) {
if (metaClass == null) {
throw new IllegalStateException(java.text.MessageFormat.format("Can't find class {0} in the package {1}", new Object[] {metaClassName, this.ePackage.getName()}));
}
}
- «EXPAND xpt::Common::generatedMemberComment('Default implementation throws IllegalStateException if meta-feature is null')»
+ «EXPAND xpt::Common::generatedMemberComment('Default implementation throws IllegalStateException if meta-feature is null')»
private void assertMetaFeature(org.eclipse.emf.ecore.EStructuralFeature metaFeature, org.eclipse.emf.ecore.EClass metaClass, String featureName) {
if (metaFeature == null) {
throw new IllegalStateException(java.text.MessageFormat.format("Can't find feature {0} of class {1} in the package {2}", new Object[] {featureName, metaClass.getName(), this.ePackage.getName()}));
}
}
- «EXPAND initMethod FOREACH editorGen.getAllDomainGenPackages(false)-»
-«EXPAND additions-»
+ «EXPAND initMethod FOREACH editorGen.getAllDomainGenPackages(false)-»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::DynamicModelAccess»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::DynamicModelAccess»«ENDDEFINE»
-«DEFINE field(dma : gmfgen::DynamicModelAccess) FOR genmodel::GenPackage-»
-«EXPAND xpt::Common::generatedMemberComment»
-private static «dma.className» «fieldName(self)»;
-«ENDDEFINE»
+«DEFINE field(dma : gmfgen::DynamicModelAccess) FOR genmodel::GenPackage-»
+«EXPAND xpt::Common::generatedMemberComment»
+private static «dma.className» «fieldName(self)»;
+«ENDDEFINE»
-«DEFINE getMethod(dma : gmfgen::DynamicModelAccess) FOR genmodel::GenPackage-»
- «EXPAND xpt::Common::generatedMemberComment('@throws IllegalStateException if no EPackage with given URI is registered.')»
- public static «dma.className» get«getNameToken(self)»() {
- if («fieldName(self)» == null) {
- org.eclipse.emf.ecore.EPackage pkg = getRegistry().getEPackage("«ecorePackage.nsURI»");
+«DEFINE getMethod(dma : gmfgen::DynamicModelAccess) FOR genmodel::GenPackage-»
+ «EXPAND xpt::Common::generatedMemberComment('@throws IllegalStateException if no EPackage with given URI is registered.')»
+ public static «dma.className» get«getNameToken(self)»() {
+ if («fieldName(self)» == null) {
+ org.eclipse.emf.ecore.EPackage pkg = getRegistry().getEPackage("«ecorePackage.nsURI»");
if (pkg == null) {
- throw new IllegalStateException("Package «ecorePackage.name»(«ecorePackage.nsURI») not found");
+ throw new IllegalStateException("Package «ecorePackage.name»(«ecorePackage.nsURI») not found");
}
- «fieldName(self)» = new «dma.className»(pkg);
- «fieldName(self)».init«getNameToken(self)»();
+ «fieldName(self)» = new «dma.className»(pkg);
+ «fieldName(self)».init«getNameToken(self)»();
}
- return «fieldName(self)»;
+ return «fieldName(self)»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE initMethod FOR genmodel::GenPackage-»
- «EXPAND xpt::Common::generatedMemberComment»
- private void init«getNameToken(self)»() {
+«DEFINE initMethod FOR genmodel::GenPackage-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private void init«getNameToken(self)»() {
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getRegistryMethod FOR gmfgen::DynamicModelAccess»
- «EXPAND xpt::Common::generatedMemberComment('Default implementation returns global registry, clients that need another may redefine.')»
+«DEFINE getRegistryMethod FOR gmfgen::DynamicModelAccess»
+ «EXPAND xpt::Common::generatedMemberComment('Default implementation returns global registry, clients that need another may redefine.')»
private static org.eclipse.emf.ecore.EPackage.Registry getRegistry() {
return org.eclipse.emf.ecore.EPackage.Registry.INSTANCE;
}
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates-dynmodel/MetaModel.xpt b/plugins/org.eclipse.gmf.codegen/templates-dynmodel/MetaModel.xpt
index 0a6653a17..77058df3b 100644
--- a/plugins/org.eclipse.gmf.codegen/templates-dynmodel/MetaModel.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates-dynmodel/MetaModel.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,104 +10,104 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION Facility»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION gmf::GenModelUtils»
+«EXTENSION Facility»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION gmf::GenModelUtils»
// XXX is isExternalInterface use valid here, won't all objects be just EObject?
-«DEFINE IsInstance(accessor : String) FOR genmodel::GenClass-»
-«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().isInstance(«accessor», "«ecoreClass.name»")«ENDDEFINE»
+«DEFINE IsInstance(accessor : String) FOR genmodel::GenClass-»
+«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().isInstance(«accessor», "«ecoreClass.name»")«ENDDEFINE»
-«DEFINE NotInstance(accessor : String) FOR genmodel::GenClass»!«EXPAND IsInstance(accessor)»«ENDDEFINE»
+«DEFINE NotInstance(accessor : String) FOR genmodel::GenClass»!«EXPAND IsInstance(accessor)»«ENDDEFINE»
-«DEFINE IsContainerInstance(_object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
-«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().isInstance(«IF isExternalInterface(self)»((org.eclipse.emf.ecore.EObject) «_object»)«ELSE»«_object»«ENDIF».eContainer(), "«ecoreClass.name»")«ENDDEFINE»
+«DEFINE IsContainerInstance(_object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
+«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().isInstance(«IF isExternalInterface(self)»((org.eclipse.emf.ecore.EObject) «_object»)«ELSE»«_object»«ENDIF».eContainer(), "«ecoreClass.name»")«ENDDEFINE»
-«DEFINE getFeatureValue(containerVar : String, containerClass : genmodel::GenClass) FOR genmodel::GenFeature-»
-((«EXPAND featureTargetType») «IF isExternalInterface(containerClass)-»
-((org.eclipse.emf.ecore.EObject) «containerVar»)«ELSE-»
-«containerVar»«ENDIF-»
-.eGet(«EXPAND MetaFeature»))«ENDDEFINE»
+«DEFINE getFeatureValue(containerVar : String, containerClass : genmodel::GenClass) FOR genmodel::GenFeature-»
+((«EXPAND featureTargetType») «IF isExternalInterface(containerClass)-»
+((org.eclipse.emf.ecore.EObject) «containerVar»)«ELSE-»
+«containerVar»«ENDIF-»
+.eGet(«EXPAND MetaFeature»))«ENDDEFINE»
-«DEFINE featureTargetType FOR genmodel::GenFeature-»
-«EXPAND _featureTargetType(self) FOR ecoreFeature-»
-«ENDDEFINE»
+«DEFINE featureTargetType FOR genmodel::GenFeature-»
+«EXPAND _featureTargetType(self) FOR ecoreFeature-»
+«ENDDEFINE»
-«DEFINE _featureTargetType(gf : genmodel::GenFeature) FOR ecore::EStructuralFeature»NO-OP«ENDDEFINE»
-«DEFINE _featureTargetType(gf : genmodel::GenFeature) FOR ecore::EReference-»
-«IF isListType(gf)»java.util.List«ELSE»org.eclipse.emf.ecore.EObject«ENDIF-»
-«ENDDEFINE»
-«DEFINE _featureTargetType(gf : genmodel::GenFeature) FOR ecore::EAttribute-»
-«IF isListType(gf)»java.util.List«ELSE»«getObjectCompatibleClassName(eAttributeType)»«ENDIF-»
-«ENDDEFINE»
+«DEFINE _featureTargetType(gf : genmodel::GenFeature) FOR ecore::EStructuralFeature»NO-OP«ENDDEFINE»
+«DEFINE _featureTargetType(gf : genmodel::GenFeature) FOR ecore::EReference-»
+«IF isListType(gf)»java.util.List«ELSE»org.eclipse.emf.ecore.EObject«ENDIF-»
+«ENDDEFINE»
+«DEFINE _featureTargetType(gf : genmodel::GenFeature) FOR ecore::EAttribute-»
+«IF isListType(gf)»java.util.List«ELSE»«getObjectCompatibleClassName(eAttributeType)»«ENDIF-»
+«ENDDEFINE»
-«DEFINE getFeatureValue(containerVar : String, container : genmodel::GenClass, needsCastToResultType : Boolean) FOR genmodel::GenFeature-»
+«DEFINE getFeatureValue(containerVar : String, container : genmodel::GenClass, needsCastToResultType : Boolean) FOR genmodel::GenFeature-»
// ??? FIXME
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setFeatureValue(containerVar : String, containerClass : genmodel::GenClass, valueVar : String) FOR genmodel::GenFeature-»
-«IF isExternalInterface(containerClass)-»
-((org.eclipse.emf.ecore.EObject) «containerVar»)«ELSE-»
-«containerVar»«ENDIF-»
-.eSet(«EXPAND MetaFeature», «valueVar»)«ENDDEFINE»
+«DEFINE setFeatureValue(containerVar : String, containerClass : genmodel::GenClass, valueVar : String) FOR genmodel::GenFeature-»
+«IF isExternalInterface(containerClass)-»
+((org.eclipse.emf.ecore.EObject) «containerVar»)«ELSE-»
+«containerVar»«ENDIF-»
+.eSet(«EXPAND MetaFeature», «valueVar»)«ENDDEFINE»
-«DEFINE setFeatureValue(containerVar : String, containerClass : genmodel::GenClass, valueVar : String, isPlainObjectValue : Boolean) FOR genmodel::GenFeature-»
-«EXPAND setFeatureValue(containerVar, containerClass, valueVar)»«ENDDEFINE»
+«DEFINE setFeatureValue(containerVar : String, containerClass : genmodel::GenClass, valueVar : String, isPlainObjectValue : Boolean) FOR genmodel::GenFeature-»
+«EXPAND setFeatureValue(containerVar, containerClass, valueVar)»«ENDDEFINE»
-«DEFINE MetaClass FOR genmodel::GenDataType»«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().getEDataType("«ecoreDataType.name»")«ENDDEFINE»
-«DEFINE MetaClass FOR genmodel::GenEnum»«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().getEEnum("«ecoreEnum.name»")«ENDDEFINE»
-«DEFINE MetaClass FOR genmodel::GenClass»«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().getEClass("«ecoreClass.name»")«ENDDEFINE»
+«DEFINE MetaClass FOR genmodel::GenDataType»«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().getEDataType("«ecoreDataType.name»")«ENDDEFINE»
+«DEFINE MetaClass FOR genmodel::GenEnum»«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().getEEnum("«ecoreEnum.name»")«ENDDEFINE»
+«DEFINE MetaClass FOR genmodel::GenClass»«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().getEClass("«ecoreClass.name»")«ENDDEFINE»
-«DEFINE MetaFeature FOR genmodel::GenFeature»«EXPAND _metaFeature(ecoreFeature)»«ENDDEFINE»
+«DEFINE MetaFeature FOR genmodel::GenFeature»«EXPAND _metaFeature(ecoreFeature)»«ENDDEFINE»
-«DEFINE _metaFeature(f : ecore::EStructuralFeature) FOR genmodel::GenFeature»no-op«ENDDEFINE»
-«DEFINE _metaFeature(eRef : ecore::EReference) FOR genmodel::GenFeature»«getDMA().getQualifiedClassName()».get«getNameToken(genClass.genPackage)»().getEReference("«genClass.ecoreClass.name»", "«ecoreFeature.name»")«ENDDEFINE»
-«DEFINE _metaFeature(eAttr : ecore::EAttribute) FOR genmodel::GenFeature»«getDMA().getQualifiedClassName()».get«getNameToken(genClass.genPackage)»().getEAttribute("«genClass.ecoreClass.name»", "«ecoreFeature.name»")«ENDDEFINE»
+«DEFINE _metaFeature(f : ecore::EStructuralFeature) FOR genmodel::GenFeature»no-op«ENDDEFINE»
+«DEFINE _metaFeature(eRef : ecore::EReference) FOR genmodel::GenFeature»«getDMA().getQualifiedClassName()».get«getNameToken(genClass.genPackage)»().getEReference("«genClass.ecoreClass.name»", "«ecoreFeature.name»")«ENDDEFINE»
+«DEFINE _metaFeature(eAttr : ecore::EAttribute) FOR genmodel::GenFeature»«getDMA().getQualifiedClassName()».get«getNameToken(genClass.genPackage)»().getEAttribute("«genClass.ecoreClass.name»", "«ecoreFeature.name»")«ENDDEFINE»
-«DEFINE NewInstance FOR genmodel::GenClass-»
-«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().newInstance("«ecoreClass.name»")«ENDDEFINE»
+«DEFINE NewInstance FOR genmodel::GenClass-»
+«getDMA().getQualifiedClassName()».get«getNameToken(genPackage)»().newInstance("«ecoreClass.name»")«ENDDEFINE»
-«DEFINE NewInstance(varName : String) FOR genmodel::GenClass-»
-org.eclipse.emf.ecore.EObject «varName» = «EXPAND NewInstance»;«ENDDEFINE»
+«DEFINE NewInstance(varName : String) FOR genmodel::GenClass-»
+org.eclipse.emf.ecore.EObject «varName» = «EXPAND NewInstance»;«ENDDEFINE»
-«DEFINE DowncastToEObject(value : String) FOR genmodel::GenClass»«IF isExternalInterface(self)»(org.eclipse.emf.ecore.EObject) «ENDIF»«value»«ENDDEFINE»
+«DEFINE DowncastToEObject(value : String) FOR genmodel::GenClass»«IF isExternalInterface(self)»(org.eclipse.emf.ecore.EObject) «ENDIF»«value»«ENDDEFINE»
-«DEFINE DeclareAndAssign(assignee : String, value : String) FOR genmodel::GenClass-»
-org.eclipse.emf.ecore.EObject «assignee» = «value»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String) FOR genmodel::GenClass-»
+org.eclipse.emf.ecore.EObject «assignee» = «value»;«ENDDEFINE»
-«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClass-»
-org.eclipse.emf.ecore.EObject «assignee» = «IF isPlainObjectValue»(org.eclipse.emf.ecore.EObject)«ENDIF»«value»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClass-»
+org.eclipse.emf.ecore.EObject «assignee» = «IF isPlainObjectValue»(org.eclipse.emf.ecore.EObject)«ENDIF»«value»;«ENDDEFINE»
-«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClassifier»NO-OP«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClassifier»NO-OP«ENDDEFINE»
-«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenDataType-»
-«EXPAND QualifiedClassName» «assignee» = («EXPAND QualifiedClassName») «value»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenDataType-»
+«EXPAND QualifiedClassName» «assignee» = («EXPAND QualifiedClassName») «value»;«ENDDEFINE»
-«DEFINE DeclareAndAssignContainer(assignee : String, _object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
-org.eclipse.emf.ecore.EObject «assignee» = «IF isExternalInterface(metaClass)»((org.eclipse.emf.ecore.EObject) «_object»)«ELSE»«_object»«ENDIF».eContainer();«ENDDEFINE»
+«DEFINE DeclareAndAssignContainer(assignee : String, _object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
+org.eclipse.emf.ecore.EObject «assignee» = «IF isExternalInterface(metaClass)»((org.eclipse.emf.ecore.EObject) «_object»)«ELSE»«_object»«ENDIF».eContainer();«ENDDEFINE»
// FIXME - feature value is not necessarily of EObject type
-«DEFINE DeclareAndAssign(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature) FOR genmodel::GenClass-»
-org.eclipse.emf.ecore.EObject «assignee» = «EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature) FOR genmodel::GenClass-»
+org.eclipse.emf.ecore.EObject «assignee» = «EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature»;«ENDDEFINE»
-«DEFINE DeclareAndAssign2(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature, srcExt : String, needCast : Boolean) FOR genmodel::GenClass-»
-org.eclipse.emf.ecore.EObject «assignee» = «EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature».«srcExt»;«ENDDEFINE»
+«DEFINE DeclareAndAssign2(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature, srcExt : String, needCast : Boolean) FOR genmodel::GenClass-»
+org.eclipse.emf.ecore.EObject «assignee» = «EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature».«srcExt»;«ENDDEFINE»
-«DEFINE CastEObject(eObjectValue : String) FOR genmodel::GenClass»«eObjectValue»«ENDDEFINE»
+«DEFINE CastEObject(eObjectValue : String) FOR genmodel::GenClass»«eObjectValue»«ENDDEFINE»
-«DEFINE QualifiedClassName FOR genmodel::GenClassifier»NO-OP«ENDDEFINE»
-«DEFINE QualifiedClassName FOR genmodel::GenClass»org.eclipse.emf.ecore.EObject«ENDDEFINE»
-«DEFINE QualifiedClassName FOR genmodel::GenEnum»org.eclipse.emf.common.util.Enumerator«ENDDEFINE»
-«DEFINE QualifiedClassName FOR genmodel::GenDataType»«getObjectCompatibleClassName(ecoreDataType)»«ENDDEFINE»
+«DEFINE QualifiedClassName FOR genmodel::GenClassifier»NO-OP«ENDDEFINE»
+«DEFINE QualifiedClassName FOR genmodel::GenClass»org.eclipse.emf.ecore.EObject«ENDDEFINE»
+«DEFINE QualifiedClassName FOR genmodel::GenEnum»org.eclipse.emf.common.util.Enumerator«ENDDEFINE»
+«DEFINE QualifiedClassName FOR genmodel::GenDataType»«getObjectCompatibleClassName(ecoreDataType)»«ENDDEFINE»
-«DEFINE PopulateItemProviderFactories(factoryListVar : String) FOR gmfgen::GenEditorGenerator-»
-«REM»
+«DEFINE PopulateItemProviderFactories(factoryListVar : String) FOR gmfgen::GenEditorGenerator-»
+«REM»
NO-OP since ReflectiveItemProviderAdapterFactory should
get added anyway.
-«ENDREM»«ENDDEFINE»
+«ENDREM»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/MetaModel.xpt b/plugins/org.eclipse.gmf.codegen/templates/MetaModel.xpt
index 544dd4f6c..1d2f07499 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/MetaModel.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/MetaModel.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,49 +10,49 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION MetaModel»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION gmf::GenModelUtils»
+«EXTENSION MetaModel»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION gmf::GenModelUtils»
/*
* Does instanceof check.
*/
-«DEFINE IsInstance(accessor : String) FOR genmodel::GenClass-»
-«accessor» instanceof «getQualifiedInterfaceName(self)»«ENDDEFINE»
+«DEFINE IsInstance(accessor : String) FOR genmodel::GenClass-»
+«accessor» instanceof «getQualifiedInterfaceName(self)»«ENDDEFINE»
// Shorthand, negates IsInstance - handy if you consider
// different approaches for generated and dynamic models: false == instanceof
// vs. !MetaModelFacility.isInstance
-«DEFINE NotInstance(accessor : String) FOR genmodel::GenClass-»
-false == «EXPAND IsInstance(accessor)»«ENDDEFINE»
+«DEFINE NotInstance(accessor : String) FOR genmodel::GenClass-»
+false == «EXPAND IsInstance(accessor)»«ENDDEFINE»
/**
* Special kind of instanceof check, that compares eContainer() of the object.
* Since metaClass may be an external interface, eContainer() might need cast to EObject
*/
-«DEFINE IsContainerInstance(_object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
-«EXPAND _getEObjectFeature(_object, 'eContainer()') FOR metaClass» instanceof «getQualifiedInterfaceName(self)»«ENDDEFINE»
+«DEFINE IsContainerInstance(_object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
+«EXPAND _getEObjectFeature(_object, 'eContainer()') FOR metaClass» instanceof «getQualifiedInterfaceName(self)»«ENDDEFINE»
-«DEFINE _getEObjectFeature(_object : String, feature : String) FOR genmodel::GenClass-»
-«IF isExternalInterface(self)»((org.eclipse.emf.ecore.EObject) «_object»).«feature»«ELSE»«_object».«feature»«ENDIF-»
-«ENDDEFINE»
+«DEFINE _getEObjectFeature(_object : String, feature : String) FOR genmodel::GenClass-»
+«IF isExternalInterface(self)»((org.eclipse.emf.ecore.EObject) «_object»).«feature»«ELSE»«_object».«feature»«ENDIF-»
+«ENDDEFINE»
// Public/API-sort templates are named with first letter capitalized.
// FIXME getFeatureValue* and setFeatureValue start with lowercase to indicate pending refactoring
-«DEFINE getFeatureValue(containerVar : String, containerClass : genmodel::GenClass) FOR genmodel::GenFeature-»
-«IF isExternalInterface(containerClass)-»
-((«EXPAND featureTargetType») ((org.eclipse.emf.ecore.EObject) «containerVar»).eGet(«EXPAND MetaFeature»))«-»
-«ELSE-»
-«containerVar».«getGetAccessor(self)»()«-»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE getFeatureValue(containerVar : String, containerClass : genmodel::GenClass) FOR genmodel::GenFeature-»
+«IF isExternalInterface(containerClass)-»
+((«EXPAND featureTargetType») ((org.eclipse.emf.ecore.EObject) «containerVar»).eGet(«EXPAND MetaFeature»))«-»
+«ELSE-»
+«containerVar».«getGetAccessor(self)»()«-»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE featureTargetType FOR genmodel::GenFeature»«IF isListType(self)»java.util.List«ELSE»«EXPAND QualifiedClassName FOR findGenClassifier(genClass.genPackage.genModel, ecoreFeature.eType)»«ENDIF»«ENDDEFINE»
+«DEFINE featureTargetType FOR genmodel::GenFeature»«IF isListType(self)»java.util.List«ELSE»«EXPAND QualifiedClassName FOR findGenClassifier(genClass.genPackage.genModel, ecoreFeature.eType)»«ENDIF»«ENDDEFINE»
/*
* FIXME leave only one version of these two getFeatureValue
@@ -63,99 +63,99 @@ false == «EXPAND IsInstance(accessor)»«ENDDEFINE»
* @param containerMetaClass the <code>GenClass</code> of the container, or <code>null</code>, if the container is declared as an <code>org.eclipse.emf.ecore.EObject</code>.
* @param needsCastToResultType whether the cast to the result type is required (this parameter is only used if the <code>org.eclipse.emf.ecore.EClass</code> this feature belongs to is an external interface).
*/
-«DEFINE getFeatureValue(containerVar : String, container : genmodel::GenClass, needsCastToResultType : Boolean) FOR genmodel::GenFeature-»
-«IF isExternalInterface(genClass)-»
-«IF needsCastToResultType»((«EXPAND featureTargetType») «ENDIF»«parenthesizedCast(containerVar, container, null)».eGet(«EXPAND MetaFeature»)«IF needsCastToResultType»)«ENDIF-»
-«ELSE-»
-«parenthesizedCast(containerVar, container, genClass)».«getGetAccessor(self)»()«-»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE modifyFeature(targetVar : String, targetType : genmodel::GenClass, value : String) FOR genmodel::GenFeature-»
-«IF isListType(self)-»
-«EXPAND getFeatureValue(targetVar, targetType)».add(«value»);«-»
-«ELSE-»
-«EXPAND setFeatureValue(targetVar, targetType, value)»;«-»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE replaceFeatureValue(targetVar : String, targetType : genmodel::GenClass, oldValue : String, newValue : String) FOR genmodel::GenFeature-»
-«IF isListType(self)-»
- «EXPAND getFeatureValue(targetVar, targetType)».remove(«oldValue»);
-«ENDIF-»
- «EXPAND modifyFeature(targetVar, targetType, newValue)-»
-«ENDDEFINE»
-
-«DEFINE moveFeatureValue(oldTarget : String, newTarget : String, targetType : genmodel::GenClass, value : String) FOR genmodel::GenFeature-»
-«IF isListType(self)-»
- «EXPAND getFeatureValue(oldTarget, targetType)».remove(«value»);
-«ELSE-»
- «EXPAND setFeatureValue(oldTarget, targetType, 'null')»;
-«ENDIF-»
- «EXPAND modifyFeature(newTarget, targetType, value)-»
-«ENDDEFINE»
-
-«DEFINE setFeatureValue(targetVar : String, targetType : genmodel::GenClass, valueVar : String) FOR genmodel::GenFeature-»
-«EXPAND setFeatureValue(targetVar, targetType, valueVar, false)»«ENDDEFINE»
+«DEFINE getFeatureValue(containerVar : String, container : genmodel::GenClass, needsCastToResultType : Boolean) FOR genmodel::GenFeature-»
+«IF isExternalInterface(genClass)-»
+«IF needsCastToResultType»((«EXPAND featureTargetType») «ENDIF»«parenthesizedCast(containerVar, container, null)».eGet(«EXPAND MetaFeature»)«IF needsCastToResultType»)«ENDIF-»
+«ELSE-»
+«parenthesizedCast(containerVar, container, genClass)».«getGetAccessor(self)»()«-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE modifyFeature(targetVar : String, targetType : genmodel::GenClass, value : String) FOR genmodel::GenFeature-»
+«IF isListType(self)-»
+«EXPAND getFeatureValue(targetVar, targetType)».add(«value»);«-»
+«ELSE-»
+«EXPAND setFeatureValue(targetVar, targetType, value)»;«-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE replaceFeatureValue(targetVar : String, targetType : genmodel::GenClass, oldValue : String, newValue : String) FOR genmodel::GenFeature-»
+«IF isListType(self)-»
+ «EXPAND getFeatureValue(targetVar, targetType)».remove(«oldValue»);
+«ENDIF-»
+ «EXPAND modifyFeature(targetVar, targetType, newValue)-»
+«ENDDEFINE»
+
+«DEFINE moveFeatureValue(oldTarget : String, newTarget : String, targetType : genmodel::GenClass, value : String) FOR genmodel::GenFeature-»
+«IF isListType(self)-»
+ «EXPAND getFeatureValue(oldTarget, targetType)».remove(«value»);
+«ELSE-»
+ «EXPAND setFeatureValue(oldTarget, targetType, 'null')»;
+«ENDIF-»
+ «EXPAND modifyFeature(newTarget, targetType, value)-»
+«ENDDEFINE»
+
+«DEFINE setFeatureValue(targetVar : String, targetType : genmodel::GenClass, valueVar : String) FOR genmodel::GenFeature-»
+«EXPAND setFeatureValue(targetVar, targetType, valueVar, false)»«ENDDEFINE»
// FIXME support list features as well, i.e. do .add() instead of eSet
-«DEFINE setFeatureValue(targetVar : String, targetType : genmodel::GenClass, valueVar : String, isPlainObjectValue : Boolean) FOR genmodel::GenFeature-»
-«IF isExternalInterface(targetType)-»
-((org.eclipse.emf.ecore.EObject) «targetVar»).eSet(«EXPAND MetaFeature», «valueVar»)«-»
-«ELSE-»
-«targetVar».set«getAccessorName(self)»(«IF not isPlainObjectValue»«valueVar»«ELSE»«IF isPrimitiveType(self)»«EXPAND _unwrapObjectToPrimitiveValue(valueVar)»«ELSE»(«EXPAND featureTargetType») «valueVar»«ENDIF»«ENDIF»)«-»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE setFeatureValue(targetVar : String, targetType : genmodel::GenClass, valueVar : String, isPlainObjectValue : Boolean) FOR genmodel::GenFeature-»
+«IF isExternalInterface(targetType)-»
+((org.eclipse.emf.ecore.EObject) «targetVar»).eSet(«EXPAND MetaFeature», «valueVar»)«-»
+«ELSE-»
+«targetVar».set«getAccessorName(self)»(«IF not isPlainObjectValue»«valueVar»«ELSE»«IF isPrimitiveType(self)»«EXPAND _unwrapObjectToPrimitiveValue(valueVar)»«ELSE»(«EXPAND featureTargetType») «valueVar»«ENDIF»«ENDIF»)«-»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE _unwrapObjectToPrimitiveValue(valueVar : String) FOR genmodel::GenFeature-»
-((«EXPAND featureTargetType») «valueVar»).«ecoreFeature.eType.instanceClassName»Value()«ENDDEFINE»
+«DEFINE _unwrapObjectToPrimitiveValue(valueVar : String) FOR genmodel::GenFeature-»
+((«EXPAND featureTargetType») «valueVar»).«ecoreFeature.eType.instanceClassName»Value()«ENDDEFINE»
-«DEFINE MetaClass FOR genmodel::GenClassifier»«getQualifiedPackageInterfaceName(genPackage)».eINSTANCE.get«getClassifierAccessorName(self)»()«ENDDEFINE»
+«DEFINE MetaClass FOR genmodel::GenClassifier»«getQualifiedPackageInterfaceName(genPackage)».eINSTANCE.get«getClassifierAccessorName(self)»()«ENDDEFINE»
-«DEFINE MetaFeature FOR genmodel::GenFeature»«getQualifiedPackageInterfaceName(genClass.genPackage)».eINSTANCE.get«getFeatureAccessorName(self)»()«ENDDEFINE»
+«DEFINE MetaFeature FOR genmodel::GenFeature»«getQualifiedPackageInterfaceName(genClass.genPackage)».eINSTANCE.get«getFeatureAccessorName(self)»()«ENDDEFINE»
// SomeFactory.eINSTANCE.createBlaBla();
//NB: for map entries, the resulting type is EObject, not the qualified interface name. If cast is needed, use (un)parenthesizedCast() extension.
//see GenClassImpl#hasFactoryInterfaceCreateMethod() for details why map entries should be treated differently
-«DEFINE NewInstance FOR genmodel::GenClass-»
-«IF isMapEntry(self)-»
-«getQualifiedFactoryInterfaceName(genPackage)».«getFactoryInstanceName(genPackage)».create(«EXPAND MetaClass»)«ELSE-»
-«getQualifiedFactoryInterfaceName(genPackage)».«getFactoryInstanceName(genPackage)».create«ecoreClass.name»()«ENDIF-»
-«ENDDEFINE»
+«DEFINE NewInstance FOR genmodel::GenClass-»
+«IF isMapEntry(self)-»
+«getQualifiedFactoryInterfaceName(genPackage)».«getFactoryInstanceName(genPackage)».create(«EXPAND MetaClass»)«ELSE-»
+«getQualifiedFactoryInterfaceName(genPackage)».«getFactoryInstanceName(genPackage)».create«ecoreClass.name»()«ENDIF-»
+«ENDDEFINE»
// XXX Need to take into account possible GenClass from generated and always available code
// e.g. Notation or Ecore
-«DEFINE NewInstance(varName : String) FOR genmodel::GenClass-»
-«getQualifiedInterfaceName(self)» «varName» = «IF isMapEntry(self)»(«getQualifiedInterfaceName(self)») «ENDIF»«EXPAND NewInstance»;
-«ENDDEFINE»
+«DEFINE NewInstance(varName : String) FOR genmodel::GenClass-»
+«getQualifiedInterfaceName(self)» «varName» = «IF isMapEntry(self)»(«getQualifiedInterfaceName(self)») «ENDIF»«EXPAND NewInstance»;
+«ENDDEFINE»
/*
* Ensures value is of type EObject, may be no-op if context GenClass is compatible with EObject.
* Note, injected value is not surrounded with parenthesis, may need to introduce another
* template to accomplish that if needed.
*/
-«DEFINE DowncastToEObject(value : String) FOR genmodel::GenClass»«IF isExternalInterface(self)»(org.eclipse.emf.ecore.EObject) «ENDIF»«value»«ENDDEFINE»
+«DEFINE DowncastToEObject(value : String) FOR genmodel::GenClass»«IF isExternalInterface(self)»(org.eclipse.emf.ecore.EObject) «ENDIF»«value»«ENDDEFINE»
/*
* Declares new variable of appropriate type and assigns casted value to it.
*/
-«DEFINE DeclareAndAssign(assignee : String, value : String) FOR genmodel::GenClass-»
-«getQualifiedInterfaceName(self)» «assignee» = («getQualifiedInterfaceName(self)») «value»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String) FOR genmodel::GenClass-»
+«getQualifiedInterfaceName(self)» «assignee» = («getQualifiedInterfaceName(self)») «value»;«ENDDEFINE»
/*
* third boolean parameter is to indicate the value is not EObject, so may
* need extra cast in case dynamic model instances are in use.
*/
-«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClass-»
-«EXPAND DeclareAndAssign(assignee, value)»«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClass-»
+«EXPAND DeclareAndAssign(assignee, value)»«ENDDEFINE»
-«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClassifier-»
-«self.getQualifiedClassName()» «assignee» = («self.getQualifiedClassName()») «value»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, value : String, isPlainObjectValue : Boolean) FOR genmodel::GenClassifier-»
+«self.getQualifiedClassName()» «assignee» = («self.getQualifiedClassName()») «value»;«ENDDEFINE»
// @see IsContainerInstance
-«DEFINE DeclareAndAssignContainer(assignee : String, _object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
-«getQualifiedInterfaceName(self)» «assignee» = («getQualifiedInterfaceName(self)») «EXPAND _getEObjectFeature(_object, 'eContainer()') FOR metaClass»;«ENDDEFINE»
+«DEFINE DeclareAndAssignContainer(assignee : String, _object : String, metaClass : genmodel::GenClass) FOR genmodel::GenClass-»
+«getQualifiedInterfaceName(self)» «assignee» = («getQualifiedInterfaceName(self)») «EXPAND _getEObjectFeature(_object, 'eContainer()') FOR metaClass»;«ENDDEFINE»
/*
* Declares new variable of context type and assignes a value obtained from 'src',
@@ -163,31 +163,31 @@ false == «EXPAND IsInstance(accessor)»«ENDDEFINE»
*
* XXX in certain scenarions may need extra cast of the feature value
*/
-«DEFINE DeclareAndAssign(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature) FOR genmodel::GenClass-»
-«getQualifiedInterfaceName(self)» «assignee» = «EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature»;«ENDDEFINE»
+«DEFINE DeclareAndAssign(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature) FOR genmodel::GenClass-»
+«getQualifiedInterfaceName(self)» «assignee» = «EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature»;«ENDDEFINE»
/*
* Same as DeclareAndAssign, with extra operation applied to source object
*/
-«DEFINE DeclareAndAssign2(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature, srcExt : String, needCast : Boolean) FOR genmodel::GenClass-»
-«getQualifiedInterfaceName(self)» «assignee» = «IF needCast»(«getQualifiedInterfaceName(self)») «ENDIF»«EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature».«srcExt»;«ENDDEFINE»
+«DEFINE DeclareAndAssign2(assignee : String, src : String, srcMetaClass : genmodel::GenClass, srcFeature : genmodel::GenFeature, srcExt : String, needCast : Boolean) FOR genmodel::GenClass-»
+«getQualifiedInterfaceName(self)» «assignee» = «IF needCast»(«getQualifiedInterfaceName(self)») «ENDIF»«EXPAND getFeatureValue(src, srcMetaClass) FOR srcFeature».«srcExt»;«ENDDEFINE»
/*
* Cast value of type EObject to specific type. Would be no-op with dynamic model instances,
* therefore, the fact eObjectValue is actually EObject is essential
*/
-«DEFINE CastEObject(eObjectValue : String) FOR genmodel::GenClass»(«getQualifiedInterfaceName(self)») «eObjectValue»«ENDDEFINE»
+«DEFINE CastEObject(eObjectValue : String) FOR genmodel::GenClass»(«getQualifiedInterfaceName(self)») «eObjectValue»«ENDDEFINE»
/**
* Qualified interface name of the generated EClass, or EObject for dynamic models.
* Use whenever class name is inevitable (e.g. method arguments)
* SHOULD NEVER APPEAR in instanceof or any other similar comparison operation
*/
-«DEFINE QualifiedClassName FOR genmodel::GenClass»«getQualifiedInterfaceName(self)»«ENDDEFINE»
-«DEFINE QualifiedClassName FOR genmodel::GenClassifier»«self.getQualifiedClassName()»«ENDDEFINE»
-
-«DEFINE PopulateItemProviderFactories(factoryListVar : String) FOR gmfgen::GenEditorGenerator-»
-«FOREACH getAllDomainGenPackages(true)->asSequence() AS genPackage-»
- «factoryListVar».add(new «getQualifiedItemProviderAdapterFactoryClassName(genPackage)»());
-«ENDFOREACH-»
-«ENDDEFINE»
+«DEFINE QualifiedClassName FOR genmodel::GenClass»«getQualifiedInterfaceName(self)»«ENDDEFINE»
+«DEFINE QualifiedClassName FOR genmodel::GenClassifier»«self.getQualifiedClassName()»«ENDDEFINE»
+
+«DEFINE PopulateItemProviderFactories(factoryListVar : String) FOR gmfgen::GenEditorGenerator-»
+«FOREACH getAllDomainGenPackages(true)->asSequence() AS genPackage-»
+ «factoryListVar».add(new «getQualifiedItemProviderAdapterFactoryClassName(genPackage)»());
+«ENDFOREACH-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ChildNodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ChildNodeLabelEditPart.xpt
index 1d641e085..7ed67924d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ChildNodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ChildNodeLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,80 +11,80 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE Main FOR gmfgen::GenChildLabelNode-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenChildLabelNode-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::contsructor-»
+ «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::contsructor-»
- «EXPAND getDragTracker-»
+ «EXPAND getDragTracker-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::TextAware::methods(false, labelReadOnly, labelElementIcon, viewmap, labelModelFacet, self, getDiagram())-»
+ «EXPAND impl::diagram::editparts::TextAware::methods(false, labelReadOnly, labelElementIcon, viewmap, labelModelFacet, self, getDiagram())-»
- «EXPAND xpt::diagram::editparts::Common::notationalListeners-»
+ «EXPAND xpt::diagram::editparts::Common::notationalListeners-»
-«IF getAssistantOutgoingLinks(self)->size() > 0-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSource-»
+«IF getAssistantOutgoingLinks(self)->size() > 0-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSource-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSourceAndTarget-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSourceAndTarget-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForTarget-»
-«ENDIF-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForTarget-»
+«ENDIF-»
-«IF getAssistantIncomingLinks(self)->size() > 0-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnTarget-»
+«IF getAssistantIncomingLinks(self)->size() > 0-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnTarget-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForSource-»
-«ENDIF-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForSource-»
+«ENDIF-»
- «EXPAND handleNotificationEvent-»
+ «EXPAND handleNotificationEvent-»
- «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
+ «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenChildLabelNode»extends org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenChildLabelNode»extends org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenChildLabelNode»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenChildLabelNode»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenChildLabelNode-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
+«DEFINE attributes FOR gmfgen::GenChildLabelNode-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
- «EXPAND impl::diagram::editparts::TextAware::fields FOR self-»
-«ENDDEFINE»
+ «EXPAND impl::diagram::editparts::TextAware::fields FOR self-»
+«ENDDEFINE»
-«DEFINE getDragTracker FOR gmfgen::GenChildLabelNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDragTracker FOR gmfgen::GenChildLabelNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gef.DragTracker getDragTracker(org.eclipse.gef.Request request) {
- «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::getDragTrackerBody-»
+ «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::getDragTrackerBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenChildLabelNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenChildLabelNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenChildLabelNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE handleNotificationEvent FOR gmfgen::GenChildLabelNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification event) {
- «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::handleNotificationEventBody-»
+ «EXPAND impl::diagram::editparts::ChildNodeLabelEditPart::handleNotificationEventBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenChildLabelNode»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenChildLabelNode»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/CompartmentEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/CompartmentEditPart.xpt
index 40678cd52..764e64e8e 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/CompartmentEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/CompartmentEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,64 +11,64 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE Main FOR gmfgen::GenCompartment-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenCompartment-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::contsructor-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::contsructor-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::hasModelChildrenChanged-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::hasModelChildrenChanged-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::getCompartmentName-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::getCompartmentName-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::createFigure-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::createFigure-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::refreshVisuals-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::refreshVisuals-»
- «EXPAND handleNotificationEvent-»
+ «EXPAND handleNotificationEvent-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::refreshBounds-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::refreshBounds-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::setRatio-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::setRatio-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenCompartment-»
-extends «IF listLayout»org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart«ENDIF-»
-«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenCompartment-»
+extends «IF listLayout»org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart«ENDIF-»
+«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenCompartment»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenCompartment»«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenCompartment-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
-«ENDDEFINE»
+«DEFINE attributes FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenCompartment-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::CompartmentEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenCompartment-»
- «IF isStoringChildPositions(node)-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE handleNotificationEvent FOR gmfgen::GenCompartment-»
+ «IF isStoringChildPositions(node)-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification notification) {
- «EXPAND impl::diagram::editparts::CompartmentEditPart::handleNotificationEventBody-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::handleNotificationEventBody-»
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenCompartment»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenCompartment»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/DiagramEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/DiagramEditPart.xpt
index c8eebf340..84cae8b76 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/DiagramEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/DiagramEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,55 +11,55 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE Main FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::DiagramEditPart::_constructor-»
+ «EXPAND impl::diagram::editparts::DiagramEditPart::_constructor-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::DiagramEditPart::createFigure-»
+ «EXPAND impl::diagram::editparts::DiagramEditPart::createFigure-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenDiagram»extends org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenDiagram»extends org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenDiagram»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenDiagram»«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public final static String MODEL_ID = "«editorGen.modelID»"; «EXPAND xpt::Common::nonNLS»
+«DEFINE attributes FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public final static String MODEL_ID = "«editorGen.modelID»"; «EXPAND xpt::Common::nonNLS»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
-«ENDDEFINE»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::DiagramEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::DiagramEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE definionName FOR gmfgen::GenDiagram-»
-«ENDDEFINE»
+«DEFINE definionName FOR gmfgen::GenDiagram-»
+«ENDDEFINE»
-«DEFINE definionName FOR gmfgen::GenDiagram-»
-«ENDDEFINE»
+«DEFINE definionName FOR gmfgen::GenDiagram-»
+«ENDDEFINE»
-«DEFINE definionName FOR gmfgen::GenDiagram-»
-«ENDDEFINE»
+«DEFINE definionName FOR gmfgen::GenDiagram-»
+«ENDDEFINE»
-«DEFINE definionName FOR gmfgen::GenDiagram-»
-«ENDDEFINE»
+«DEFINE definionName FOR gmfgen::GenDiagram-»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ExternalNodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ExternalNodeLabelEditPart.xpt
index 3df29a90b..3747c3b54 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ExternalNodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/ExternalNodeLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,59 +11,59 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE Main FOR gmfgen::GenExternalNodeLabel-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenExternalNodeLabel-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::initializer-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::initializer-»
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::_constructor-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::_constructor-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::getBorderItemLocator-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::getBorderItemLocator-»
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::refreshBounds-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::refreshBounds-»
- «EXPAND impl::diagram::editparts::TextAware::methods(false, readOnly, elementIcon, viewmap, modelFacet, node, getDiagram())-»
+ «EXPAND impl::diagram::editparts::TextAware::methods(false, readOnly, elementIcon, viewmap, modelFacet, node, getDiagram())-»
- «EXPAND handleNotificationEvent-»
+ «EXPAND handleNotificationEvent-»
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::createFigure-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::createFigure-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenExternalNodeLabel»extends org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenExternalNodeLabel»extends org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenExternalNodeLabel»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenExternalNodeLabel»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
+«DEFINE attributes FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
- «EXPAND impl::diagram::editparts::TextAware::fields FOR self-»
-«ENDDEFINE»
+ «EXPAND impl::diagram::editparts::TextAware::fields FOR self-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE handleNotificationEvent FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification event) {
- «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::handleNotificationEventBody-»
+ «EXPAND impl::diagram::editparts::ExternalNodeLabelEditPart::handleNotificationEventBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenExternalNodeLabel»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenExternalNodeLabel»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkEditPart.xpt
index 25a09b226..c6a5cde49 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,51 +11,51 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE Main FOR gmfgen::GenLink-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenLink-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::LinkEditPart::_constructor-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::_constructor-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::LinkEditPart::addFixedChild-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::addFixedChild-»
- «EXPAND impl::diagram::editparts::LinkEditPart::addChildVisual-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::addChildVisual-»
- «EXPAND impl::diagram::editparts::LinkEditPart::removeFixedChild-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::removeFixedChild-»
- «EXPAND impl::diagram::editparts::LinkEditPart::removeChildVisual-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::removeChildVisual-»
- «EXPAND impl::diagram::editparts::LinkEditPart::createLinkFigure-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::createLinkFigure-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenLink»extends org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenLink»extends org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenLink-»
- «IF treeBranch»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart«ENDIF-»
-«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenLink-»
+ «IF treeBranch»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITreeBranchEditPart«ENDIF-»
+«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenLink-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant-»
-«ENDDEFINE»
+«DEFINE attributes FOR gmfgen::GenLink-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenLink-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenLink-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::LinkEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::LinkEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenLink-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenLink-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkLabelEditPart.xpt
index ef4f68bd2..f98e5b6a6 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/LinkLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,58 +11,58 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE Main FOR gmfgen::GenLinkLabel-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenLinkLabel-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::LinkLabelEditPart::initializer-»
+ «EXPAND impl::diagram::editparts::LinkLabelEditPart::initializer-»
- «EXPAND impl::diagram::editparts::LinkLabelEditPart::_constructor-»
+ «EXPAND impl::diagram::editparts::LinkLabelEditPart::_constructor-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::LinkLabelEditPart::getKeyPoint-»
+ «EXPAND impl::diagram::editparts::LinkLabelEditPart::getKeyPoint-»
- «EXPAND impl::diagram::editparts::TextAware::methods(false, readOnly, elementIcon, viewmap, modelFacet, link, getDiagram())-»
+ «EXPAND impl::diagram::editparts::TextAware::methods(false, readOnly, elementIcon, viewmap, modelFacet, link, getDiagram())-»
- «EXPAND handleNotificationEvent-»
+ «EXPAND handleNotificationEvent-»
- «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
+ «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenLinkLabel»extends org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenLinkLabel»extends org.eclipse.gmf.runtime.diagram.ui.editparts.LabelEditPart«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenLinkLabel»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenLinkLabel»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenLinkLabel-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant-»
+«DEFINE attributes FOR gmfgen::GenLinkLabel-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant-»
- «EXPAND impl::diagram::editparts::TextAware::fields-»
-«ENDDEFINE»
+ «EXPAND impl::diagram::editparts::TextAware::fields-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenLinkLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenLinkLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::LinkLabelEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::LinkLabelEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenLinkLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE handleNotificationEvent FOR gmfgen::GenLinkLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification event) {
- «EXPAND impl::diagram::editparts::LinkLabelEditPart::handleNotificationEventBody-»
+ «EXPAND impl::diagram::editparts::LinkLabelEditPart::handleNotificationEventBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenLinkLabel-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenLinkLabel-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt
index bf0a39ada..7ec30ea94 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,121 +11,121 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE Main FOR gmfgen::GenNode-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenNode-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::NodeEditPart::_constructor-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::_constructor-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::NodeEditPart::createLayoutEditPolicy-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::createLayoutEditPolicy-»
- «EXPAND impl::diagram::editparts::NodeEditPart::createNodeShape(self) FOR viewmap-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::createNodeShape(self) FOR viewmap-»
-«IF hasFixedChildren(self)-»
- «EXPAND impl::diagram::editparts::NodeEditPart::addFixedChild-»
+«IF hasFixedChildren(self)-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::addFixedChild-»
- «EXPAND impl::diagram::editparts::NodeEditPart::removeFixedChild-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::removeFixedChild-»
- «EXPAND impl::diagram::editparts::NodeEditPart::addChildVisual-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::addChildVisual-»
- «EXPAND impl::diagram::editparts::NodeEditPart::removeChildVisual-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::removeChildVisual-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getContentPaneFor-»
-«ENDIF-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getContentPaneFor-»
+«ENDIF-»
- «EXPAND impl::diagram::editparts::NodeEditPart::addBorderItem-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::addBorderItem-»
- «EXPAND impl::diagram::editparts::NodeEditPart::createNodePlate-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::createNodePlate-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryDragEditPolicy-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryDragEditPolicy-»
- «EXPAND impl::diagram::editparts::NodeEditPart::createFigure-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::createFigure-»
- «EXPAND impl::diagram::editparts::NodeEditPart::setupContentPane-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::setupContentPane-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getContentPane-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getContentPane-»
- «EXPAND impl::diagram::editparts::NodeEditPart::setForegroundColor-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::setForegroundColor-»
- «EXPAND impl::diagram::editparts::NodeEditPart::setBackgroundColor-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::setBackgroundColor-»
- «EXPAND impl::diagram::editparts::NodeEditPart::setLineWidth-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::setLineWidth-»
- «EXPAND impl::diagram::editparts::NodeEditPart::setLineStyle-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::setLineStyle-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryChildEditPart-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getPrimaryChildEditPart-»
-«IF getAssistantOutgoingLinks(self)->size() > 0-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSource-»
+«IF getAssistantOutgoingLinks(self)->size() > 0-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSource-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSourceAndTarget-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnSourceAndTarget-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForTarget-»
-«ENDIF-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForTarget-»
+«ENDIF-»
-«IF getAssistantIncomingLinks(self)->size() > 0-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnTarget-»
+«IF getAssistantIncomingLinks(self)->size() > 0-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMARelTypesOnTarget-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForSource-»
-«ENDIF-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getMATypesForSource-»
+«ENDIF-»
-«IF hasChildrenInListCompartments(self)-»
- «EXPAND impl::diagram::editparts::NodeEditPart::getTargetEditPartMethod-»
-«ENDIF-»
+«IF hasChildrenInListCompartments(self)-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::getTargetEditPartMethod-»
+«ENDIF-»
- «EXPAND handleNotificationEvent-»
+ «EXPAND handleNotificationEvent-»
- «EXPAND impl::diagram::editparts::NodeEditPart::innerClassDeclaration FOR viewmap-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::innerClassDeclaration FOR viewmap-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenNode»extends «EXPAND impl::diagram::editparts::NodeEditPart::extendsListContents»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenNode»extends «EXPAND impl::diagram::editparts::NodeEditPart::extendsListContents»«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenNode»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenNode»«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenNode-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
+«DEFINE attributes FOR gmfgen::GenNode-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure contentPane;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure primaryShape;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::NodeEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenNode-»
-«ENDDEFINE»
+«DEFINE handleNotificationEvent FOR gmfgen::GenNode-»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenTopLevelNode-»
- «REM»This code is important for refreshing shortcut decoration
- on adding corresponding annotation to the View instance.«ENDREM»
- «IF getDiagram().generateShortcutIcon()-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE handleNotificationEvent FOR gmfgen::GenTopLevelNode-»
+ «REM»This code is important for refreshing shortcut decoration
+ on adding corresponding annotation to the View instance.«ENDREM»
+ «IF getDiagram().generateShortcutIcon()-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification event) {
- «EXPAND impl::diagram::editparts::NodeEditPart::handleNotificationEventBody-»
+ «EXPAND impl::diagram::editparts::NodeEditPart::handleNotificationEventBody-»
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenNode-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenNode-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeLabelEditPart.xpt
index b1543afc6..24e11616c 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editparts/NodeLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,59 +11,59 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE Main FOR gmfgen::GenNodeLabel-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPartsPackageName»;
+«DEFINE Main FOR gmfgen::GenNodeLabel-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartClassName» «EXPAND extendsList» «EXPAND implementsList» {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND impl::diagram::editparts::NodeLabelEditPart::_constructor-»
+ «EXPAND impl::diagram::editparts::NodeLabelEditPart::_constructor-»
- «EXPAND createDefaultEditPolicies-»
+ «EXPAND createDefaultEditPolicies-»
- «EXPAND impl::diagram::editparts::TextAware::methods(isStoringChildPositions(node), readOnly, elementIcon, viewmap, modelFacet, node, getDiagram())-»
+ «EXPAND impl::diagram::editparts::TextAware::methods(isStoringChildPositions(node), readOnly, elementIcon, viewmap, modelFacet, node, getDiagram())-»
- «EXPAND xpt::diagram::editparts::Common::notationalListeners-»
+ «EXPAND xpt::diagram::editparts::Common::notationalListeners-»
- «EXPAND impl::diagram::editparts::NodeLabelEditPart::refreshBounds-»
+ «EXPAND impl::diagram::editparts::NodeLabelEditPart::refreshBounds-»
- «EXPAND handleNotificationEvent-»
+ «EXPAND handleNotificationEvent-»
- «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
+ «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenNodeLabel»extends org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenNodeLabel»extends org.eclipse.gmf.runtime.diagram.ui.editparts.CompartmentEditPart«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenNodeLabel»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenNodeLabel»implements org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenNodeLabel-»
- «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
+«DEFINE attributes FOR gmfgen::GenNodeLabel-»
+ «EXPAND xpt::diagram::editparts::Common::visualIDConstant FOR self-»
- «EXPAND impl::diagram::editparts::TextAware::fields FOR self-»
-«ENDDEFINE»
+ «EXPAND impl::diagram::editparts::TextAware::fields FOR self-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPolicies FOR gmfgen::GenNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createDefaultEditPolicies FOR gmfgen::GenNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void createDefaultEditPolicies() {
- «EXPAND impl::diagram::editparts::NodeLabelEditPart::createDefaultEditPoliciesBody-»
+ «EXPAND impl::diagram::editparts::NodeLabelEditPart::createDefaultEditPoliciesBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEvent FOR gmfgen::GenNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE handleNotificationEvent FOR gmfgen::GenNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void handleNotificationEvent(org.eclipse.emf.common.notify.Notification event) {
- «EXPAND impl::diagram::editparts::NodeLabelEditPart::handleNotificationEventBody-»
+ «EXPAND impl::diagram::editparts::NodeLabelEditPart::handleNotificationEventBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenNodeLabel-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenNodeLabel-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CreateShortcutAction.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CreateShortcutAction.xpt
index 71640e6be..35b31ae75 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CreateShortcutAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CreateShortcutAction.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,39 +11,39 @@
* Artem Tikhomirov (Borland) - [174961] migration to Commands/Handlers
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::editor::Utils»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::editor::Utils»
+«EXTENSION xpt::StringOperations»
-«DEFINE Main FOR gmfgen::CreateShortcutAction-»
-«EXPAND xpt::Common::copyright FOR owner.editorGen-»
-«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
+«DEFINE Main FOR gmfgen::CreateShortcutAction-»
+«EXPAND xpt::Common::copyright FOR owner.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
-«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
-«EXPAND executeMethod»
-«EXPAND additions-»
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND executeMethod»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::CreateShortcutAction» extends org.eclipse.core.commands.AbstractHandler«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::CreateShortcutAction»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::CreateShortcutAction» extends org.eclipse.core.commands.AbstractHandler«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::CreateShortcutAction»«ENDDEFINE»
-«DEFINE executeMethod FOR gmfgen::CreateShortcutAction-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE executeMethod FOR gmfgen::CreateShortcutAction-»
+ «EXPAND xpt::Common::generatedMemberComment»
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
org.eclipse.ui.IEditorPart diagramEditor = org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(event);
org.eclipse.swt.widgets.Shell shell = diagramEditor.getEditorSite().getShell();
- «EXPAND xpt::Common::_assert('diagramEditor instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor')-»
+ «EXPAND xpt::Common::_assert('diagramEditor instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor')-»
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = ((org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor) diagramEditor).getEditingDomain();
org.eclipse.jface.viewers.ISelection selection = org.eclipse.ui.handlers.HandlerUtil.getCurrentSelectionChecked(event);
- «EXPAND xpt::Common::_assert('selection instanceof org.eclipse.jface.viewers.IStructuredSelection')-»
- «EXPAND xpt::Common::_assert('((org.eclipse.jface.viewers.IStructuredSelection) selection).size() == 1')-»
- «EXPAND xpt::Common::_assert('((org.eclipse.jface.viewers.IStructuredSelection) selection).getFirstElement() instanceof org.eclipse.gef.EditPart')-»
+ «EXPAND xpt::Common::_assert('selection instanceof org.eclipse.jface.viewers.IStructuredSelection')-»
+ «EXPAND xpt::Common::_assert('((org.eclipse.jface.viewers.IStructuredSelection) selection).size() == 1')-»
+ «EXPAND xpt::Common::_assert('((org.eclipse.jface.viewers.IStructuredSelection) selection).getFirstElement() instanceof org.eclipse.gef.EditPart')-»
org.eclipse.gef.EditPart selectedDiagramPart = (org.eclipse.gef.EditPart) ((org.eclipse.jface.viewers.IStructuredSelection) selection).getFirstElement();
final org.eclipse.gmf.runtime.notation.View view = (org.eclipse.gmf.runtime.notation.View) selectedDiagramPart.getModel();
-«IF null = owner.editorGen.application-»
- «owner.editorGen.diagram.getElementChooserQualifiedClassName()» elementChooser = new «owner.editorGen.diagram.getElementChooserQualifiedClassName()»(shell, view);
+«IF null = owner.editorGen.application-»
+ «owner.editorGen.diagram.getElementChooserQualifiedClassName()» elementChooser = new «owner.editorGen.diagram.getElementChooserQualifiedClassName()»(shell, view);
int result = elementChooser.open();
if (result != org.eclipse.jface.window.Window.OK) {
return null;
@@ -53,46 +53,46 @@ public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«
try {
selectedElement = editingDomain.getResourceSet().getEObject(selectedModelElementURI, true);
} catch (org.eclipse.emf.common.util.WrappedException e) {
- «owner.editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Exception while loading object: " + selectedModelElementURI.toString(), e);«EXPAND xpt::Common::nonNLS»
+ «owner.editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Exception while loading object: " + selectedModelElementURI.toString(), e);«EXPAND xpt::Common::nonNLS»
return null;
}
if (selectedElement == null) {
return null;
}
- org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor viewDescriptor = new org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor(new org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter(selectedElement), org.eclipse.gmf.runtime.notation.Node.class, null, «EXPAND xpt::plugin::Activator::preferenceHintAccess FOR owner.editorGen»);
+ org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor viewDescriptor = new org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor(new org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter(selectedElement), org.eclipse.gmf.runtime.notation.Node.class, null, «EXPAND xpt::plugin::Activator::preferenceHintAccess FOR owner.editorGen»);
org.eclipse.gmf.runtime.common.core.command.ICommand command = new org.eclipse.gmf.runtime.diagram.ui.commands.CreateCommand(editingDomain, viewDescriptor, view);
- command = command.compose(new «owner.editorGen.diagram.getCreateShortcutDecorationsCommandQualifiedClassName()»(editingDomain, view, viewDescriptor));
+ command = command.compose(new «owner.editorGen.diagram.getCreateShortcutDecorationsCommandQualifiedClassName()»(editingDomain, view, viewDescriptor));
try {
org.eclipse.core.commands.operations.OperationHistoryFactory.getOperationHistory().execute(command, new org.eclipse.core.runtime.NullProgressMonitor(), null);
} catch (org.eclipse.core.commands.ExecutionException e) {
- «owner.editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Unable to create shortcut", e);«EXPAND xpt::Common::nonNLS»
+ «owner.editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Unable to create shortcut", e);«EXPAND xpt::Common::nonNLS»
}
-«ELSE-»
- org.eclipse.emf.ecore.resource.Resource resource = «owner.editorGen.diagram.getDiagramEditorUtilQualifiedClassName()».openModel(shell, «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForCreateShortcutOpenModel())) FOR owner.editorGen», editingDomain);
+«ELSE-»
+ org.eclipse.emf.ecore.resource.Resource resource = «owner.editorGen.diagram.getDiagramEditorUtilQualifiedClassName()».openModel(shell, «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForCreateShortcutOpenModel())) FOR owner.editorGen», editingDomain);
if (resource == null || resource.getContents().isEmpty()) {
return null;
}
- «EXPAND xpt::editor::ShortcutCreationWizard::qualifiedClassName FOR owner.editorGen.diagram» wizard = new «EXPAND xpt::editor::ShortcutCreationWizard::qualifiedClassName FOR owner.editorGen.diagram»((org.eclipse.emf.ecore.EObject) resource.getContents().get(0), view, editingDomain);
- wizard.setWindowTitle(«EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForCreateShortcutWizard())) FOR owner.editorGen»);
- «owner.editorGen.diagram.getDiagramEditorUtilQualifiedClassName()».runWizard(myShell, wizard, "CreateShortcut");«EXPAND xpt::Common::nonNLS»
-«ENDIF-»
+ «EXPAND xpt::editor::ShortcutCreationWizard::qualifiedClassName FOR owner.editorGen.diagram» wizard = new «EXPAND xpt::editor::ShortcutCreationWizard::qualifiedClassName FOR owner.editorGen.diagram»((org.eclipse.emf.ecore.EObject) resource.getContents().get(0), view, editingDomain);
+ wizard.setWindowTitle(«EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForCreateShortcutWizard())) FOR owner.editorGen»);
+ «owner.editorGen.diagram.getDiagramEditorUtilQualifiedClassName()».runWizard(myShell, wizard, "CreateShortcut");«EXPAND xpt::Common::nonNLS»
+«ENDIF-»
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::CreateShortcutAction»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::CreateShortcutAction»«ENDDEFINE»
-«DEFINE i18nValues FOR gmfgen::GenDiagram-»
-«IF null <> editorGen.application-»
-«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForCreateShortcutOpenModel()), 'Select model to reference')-»
-«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForCreateShortcutWizard()), 'Create shortcut')-»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE i18nValues FOR gmfgen::GenDiagram-»
+«IF null <> editorGen.application-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForCreateShortcutOpenModel()), 'Select model to reference')-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForCreateShortcutWizard()), 'Create shortcut')-»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
-«IF null <> editorGen.application-»
-«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForCreateShortcutOpenModel()))-»
-«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForCreateShortcutWizard()))-»
-«ENDIF-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
+«IF null <> editorGen.application-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForCreateShortcutOpenModel()))-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForCreateShortcutWizard()))-»
+«ENDIF-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CustomAction.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CustomAction.xpt
index 037313f9d..4fed8e7bd 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CustomAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/CustomAction.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,18 +10,18 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::StringOperations»
-«DEFINE Main FOR gmfgen::GenCustomAction-»
-«EXPAND xpt::Common::copyright FOR owner.editorGen-»
-«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
+«DEFINE Main FOR gmfgen::GenCustomAction-»
+«EXPAND xpt::Common::copyright FOR owner.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
-«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\\.')->last()» extends org.eclipse.core.commands.AbstractHandler {
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedClassName.xpandSplit('\\.')->last()» extends org.eclipse.core.commands.AbstractHandler {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
org.eclipse.ui.IEditorPart diagramEditor = org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(event);
org.eclipse.jface.viewers.ISelection selection = org.eclipse.ui.handlers.HandlerUtil.getCurrentSelectionChecked(event);
@@ -29,4 +29,4 @@ public class «qualifiedClassName.xpandSplit('\\.')->last()» extends org.eclipse.
throw new UnsupportedOperationException();
}
}
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/LoadResourceAction.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/LoadResourceAction.xpt
index bbde85327..ab402fb74 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/LoadResourceAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/LoadResourceAction.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,34 +11,34 @@
* Artem Tikhomirov (Borland) - [174961] migration to Commands/Handlers
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::StringOperations»
-«DEFINE Main FOR gmfgen::LoadResourceAction-»
-«EXPAND xpt::Common::copyright FOR owner.editorGen-»
-«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
+«DEFINE Main FOR gmfgen::LoadResourceAction-»
+«EXPAND xpt::Common::copyright FOR owner.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
-«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
-«EXPAND executeMethod»
-«EXPAND additions-»
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND executeMethod»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::LoadResourceAction» extends org.eclipse.core.commands.AbstractHandler«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::LoadResourceAction»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::LoadResourceAction» extends org.eclipse.core.commands.AbstractHandler«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::LoadResourceAction»«ENDDEFINE»
-«DEFINE executeMethod FOR gmfgen::LoadResourceAction-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE executeMethod FOR gmfgen::LoadResourceAction-»
+ «EXPAND xpt::Common::generatedMemberComment»
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
org.eclipse.ui.IEditorPart diagramEditor = org.eclipse.ui.handlers.HandlerUtil.getActiveEditorChecked(event);
org.eclipse.swt.widgets.Shell shell = diagramEditor.getEditorSite().getShell();
- «EXPAND xpt::Common::_assert('diagramEditor instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor')-»
+ «EXPAND xpt::Common::_assert('diagramEditor instanceof org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor')-»
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = ((org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor) diagramEditor).getEditingDomain();
org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog loadResourceDialog = new org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog(shell, editingDomain);
loadResourceDialog.open();
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::LoadResourceAction»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::LoadResourceAction»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/PredefinedAction.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/PredefinedAction.xpt
index 532573b7e..3f1021e98 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/PredefinedAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/PredefinedAction.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,13 +10,13 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE Main FOR gmfgen::GenAction»«ERROR 'Asbtract template for ' + self.repr()»«ENDDEFINE»
+«DEFINE Main FOR gmfgen::GenAction»«ERROR 'Asbtract template for ' + self.repr()»«ENDDEFINE»
-«DEFINE Main FOR gmfgen::LoadResourceAction»«EXPAND LoadResourceAction::Main»«ENDDEFINE»
+«DEFINE Main FOR gmfgen::LoadResourceAction»«EXPAND LoadResourceAction::Main»«ENDDEFINE»
-«DEFINE Main(editorGen : gmfgen::GenEditorGenerator) FOR gmfgen::InitDiagramAction»«EXPAND xpt::editor::InitDiagramFileAction::InitDiagramFileAction(editorGen)»«ENDDEFINE»
+«DEFINE Main(editorGen : gmfgen::GenEditorGenerator) FOR gmfgen::InitDiagramAction»«EXPAND xpt::editor::InitDiagramFileAction::InitDiagramFileAction(editorGen)»«ENDDEFINE»
-«DEFINE Main FOR gmfgen::CreateShortcutAction»«EXPAND CreateShortcutAction::Main»«ENDDEFINE»
+«DEFINE Main FOR gmfgen::CreateShortcutAction»«EXPAND CreateShortcutAction::Main»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt
index 52279d1d7..9e9e00a3c 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/actions/extensions.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,146 +10,146 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION impl::actions::MenuAction»
-«EXTENSION xpt::StringOperations»
+«EXTENSION impl::actions::MenuAction»
+«EXTENSION xpt::StringOperations»
-«DEFINE Main FOR gmfgen::GenEditorGenerator»
+«DEFINE Main FOR gmfgen::GenEditorGenerator»
<extension point="org.eclipse.ui.menus" id="context-menus">
- «EXPAND xpt::Common::xmlGeneratedTag»
- <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=«»">
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <!-- menuContribution locationURI="menu:org.eclipse.ui.main.menu?after=«»">
</menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=«»">
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?after=«»">
</menuContribution -->
-«EXPAND menuContribution FOREACH contextMenus-»
+«EXPAND menuContribution FOREACH contextMenus-»
</extension>
-«IF hasCommandsToContribute(self)-»
+«IF hasCommandsToContribute(self)-»
<extension point="org.eclipse.ui.commands" id="menu-commands">
- «EXPAND xpt::Common::xmlGeneratedTag»
- <category id="«editor.iD»" name="%cmdcategory.name" description="%cmdcategory.desc"/>
-«EXPAND commandContribution FOREACH contextMenus-»
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <category id="«editor.iD»" name="%cmdcategory.name" description="%cmdcategory.desc"/>
+«EXPAND commandContribution FOREACH contextMenus-»
</extension>
-«ENDIF-»
+«ENDIF-»
-«IF hasHandlersToContribute(self)-»
+«IF hasHandlersToContribute(self)-»
<extension point="org.eclipse.ui.handlers" id="menu-handlers">
- «EXPAND xpt::Common::xmlGeneratedTag»
-«EXPAND handlerContribution FOREACH contextMenus-»
+ «EXPAND xpt::Common::xmlGeneratedTag»
+«EXPAND handlerContribution FOREACH contextMenus-»
</extension>
-«ENDIF-»
+«ENDIF-»
<!-- optionally, specify keybindings -->
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE menuContribution FOR gmfgen::GenContextMenu-»
-«EXPAND _menuContribution(self, 'popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu')-»
-«ENDDEFINE»
+«DEFINE menuContribution FOR gmfgen::GenContextMenu-»
+«EXPAND _menuContribution(self, 'popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu')-»
+«ENDDEFINE»
-«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenContributionManager»«ERROR 'Abstract menuContribution for ' + self.repr()»«ENDDEFINE»
-«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenMenuManager»«EXPAND _menuContribution(contextMenu, 'popup:' + iD)»«ENDDEFINE»
-«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenToolBarManager»«EXPAND _menuContribution(contextMenu, 'toolbar:' + iD)»«ENDDEFINE»
+«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenContributionManager»«ERROR 'Abstract menuContribution for ' + self.repr()»«ENDDEFINE»
+«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenMenuManager»«EXPAND _menuContribution(contextMenu, 'popup:' + iD)»«ENDDEFINE»
+«DEFINE menuContribution(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenToolBarManager»«EXPAND _menuContribution(contextMenu, 'toolbar:' + iD)»«ENDDEFINE»
-«DEFINE _menuContribution(contextMenu : gmfgen::GenContextMenu, locationURI : String) FOR gmfgen::GenContributionManager-»
- <menuContribution locationURI="«locationURI»">
-«EXPAND menuEntry(contextMenu) FOREACH items-»
+«DEFINE _menuContribution(contextMenu : gmfgen::GenContextMenu, locationURI : String) FOR gmfgen::GenContributionManager-»
+ <menuContribution locationURI="«locationURI»">
+«EXPAND menuEntry(contextMenu) FOREACH items-»
</menuContribution>
-«EXPAND menuContribution(contextMenu) FOREACH items[gmfgen::GenContributionManager]-»
-«ENDDEFINE»
-
-
-«DEFINE commandContribution FOR gmfgen::GenContributionManager-»
-«EXPAND commandContribution FOREACH items[gmfgen::GenCustomAction]-»
-«EXPAND commandContribution FOREACH items[gmfgen::GenAction]-»
-«EXPAND commandContribution FOREACH items[gmfgen::GenContributionManager]-»
-«ENDDEFINE»
-
-«DEFINE handlerContribution FOR gmfgen::GenContributionManager-»
-«EXPAND handlerContribution FOREACH items[gmfgen::GenCustomAction]-»
-«EXPAND handlerContribution FOREACH items[gmfgen::GenContributionManager]-»
-«ENDDEFINE»
-
-«DEFINE commandContribution FOR gmfgen::GenCustomAction-»
- <command id="«EXPAND commandIdentifier»"
- name="«name»"
- categoryId="«owner.editorGen.editor.iD»"/>
-«ENDDEFINE»
-
-«DEFINE commandContribution FOR gmfgen::GenAction-»
- <command id="«EXPAND commandIdentifier»"
- name="«name/*FIXME: into i18n keys*/»"
- categoryId="«owner.editorGen.editor.iD»"
- defaultHandler="«qualifiedClassName»"/>
-«ENDDEFINE»
-
-«DEFINE handlerContribution FOR gmfgen::GenCustomAction-»
+«EXPAND menuContribution(contextMenu) FOREACH items[gmfgen::GenContributionManager]-»
+«ENDDEFINE»
+
+
+«DEFINE commandContribution FOR gmfgen::GenContributionManager-»
+«EXPAND commandContribution FOREACH items[gmfgen::GenCustomAction]-»
+«EXPAND commandContribution FOREACH items[gmfgen::GenAction]-»
+«EXPAND commandContribution FOREACH items[gmfgen::GenContributionManager]-»
+«ENDDEFINE»
+
+«DEFINE handlerContribution FOR gmfgen::GenContributionManager-»
+«EXPAND handlerContribution FOREACH items[gmfgen::GenCustomAction]-»
+«EXPAND handlerContribution FOREACH items[gmfgen::GenContributionManager]-»
+«ENDDEFINE»
+
+«DEFINE commandContribution FOR gmfgen::GenCustomAction-»
+ <command id="«EXPAND commandIdentifier»"
+ name="«name»"
+ categoryId="«owner.editorGen.editor.iD»"/>
+«ENDDEFINE»
+
+«DEFINE commandContribution FOR gmfgen::GenAction-»
+ <command id="«EXPAND commandIdentifier»"
+ name="«name/*FIXME: into i18n keys*/»"
+ categoryId="«owner.editorGen.editor.iD»"
+ defaultHandler="«qualifiedClassName»"/>
+«ENDDEFINE»
+
+«DEFINE handlerContribution FOR gmfgen::GenCustomAction-»
<handler
- commandId="«EXPAND commandIdentifier»"
- class="«qualifiedClassName»">
+ commandId="«EXPAND commandIdentifier»"
+ class="«qualifiedClassName»">
<enabledWhen>
- <with variable="activePartId"><equals value="«owner.editorGen.editor.iD»"/></with>
+ <with variable="activePartId"><equals value="«owner.editorGen.editor.iD»"/></with>
</enabledWhen>
</handler>
-«ENDDEFINE»
-
-«DEFINE commandIdentifier FOR gmfgen::GenCustomAction»«owner.editorGen.plugin.iD».«qualifiedClassName.xpandSplit('\\.')->last()»«ENDDEFINE»
-«DEFINE commandIdentifier FOR gmfgen::GenAction»«owner.editorGen.plugin.iD».«qualifiedClassName.xpandSplit('\\.')->last()»«ENDDEFINE»
-
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenContributionItem»«REM»NO-OP XXX or ERROR?«ENDREM»«ENDDEFINE»
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenSeparator-»
- <separator «IF groupName <> null»name="«groupName»" «ENDIF»visible="true"/>
-«ENDDEFINE»
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenGroupMarker-»
- <separator name="«groupName»"/>
-«ENDDEFINE»
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenCommandAction-»
- <command commandId="«commandIdentifier»">
+«ENDDEFINE»
+
+«DEFINE commandIdentifier FOR gmfgen::GenCustomAction»«owner.editorGen.plugin.iD».«qualifiedClassName.xpandSplit('\\.')->last()»«ENDDEFINE»
+«DEFINE commandIdentifier FOR gmfgen::GenAction»«owner.editorGen.plugin.iD».«qualifiedClassName.xpandSplit('\\.')->last()»«ENDDEFINE»
+
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenContributionItem»«REM»NO-OP XXX or ERROR?«ENDREM»«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenSeparator-»
+ <separator «IF groupName <> null»name="«groupName»" «ENDIF»visible="true"/>
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenGroupMarker-»
+ <separator name="«groupName»"/>
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenCommandAction-»
+ <command commandId="«commandIdentifier»">
<visibleWhen>
-«EXPAND menuCondition FOR contextMenu-»
+«EXPAND menuCondition FOR contextMenu-»
</visibleWhen>
</command>
-«ENDDEFINE»
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenCustomAction-»
- <command commandId="«EXPAND commandIdentifier»">
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenCustomAction-»
+ <command commandId="«EXPAND commandIdentifier»">
<visibleWhen>
-«EXPAND menuCondition FOR contextMenu-»
+«EXPAND menuCondition FOR contextMenu-»
</visibleWhen>
</command>
-«ENDDEFINE»
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenAction-»
- <command commandId="«EXPAND commandIdentifier»">
+«ENDDEFINE»
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenAction-»
+ <command commandId="«EXPAND commandIdentifier»">
<visibleWhen>
-«EXPAND menuCondition FOR contextMenu-»
+«EXPAND menuCondition FOR contextMenu-»
</visibleWhen>
</command>
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenMenuManager»
- <menu id="«iD»" label="«name»">
+«DEFINE menuEntry(contextMenu : gmfgen::GenContextMenu) FOR gmfgen::GenMenuManager»
+ <menu id="«iD»" label="«name»">
<visibleWhen>
-«EXPAND menuCondition FOR contextMenu-»
+«EXPAND menuCondition FOR contextMenu-»
</visibleWhen>
</menu>
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE menuCondition FOR gmfgen::GenContextMenu-»
+«DEFINE menuCondition FOR gmfgen::GenContextMenu-»
<and>
- <with variable="activePartId"><equals value="«editorGen.editor.iD»"/></with>
- <with variable="selection"><iterate ifEmpty="false">«IF context->size() > 1»<or>«ENDIF»
-«REM»XXX, perhaps, <adapt type="EditPart">?«ENDREM-»
-«FOREACH context AS de-»
- <instanceof value="«de.getEditPartQualifiedClassName()»"/>
-«ENDFOREACH-»
- «IF context->size() > 1»</or>«ENDIF»</iterate></with>
+ <with variable="activePartId"><equals value="«editorGen.editor.iD»"/></with>
+ <with variable="selection"><iterate ifEmpty="false">«IF context->size() > 1»<or>«ENDIF»
+«REM»XXX, perhaps, <adapt type="EditPart">?«ENDREM-»
+«FOREACH context AS de-»
+ <instanceof value="«de.getEditPartQualifiedClassName()»"/>
+«ENDFOREACH-»
+ «IF context->size() > 1»</or>«ENDIF»</iterate></with>
</and>
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE i18n FOR gmfgen::GenEditorGenerator-»
-«IF hasCommandsToContribute(self)-»
+«DEFINE i18n FOR gmfgen::GenEditorGenerator-»
+«IF hasCommandsToContribute(self)-»
# Commands and menu actions
-cmdcategory.name=«modelID» Editor Commands
-cmdcategory.desc=«modelID» Editor Commands
-«ENDIF»
-«ENDDEFINE» \ No newline at end of file
+cmdcategory.name=«modelID» Editor Commands
+cmdcategory.desc=«modelID» Editor Commands
+«ENDIF»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt
index 9e1402b61..3c55de805 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/commands/DeleteLinkCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,30 +10,30 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::GenModelUtils»
-«DEFINE newInstance(String requestVar) FOR gmfgen::GenLink»«EXPAND newDeleteLinkCommand(self, requestVar) FOR modelFacet»«ENDDEFINE»
+«DEFINE newInstance(String requestVar) FOR gmfgen::GenLink»«EXPAND newDeleteLinkCommand(self, requestVar) FOR modelFacet»«ENDDEFINE»
-«DEFINE newRequest(String requestVar, String edgeVar) FOR gmfgen::GenLink»«EXPAND newDestroyRequest(self, requestVar, edgeVar) FOR modelFacet»«ENDDEFINE»
+«DEFINE newRequest(String requestVar, String edgeVar) FOR gmfgen::GenLink»«EXPAND newDestroyRequest(self, requestVar, edgeVar) FOR modelFacet»«ENDDEFINE»
-«DEFINE newDeleteLinkCommand(gmfgen::GenLink genLink, String requestVar) FOR gmfgen::LinkModelFacet»
-«ERROR 'Unsupported model facet: ' + self.repr()-»
-«ENDDEFINE»
+«DEFINE newDeleteLinkCommand(gmfgen::GenLink genLink, String requestVar) FOR gmfgen::LinkModelFacet»
+«ERROR 'Unsupported model facet: ' + self.repr()-»
+«ENDDEFINE»
-«DEFINE newDeleteLinkCommand(gmfgen::GenLink genLink, String requestVar) FOR gmfgen::TypeLinkModelFacet-»
-«EXPAND newDeleteLinkWithClassCommand(genLink, requestVar)-»
-«ENDDEFINE»
+«DEFINE newDeleteLinkCommand(gmfgen::GenLink genLink, String requestVar) FOR gmfgen::TypeLinkModelFacet-»
+«EXPAND newDeleteLinkWithClassCommand(genLink, requestVar)-»
+«ENDDEFINE»
-«DEFINE newDeleteLinkCommand(gmfgen::GenLink genLink, String requestVar) FOR gmfgen::FeatureLinkModelFacet-»
-«EXPAND newDeleteReferenceLinkCommand(genLink, requestVar)-»
-«ENDDEFINE»
+«DEFINE newDeleteLinkCommand(gmfgen::GenLink genLink, String requestVar) FOR gmfgen::FeatureLinkModelFacet-»
+«EXPAND newDeleteReferenceLinkCommand(genLink, requestVar)-»
+«ENDDEFINE»
-«DEFINE newDeleteReferenceLinkCommand(GenLink genLink, String destroyReferenceRequest) FOR gmfgen::FeatureLinkModelFacet-»
-new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand(«destroyReferenceRequest»)«IF isContains(metaFeature)» {
+«DEFINE newDeleteReferenceLinkCommand(GenLink genLink, String destroyReferenceRequest) FOR gmfgen::FeatureLinkModelFacet-»
+new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand(«destroyReferenceRequest»)«IF isContains(metaFeature)» {
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
org.eclipse.emf.ecore.EObject referencedObject = getReferencedObject();
org.eclipse.emf.ecore.resource.Resource resource = referencedObject.eResource();
@@ -41,22 +41,22 @@ new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyReferenceCommand(«dest
resource.getContents().add(referencedObject);
return result;
}
-}«ENDIF-»
-«ENDDEFINE»
+}«ENDIF-»
+«ENDDEFINE»
-«DEFINE newDeleteLinkWithClassCommand(GenLink genLink, String destroyElementRequest) FOR gmfgen::TypeLinkModelFacet-»
-new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(«destroyElementRequest»)«-»
-«ENDDEFINE»
+«DEFINE newDeleteLinkWithClassCommand(GenLink genLink, String destroyElementRequest) FOR gmfgen::TypeLinkModelFacet-»
+new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(«destroyElementRequest»)«-»
+«ENDDEFINE»
-«DEFINE newDestroyRequest(gmfgen::GenLink genLink, String requestVar, String edgeVar) FOR gmfgen::LinkModelFacet»
-«ERROR 'Unsupported model facet: ' + self.repr()-»
-«ENDDEFINE»
+«DEFINE newDestroyRequest(gmfgen::GenLink genLink, String requestVar, String edgeVar) FOR gmfgen::LinkModelFacet»
+«ERROR 'Unsupported model facet: ' + self.repr()-»
+«ENDDEFINE»
-«DEFINE newDestroyRequest(gmfgen::GenLink genLink, String requestVar, String edgeVar) FOR gmfgen::TypeLinkModelFacet-»
-org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest «requestVar» = new org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest(«edgeVar».getElement(), false);
-«ENDDEFINE»
+«DEFINE newDestroyRequest(gmfgen::GenLink genLink, String requestVar, String edgeVar) FOR gmfgen::TypeLinkModelFacet-»
+org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest «requestVar» = new org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest(«edgeVar».getElement(), false);
+«ENDDEFINE»
-«DEFINE newDestroyRequest(gmfgen::GenLink genLink, String requestVar, String edgeVar) FOR gmfgen::FeatureLinkModelFacet-»
-«REM»FIXME source not always container, target is not always referenced object. And containerReference is known at generation time«ENDREM-»
-org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest «requestVar» = new org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest(«edgeVar».getSource().getElement(), null, «edgeVar».getTarget().getElement(), false);
-«ENDDEFINE» \ No newline at end of file
+«DEFINE newDestroyRequest(gmfgen::GenLink genLink, String requestVar, String edgeVar) FOR gmfgen::FeatureLinkModelFacet-»
+«REM»FIXME source not always container, target is not always referenced object. And containerReference is known at generation time«ENDREM-»
+org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest «requestVar» = new org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest(«edgeVar».getSource().getElement(), null, «edgeVar».getTarget().getElement(), false);
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt
index ecaf5e637..4e60c447d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ChildNodeLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,33 +11,33 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE contsructor FOR gmfgen::GenChildLabelNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE contsructor FOR gmfgen::GenChildLabelNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDragTrackerBody FOR gmfgen::GenChildLabelNode-»
+«DEFINE getDragTrackerBody FOR gmfgen::GenChildLabelNode-»
if (request instanceof org.eclipse.gef.requests.SelectionRequest && ((org.eclipse.gef.requests.SelectionRequest) request).getLastButtonPressed() == 3) {
return null;
}
return new org.eclipse.gmf.runtime.diagram.ui.tools.DragEditPartsTrackerEx(this);
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenChildLabelNode-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenChildLabelNode-»
super.createDefaultEditPolicies();
- installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE, new «getItemSemanticEditPolicyQualifiedClassName()»());
- installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «getDiagram().getTextNonResizableEditPolicyQualifiedClassName()»());
+ installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE, new «getItemSemanticEditPolicyQualifiedClassName()»());
+ installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new «getDiagram().getTextNonResizableEditPolicyQualifiedClassName()»());
installEditPolicy(org.eclipse.gef.EditPolicy.COMPONENT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ListItemComponentEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
-«ENDDEFINE»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+«ENDDEFINE»
-«DEFINE handleNotificationEventBody FOR gmfgen::GenChildLabelNode-»
+«DEFINE handleNotificationEventBody FOR gmfgen::GenChildLabelNode-»
Object feature = event.getFeature();
- «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
+ «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
super.handleNotificationEvent(event);
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt
index 3374f9687..7496ea1f1 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/CompartmentEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,69 +11,69 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE contsructor FOR gmfgen::GenCompartment-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE contsructor FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE hasModelChildrenChanged FOR gmfgen::GenCompartment-»
- «IF listLayout-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE hasModelChildrenChanged FOR gmfgen::GenCompartment-»
+ «IF listLayout-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean hasModelChildrenChanged(org.eclipse.emf.common.notify.Notification evt) {
return false;
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE getCompartmentName FOR gmfgen::GenCompartment-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getCompartmentName FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getCompartmentName() {
- return «EXPAND xpt::Externalizer::accessorCall(i18nKeyForCompartmentTitle(self)) FOR getDiagram().editorGen»;
+ return «EXPAND xpt::Externalizer::accessorCall(i18nKeyForCompartmentTitle(self)) FOR getDiagram().editorGen»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createFigure FOR gmfgen::GenCompartment-»
- «IF not needsTitle-»
- «REM»By default titles are shown even if there are no TitleStyle, we need to switch it off«ENDREM»«-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createFigure FOR gmfgen::GenCompartment-»
+ «IF not needsTitle-»
+ «REM»By default titles are shown even if there are no TitleStyle, we need to switch it off«ENDREM»«-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.draw2d.IFigure createFigure() {
org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure result = (org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure) super.createFigure();
result.setTitleVisibility(false);
return result;
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenCompartment-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenCompartment-»
super.createDefaultEditPolicies();
- «IF canCollapse-»
+ «IF canCollapse-»
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableCompartmentEditPolicy());
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
- «IF childNodes->size() > 0-»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
+ «IF childNodes->size() > 0-»
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy());
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy());
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
- «EXPAND xpt::diagram::editparts::Common::behaviour-»
-«ENDDEFINE»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
+ «EXPAND xpt::diagram::editparts::Common::behaviour-»
+«ENDDEFINE»
-«DEFINE refreshVisuals FOR gmfgen::GenCompartment-»
- «IF isStoringChildPositions(node)-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshVisuals FOR gmfgen::GenCompartment-»
+ «IF isStoringChildPositions(node)-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshVisuals() {
super.refreshVisuals();
refreshBounds();
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE handleNotificationEventBody FOR gmfgen::GenCompartment-»
+«DEFINE handleNotificationEventBody FOR gmfgen::GenCompartment-»
super.handleNotificationEvent(notification);
Object feature = notification.getFeature();
if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width().equals(feature)
@@ -82,11 +82,11 @@
|| org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
refreshBounds();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshBounds FOR gmfgen::GenCompartment-»
- «IF isStoringChildPositions(node)-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshBounds FOR gmfgen::GenCompartment-»
+ «IF isStoringChildPositions(node)-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshBounds() {
int x = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_X())).intValue();
int y = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_Y())).intValue();
@@ -94,35 +94,35 @@
int height = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height())).intValue();
((org.eclipse.gef.GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new org.eclipse.draw2d.geometry.Rectangle(x, y, width, height));
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE setRatio FOR gmfgen::GenCompartment-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setRatio FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setRatio(Double ratio) {
- «IF gmfgen::ViewmapLayoutType::UNKNOWN = node.getLayoutType()-»
+ «IF gmfgen::ViewmapLayoutType::UNKNOWN = node.getLayoutType()-»
if (getFigure().getParent().getLayoutManager() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout) {
super.setRatio(ratio);
}
- «ELSE-»
+ «ELSE-»
// nothing to do -- parent layout does not accept Double constraints as ratio
// super.setRatio(ratio);
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
-«EXPAND internal_i18nAccessors FOREACH compartments»
-«ENDDEFINE»
+«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
+«EXPAND internal_i18nAccessors FOREACH compartments»
+«ENDDEFINE»
-«DEFINE internal_i18nAccessors FOR gmfgen::GenCompartment-»
-«IF null <> title»«EXPAND xpt::Externalizer::accessorField(i18nKeyForCompartmentTitle(self))»«ENDIF-»
-«ENDDEFINE»
+«DEFINE internal_i18nAccessors FOR gmfgen::GenCompartment-»
+«IF null <> title»«EXPAND xpt::Externalizer::accessorField(i18nKeyForCompartmentTitle(self))»«ENDIF-»
+«ENDDEFINE»
-«DEFINE i18nValues FOR gmfgen::GenDiagram-»
-«EXPAND internal_i18nValues FOREACH compartments»
-«ENDDEFINE»
+«DEFINE i18nValues FOR gmfgen::GenDiagram-»
+«EXPAND internal_i18nValues FOREACH compartments»
+«ENDDEFINE»
-«DEFINE internal_i18nValues FOR gmfgen::GenCompartment-»
-«IF null <> title»«EXPAND xpt::Externalizer::messageEntry(i18nKeyForCompartmentTitle(self), title)»«ENDIF-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE internal_i18nValues FOR gmfgen::GenCompartment-»
+«IF null <> title»«EXPAND xpt::Externalizer::messageEntry(i18nKeyForCompartmentTitle(self), title)»«ENDIF-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt
index a0249c331..89aa0a014 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/DiagramEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,22 +11,22 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE _constructor FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE _constructor FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenDiagram-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenDiagram-»
super.createDefaultEditPolicies();
- «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
- «EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
- «IF generateCreateShortcutAction() and null = editorGen.application-»
+ «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
+ «EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
+ «IF generateCreateShortcutAction() and null = editorGen.application-»
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.DiagramDragDropEditPolicy() {
public org.eclipse.gef.commands.Command getDropObjectsCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest dropRequest) {
java.util.List viewDescriptors = new java.util.ArrayList();
@@ -43,13 +43,13 @@
private org.eclipse.gef.commands.Command createShortcutsCommand(org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest dropRequest, java.util.List viewDescriptors) {
org.eclipse.gef.commands.Command command = createViewsAndArrangeCommand(dropRequest, viewDescriptors);
if (command != null) {
- return command.chain(new org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy(new «getCreateShortcutDecorationsCommandQualifiedClassName()»(getEditingDomain(), (org.eclipse.gmf.runtime.notation.View) getModel(), viewDescriptors)));
+ return command.chain(new org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy(new «getCreateShortcutDecorationsCommandQualifiedClassName()»(getEditingDomain(), (org.eclipse.gmf.runtime.notation.View) getModel(), viewDescriptors)));
}
return null;
}
});
- «ENDIF-»
- «IF shouldGenerateDiagramViewmap(self)-»
+ «ENDIF-»
+ «IF shouldGenerateDiagramViewmap(self)-»
// diagram figure does layout; need to install child editpolicy to show selection feedback
installEditPolicy(org.eclipse.gef.EditPolicy.LAYOUT_ROLE, new org.eclipse.gef.editpolicies.LayoutEditPolicy() {
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
@@ -64,33 +64,33 @@
return null;
}
});
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
// removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.POPUPBAR_ROLE);
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createFigure FOR gmfgen::GenDiagram-»
- «IF shouldGenerateDiagramViewmap(self)-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createFigure FOR gmfgen::GenDiagram-»
+ «IF shouldGenerateDiagramViewmap(self)-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createFigure() {
org.eclipse.draw2d.FreeformLayer l = new org.eclipse.draw2d.FreeformLayer();
l.setBorder(new org.eclipse.draw2d.MarginBorder(50));
- «EXPAND initLayout('lm') FOR viewmap.layoutType-»
+ «EXPAND initLayout('lm') FOR viewmap.layoutType-»
l.setLayoutManager(lm);
return l;
}
- «ENDIF»
-«ENDDEFINE»
+ «ENDIF»
+«ENDDEFINE»
-«DEFINE initLayout(varName : String) FOR gmfgen::ViewmapLayoutType-»
- «IF self = gmfgen::ViewmapLayoutType::TOOLBAR_LAYOUT-»
- org.eclipse.draw2d.ToolbarLayout «varName» = new org.eclipse.draw2d.ToolbarLayout();
- «varName».setSpacing(10);
- «ELSEIF self = gmfgen::ViewmapLayoutType::FLOW_LAYOUT-»
- org.eclipse.draw2d.FlowLayout «varName» = new org.eclipse.draw2d.FlowLayout();
- «varName».setMajorSpacing(10);
- «varName».setMinorSpacing(10);
- «ELSE-»
- org.eclipse.draw2d.LayoutManager «varName» = null; /*FIXME - unknown layout type*/
- «ENDIF-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE initLayout(varName : String) FOR gmfgen::ViewmapLayoutType-»
+ «IF self = gmfgen::ViewmapLayoutType::TOOLBAR_LAYOUT-»
+ org.eclipse.draw2d.ToolbarLayout «varName» = new org.eclipse.draw2d.ToolbarLayout();
+ «varName».setSpacing(10);
+ «ELSEIF self = gmfgen::ViewmapLayoutType::FLOW_LAYOUT-»
+ org.eclipse.draw2d.FlowLayout «varName» = new org.eclipse.draw2d.FlowLayout();
+ «varName».setMajorSpacing(10);
+ «varName».setMinorSpacing(10);
+ «ELSE-»
+ org.eclipse.draw2d.LayoutManager «varName» = null; /*FIXME - unknown layout type*/
+ «ENDIF-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt
index 9257d5723..4765a8fb2 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/ExternalNodeLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,31 +11,31 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE initializer FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE initializer FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
static {
- registerSnapBackPosition(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall», new org.eclipse.draw2d.geometry.Point(0, 0));
+ registerSnapBackPosition(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall», new org.eclipse.draw2d.geometry.Point(0, 0));
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE _constructor FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenExternalNodeLabel-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenExternalNodeLabel-»
super.createDefaultEditPolicies();
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
- installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
-«ENDDEFINE»
+ installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+«ENDDEFINE»
-«DEFINE getBorderItemLocator FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getBorderItemLocator FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.diagram.ui.figures.IBorderItemLocator getBorderItemLocator() {
org.eclipse.draw2d.IFigure parentFigure = getFigure().getParent();
if (parentFigure != null && parentFigure.getLayoutManager() != null) {
@@ -44,10 +44,10 @@
}
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshBounds FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshBounds FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
public void refreshBounds() {
int x = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_X())).intValue();
int y = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_Y())).intValue();
@@ -55,14 +55,14 @@
int height = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height())).intValue();
getBorderItemLocator().setConstraint(new org.eclipse.draw2d.geometry.Rectangle(x, y, width, height));
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEventBody FOR gmfgen::GenExternalNodeLabel-»
+«DEFINE handleNotificationEventBody FOR gmfgen::GenExternalNodeLabel-»
Object feature = event.getFeature();
- «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
+ «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
super.handleNotificationEvent(event);
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createFigure FOR gmfgen::GenExternalNodeLabel-»
- «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE createFigure FOR gmfgen::GenExternalNodeLabel-»
+ «EXPAND xpt::diagram::editparts::Common::labelFigure FOR viewmap-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt
index 299dba922..96df6717a 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,134 +11,134 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE _constructor FOR gmfgen::GenLink-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE _constructor FOR gmfgen::GenLink-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenLink-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenLink-»
super.createDefaultEditPolicies();
- «IF null = modelFacet-»
+ «IF null = modelFacet-»
installEditPolicy(org.eclipse.gef.EditPolicy.COMPONENT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ViewComponentEditPolicy());
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
-«ENDDEFINE»
-
-«DEFINE addFixedChild FOR gmfgen::GenLink-»
- «IF labels->size() > 0-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+«ENDDEFINE»
+
+«DEFINE addFixedChild FOR gmfgen::GenLink-»
+ «IF labels->size() > 0-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean addFixedChild(org.eclipse.gef.EditPart childEditPart) {
- «FOREACH labels->asSequence() AS label-»
- «EXPAND addLabel(label) FOR label.viewmap-»
- «ENDFOREACH-»
+ «FOREACH labels->asSequence() AS label-»
+ «EXPAND addLabel(label) FOR label.viewmap-»
+ «ENDFOREACH-»
return false;
}
- «ENDIF»
-«ENDDEFINE»
+ «ENDIF»
+«ENDDEFINE»
-«DEFINE addLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::Viewmap-»
-«ENDDEFINE»
+«DEFINE addLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::Viewmap-»
+«ENDDEFINE»
-«DEFINE addLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::ParentAssignedViewmap-»
- if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
- ((«label.getEditPartQualifiedClassName()») childEditPart).«EXPAND impl::diagram::editparts::TextAware::labelSetterName»(
- getPrimaryShape().«getterName»());
+«DEFINE addLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::ParentAssignedViewmap-»
+ if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
+ ((«label.getEditPartQualifiedClassName()») childEditPart).«EXPAND impl::diagram::editparts::TextAware::labelSetterName»(
+ getPrimaryShape().«getterName»());
return true;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE removeFixedChild FOR gmfgen::GenLink-»
- «IF labels->size() > 0-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE removeFixedChild FOR gmfgen::GenLink-»
+ «IF labels->size() > 0-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean removeFixedChild(org.eclipse.gef.EditPart childEditPart) {
- «FOREACH labels->asSequence() AS label-»
- «EXPAND removeLabel(label) FOR label.viewmap-»
- «ENDFOREACH-»
+ «FOREACH labels->asSequence() AS label-»
+ «EXPAND removeLabel(label) FOR label.viewmap-»
+ «ENDFOREACH-»
return false;
}
- «ENDIF»
-«ENDDEFINE»
+ «ENDIF»
+«ENDDEFINE»
-«DEFINE removeLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::Viewmap-»
-«ENDDEFINE»
+«DEFINE removeLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::Viewmap-»
+«ENDDEFINE»
-«DEFINE removeLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::ParentAssignedViewmap-»
- if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
+«DEFINE removeLabel(label : gmfgen::GenLinkLabel) FOR gmfgen::ParentAssignedViewmap-»
+ if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
return true;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addChildVisual FOR gmfgen::GenLink-»
- «IF labels->size() > 0-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE addChildVisual FOR gmfgen::GenLink-»
+ «IF labels->size() > 0-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void addChildVisual(org.eclipse.gef.EditPart childEditPart, int index) {
if (addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
}
- «ENDIF»
-«ENDDEFINE»
+ «ENDIF»
+«ENDDEFINE»
-«DEFINE removeChildVisual FOR gmfgen::GenLink-»
- «IF labels->size() > 0-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE removeChildVisual FOR gmfgen::GenLink-»
+ «IF labels->size() > 0-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void removeChildVisual(org.eclipse.gef.EditPart childEditPart) {
if (removeFixedChild(childEditPart)) {
return;
}
super.removeChildVisual(childEditPart);
}
- «ENDIF»
-«ENDDEFINE»
+ «ENDIF»
+«ENDDEFINE»
-«DEFINE createLinkFigure FOR gmfgen::GenLink-»
- «EXPAND xpt::Common::generatedMemberComment(
+«DEFINE createLinkFigure FOR gmfgen::GenLink-»
+ «EXPAND xpt::Common::generatedMemberComment(
'Creates figure for this edit part.\n' +
'\n' +
'Body of this method does not depend on settings in generation model\n' +
'so you may safely remove <i>generated</i> tag and modify it.\n'
- )»
- «EXPAND createLinkFigure(self) FOR viewmap-»
-«ENDDEFINE»
+ )»
+ «EXPAND createLinkFigure(self) FOR viewmap-»
+«ENDDEFINE»
-«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::Viewmap-»
- «ERROR 'Unknown viewmap: ' + self.repr()-»
-«ENDDEFINE»
+«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::Viewmap-»
+ «ERROR 'Unknown viewmap: ' + self.repr()-»
+«ENDDEFINE»
-«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::FigureViewmap-»
- «LET (if figureQualifiedClassName = null then 'org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx' else figureQualifiedClassName endif) AS fqn-»
+«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::FigureViewmap-»
+ «LET (if figureQualifiedClassName = null then 'org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx' else figureQualifiedClassName endif) AS fqn-»
protected org.eclipse.draw2d.Connection createConnectionFigure() {
- return new «fqn»();
+ return new «fqn»();
}
- «EXPAND xpt::Common::generatedMemberComment»
- public «fqn» getPrimaryShape() {
- return («fqn») getFigure();
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «fqn» getPrimaryShape() {
+ return («fqn») getFigure();
}
- «ENDLET-»
-«ENDDEFINE»
+ «ENDLET-»
+«ENDDEFINE»
-«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::SnippetViewmap»
+«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::SnippetViewmap»
protected org.eclipse.draw2d.Connection createConnectionFigure() {
- return «body»;
+ return «body»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::InnerClassViewmap»
+«DEFINE createLinkFigure(link : gmfgen::GenLink) FOR gmfgen::InnerClassViewmap»
protected org.eclipse.draw2d.Connection createConnectionFigure() {
- return new «className»();
+ return new «className»();
}
- «EXPAND xpt::Common::generatedMemberComment»
- public «className» getPrimaryShape() {
- return («className») getFigure();
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «className» getPrimaryShape() {
+ return («className») getFigure();
}
- «classBody»
-«ENDDEFINE» \ No newline at end of file
+ «classBody»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt
index 10e2a785a..d9e60469d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/LinkLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,30 +11,30 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::ViewmapAttributesUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::diagram::ViewmapAttributesUtils»
-«DEFINE initializer FOR gmfgen::GenLinkLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE initializer FOR gmfgen::GenLinkLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
static {
- registerSnapBackPosition(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall»,
- new org.eclipse.draw2d.geometry.Point(«labelOffsetX(viewmap, 0)», «labelOffsetY(viewmap, 0)»));
+ registerSnapBackPosition(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall»,
+ new org.eclipse.draw2d.geometry.Point(«labelOffsetX(viewmap, 0)», «labelOffsetY(viewmap, 0)»));
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenLinkLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE _constructor FOR gmfgen::GenLinkLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenLinkLabel-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenLinkLabel-»
super.createDefaultEditPolicies();
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE,
new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE,
- new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
+ new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE,
new org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableLabelEditPolicy() {
@@ -44,18 +44,18 @@
return java.util.Collections.singletonList(mh);
}
});
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
-«ENDDEFINE»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+«ENDDEFINE»
-«DEFINE getKeyPoint FOR gmfgen::GenLinkLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getKeyPoint FOR gmfgen::GenLinkLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
public int getKeyPoint() {
- return org.eclipse.draw2d.ConnectionLocator.«alignment»;
+ return org.eclipse.draw2d.ConnectionLocator.«alignment»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEventBody FOR gmfgen::GenLinkLabel-»
+«DEFINE handleNotificationEventBody FOR gmfgen::GenLinkLabel-»
Object feature = event.getFeature();
- «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
+ «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
super.handleNotificationEvent(event);
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
index a63e83164..a9605e917 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,73 +11,73 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::ViewmapAttributesUtils»
-«EXTENSION xpt::diagram::editparts::Utils»
-«EXTENSION xpt::diagram::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::diagram::ViewmapAttributesUtils»
+«EXTENSION xpt::diagram::editparts::Utils»
+«EXTENSION xpt::diagram::Utils»
-«DEFINE extendsListContents FOR gmfgen::GenNode-»
-«IF hasBorderItems(self)»org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart«ENDIF-»
-«ENDDEFINE»
+«DEFINE extendsListContents FOR gmfgen::GenNode-»
+«IF hasBorderItems(self)»org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart«ENDIF-»
+«ENDDEFINE»
-«DEFINE extendsListContents FOR gmfgen::GenChildSideAffixedNode-»
-«IF hasBorderItems(self)»org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart«ENDIF-»
-«ENDDEFINE»
+«DEFINE extendsListContents FOR gmfgen::GenChildSideAffixedNode-»
+«IF hasBorderItems(self)»org.eclipse.gmf.runtime.diagram.ui.editparts.BorderedBorderItemEditPart«ELSE»org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderItemEditPart«ENDIF-»
+«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE _constructor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenNode-»
- «EXPAND installCreationRolePolicy-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenNode-»
+ «EXPAND installCreationRolePolicy-»
super.createDefaultEditPolicies();
- «EXPAND installPrimaryDragEditPolicy-»
- «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
- «IF needsGraphicalNodeEditPolicy(self)-»
- installEditPolicy(org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE, new «getGraphicalNodeEditPolicyQualifiedClassName()»());
- «ENDIF-»
- «IF not childNodes->isEmpty()-»
+ «EXPAND installPrimaryDragEditPolicy-»
+ «EXPAND xpt::diagram::editparts::Common::installSemanticEditPolicy-»
+ «IF needsGraphicalNodeEditPolicy(self)-»
+ installEditPolicy(org.eclipse.gef.EditPolicy.GRAPHICAL_NODE_ROLE, new «getGraphicalNodeEditPolicyQualifiedClassName()»());
+ «ENDIF-»
+ «IF not childNodes->isEmpty()-»
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.DRAG_DROP_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.DragDropEditPolicy());
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::installCanonicalEditPolicy-»
installEditPolicy(org.eclipse.gef.EditPolicy.LAYOUT_ROLE, createLayoutEditPolicy());
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
// 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);
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE installCreationRolePolicy FOR gmfgen::GenNode-»
-«IF hasChildren(self) or hasChildrenInListCompartments(self)-»
- installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE, «EXPAND _creationEditPolicyNewInstance»);
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE installCreationRolePolicy FOR gmfgen::GenNode-»
+«IF hasChildren(self) or hasChildrenInListCompartments(self)-»
+ installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CREATION_ROLE, «EXPAND _creationEditPolicyNewInstance»);
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE _creationEditPolicyNewInstance FOR gmfgen::GenNode»new org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy()«ENDDEFINE»
+«DEFINE _creationEditPolicyNewInstance FOR gmfgen::GenNode»new org.eclipse.gmf.runtime.diagram.ui.editpolicies.CreationEditPolicy()«ENDDEFINE»
-«DEFINE installPrimaryDragEditPolicy FOR gmfgen::GenNode»«ENDDEFINE»
+«DEFINE installPrimaryDragEditPolicy FOR gmfgen::GenNode»«ENDDEFINE»
-«DEFINE installPrimaryDragEditPolicy FOR gmfgen::GenChildSideAffixedNode-»
+«DEFINE installPrimaryDragEditPolicy FOR gmfgen::GenChildSideAffixedNode-»
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, getPrimaryDragEditPolicy());
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createLayoutEditPolicy FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createLayoutEditPolicy FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.editpolicies.LayoutEditPolicy createLayoutEditPolicy() {
- «EXPAND createLayoutEditPolicyBody-»
+ «EXPAND createLayoutEditPolicyBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createLayoutEditPolicyBody FOR gmfgen::GenNode-»
- «IF gmfgen::ViewmapLayoutType::XY_LAYOUT = getLayoutType()-»
+«DEFINE createLayoutEditPolicyBody FOR gmfgen::GenNode-»
+ «IF gmfgen::ViewmapLayoutType::XY_LAYOUT = getLayoutType()-»
org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.XYLayoutEditPolicy() {
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
- «EXPAND borderItemSelectionEditPolicy-»
+ «EXPAND borderItemSelectionEditPolicy-»
org.eclipse.gef.EditPolicy result = super.createChildEditPolicy(child);
if (result == null) {
return new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ResizableShapeEditPolicy();
@@ -86,29 +86,29 @@
}
};
return lep;
- «ELSEIF gmfgen::ViewmapLayoutType::TOOLBAR_LAYOUT = getLayoutType()»
+ «ELSEIF gmfgen::ViewmapLayoutType::TOOLBAR_LAYOUT = getLayoutType()»
org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy lep = new org.eclipse.gmf.runtime.diagram.ui.editpolicies.ConstrainedToolbarLayoutEditPolicy() {
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
- «EXPAND borderItemSelectionEditPolicy-»
+ «EXPAND borderItemSelectionEditPolicy-»
if (child.getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE) == null) {
if (child instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart) {
- return new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»();
+ return new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»();
}
}
return super.createChildEditPolicy(child);
}
};
return lep;
- «ELSEIF gmfgen::ViewmapLayoutType::FLOW_LAYOUT = getLayoutType()»
+ «ELSEIF gmfgen::ViewmapLayoutType::FLOW_LAYOUT = getLayoutType()»
org.eclipse.gef.editpolicies.FlowLayoutEditPolicy lep = new org.eclipse.gef.editpolicies.FlowLayoutEditPolicy() {
- «IF hasBorderItems(self)-»
+ «IF hasBorderItems(self)-»
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
- «EXPAND borderItemSelectionEditPolicy-»
+ «EXPAND borderItemSelectionEditPolicy-»
return super.createChildEditPolicy(child);
}
- «ENDIF-»
+ «ENDIF-»
protected org.eclipse.gef.commands.Command createAddCommand(org.eclipse.gef.EditPart child, org.eclipse.gef.EditPart after) {
return null;
@@ -123,11 +123,11 @@
}
};
return lep;
- «ELSE-»
+ «ELSE-»
org.eclipse.gef.editpolicies.LayoutEditPolicy lep = new org.eclipse.gef.editpolicies.LayoutEditPolicy() {
protected org.eclipse.gef.EditPolicy createChildEditPolicy(org.eclipse.gef.EditPart child) {
- «EXPAND borderItemSelectionEditPolicy-»
+ «EXPAND borderItemSelectionEditPolicy-»
org.eclipse.gef.EditPolicy result = child.getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
if (result == null) {
result = new org.eclipse.gef.editpolicies.NonResizableEditPolicy();
@@ -144,30 +144,30 @@
}
};
return lep;
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE borderItemSelectionEditPolicy FOR gmfgen::GenNode-»
-«IF hasBorderItems(self)-»
+«DEFINE borderItemSelectionEditPolicy FOR gmfgen::GenNode-»
+«IF hasBorderItems(self)-»
org.eclipse.gmf.runtime.notation.View childView = (org.eclipse.gmf.runtime.notation.View) child.getModel();
-switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(childView)) {
-«IF getExternalLabels(self)->size() > 0-»
-«FOREACH getExternalLabels(self) AS nextLabel-»
-«EXPAND xpt::Common::caseVisualID FOR nextLabel-»
-«ENDFOREACH-»
- return «EXPAND borderItemSelectionEP»;
-«ENDIF-»
-«IF getSideAffixedChildren(self)->size() > 0-»
-«FOREACH getSideAffixedChildren(self) AS nextBorderItem-»
-«EXPAND xpt::Common::caseVisualID FOR nextBorderItem-»
-«ENDFOREACH-»
+switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(childView)) {
+«IF getExternalLabels(self)->size() > 0-»
+«FOREACH getExternalLabels(self) AS nextLabel-»
+«EXPAND xpt::Common::caseVisualID FOR nextLabel-»
+«ENDFOREACH-»
+ return «EXPAND borderItemSelectionEP»;
+«ENDIF-»
+«IF getSideAffixedChildren(self)->size() > 0-»
+«FOREACH getSideAffixedChildren(self) AS nextBorderItem-»
+«EXPAND xpt::Common::caseVisualID FOR nextBorderItem-»
+«ENDFOREACH-»
return new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy();
-«ENDIF-»
+«ENDIF-»
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE borderItemSelectionEP FOR gmfgen::GenNode-»
+«DEFINE borderItemSelectionEP FOR gmfgen::GenNode-»
new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolicy() {
protected java.util.List createSelectionHandles() {
@@ -176,151 +176,151 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
return java.util.Collections.singletonList(mh);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::Viewmap-»
- «ERROR 'Unknown viewmap: ' + self.repr()-»
-«ENDDEFINE»
+«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::Viewmap-»
+ «ERROR 'Unknown viewmap: ' + self.repr()-»
+«ENDDEFINE»
-«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::FigureViewmap-»
- «LET (if figureQualifiedClassName = null then 'org.eclipse.draw2d.RectangleFigure' else figureQualifiedClassName endif) AS fqn-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::FigureViewmap-»
+ «LET (if figureQualifiedClassName = null then 'org.eclipse.draw2d.RectangleFigure' else figureQualifiedClassName endif) AS fqn-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createNodeShape() {
- return primaryShape = new «fqn»()«IF node.getLayoutType() = gmfgen::ViewmapLayoutType::XY_LAYOUT»{
+ return primaryShape = new «fqn»()«IF node.getLayoutType() = gmfgen::ViewmapLayoutType::XY_LAYOUT»{
protected boolean useLocalCoordinates() {
return true;
}
- }«ENDIF»;
+ }«ENDIF»;
}
- «EXPAND getPrimaryShapeMethod FOR fqn-»
- «ENDLET-»
-«ENDDEFINE»
+ «EXPAND getPrimaryShapeMethod FOR fqn-»
+ «ENDLET-»
+«ENDDEFINE»
-«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::SnippetViewmap-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::SnippetViewmap-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createNodeShape() {
- return «body»;
+ return «body»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::InnerClassViewmap-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createNodeShape(node : gmfgen::GenNode) FOR gmfgen::InnerClassViewmap-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createNodeShape() {
- «className» figure = new «className»();
- «IF node.childNodes->size() > 0 and node.getLayoutType() = gmfgen::ViewmapLayoutType::XY_LAYOUT-»
+ «className» figure = new «className»();
+ «IF node.childNodes->size() > 0 and node.getLayoutType() = gmfgen::ViewmapLayoutType::XY_LAYOUT-»
figure.setUseLocalCoordinates(true);
- «ENDIF-»
+ «ENDIF-»
return primaryShape = figure;
}
- «EXPAND getPrimaryShapeMethod FOR className-»
-«ENDDEFINE»
+ «EXPAND getPrimaryShapeMethod FOR className-»
+«ENDDEFINE»
-«DEFINE getPrimaryShapeMethod FOR String-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «self» getPrimaryShape() {
- return («self») primaryShape;
+«DEFINE getPrimaryShapeMethod FOR String-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «self» getPrimaryShape() {
+ return («self») primaryShape;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addFixedChild FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE addFixedChild FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean addFixedChild(org.eclipse.gef.EditPart childEditPart) {
-«FOREACH getInnerFixedLabels(self) AS label»«LET label.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
- if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
- ((«label.getEditPartQualifiedClassName()») childEditPart).«EXPAND impl::diagram::editparts::TextAware::labelSetterName FOR childViewmap»(getPrimaryShape().«childViewmap.getterName»());
+«FOREACH getInnerFixedLabels(self) AS label»«LET label.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
+ if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
+ ((«label.getEditPartQualifiedClassName()») childEditPart).«EXPAND impl::diagram::editparts::TextAware::labelSetterName FOR childViewmap»(getPrimaryShape().«childViewmap.getterName»());
return true;
}
-«ENDLET»«ENDFOREACH-»
-«FOREACH getPinnedCompartments(self) AS compartment»«LET compartment.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
- if (childEditPart instanceof «compartment.getEditPartQualifiedClassName()») {
- org.eclipse.draw2d.IFigure pane = getPrimaryShape().«childViewmap.getterName»();
+«ENDLET»«ENDFOREACH-»
+«FOREACH getPinnedCompartments(self) AS compartment»«LET compartment.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
+ if (childEditPart instanceof «compartment.getEditPartQualifiedClassName()») {
+ org.eclipse.draw2d.IFigure pane = getPrimaryShape().«childViewmap.getterName»();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.add(((«compartment.getEditPartQualifiedClassName()») childEditPart).getFigure());
+ pane.add(((«compartment.getEditPartQualifiedClassName()») childEditPart).getFigure());
return true;
}
-«ENDLET»«ENDFOREACH-»
-«FOREACH getSideAffixedChildren(self) AS child-»
- if (childEditPart instanceof «child.getEditPartQualifiedClassName()») {
- org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator locator = new org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator(getMainFigure(), org.eclipse.draw2d.PositionConstants.«child.preferredSideName»);
- getBorderedFigure().getBorderItemContainer().add(((«child.getEditPartQualifiedClassName()») childEditPart).getFigure(), locator);
+«ENDLET»«ENDFOREACH-»
+«FOREACH getSideAffixedChildren(self) AS child-»
+ if (childEditPart instanceof «child.getEditPartQualifiedClassName()») {
+ org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator locator = new org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator(getMainFigure(), org.eclipse.draw2d.PositionConstants.«child.preferredSideName»);
+ getBorderedFigure().getBorderItemContainer().add(((«child.getEditPartQualifiedClassName()») childEditPart).getFigure(), locator);
return true;
}
-«ENDFOREACH-»
+«ENDFOREACH-»
return false;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE removeFixedChild FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE removeFixedChild FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean removeFixedChild(org.eclipse.gef.EditPart childEditPart) {
-«FOREACH getInnerFixedLabels(self) AS label»«LET label.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
- if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
+«FOREACH getInnerFixedLabels(self) AS label»«LET label.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
+ if (childEditPart instanceof «label.getEditPartQualifiedClassName()») {
return true;
}
-«ENDLET»«ENDFOREACH-»
-«FOREACH getPinnedCompartments(self) AS compartment»«LET compartment.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
- if (childEditPart instanceof «compartment.getEditPartQualifiedClassName()») {
- org.eclipse.draw2d.IFigure pane = getPrimaryShape().«childViewmap.getterName»();
+«ENDLET»«ENDFOREACH-»
+«FOREACH getPinnedCompartments(self) AS compartment»«LET compartment.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
+ if (childEditPart instanceof «compartment.getEditPartQualifiedClassName()») {
+ org.eclipse.draw2d.IFigure pane = getPrimaryShape().«childViewmap.getterName»();
setupContentPane(pane); // FIXME each comparment should handle his content pane in his own way
- pane.remove(((«compartment.getEditPartQualifiedClassName()») childEditPart).getFigure());
+ pane.remove(((«compartment.getEditPartQualifiedClassName()») childEditPart).getFigure());
return true;
}
-«ENDLET»«ENDFOREACH-»
-«FOREACH getSideAffixedChildren(self) AS child-»
- if (childEditPart instanceof «child.getEditPartQualifiedClassName()») {
- getBorderedFigure().getBorderItemContainer().remove(((«child.getEditPartQualifiedClassName()») childEditPart).getFigure());
+«ENDLET»«ENDFOREACH-»
+«FOREACH getSideAffixedChildren(self) AS child-»
+ if (childEditPart instanceof «child.getEditPartQualifiedClassName()») {
+ getBorderedFigure().getBorderItemContainer().remove(((«child.getEditPartQualifiedClassName()») childEditPart).getFigure());
return true;
}
-«ENDFOREACH-»
+«ENDFOREACH-»
return false;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addChildVisual FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE addChildVisual FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void addChildVisual(org.eclipse.gef.EditPart childEditPart, int index) {
if (addFixedChild(childEditPart)) {
return;
}
super.addChildVisual(childEditPart, -1);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE removeChildVisual FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE removeChildVisual FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void removeChildVisual(org.eclipse.gef.EditPart childEditPart) {
if (removeFixedChild(childEditPart)){
return;
}
super.removeChildVisual(childEditPart);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getContentPaneFor FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getContentPaneFor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure getContentPaneFor(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart editPart) {
- «REM»it is unclear what we should return for labels here«ENDREM-»
-«FOREACH getPinnedCompartments(self) AS compartment»«LET compartment.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
- if (editPart instanceof «compartment.getEditPartQualifiedClassName()») {
- return getPrimaryShape().«childViewmap.getterName»();
+ «REM»it is unclear what we should return for labels here«ENDREM-»
+«FOREACH getPinnedCompartments(self) AS compartment»«LET compartment.viewmap.oclAsType(gmfgen::ParentAssignedViewmap) AS childViewmap-»
+ if (editPart instanceof «compartment.getEditPartQualifiedClassName()») {
+ return getPrimaryShape().«childViewmap.getterName»();
}
-«ENDLET»«ENDFOREACH-»
-«IF hasBorderItems(self)-»
+«ENDLET»«ENDFOREACH-»
+«IF hasBorderItems(self)-»
if (editPart instanceof org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart) {
return getBorderedFigure().getBorderItemContainer();
}
-«ENDIF-»
+«ENDIF-»
return getContentPane();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addBorderItem FOR gmfgen::GenNode-»
- «IF getExternalLabels(self)->size() > 0-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE addBorderItem FOR gmfgen::GenNode-»
+ «IF getExternalLabels(self)->size() > 0-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void addBorderItem(org.eclipse.draw2d.IFigure borderItemContainer, org.eclipse.gmf.runtime.diagram.ui.editparts.IBorderItemEditPart borderItemEditPart) {
- if («FOREACH getExternalLabels(self) AS label SEPARATOR ' || '»borderItemEditPart instanceof «label.getEditPartQualifiedClassName()»«ENDFOREACH») {
+ if («FOREACH getExternalLabels(self) AS label SEPARATOR ' || '»borderItemEditPart instanceof «label.getEditPartQualifiedClassName()»«ENDFOREACH») {
org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator locator = new org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator(getMainFigure(), org.eclipse.draw2d.PositionConstants.SOUTH);
locator.setBorderItemOffset(new org.eclipse.draw2d.geometry.Dimension(-20, -20));
borderItemContainer.add(borderItemEditPart.getFigure(), locator);
@@ -328,56 +328,56 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
super.addBorderItem(borderItemContainer, borderItemEditPart);
}
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE createNodePlate FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createNodePlate FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure createNodePlate() {
- org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure result = new org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(«IF getDiagram().isPixelMapMode()»«defaultSizeWidth(viewmap, 40)», «defaultSizeHeight(viewmap, 40)»«ELSE»getMapMode().DPtoLP(«defaultSizeWidth(viewmap, 40)»), getMapMode().DPtoLP(«defaultSizeHeight(viewmap, 40)»)«ENDIF»);
- «EXPAND setupNodePlate-»
+ org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure result = new org.eclipse.gmf.runtime.gef.ui.figures.DefaultSizeNodeFigure(«IF getDiagram().isPixelMapMode()»«defaultSizeWidth(viewmap, 40)», «defaultSizeHeight(viewmap, 40)»«ELSE»getMapMode().DPtoLP(«defaultSizeWidth(viewmap, 40)»), getMapMode().DPtoLP(«defaultSizeHeight(viewmap, 40)»)«ENDIF»);
+ «EXPAND setupNodePlate-»
return result;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setupNodePlate FOR gmfgen::GenNode»«ENDDEFINE»
+«DEFINE setupNodePlate FOR gmfgen::GenNode»«ENDDEFINE»
-«DEFINE setupNodePlate FOR gmfgen::GenChildSideAffixedNode»
+«DEFINE setupNodePlate FOR gmfgen::GenChildSideAffixedNode»
//FIXME: workaround for #154536
result.getBounds().setSize(result.getPreferredSize());
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getPrimaryDragEditPolicy FOR gmfgen::GenNode-»
- «LET getResizeConstraints(viewmap) AS rc-»
- «IF null <> primaryDragEditPolicyQualifiedClassName or null <> rc-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getPrimaryDragEditPolicy FOR gmfgen::GenNode-»
+ «LET getResizeConstraints(viewmap) AS rc-»
+ «IF null <> primaryDragEditPolicyQualifiedClassName or null <> rc-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gef.EditPolicy getPrimaryDragEditPolicy() {
- «IF null <> primaryDragEditPolicyQualifiedClassName-»
- return new «primaryDragEditPolicyQualifiedClassName»();
- «ELSE-»
+ «IF null <> primaryDragEditPolicyQualifiedClassName-»
+ return new «primaryDragEditPolicyQualifiedClassName»();
+ «ELSE-»
org.eclipse.gef.EditPolicy result = super.getPrimaryDragEditPolicy();
if (result instanceof org.eclipse.gef.editpolicies.ResizableEditPolicy) {
org.eclipse.gef.editpolicies.ResizableEditPolicy ep = (org.eclipse.gef.editpolicies.ResizableEditPolicy) result;
ep.setResizeDirections(
- «IF rc.resizeHandleNames->size() > 0-»
- «FOREACH rc.resizeHandleNames->asSequence() AS name SEPARATOR ' | '»org.eclipse.draw2d.PositionConstants.«name»«ENDFOREACH-»
- «ELSE»org.eclipse.draw2d.PositionConstants.NONE«ENDIF»);
+ «IF rc.resizeHandleNames->size() > 0-»
+ «FOREACH rc.resizeHandleNames->asSequence() AS name SEPARATOR ' | '»org.eclipse.draw2d.PositionConstants.«name»«ENDFOREACH-»
+ «ELSE»org.eclipse.draw2d.PositionConstants.NONE«ENDIF»);
}
return result;
- «ENDIF-»
+ «ENDIF-»
}
- «ENDIF-»
- «ENDLET-»
-«ENDDEFINE»
+ «ENDIF-»
+ «ENDLET-»
+«ENDDEFINE»
-«DEFINE createFigure FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment(
+«DEFINE createFigure FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment(
'Creates figure for this edit part.\n' +
'\n' +
'Body of this method does not depend on settings in generation model\n' +
'so you may safely remove <i>generated</i> tag and modify it.\n'
- )»
- protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure create«IF hasBorderItems(self)»Main«ELSE»Node«ENDIF»Figure() {
+ )»
+ protected org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure create«IF hasBorderItems(self)»Main«ELSE»Node«ENDIF»Figure() {
org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure figure = createNodePlate();
figure.setLayoutManager(new org.eclipse.draw2d.StackLayout());
org.eclipse.draw2d.IFigure shape = createNodeShape();
@@ -385,18 +385,18 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
contentPane = setupContentPane(shape);
return figure;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setupContentPane FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment(
+«DEFINE setupContentPane FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment(
'Default implementation treats passed figure as content pane.\n' +
'Respects layout one may have set for generated figure.\n' +
'@param nodeShape instance of generated figure class'
- )»
+ )»
protected org.eclipse.draw2d.IFigure setupContentPane(org.eclipse.draw2d.IFigure nodeShape) {
- «IF not childNodes->isEmpty() or (not compartments->isEmpty() or not labels->-((labels)[gmfgen::GenExternalNodeLabel])->isEmpty())-»
+ «IF not childNodes->isEmpty() or (not compartments->isEmpty() or not labels->-((labels)[gmfgen::GenExternalNodeLabel])->isEmpty())-»
if (nodeShape.getLayoutManager() == null) {
- «IF getLayoutType() = gmfgen::ViewmapLayoutType::XY_LAYOUT-»
+ «IF getLayoutType() = gmfgen::ViewmapLayoutType::XY_LAYOUT-»
nodeShape.setLayoutManager(new org.eclipse.draw2d.FreeformLayout() {
public Object getConstraint(org.eclipse.draw2d.IFigure figure) {
@@ -407,175 +407,175 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
return result;
}
});
- «ELSE-»
+ «ELSE-»
org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout layout =new org.eclipse.gmf.runtime.draw2d.ui.figures.ConstrainedToolbarLayout();
- layout.setSpacing(«IF getDiagram().isPixelMapMode()»5«ELSE»getMapMode().DPtoLP(5)«ENDIF»);
+ layout.setSpacing(«IF getDiagram().isPixelMapMode()»5«ELSE»getMapMode().DPtoLP(5)«ENDIF»);
nodeShape.setLayoutManager(layout);
- «ENDIF-»
+ «ENDIF-»
}
- «ENDIF-»
+ «ENDIF-»
return nodeShape; // use nodeShape itself as contentPane
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getContentPane FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getContentPane FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.draw2d.IFigure getContentPane() {
if (contentPane != null) {
return contentPane;
}
return super.getContentPane();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setForegroundColor FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setForegroundColor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setForegroundColor(org.eclipse.swt.graphics.Color color) {
if (primaryShape != null) {
primaryShape.setForegroundColor(color);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setBackgroundColor FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setBackgroundColor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setBackgroundColor(org.eclipse.swt.graphics.Color color) {
if (primaryShape != null) {
primaryShape.setBackgroundColor(color);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setLineWidth FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setLineWidth FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setLineWidth(int width) {
if (primaryShape instanceof org.eclipse.draw2d.Shape) {
- ((org.eclipse.draw2d.Shape) primaryShape).setLineWidth(«IF getDiagram().isPixelMapMode()»width«ELSE»getMapMode().DPtoLP(width)«ENDIF»);
+ ((org.eclipse.draw2d.Shape) primaryShape).setLineWidth(«IF getDiagram().isPixelMapMode()»width«ELSE»getMapMode().DPtoLP(width)«ENDIF»);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setLineStyle FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setLineStyle FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setLineType(int style) {
if (primaryShape instanceof org.eclipse.draw2d.Shape) {
((org.eclipse.draw2d.Shape) primaryShape).setLineStyle(style);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getPrimaryChildEditPart FOR gmfgen::GenNode-»
- «IF not labels->isEmpty()-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getPrimaryChildEditPart FOR gmfgen::GenNode-»
+ «IF not labels->isEmpty()-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gef.EditPart getPrimaryChildEditPart() {
- return getChildBySemanticHint(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR labels->first().oclAsType(gmfgen::GenLabel)»);
+ return getChildBySemanticHint(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR labels->first().oclAsType(gmfgen::GenLabel)»);
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
// pre: getAssistantOutgoingLinks(this).size() > 0
-«DEFINE getMARelTypesOnSource FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getMARelTypesOnSource FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ getMARelTypesOnSource() {
java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ types = new java.util.ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/();
- «FOREACH getAssistantOutgoingLinks(self) AS link-»
- types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
- «ENDFOREACH-»
+ «FOREACH getAssistantOutgoingLinks(self) AS link-»
+ types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
+ «ENDFOREACH-»
return types;
}
-«ENDDEFINE»
+«ENDDEFINE»
// pre: getAssistantIncomingLinks(this).size() > 0
-«DEFINE getMARelTypesOnTarget FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getMARelTypesOnTarget FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ getMARelTypesOnTarget() {
java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ types = new java.util.ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/();
- «FOREACH getAssistantIncomingLinks(self) AS link-»
- types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
- «ENDFOREACH-»
+ «FOREACH getAssistantIncomingLinks(self) AS link-»
+ types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
+ «ENDFOREACH-»
return types;
}
-«ENDDEFINE»
+«ENDDEFINE»
// pre: getAssistantOutgoingLinks(this).size() > 0
-«DEFINE getMARelTypesOnSourceAndTarget FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getMARelTypesOnSourceAndTarget FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ getMARelTypesOnSourceAndTarget(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart targetEditPart) {
java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ types = new java.util.ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/();
- «FOREACH getAssistantOutgoingLinks(self) AS link-»
- «FOREACH selectGenNodes(link.targets->asSequence()) AS target-»
- if (targetEditPart instanceof «target.getEditPartQualifiedClassName()») {
- types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
+ «FOREACH getAssistantOutgoingLinks(self) AS link-»
+ «FOREACH selectGenNodes(link.targets->asSequence()) AS target-»
+ if (targetEditPart instanceof «target.getEditPartQualifiedClassName()») {
+ types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
}
- «ENDFOREACH-»
- «ENDFOREACH-»
+ «ENDFOREACH-»
+ «ENDFOREACH-»
return types;
}
-«ENDDEFINE»
+«ENDDEFINE»
// pre: getAssistantIncomingLinks(this).size() > 0
-«DEFINE getMATypesForSource FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getMATypesForSource FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ getMATypesForSource(org.eclipse.gmf.runtime.emf.type.core.IElementType relationshipType) {
java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ types = new java.util.ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/();
- «FOREACH getAssistantIncomingLinks(self) AS link-»
- «FOREACH selectGenNodes(link.sources->asSequence()) AS source-»
- if (relationshipType == «EXPAND xpt::providers::ElementTypes::accessElementType FOR link») {
- types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR source»);
+ «FOREACH getAssistantIncomingLinks(self) AS link-»
+ «FOREACH selectGenNodes(link.sources->asSequence()) AS source-»
+ if (relationshipType == «EXPAND xpt::providers::ElementTypes::accessElementType FOR link») {
+ types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR source»);
}
- «ENDFOREACH-»
- «ENDFOREACH-»
+ «ENDFOREACH-»
+ «ENDFOREACH-»
return types;
}
-«ENDDEFINE»
+«ENDDEFINE»
// pre: getAssistantOutgoingLinks(this).size() > 0
-«DEFINE getMATypesForTarget FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getMATypesForTarget FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ getMATypesForTarget(org.eclipse.gmf.runtime.emf.type.core.IElementType relationshipType) {
java.util.List/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/ types = new java.util.ArrayList/*<org.eclipse.gmf.runtime.emf.type.core.IElementType>*/();
- «FOREACH getAssistantOutgoingLinks(self) AS link-»
- «FOREACH (link.targets)[gmfgen::GenNode]->asSequence() AS target-»
- if (relationshipType == «EXPAND xpt::providers::ElementTypes::accessElementType FOR link») {
- types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR target»);
+ «FOREACH getAssistantOutgoingLinks(self) AS link-»
+ «FOREACH (link.targets)[gmfgen::GenNode]->asSequence() AS target-»
+ if (relationshipType == «EXPAND xpt::providers::ElementTypes::accessElementType FOR link») {
+ types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR target»);
}
- «ENDFOREACH-»
- «ENDFOREACH-»
+ «ENDFOREACH-»
+ «ENDFOREACH-»
return types;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleNotificationEventBody FOR gmfgen::GenTopLevelNode-»
+«DEFINE handleNotificationEventBody FOR gmfgen::GenTopLevelNode-»
if (event.getNotifier() == getModel() && org.eclipse.emf.ecore.EcorePackage.eINSTANCE.getEModelElement_EAnnotations().equals(event.getFeature())) {
handleMajorSemanticChange();
} else {
super.handleNotificationEvent(event);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE innerClassDeclaration FOR gmfgen::Viewmap»
-«ENDDEFINE»
+«DEFINE innerClassDeclaration FOR gmfgen::Viewmap»
+«ENDDEFINE»
-«DEFINE innerClassDeclaration FOR gmfgen::InnerClassViewmap»
- «classBody»
-«ENDDEFINE»
+«DEFINE innerClassDeclaration FOR gmfgen::InnerClassViewmap»
+ «classBody»
+«ENDDEFINE»
-«DEFINE getTargetEditPartMethod FOR gmfgen::GenNode»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getTargetEditPartMethod FOR gmfgen::GenNode»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gef.EditPart getTargetEditPart(org.eclipse.gef.Request request) {
if (request instanceof org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest) {
org.eclipse.gmf.runtime.diagram.core.edithelpers.CreateElementRequestAdapter adapter = ((org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewAndElementRequest) request).getViewAndElementDescriptor().getCreateElementRequestAdapter();
org.eclipse.gmf.runtime.emf.type.core.IElementType type = (org.eclipse.gmf.runtime.emf.type.core.IElementType) adapter.getAdapter(org.eclipse.gmf.runtime.emf.type.core.IElementType.class);
-«FOREACH compartments->asSequence() AS compartment-»
- «IF listCompartmentHasChildren(compartment)-»
- «FOREACH compartment.childNodes->asSequence() AS childNode-»
- if (type == «EXPAND xpt::providers::ElementTypes::accessElementType FOR childNode») {
- return getChildBySemanticHint(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR compartment»);
+«FOREACH compartments->asSequence() AS compartment-»
+ «IF listCompartmentHasChildren(compartment)-»
+ «FOREACH compartment.childNodes->asSequence() AS childNode-»
+ if (type == «EXPAND xpt::providers::ElementTypes::accessElementType FOR childNode») {
+ return getChildBySemanticHint(«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR compartment»);
}
- «ENDFOREACH-»
- «ENDIF-»
-«ENDFOREACH-»
+ «ENDFOREACH-»
+ «ENDIF-»
+«ENDFOREACH-»
}
return super.getTargetEditPart(request);
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt
index 00f748155..ded70e672 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeLabelEditPart.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,19 +11,19 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editparts::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::diagram::editparts::Utils»
-«DEFINE _constructor FOR gmfgen::GenNodeLabel-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
+«DEFINE _constructor FOR gmfgen::GenNodeLabel-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «editPartClassName»(org.eclipse.gmf.runtime.notation.View view) {
super(view);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenNodeLabel-»
+«DEFINE createDefaultEditPoliciesBody FOR gmfgen::GenNodeLabel-»
super.createDefaultEditPolicies();
- installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
+ installEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE, new «getDiagram().getTextSelectionEditPolicyQualifiedClassName()»());
installEditPolicy(org.eclipse.gef.EditPolicy.DIRECT_EDIT_ROLE, new org.eclipse.gmf.runtime.diagram.ui.editpolicies.LabelDirectEditPolicy());
installEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE, new org.eclipse.gef.editpolicies.NonResizableEditPolicy() {
@@ -42,12 +42,12 @@
return false;
}
});
- «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
-«ENDDEFINE»
+ «EXPAND xpt::diagram::editparts::Common::behaviour FOR self-»
+«ENDDEFINE»
-«DEFINE refreshBounds FOR gmfgen::GenNodeLabel-»
- «IF isStoringChildPositions(node)-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshBounds FOR gmfgen::GenNodeLabel-»
+ «IF isStoringChildPositions(node)-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshBounds() {
int width = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width())).intValue();
int height = ((Integer) getStructuralFeatureValue(org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height())).intValue();
@@ -57,14 +57,14 @@
org.eclipse.draw2d.geometry.Point loc = new org.eclipse.draw2d.geometry.Point(x, y);
((org.eclipse.gef.GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), new org.eclipse.draw2d.geometry.Rectangle(loc, size));
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE handleNotificationEventBody FOR gmfgen::GenNodeLabel-»
+«DEFINE handleNotificationEventBody FOR gmfgen::GenNodeLabel-»
Object feature = event.getFeature();
- «IF isStoringChildPositions(node)-»
- «EXPAND xpt::diagram::editparts::Common::handleBounds FOR self-»
- «ENDIF-»
- «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
+ «IF isStoringChildPositions(node)-»
+ «EXPAND xpt::diagram::editparts::Common::handleBounds FOR self-»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editparts::Common::handleText FOR self-»
super.handleNotificationEvent(event);
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
index e2d649b00..a5c8917d3 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/TextAware.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,101 +11,101 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::ViewmapAttributesUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::diagram::ViewmapAttributesUtils»
-«DEFINE fields FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE fields FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gef.tools.DirectEditManager manager;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gmf.runtime.common.ui.services.parser.IParser parser;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.util.List parserElements;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String defaultText;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE methods(needsRefreshBounds : Boolean, readOnly : Boolean, useElementIcon : Boolean, viewmap : gmfgen::Viewmap,
- modelFacet : gmfgen::LabelModelFacet, host : gmfgen::GenCommonBase, diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
- «EXPAND getLabelTextHelper-»
+«DEFINE methods(needsRefreshBounds : Boolean, readOnly : Boolean, useElementIcon : Boolean, viewmap : gmfgen::Viewmap,
+ modelFacet : gmfgen::LabelModelFacet, host : gmfgen::GenCommonBase, diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
+ «EXPAND getLabelTextHelper-»
- «EXPAND setLabelTextHelper-»
+ «EXPAND setLabelTextHelper-»
- «EXPAND getLabelIconHelper-»
+ «EXPAND getLabelIconHelper-»
- «EXPAND setLabelIconHelper-»
+ «EXPAND setLabelIconHelper-»
- «EXPAND labelSetter-»
+ «EXPAND labelSetter-»
- «EXPAND getModelChildren-»
+ «EXPAND getModelChildren-»
- «EXPAND getChildBySemanticHint-»
+ «EXPAND getChildBySemanticHint-»
- «EXPAND getParserElement(modelFacet)-»
+ «EXPAND getParserElement(modelFacet)-»
- «EXPAND getLabelIcon(useElementIcon, diagram)-»
+ «EXPAND getLabelIcon(useElementIcon, diagram)-»
- «EXPAND getLabelText-»
+ «EXPAND getLabelText-»
- «EXPAND setLabelText(diagram)-»
+ «EXPAND setLabelText(diagram)-»
- «EXPAND getEditText-»
+ «EXPAND getEditText-»
- «EXPAND isEditable(readOnly)-»
+ «EXPAND isEditable(readOnly)-»
- «EXPAND getEditTextValidator-»
+ «EXPAND getEditTextValidator-»
- «EXPAND getCompletionProcessor-»
+ «EXPAND getCompletionProcessor-»
- «EXPAND getParserOptions-»
+ «EXPAND getParserOptions-»
- «EXPAND getParser(modelFacet, diagram, host)-»
+ «EXPAND getParser(modelFacet, diagram, host)-»
- «EXPAND getManager(diagram)-»
+ «EXPAND getManager(diagram)-»
- «EXPAND setManager-»
+ «EXPAND setManager-»
- «EXPAND performDirectEdit-»
+ «EXPAND performDirectEdit-»
- «EXPAND performDirectEditAtPoint-»
+ «EXPAND performDirectEditAtPoint-»
- «EXPAND performDirectEditWithInitialChar-»
+ «EXPAND performDirectEditWithInitialChar-»
- «EXPAND performDirectEditRequest-»
+ «EXPAND performDirectEditRequest-»
- «EXPAND refreshVisuals(needsRefreshBounds)-»
+ «EXPAND refreshVisuals(needsRefreshBounds)-»
- «EXPAND refreshLabel(diagram)-»
+ «EXPAND refreshLabel(diagram)-»
- «EXPAND refreshUnderline-»
+ «EXPAND refreshUnderline-»
- «EXPAND refreshStrikeThrough-»
+ «EXPAND refreshStrikeThrough-»
- «EXPAND refreshFont-»
+ «EXPAND refreshFont-»
- «EXPAND setFontColor-»
+ «EXPAND setFontColor-»
- «EXPAND addSemanticListeners-»
+ «EXPAND addSemanticListeners-»
- «EXPAND removeSemanticListeners-»
+ «EXPAND removeSemanticListeners-»
- «EXPAND getAccessibleEditPart-»
+ «EXPAND getAccessibleEditPart-»
- «EXPAND getFontStyleOwnerView(viewmap)-»
-«ENDDEFINE»
+ «EXPAND getFontStyleOwnerView(viewmap)-»
+«ENDDEFINE»
-«DEFINE labelSetterName FOR gmfgen::ParentAssignedViewmap-»
-«IF setterName <> null»«setterName»«ELSE»setLabel«ENDIF-»
-«ENDDEFINE»
+«DEFINE labelSetterName FOR gmfgen::ParentAssignedViewmap-»
+«IF setterName <> null»«setterName»«ELSE»setLabel«ENDIF-»
+«ENDDEFINE»
-«DEFINE labelSetterName FOR gmfgen::Viewmap»setLabel«ENDDEFINE»
+«DEFINE labelSetterName FOR gmfgen::Viewmap»setLabel«ENDDEFINE»
-«DEFINE getLabelTextHelper FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getLabelTextHelper FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getLabelTextHelper(org.eclipse.draw2d.IFigure figure) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
return ((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).getText();
@@ -113,10 +113,10 @@
return ((org.eclipse.draw2d.Label) figure).getText();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setLabelTextHelper FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setLabelTextHelper FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setLabelTextHelper(org.eclipse.draw2d.IFigure figure, String text) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).setText(text);
@@ -124,10 +124,10 @@
((org.eclipse.draw2d.Label) figure).setText(text);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getLabelIconHelper FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getLabelIconHelper FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.swt.graphics.Image getLabelIconHelper(org.eclipse.draw2d.IFigure figure) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
return ((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).getIcon();
@@ -135,10 +135,10 @@
return ((org.eclipse.draw2d.Label) figure).getIcon();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setLabelIconHelper FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setLabelIconHelper FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setLabelIconHelper(org.eclipse.draw2d.IFigure figure, org.eclipse.swt.graphics.Image icon) {
if (figure instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) figure).setIcon(icon);
@@ -146,80 +146,80 @@
((org.eclipse.draw2d.Label) figure).setIcon(icon);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE labelSetter FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
- public void «EXPAND labelSetterName FOR viewmap»(«EXPAND labelSetterFigureClassName FOR viewmap» figure) {
+«DEFINE labelSetter FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public void «EXPAND labelSetterName FOR viewmap»(«EXPAND labelSetterFigureClassName FOR viewmap» figure) {
unregisterVisuals();
setFigure(figure);
defaultText = getLabelTextHelper(figure);
registerVisuals();
refreshVisuals();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE labelSetterFigureClassName FOR gmfgen::ParentAssignedViewmap-»
- «IF figureQualifiedClassName <> null-»
- «figureQualifiedClassName»
- «ELSE-»
+«DEFINE labelSetterFigureClassName FOR gmfgen::ParentAssignedViewmap-»
+ «IF figureQualifiedClassName <> null-»
+ «figureQualifiedClassName»
+ «ELSE-»
org.eclipse.draw2d.IFigure
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE labelSetterFigureClassName FOR gmfgen::Viewmap-»
+«DEFINE labelSetterFigureClassName FOR gmfgen::Viewmap-»
org.eclipse.draw2d.IFigure
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getModelChildren FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getModelChildren FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected java.util.List getModelChildren() {
return java.util.Collections.EMPTY_LIST;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getChildBySemanticHint FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getChildBySemanticHint FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart getChildBySemanticHint(String semanticHint) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getParserElement(modelFacet : gmfgen::LabelModelFacet) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getParserElement(modelFacet : gmfgen::LabelModelFacet) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.emf.ecore.EObject getParserElement() {
-«IF modelFacet = null»
+«IF modelFacet = null»
org.eclipse.emf.ecore.EObject element = resolveSemanticElement();
return element != null ? element : (org.eclipse.gmf.runtime.notation.View) getModel();
-«ELSE»«EXPAND getParserElement FOR modelFacet»«ENDIF-»
+«ELSE»«EXPAND getParserElement FOR modelFacet»«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getParserElement FOR gmfgen::LabelModelFacet-»
+«DEFINE getParserElement FOR gmfgen::LabelModelFacet-»
return resolveSemanticElement();
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getParserElement FOR gmfgen::DesignLabelModelFacet-»
+«DEFINE getParserElement FOR gmfgen::DesignLabelModelFacet-»
return (org.eclipse.gmf.runtime.notation.View) getModel();
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getLabelIcon(useElementIcon : Boolean, diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getLabelIcon(useElementIcon : Boolean, diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.swt.graphics.Image getLabelIcon() {
- «IF useElementIcon-»
+ «IF useElementIcon-»
org.eclipse.emf.ecore.EObject parserElement = getParserElement();
if (parserElement == null) {
return null;
}
- return «diagram.getElementTypesQualifiedClassName()».getImage(parserElement.eClass());
- «ELSE-»
+ return «diagram.getElementTypesQualifiedClassName()».getImage(parserElement.eClass());
+ «ELSE-»
return null;
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getLabelText FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getLabelText FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getLabelText() {
String text = null;
org.eclipse.emf.ecore.EObject parserElement = getParserElement();
@@ -233,48 +233,48 @@
}
return text;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setLabelText(diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setLabelText(diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setLabelText(String text) {
setLabelTextHelper(getFigure(), text);
Object pdEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») pdEditPolicy).refreshFeedback();
+ if (pdEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
+ ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») sfEditPolicy).refreshFeedback();
+ if (sfEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
+ ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») sfEditPolicy).refreshFeedback();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getEditText FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getEditText FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getEditText() {
if (getParserElement() == null || getParser() == null) {
- return ""; «EXPAND xpt::Common::nonNLS»
+ return ""; «EXPAND xpt::Common::nonNLS»
}
return getParser().getEditString(
new org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter(getParserElement()),
getParserOptions().intValue());
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE isEditable(readOnly : Boolean) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE isEditable(readOnly : Boolean) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean isEditable() {
- «IF readOnly-»
+ «IF readOnly-»
return false;
- «ELSE-»
+ «ELSE-»
return getParser() != null;
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getEditTextValidator FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getEditTextValidator FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.jface.viewers.ICellEditorValidator getEditTextValidator() {
return new org.eclipse.jface.viewers.ICellEditorValidator() {
@@ -302,72 +302,72 @@
}
};
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getCompletionProcessor FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getCompletionProcessor FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.jface.text.contentassist.IContentAssistProcessor getCompletionProcessor() {
if (getParserElement() == null || getParser() == null) {
return null;
}
return getParser().getCompletionProcessor(new org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter(getParserElement()));
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getParserOptions FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getParserOptions FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions getParserOptions() {
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserOptions.NONE;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getParser(modelFacet : gmfgen::LabelModelFacet, diagram : gmfgen::GenDiagram, host : gmfgen::GenCommonBase) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getParser(modelFacet : gmfgen::LabelModelFacet, diagram : gmfgen::GenDiagram, host : gmfgen::GenCommonBase) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.ui.services.parser.IParser getParser() {
if (parser == null) {
- parser = «EXPAND parsers::ParserProvider::accessorCall(host, modelFacet, 'getParserElement()')»;
+ parser = «EXPAND parsers::ParserProvider::accessorCall(host, modelFacet, 'getParserElement()')»;
}
return parser;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getManager(diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getManager(diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.tools.DirectEditManager getManager() {
if (manager == null) {
setManager(new org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager(this,
org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager.getTextCellEditorClass(this),
- «diagram.getEditPartFactoryQualifiedClassName()».getTextCellEditorLocator(this)));
+ «diagram.getEditPartFactoryQualifiedClassName()».getTextCellEditorLocator(this)));
}
return manager;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setManager FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setManager FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setManager(org.eclipse.gef.tools.DirectEditManager manager) {
this.manager = manager;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE performDirectEdit FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE performDirectEdit FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void performDirectEdit() {
getManager().show();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE performDirectEditAtPoint FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE performDirectEditAtPoint FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void performDirectEdit(org.eclipse.draw2d.geometry.Point eventLocation) {
if (getManager().getClass() == org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager.class) {
((org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager) getManager()).show(eventLocation.getSWTPoint());
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE performDirectEditWithInitialChar FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE performDirectEditWithInitialChar FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
private void performDirectEdit(char initialCharacter) {
if (getManager() instanceof org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager) {
((org.eclipse.gmf.runtime.diagram.ui.tools.TextDirectEditManager) getManager()).show(initialCharacter);
@@ -375,10 +375,10 @@
performDirectEdit();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE performDirectEditRequest FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE performDirectEditRequest FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void performDirectEditRequest(org.eclipse.gef.Request request) {
final org.eclipse.gef.Request theRequest = request;
try {
@@ -402,10 +402,10 @@
e.printStackTrace();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshVisuals(needsRefreshBounds : Boolean) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshVisuals(needsRefreshBounds : Boolean) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshVisuals() {
super.refreshVisuals();
refreshLabel();
@@ -413,30 +413,30 @@
refreshFontColor();
refreshUnderline();
refreshStrikeThrough();
- «IF needsRefreshBounds-»
+ «IF needsRefreshBounds-»
refreshBounds();
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshLabel(diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshLabel(diagram : gmfgen::GenDiagram) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshLabel() {
setLabelTextHelper(getFigure(), getLabelText());
setLabelIconHelper(getFigure(), getLabelIcon());
Object pdEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.PRIMARY_DRAG_ROLE);
- if (pdEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») pdEditPolicy).refreshFeedback();
+ if (pdEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
+ ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») pdEditPolicy).refreshFeedback();
}
Object sfEditPolicy = getEditPolicy(org.eclipse.gef.EditPolicy.SELECTION_FEEDBACK_ROLE);
- if (sfEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
- ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») sfEditPolicy).refreshFeedback();
+ if (sfEditPolicy instanceof «diagram.getTextSelectionEditPolicyQualifiedClassName()») {
+ ((«diagram.getTextSelectionEditPolicyQualifiedClassName()») sfEditPolicy).refreshFeedback();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshUnderline FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshUnderline FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshUnderline() {
org.eclipse.gmf.runtime.notation.FontStyle style =
(org.eclipse.gmf.runtime.notation.FontStyle) getFontStyleOwnerView().getStyle(
@@ -445,10 +445,10 @@
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getFigure()).setTextUnderline(style.isUnderline());
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshStrikeThrough FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshStrikeThrough FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshStrikeThrough() {
org.eclipse.gmf.runtime.notation.FontStyle style =
(org.eclipse.gmf.runtime.notation.FontStyle) getFontStyleOwnerView().getStyle(
@@ -457,10 +457,10 @@
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getFigure()).setTextStrikeThrough(style.isStrikeThrough());
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshFont FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshFont FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshFont() {
org.eclipse.gmf.runtime.notation.FontStyle style =
(org.eclipse.gmf.runtime.notation.FontStyle) getFontStyleOwnerView().getStyle(
@@ -473,45 +473,45 @@
setFont(fontData);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE setFontColor FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE setFontColor FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setFontColor(org.eclipse.swt.graphics.Color color) {
getFigure().setForegroundColor(color);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addSemanticListeners FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE addSemanticListeners FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void addSemanticListeners() {
if (getParser() instanceof org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser) {
org.eclipse.emf.ecore.EObject element = resolveSemanticElement();
parserElements = ((org.eclipse.gmf.runtime.emf.ui.services.parser.ISemanticParser) getParser()).getSemanticElementsBeingParsed(element);
for (int i = 0; i < parserElements.size(); i++) {
- addListenerFilter("SemanticModel" + i, this, (org.eclipse.emf.ecore.EObject) parserElements.get(i)); «EXPAND xpt::Common::nonNLS»
+ addListenerFilter("SemanticModel" + i, this, (org.eclipse.emf.ecore.EObject) parserElements.get(i)); «EXPAND xpt::Common::nonNLS»
}
} else {
super.addSemanticListeners();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE removeSemanticListeners FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE removeSemanticListeners FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void removeSemanticListeners() {
if (parserElements != null) {
for (int i = 0; i < parserElements.size(); i++) {
- removeListenerFilter("SemanticModel" + i); «EXPAND xpt::Common::nonNLS»
+ removeListenerFilter("SemanticModel" + i); «EXPAND xpt::Common::nonNLS»
}
} else {
super.removeSemanticListeners();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getAccessibleEditPart FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getAccessibleEditPart FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.AccessibleEditPart getAccessibleEditPart() {
if (accessibleEP == null) {
accessibleEP = new AccessibleGraphicalEditPart() {
@@ -523,15 +523,15 @@
}
return accessibleEP;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getFontStyleOwnerView(viewmap : gmfgen::Viewmap) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getFontStyleOwnerView(viewmap : gmfgen::Viewmap) FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gmf.runtime.notation.View getFontStyleOwnerView() {
- «IF viewmap.isFixedFont()-»
+ «IF viewmap.isFixedFont()-»
return (org.eclipse.gmf.runtime.notation.View) getModel();
- «ELSE-»
+ «ELSE-»
return getPrimaryView();
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/AbstractParser.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/AbstractParser.xpt
index 261b2f0fc..c8d8cae22 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/AbstractParser.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/AbstractParser.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -12,47 +12,47 @@
* [244419] custom parsers
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION impl::parsers::i18n»
+«EXTENSION impl::parsers::i18n»
-«DEFINE className FOR gmfgen::GenParsers»«defaultAbstractParserClassName()»«ENDDEFINE»
-«DEFINE qualifiedClassName FOR gmfgen::GenParsers»«implPackageName».«EXPAND className»«ENDDEFINE»
+«DEFINE className FOR gmfgen::GenParsers»«defaultAbstractParserClassName()»«ENDDEFINE»
+«DEFINE qualifiedClassName FOR gmfgen::GenParsers»«implPackageName».«EXPAND className»«ENDDEFINE»
-«DEFINE Main FOR gmfgen::GenParsers-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «implPackageName»;
+«DEFINE Main FOR gmfgen::GenParsers-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «implPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParser {
+«EXPAND xpt::Common::generatedClassComment»
+public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParser {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected final org.eclipse.emf.ecore.EAttribute[] features;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected final org.eclipse.emf.ecore.EAttribute[] editableFeatures;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String viewPattern;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String editorPattern;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String editPattern;
- «EXPAND xpt::Common::generatedMemberComment»
- public «EXPAND className»(org.eclipse.emf.ecore.EAttribute[] features) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «EXPAND className»(org.eclipse.emf.ecore.EAttribute[] features) {
if (features == null || java.util.Arrays.asList(features).contains(null)) {
throw new IllegalArgumentException();
}
this.editableFeatures = this.features = features;
}
- «EXPAND xpt::Common::generatedMemberComment»
- public «EXPAND className»(org.eclipse.emf.ecore.EAttribute[] features,
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «EXPAND className»(org.eclipse.emf.ecore.EAttribute[] features,
org.eclipse.emf.ecore.EAttribute[] editableFeatures) {
if (features == null || java.util.Arrays.asList(features).contains(null)) {
throw new IllegalArgumentException();
@@ -64,37 +64,37 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
this.editableFeatures = editableFeatures;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getViewPattern() {
return viewPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setViewPattern(String viewPattern) {
this.viewPattern = viewPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getEditorPattern() {
return editorPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setEditorPattern(String editorPattern) {
this.editorPattern = editorPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getEditPattern() {
return editPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setEditPattern(String editPattern) {
this.editPattern = editPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean isAffectingEvent(Object event, int flags) {
if (event instanceof org.eclipse.emf.common.notify.Notification) {
return isAffectingFeature(((org.eclipse.emf.common.notify.Notification) event).getFeature());
@@ -102,7 +102,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
return false;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean isAffectingFeature(Object feature) {
for (int i = 0; i < features.length; i++) {
if (features[i] == feature) {
@@ -112,13 +112,13 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
return false;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.jface.text.contentassist.IContentAssistProcessor getCompletionProcessor(
org.eclipse.core.runtime.IAdaptable element) {
return null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected Object[] getValues(org.eclipse.emf.ecore.EObject element) {
Object[] values = new Object[features.length];
for (int i = 0; i < features.length; i++) {
@@ -127,7 +127,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
return values;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected Object[] getEditableValues(org.eclipse.emf.ecore.EObject element) {
Object[] values = new Object[editableFeatures.length];
for (int i = 0; i < editableFeatures.length; i++) {
@@ -136,19 +136,19 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
return values;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected Object getValue(org.eclipse.emf.ecore.EObject element, org.eclipse.emf.ecore.EAttribute feature) {
Object value = element.eGet(feature);
Class iClass = feature.getEAttributeType().getInstanceClass();
if (String.class.equals(iClass)) {
if (value == null) {
- value = ""; «EXPAND xpt::Common::nonNLS»
+ value = ""; «EXPAND xpt::Common::nonNLS»
}
}
return value;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getParseCommand(
org.eclipse.core.runtime.IAdaptable adapter, Object[] values, int flags) {
if (values == null || validateNewValues(values).getCode() !=
@@ -164,14 +164,14 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
}
org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand command =
new org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand(
- editingDomain, "Set Values"); «EXPAND xpt::Common::nonNLS»
+ editingDomain, "Set Values"); «EXPAND xpt::Common::nonNLS»
for (int i = 0; i < values.length; i++) {
command.compose(getModificationCommand(element, editableFeatures[i], values[i]));
}
return command;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getModificationCommand(
org.eclipse.emf.ecore.EObject element, org.eclipse.emf.ecore.EAttribute feature, Object value) {
value = getValidNewValue(feature, value);
@@ -183,7 +183,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
return new org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand(request);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus validateNewValues(Object[] values) {
if (values.length != editableFeatures.length) {
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.UNEDITABLE_STATUS;
@@ -192,7 +192,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
Object value = getValidNewValue(editableFeatures[i], values[i]);
if (value instanceof InvalidValue) {
return new org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus(
- «editorGen.plugin.getActivatorQualifiedClassName()».ID,
+ «editorGen.plugin.getActivatorQualifiedClassName()».ID,
org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus.UNEDITABLE,
value.toString());
}
@@ -200,7 +200,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.EDITABLE_STATUS;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected Object getValidNewValue(org.eclipse.emf.ecore.EAttribute feature, Object value) {
org.eclipse.emf.ecore.EClassifier type = feature.getEType();
if (type instanceof org.eclipse.emf.ecore.EDataType) {
@@ -211,7 +211,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
} else if (value instanceof String) {
value = Boolean.valueOf((String) value);
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Character.TYPE.equals(iClass)) {
if (value instanceof Character) {
@@ -224,7 +224,7 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
value = new Character(s.charAt(0));
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Byte.TYPE.equals(iClass)) {
if (value instanceof Byte) {
@@ -239,11 +239,11 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
try {
value = Byte.valueOf(s);
} catch (NumberFormatException nfe) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
}
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Short.TYPE.equals(iClass)) {
if (value instanceof Short) {
@@ -258,11 +258,11 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
try {
value = Short.valueOf(s);
} catch (NumberFormatException nfe) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
}
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Integer.TYPE.equals(iClass)) {
if (value instanceof Integer) {
@@ -277,11 +277,11 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
try {
value = Integer.valueOf(s);
} catch (NumberFormatException nfe) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
}
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Long.TYPE.equals(iClass)) {
if (value instanceof Long) {
@@ -296,11 +296,11 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
try {
value = Long.valueOf(s);
} catch (NumberFormatException nfe) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
}
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Float.TYPE.equals(iClass)) {
if (value instanceof Float) {
@@ -315,11 +315,11 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
try {
value = Float.valueOf(s);
} catch (NumberFormatException nfe) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
}
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (Double.TYPE.equals(iClass)) {
if (value instanceof Double) {
@@ -334,63 +334,63 @@ public abstract class «EXPAND className» implements org.eclipse.gmf.runtime.comm
try {
value = Double.valueOf(s);
} catch (NumberFormatException nfe) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserWrongStringConversionMessage()) FOR editorGen», iClass.getName()));
}
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», iClass.getName()));
}
} else if (type instanceof org.eclipse.emf.ecore.EEnum) {
if (value instanceof String) {
org.eclipse.emf.ecore.EEnumLiteral literal =
((org.eclipse.emf.ecore.EEnum) type).getEEnumLiteralByLiteral((String) value);
if (literal == null) {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnknownLiteralMessage()) FOR editorGen», value));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnknownLiteralMessage()) FOR editorGen», value));
} else {
value = literal.getInstance();
}
} else {
- value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», String.class.getName()));
+ value = new InvalidValue(org.eclipse.osgi.util.NLS.bind(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForAbstractParserUnexpectedValueTypeMessage()) FOR editorGen», String.class.getName()));
}
}
}
return value;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected class InvalidValue {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String description;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public InvalidValue(String description) {
this.description = description;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public String toString() {
return description;
}
}
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
-
-«DEFINE additions FOR gmfgen::GenParsers»«ENDDEFINE»
-
-«DEFINE i18nValues FOR gmfgen::GenParsers-»
-«IF (implementations)[gmfgen::PredefinedParser]->size() > 0-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForAbstractParserUnexpectedValueTypeMessage(), 'Value of type {0} is expected')-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForAbstractParserWrongStringConversionMessage(), 'String value does not convert to {0} value')-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForAbstractParserUnknownLiteralMessage(), 'Unknown literal: {0}')-»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE i18nAccessors FOR gmfgen::GenParsers-»
-«IF (implementations)[gmfgen::PredefinedParser]->size() > 0-»
-«EXPAND xpt::Externalizer::accessorField(i18nKeyForAbstractParserUnexpectedValueTypeMessage())-»
-«EXPAND xpt::Externalizer::accessorField(i18nKeyForAbstractParserWrongStringConversionMessage())-»
-«EXPAND xpt::Externalizer::accessorField(i18nKeyForAbstractParserUnknownLiteralMessage())-»
-«ENDIF-»
-«ENDDEFINE»
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenParsers»«ENDDEFINE»
+
+«DEFINE i18nValues FOR gmfgen::GenParsers-»
+«IF (implementations)[gmfgen::PredefinedParser]->size() > 0-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForAbstractParserUnexpectedValueTypeMessage(), 'Value of type {0} is expected')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForAbstractParserWrongStringConversionMessage(), 'String value does not convert to {0} value')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForAbstractParserUnknownLiteralMessage(), 'Unknown literal: {0}')-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE i18nAccessors FOR gmfgen::GenParsers-»
+«IF (implementations)[gmfgen::PredefinedParser]->size() > 0-»
+«EXPAND xpt::Externalizer::accessorField(i18nKeyForAbstractParserUnexpectedValueTypeMessage())-»
+«EXPAND xpt::Externalizer::accessorField(i18nKeyForAbstractParserWrongStringConversionMessage())-»
+«EXPAND xpt::Externalizer::accessorField(i18nKeyForAbstractParserUnknownLiteralMessage())-»
+«ENDIF-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/ParserProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/ParserProvider.xpt
index 47a605a34..a3dae53ee 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/ParserProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/parsers/ParserProvider.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -12,107 +12,107 @@
* [244419] custom parsers
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::providers::ParserUtils»
+«EXTENSION xpt::providers::ParserUtils»
-«DEFINE accessorMethod_delegate2providers FOR gmfgen::GenParsers-»
- «EXPAND xpt::Common::generatedMemberComment('Utility method that consults ParserService')»
+«DEFINE accessorMethod_delegate2providers FOR gmfgen::GenParsers-»
+ «EXPAND xpt::Common::generatedMemberComment('Utility method that consults ParserService')»
public static org.eclipse.gmf.runtime.common.ui.services.parser.IParser getParser(org.eclipse.gmf.runtime.emf.type.core.IElementType type, org.eclipse.emf.ecore.EObject object, String parserHint) {
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserService.getInstance().getParser(new HintAdapter(type, object, parserHint));
}
-«ENDDEFINE»
+«ENDDEFINE»
// invokes method generated with accessorMethod_delegate2providers template
-«DEFINE accessorCall_delegate2providers(elementTypeHolder : gmfgen::GenCommonBase, labelModelFacet : gmfgen::LabelModelFacet, parsedElement : String) FOR gmfgen::GenCommonBase-»
-«getDiagram().editorGen.labelParsers.getQualifiedClassName()».getParser(«EXPAND xpt::providers::ElementTypes::accessElementType FOR elementTypeHolder», «parsedElement», «IF labelModelFacet = null»«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall»«ELSE»«EXPAND _parserHint(labelModelFacet, self) FOR labelModelFacet.parser»«ENDIF»)«-»
-«ENDDEFINE»
+«DEFINE accessorCall_delegate2providers(elementTypeHolder : gmfgen::GenCommonBase, labelModelFacet : gmfgen::LabelModelFacet, parsedElement : String) FOR gmfgen::GenCommonBase-»
+«getDiagram().editorGen.labelParsers.getQualifiedClassName()».getParser(«EXPAND xpt::providers::ElementTypes::accessElementType FOR elementTypeHolder», «parsedElement», «IF labelModelFacet = null»«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall»«ELSE»«EXPAND _parserHint(labelModelFacet, self) FOR labelModelFacet.parser»«ENDIF»)«-»
+«ENDDEFINE»
-«DEFINE _parserHint(labelFacet : gmfgen::LabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR hintHolder»«ENDDEFINE»
+«DEFINE _parserHint(labelFacet : gmfgen::LabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR hintHolder»«ENDDEFINE»
// ExternalParser may override hint
-«DEFINE _parserHint(labelFacet : gmfgen::LabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser-»
-«IF hint = null-»
-«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR hintHolder-»
-«ELSE»«hint»«ENDIF-»
-«ENDDEFINE»
-«DEFINE _parserHint(labelFacet : gmfgen::DesignLabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser-»
-«IF hint = null»org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint.DESCRIPTION«ELSE»«hint»«ENDIF-»
-«ENDDEFINE»
-«DEFINE _parserHint(labelFacet : gmfgen::DesignLabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint.DESCRIPTION«ENDDEFINE»
+«DEFINE _parserHint(labelFacet : gmfgen::LabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser-»
+«IF hint = null-»
+«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall FOR hintHolder-»
+«ELSE»«hint»«ENDIF-»
+«ENDDEFINE»
+«DEFINE _parserHint(labelFacet : gmfgen::DesignLabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser-»
+«IF hint = null»org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint.DESCRIPTION«ELSE»«hint»«ENDIF-»
+«ENDDEFINE»
+«DEFINE _parserHint(labelFacet : gmfgen::DesignLabelModelFacet, hintHolder : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»org.eclipse.gmf.runtime.common.ui.services.parser.CommonParserHint.DESCRIPTION«ENDDEFINE»
// FIXME refactor static field to an instance registered within Activator
-«REM»Complementary method to accessorMethod_delegate2providers, although for direct access need an instance of this class«ENDREM»
-«DEFINE accessorMethod_direct FOR gmfgen::GenParsers-»
- private static «getQualifiedClassName()» ourInstance;
+«REM»Complementary method to accessorMethod_delegate2providers, although for direct access need an instance of this class«ENDREM»
+«DEFINE accessorMethod_direct FOR gmfgen::GenParsers-»
+ private static «getQualifiedClassName()» ourInstance;
- public static «getQualifiedClassName()» get() {
+ public static «getQualifiedClassName()» get() {
if (ourInstance == null) {
- ourInstance = new «getQualifiedClassName()»();
+ ourInstance = new «getQualifiedClassName()»();
}
return ourInstance;
}
-«ENDDEFINE»
+«ENDDEFINE»
// XXX consider adding #getDescriptionParser() method to control that kind of parser access?
// XXX do I really need GenCommonBase elementTypeHolder, why not use elementType reference directly?
-«DEFINE accessorCall_direct(elementTypeHolder : gmfgen::GenCommonBase, labelModelFacet : gmfgen::LabelModelFacet, parsedElement : String) FOR gmfgen::GenCommonBase-»
-«IF labelModelFacet = null or (Sequence { labelModelFacet.parser })[gmfgen::ExternalParser]->size() = 1-»
-org.eclipse.gmf.runtime.common.ui.services.parser.ParserService.getInstance().getParser(new org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter(/*«EXPAND xpt::providers::ElementTypes::accessElementType FOR elementTypeHolder», */«parsedElement», «IF labelModelFacet = null»«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall»«ELSE»«EXPAND _parserHint(labelModelFacet, self) FOR labelModelFacet.parser»«ENDIF»))«-»
-«ELSE-»
-«getDiagram().editorGen.labelParsers.getQualifiedClassName()».get().«parserAccessorName(self)»()«-»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE provider_getParserMethod FOR gmfgen::GenParsers-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE accessorCall_direct(elementTypeHolder : gmfgen::GenCommonBase, labelModelFacet : gmfgen::LabelModelFacet, parsedElement : String) FOR gmfgen::GenCommonBase-»
+«IF labelModelFacet = null or (Sequence { labelModelFacet.parser })[gmfgen::ExternalParser]->size() = 1-»
+org.eclipse.gmf.runtime.common.ui.services.parser.ParserService.getInstance().getParser(new org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter(/*«EXPAND xpt::providers::ElementTypes::accessElementType FOR elementTypeHolder», */«parsedElement», «IF labelModelFacet = null»«EXPAND xpt::editor::VisualIDRegistry::typeMethodCall»«ELSE»«EXPAND _parserHint(labelModelFacet, self) FOR labelModelFacet.parser»«ENDIF»))«-»
+«ELSE-»
+«getDiagram().editorGen.labelParsers.getQualifiedClassName()».get().«parserAccessorName(self)»()«-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE provider_getParserMethod FOR gmfgen::GenParsers-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.ui.services.parser.IParser getParser(
org.eclipse.core.runtime.IAdaptable hint) {
String vid = (String) hint.getAdapter(String.class);
if (vid != null) {
- return getParser(«EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(vid));
+ return getParser(«EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(vid));
}
org.eclipse.gmf.runtime.notation.View view =
(org.eclipse.gmf.runtime.notation.View) hint.getAdapter(org.eclipse.gmf.runtime.notation.View.class);
if (view != null) {
- return getParser(«EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(view));
+ return getParser(«EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(view));
}
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE provider_providesMethod FOR gmfgen::GenParsers-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE provider_providesMethod FOR gmfgen::GenParsers-»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean provides(org.eclipse.gmf.runtime.common.core.service.IOperation operation) {
if (operation instanceof org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation) {
org.eclipse.core.runtime.IAdaptable hint =
((org.eclipse.gmf.runtime.common.ui.services.parser.GetParserOperation) operation).getHint();
- if («editorGen.diagram.getElementTypesQualifiedClassName()».getElement(hint) == null) {
+ if («editorGen.diagram.getElementTypesQualifiedClassName()».getElement(hint) == null) {
return false;
}
return getParser(hint) != null;
}
return false;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE HintAdapterClass FOR gmfgen::GenParsers-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE HintAdapterClass FOR gmfgen::GenParsers-»
+ «EXPAND xpt::Common::generatedMemberComment»
private static class HintAdapter extends org.eclipse.gmf.runtime.emf.ui.services.parser.ParserHintAdapter {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.gmf.runtime.emf.type.core.IElementType elementType;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public HintAdapter(org.eclipse.gmf.runtime.emf.type.core.IElementType type,
org.eclipse.emf.ecore.EObject object, String parserHint) {
super(object, parserHint);
- «EXPAND xpt::Common::_assert('type != null')-»
+ «EXPAND xpt::Common::_assert('type != null')-»
elementType = type;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public Object getAdapter(Class adapter) {
if (org.eclipse.gmf.runtime.emf.type.core.IElementType.class.equals(adapter)) {
return elementType;
@@ -120,104 +120,104 @@ org.eclipse.gmf.runtime.common.ui.services.parser.ParserService.getInstance().ge
return super.getAdapter(adapter);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getParserByVisualIdMethod FOR gmfgen::GenParsers-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getParserByVisualIdMethod FOR gmfgen::GenParsers-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.ui.services.parser.IParser getParser(int visualID) {
switch (visualID) {
- «EXPAND _getParsers FOREACH editorGen.diagram.topLevelNodes-»
- «EXPAND _getParsers FOREACH editorGen.diagram.childNodes-»
- «EXPAND _getParsers FOREACH editorGen.diagram.links-»
+ «EXPAND _getParsers FOREACH editorGen.diagram.topLevelNodes-»
+ «EXPAND _getParsers FOREACH editorGen.diagram.childNodes-»
+ «EXPAND _getParsers FOREACH editorGen.diagram.links-»
}
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _getParsers FOR gmfgen::GenNode»«EXPAND _getParser FOREACH labels»«ENDDEFINE»
-«DEFINE _getParsers FOR gmfgen::GenLink»«EXPAND _getParser FOREACH labels»«ENDDEFINE»
-«DEFINE _getParsers FOR gmfgen::GenChildLabelNode»«EXPAND _getParser(self) FOR labelModelFacet»«ENDDEFINE»
-«DEFINE _getParser FOR gmfgen::GenLabel»«EXPAND _getParser(self) FOR modelFacet»«ENDDEFINE»
+«DEFINE _getParsers FOR gmfgen::GenNode»«EXPAND _getParser FOREACH labels»«ENDDEFINE»
+«DEFINE _getParsers FOR gmfgen::GenLink»«EXPAND _getParser FOREACH labels»«ENDDEFINE»
+«DEFINE _getParsers FOR gmfgen::GenChildLabelNode»«EXPAND _getParser(self) FOR labelModelFacet»«ENDDEFINE»
+«DEFINE _getParser FOR gmfgen::GenLabel»«EXPAND _getParser(self) FOR modelFacet»«ENDDEFINE»
-«DEFINE _getParser(element : gmfgen::GenCommonBase) FOR gmfgen::LabelModelFacet»«EXPAND _getParser(self, element) FOR parser»«ENDDEFINE»
+«DEFINE _getParser(element : gmfgen::GenCommonBase) FOR gmfgen::LabelModelFacet»«EXPAND _getParser(self, element) FOR parser»«ENDDEFINE»
-«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»«ERROR 'Abstract template for ' + self.repr()»«ENDDEFINE»
-«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser»«REM»NOTHING TO DO«ENDREM»«ENDDEFINE»
+«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»«ERROR 'Abstract template for ' + self.repr()»«ENDDEFINE»
+«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser»«REM»NOTHING TO DO«ENDREM»«ENDDEFINE»
-«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::PredefinedParser-»
- «EXPAND xpt::Common::caseVisualID FOR element» return «parserAccessorName(element)»();
-«ENDDEFINE»
+«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::PredefinedParser-»
+ «EXPAND xpt::Common::caseVisualID FOR element» return «parserAccessorName(element)»();
+«ENDDEFINE»
-«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::CustomParser-»
- «EXPAND xpt::Common::caseVisualID FOR element» return «parserAccessorName(element)»();
-«ENDDEFINE»
+«DEFINE _getParser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::CustomParser-»
+ «EXPAND xpt::Common::caseVisualID FOR element» return «parserAccessorName(element)»();
+«ENDDEFINE»
-«DEFINE parsers FOR gmfgen::GenNode»«EXPAND _parser FOREACH labels»«ENDDEFINE»
-«DEFINE parsers FOR gmfgen::GenLink»«EXPAND _parser FOREACH labels»«ENDDEFINE»
-«DEFINE parsers FOR gmfgen::GenChildLabelNode»«EXPAND _parser(self) FOR labelModelFacet»«ENDDEFINE»
+«DEFINE parsers FOR gmfgen::GenNode»«EXPAND _parser FOREACH labels»«ENDDEFINE»
+«DEFINE parsers FOR gmfgen::GenLink»«EXPAND _parser FOREACH labels»«ENDDEFINE»
+«DEFINE parsers FOR gmfgen::GenChildLabelNode»«EXPAND _parser(self) FOR labelModelFacet»«ENDDEFINE»
-«DEFINE _parser FOR gmfgen::GenLabel»«EXPAND _parser(self) FOR modelFacet»«ENDDEFINE»
-«DEFINE _parser(element : gmfgen::GenCommonBase) FOR gmfgen::LabelModelFacet»«EXPAND _parser(self, element) FOR parser»«ENDDEFINE»
+«DEFINE _parser FOR gmfgen::GenLabel»«EXPAND _parser(self) FOR modelFacet»«ENDDEFINE»
+«DEFINE _parser(element : gmfgen::GenCommonBase) FOR gmfgen::LabelModelFacet»«EXPAND _parser(self, element) FOR parser»«ENDDEFINE»
-«DEFINE _parser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»«ERROR 'Abstract template for ' + self.repr()»«ENDDEFINE»
+«DEFINE _parser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::GenParserImplementation»«ERROR 'Abstract template for ' + self.repr()»«ENDDEFINE»
-«DEFINE _parser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::CustomParser»
- «EXPAND xpt::Common::generatedMemberComment»
- private «qualifiedName» «parserFieldName(element)»;
+«DEFINE _parser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::CustomParser»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private «qualifiedName» «parserFieldName(element)»;
- «EXPAND xpt::Common::generatedMemberComment»
- «IF holder.extensibleViaService»private«ELSE»public«ENDIF» org.eclipse.gmf.runtime.common.ui.services.parser.IParser «parserAccessorName(element)»() {
- if («parserFieldName(element)» == null) {
- «parserFieldName(element)» = new «qualifiedName»();
+ «EXPAND xpt::Common::generatedMemberComment»
+ «IF holder.extensibleViaService»private«ELSE»public«ENDIF» org.eclipse.gmf.runtime.common.ui.services.parser.IParser «parserAccessorName(element)»() {
+ if («parserFieldName(element)» == null) {
+ «parserFieldName(element)» = new «qualifiedName»();
}
- return «parserFieldName(element)»;
+ return «parserFieldName(element)»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _parser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser-»
-«REM»NO-OP«ENDREM-»
-«ENDDEFINE»
+«DEFINE _parser(modelFacet : gmfgen::LabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::ExternalParser-»
+«REM»NO-OP«ENDREM-»
+«ENDDEFINE»
-«DEFINE _parser(modelFacet : gmfgen::FeatureLabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::PredefinedParser»
- «EXPAND xpt::Common::generatedMemberComment»
- private org.eclipse.gmf.runtime.common.ui.services.parser.IParser «parserFieldName(element)»;
+«DEFINE _parser(modelFacet : gmfgen::FeatureLabelModelFacet, element : gmfgen::GenCommonBase) FOR gmfgen::PredefinedParser»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private org.eclipse.gmf.runtime.common.ui.services.parser.IParser «parserFieldName(element)»;
- «EXPAND xpt::Common::generatedMemberComment»
- «IF holder.extensibleViaService»private«ELSE»public«ENDIF» org.eclipse.gmf.runtime.common.ui.services.parser.IParser «parserAccessorName(element)»() {
- if («parserFieldName(element)» == null) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ «IF holder.extensibleViaService»private«ELSE»public«ENDIF» org.eclipse.gmf.runtime.common.ui.services.parser.IParser «parserAccessorName(element)»() {
+ if («parserFieldName(element)» == null) {
org.eclipse.emf.ecore.EAttribute[] features = new org.eclipse.emf.ecore.EAttribute[] {
- «EXPAND MetaModel::MetaFeature FOREACH modelFacet.metaFeatures SEPARATOR ', ' »
+ «EXPAND MetaModel::MetaFeature FOREACH modelFacet.metaFeatures SEPARATOR ', ' »
};
- «IF modelFacet.editableMetaFeatures->size() > 0-»
+ «IF modelFacet.editableMetaFeatures->size() > 0-»
org.eclipse.emf.ecore.EAttribute[] editableFeatures = new org.eclipse.emf.ecore.EAttribute[] {
- «EXPAND MetaModel::MetaFeature FOREACH modelFacet.editableMetaFeatures SEPARATOR ', '»
+ «EXPAND MetaModel::MetaFeature FOREACH modelFacet.editableMetaFeatures SEPARATOR ', '»
};
- «ENDIF-»
- «getQualifiedClassName()» parser = new «getQualifiedClassName()»(features«IF modelFacet.editableMetaFeatures->size() > 0», editableFeatures«ENDIF»);
- «EXPAND _setPatterns(viewMethod, editMethod, 'parser') FOR modelFacet-»
- «parserFieldName(element)» = parser;
+ «ENDIF-»
+ «getQualifiedClassName()» parser = new «getQualifiedClassName()»(features«IF modelFacet.editableMetaFeatures->size() > 0», editableFeatures«ENDIF»);
+ «EXPAND _setPatterns(viewMethod, editMethod, 'parser') FOR modelFacet-»
+ «parserFieldName(element)» = parser;
}
- return «parserFieldName(element)»;
+ return «parserFieldName(element)»;
}
-«ENDDEFINE»
-
-«DEFINE _setPatterns(viewMethod : gmfgen::LabelTextAccessMethod, editMethod : gmfgen::LabelTextAccessMethod, parserVar : String) FOR gmfgen::FeatureLabelModelFacet-»
-«IF viewMethod <> gmfgen::LabelTextAccessMethod::NATIVE-»
- «IF isPatternSpecified(viewPattern)-»
- «parserVar».setViewPattern("«viewPattern»");«EXPAND xpt::Common::nonNLS(1)»
- «ENDIF-»
- «IF isPatternSpecified(editorPattern)-»
- «parserVar».setEditorPattern("«editorPattern»");«EXPAND xpt::Common::nonNLS(1)»
- «ELSEIF isPatternSpecified(viewPattern)-»
- «parserVar».setEditorPattern("«viewPattern»");«EXPAND xpt::Common::nonNLS(1)»
- «ENDIF-»
-«ENDIF-»
-«IF editMethod <> gmfgen::LabelTextAccessMethod::NATIVE-»
- «IF isPatternSpecified(editPattern)-»
- «parserVar».setEditPattern("«editPattern»");«EXPAND xpt::Common::nonNLS(1)»
- «ELSEIF isPatternSpecified(viewPattern)-»
- «parserVar».setEditPattern("«viewPattern»");«EXPAND xpt::Common::nonNLS(1)»
- «ENDIF-»
-«ENDIF-»
-«ENDDEFINE»
+«ENDDEFINE»
+
+«DEFINE _setPatterns(viewMethod : gmfgen::LabelTextAccessMethod, editMethod : gmfgen::LabelTextAccessMethod, parserVar : String) FOR gmfgen::FeatureLabelModelFacet-»
+«IF viewMethod <> gmfgen::LabelTextAccessMethod::NATIVE-»
+ «IF isPatternSpecified(viewPattern)-»
+ «parserVar».setViewPattern("«viewPattern»");«EXPAND xpt::Common::nonNLS(1)»
+ «ENDIF-»
+ «IF isPatternSpecified(editorPattern)-»
+ «parserVar».setEditorPattern("«editorPattern»");«EXPAND xpt::Common::nonNLS(1)»
+ «ELSEIF isPatternSpecified(viewPattern)-»
+ «parserVar».setEditorPattern("«viewPattern»");«EXPAND xpt::Common::nonNLS(1)»
+ «ENDIF-»
+«ENDIF-»
+«IF editMethod <> gmfgen::LabelTextAccessMethod::NATIVE-»
+ «IF isPatternSpecified(editPattern)-»
+ «parserVar».setEditPattern("«editPattern»");«EXPAND xpt::Common::nonNLS(1)»
+ «ELSEIF isPatternSpecified(viewPattern)-»
+ «parserVar».setEditPattern("«viewPattern»");«EXPAND xpt::Common::nonNLS(1)»
+ «ENDIF-»
+«ENDIF-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/CustomPage.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/CustomPage.xpt
index bb2c69217..7ee215ac8 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/CustomPage.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/CustomPage.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,75 +10,75 @@
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::StringOperations»
-«DEFINE Main FOR gmfgen::GenCustomPreferencePage-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «(if qualifiedClassName = getClassName() then getDiagram().preferencesPackageName else qualifiedClassName.substring(1 + 0, qualifiedClassName.xpandLength() - getClassName().xpandLength() - 1) endif)»;
+«DEFINE Main FOR gmfgen::GenCustomPreferencePage-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «(if qualifiedClassName = getClassName() then getDiagram().preferencesPackageName else qualifiedClassName.substring(1 + 0, qualifiedClassName.xpandLength() - getClassName().xpandLength() - 1) endif)»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «getClassName()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «getClassName()»«EXPAND extendsList»«EXPAND implementsList» {
-«EXPAND _constant FOREACH preferences-»
+«EXPAND _constant FOREACH preferences-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «getClassName()»() {
- setPreferenceStore(«getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore());
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «getClassName()»() {
+ setPreferenceStore(«getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore());
}
-«EXPAND methods»
-«EXPAND initDefaultsMethod»
-«EXPAND additions»
+«EXPAND methods»
+«EXPAND initDefaultsMethod»
+«EXPAND additions»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenCustomPreferencePage» extends org.eclipse.gmf.runtime.common.ui.preferences.AbstractPreferencePage«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenCustomPreferencePage»«REM»no-op«ENDREM»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenCustomPreferencePage» extends org.eclipse.gmf.runtime.common.ui.preferences.AbstractPreferencePage«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenCustomPreferencePage»«REM»no-op«ENDREM»«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenCustomPreferencePage»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenCustomPreferencePage»«ENDDEFINE»
// the reason I didn't split this template up into two distinct, addFieldsMethod and initHelpMethod, is that
// using superclass other than oe.gmf...AbstractPreferencePage may require implementation of completely different
// set of methods. Besides, there's not to much generated, anyway.
-«DEFINE methods FOR gmfgen::GenCustomPreferencePage»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE methods FOR gmfgen::GenCustomPreferencePage»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void addFields(org.eclipse.swt.widgets.Composite parent) {
// TODO Provide method implementation
throw new UnsupportedOperationException();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void initHelp() {
// TODO implement this method if needed, or leave as no-op
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE initDefaultsMethod FOR gmfgen::GenCustomPreferencePage-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE initDefaultsMethod FOR gmfgen::GenCustomPreferencePage-»
+ «EXPAND xpt::Common::generatedMemberComment»
public static void initDefaults(org.eclipse.jface.preference.IPreferenceStore store) {
-«IF preferences->isEmpty() or preferences->exists(p | p.defaultValue = null)-»
+«IF preferences->isEmpty() or preferences->exists(p | p.defaultValue = null)-»
// TODO this code is invoked during preference store initialization, please fill
// the store passed with default preference values.
-«ENDIF-»
-«EXPAND _setDefaultValue('store') FOREACH preferences->select(p | p.defaultValue <> null)-»
+«ENDIF-»
+«EXPAND _setDefaultValue('store') FOREACH preferences->select(p | p.defaultValue <> null)-»
}
-«ENDDEFINE»
+«ENDDEFINE»
// pair template to initDefaultsMethod, allows external templates invoke generated initDefaults method
// Note, CustomPage::Main is expected to be invoked only for templates with generateBoilerplate == true,
// hence no extra check when generating with initDefaultsMethod,
// however, call_initDefaults may get invoked for any CustomPreferencePage
-«DEFINE call_initDefaults(storeVarName : String) FOR gmfgen::GenCustomPreferencePage-»
-«IF generateBoilerplate»«qualifiedClassName».initDefaults(«storeVarName»);«ENDIF-»
-«ENDDEFINE»
+«DEFINE call_initDefaults(storeVarName : String) FOR gmfgen::GenCustomPreferencePage-»
+«IF generateBoilerplate»«qualifiedClassName».initDefaults(«storeVarName»);«ENDIF-»
+«ENDDEFINE»
-«DEFINE _constant FOR gmfgen::GenPreference-»
- «EXPAND xpt::Common::generatedMemberComment»
- public static final String «name» = "«key»";«EXPAND xpt::Common::nonNLS»
-«ENDDEFINE»
+«DEFINE _constant FOR gmfgen::GenPreference-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final String «name» = "«key»";«EXPAND xpt::Common::nonNLS»
+«ENDDEFINE»
-«DEFINE _setDefaultValue(store : String) FOR gmfgen::GenPreference-»
- «store».setDefault(«name», «defaultValue»);
-«ENDDEFINE» \ No newline at end of file
+«DEFINE _setDefaultValue(store : String) FOR gmfgen::GenPreference-»
+ «store».setDefault(«name», «defaultValue»);
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/StandardPage.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/StandardPage.xpt
index d28d8779e..4f267af51 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/StandardPage.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/preferences/StandardPage.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,37 +10,37 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE Main FOR gmfgen::GenStandardPreferencePage-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().preferencesPackageName»;
+«DEFINE Main FOR gmfgen::GenStandardPreferencePage-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().preferencesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «getClassName()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «getClassName()»«EXPAND extendsList»«EXPAND implementsList» {
- «EXPAND xpt::Common::generatedMemberComment»
- public «getClassName()»() {
- setPreferenceStore(«getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore());
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «getClassName()»() {
+ setPreferenceStore(«getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore());
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenStandardPreferencePage-»
-«IF gmfgen::StandardPreferencePages::General = kind-»
- extends org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage«-»
-«ELSEIF gmfgen::StandardPreferencePages::Appearance = kind-»
- extends org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage«-»
-«ELSEIF gmfgen::StandardPreferencePages::Connections = kind-»
- extends org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage«-»
-«ELSEIF gmfgen::StandardPreferencePages::Printing = kind-»
- extends org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage«-»
-«ELSEIF gmfgen::StandardPreferencePages::RulersAndGrid = kind-»
- extends org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage«-»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenStandardPreferencePage-»
+«IF gmfgen::StandardPreferencePages::General = kind-»
+ extends org.eclipse.gmf.runtime.diagram.ui.preferences.DiagramsPreferencePage«-»
+«ELSEIF gmfgen::StandardPreferencePages::Appearance = kind-»
+ extends org.eclipse.gmf.runtime.diagram.ui.preferences.AppearancePreferencePage«-»
+«ELSEIF gmfgen::StandardPreferencePages::Connections = kind-»
+ extends org.eclipse.gmf.runtime.diagram.ui.preferences.ConnectionsPreferencePage«-»
+«ELSEIF gmfgen::StandardPreferencePages::Printing = kind-»
+ extends org.eclipse.gmf.runtime.diagram.ui.preferences.PrintingPreferencePage«-»
+«ELSEIF gmfgen::StandardPreferencePages::RulersAndGrid = kind-»
+ extends org.eclipse.gmf.runtime.diagram.ui.preferences.RulerGridPreferencePage«-»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenStandardPreferencePage»«REM»no-op«ENDREM»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenStandardPreferencePage»«REM»no-op«ENDREM»«ENDDEFINE»
-«DEFINE call_initDefaults(storeVarName : String) FOR gmfgen::GenStandardPreferencePage»«IF kind <> gmfgen::StandardPreferencePages::Pathmaps»«getQualifiedClassName()».initDefaults(«storeVarName»);«ENDIF»«ENDDEFINE» \ No newline at end of file
+«DEFINE call_initDefaults(storeVarName : String) FOR gmfgen::GenStandardPreferencePage»«IF kind <> gmfgen::StandardPreferencePages::Pathmaps»«getQualifiedClassName()».initDefaults(«storeVarName»);«ENDIF»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parsers/CustomParser.xpt b/plugins/org.eclipse.gmf.codegen/templates/parsers/CustomParser.xpt
index b36065cc9..edeba2452 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parsers/CustomParser.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/parsers/CustomParser.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2008, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,55 +10,55 @@
* Artem Tikhomirov (Borland) - [244419] custom parsers
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::StringOperations»
-«DEFINE Main FOR gmfgen::CustomParser»
-«EXPAND xpt::Common::copyright FOR holder.editorGen-»
-«EXPAND xpt::Common::packageStatement FOR qualifiedName»
+«DEFINE Main FOR gmfgen::CustomParser»
+«EXPAND xpt::Common::copyright FOR holder.editorGen-»
+«EXPAND xpt::Common::packageStatement FOR qualifiedName»
-«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
-«EXPAND body»
-«EXPAND additions»
+«EXPAND xpt::Common::generatedClassComment»
+public class «qualifiedName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+«EXPAND body»
+«EXPAND additions»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::CustomParser»«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::CustomParser»«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::CustomParser» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParser«ENDDEFINE»
+«DEFINE additions FOR gmfgen::CustomParser»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::CustomParser»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::CustomParser» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParser«ENDDEFINE»
-«DEFINE body FOR gmfgen::CustomParser»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE body FOR gmfgen::CustomParser»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getEditString(org.eclipse.core.runtime.IAdaptable element, int flags) {
return "";
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus isValidEditString(org.eclipse.core.runtime.IAdaptable element, String editString) {
// TODO change to EDITABLE_STATUS as appropriate
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.UNEDITABLE_STATUS;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.core.command.ICommand getParseCommand(org.eclipse.core.runtime.IAdaptable element, String newString, int flags) {
// TODO
throw new UnsupportedOperationException();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getPrintString(org.eclipse.core.runtime.IAdaptable element, int flags) {
return "";
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean isAffectingEvent(Object event, int flags) {
return false;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.jface.text.contentassist.IContentAssistProcessor getCompletionProcessor(org.eclipse.core.runtime.IAdaptable element) {
return null;
}
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parsers/ParserProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/parsers/ParserProvider.xpt
index 852758937..ca83ecf40 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parsers/ParserProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/parsers/ParserProvider.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -12,37 +12,37 @@
* [244419] custom parsers
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::providers::ParserUtils»
-
-«DEFINE Main FOR gmfgen::GenParsers-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
-
-«EXPAND xpt::Common::generatedClassComment»
-public class «className»«EXPAND extendsList»«EXPAND implementsList» {
- «EXPAND impl::parsers::ParserProvider::parsers FOREACH editorGen.diagram.topLevelNodes»
- «EXPAND impl::parsers::ParserProvider::parsers FOREACH editorGen.diagram.childNodes»
- «EXPAND impl::parsers::ParserProvider::parsers FOREACH editorGen.diagram.links»
-
-«IF extensibleViaService-»
- «EXPAND impl::parsers::ParserProvider::getParserByVisualIdMethod-»
- «EXPAND impl::parsers::ParserProvider::accessorMethod_delegate2providers-»
- «EXPAND impl::parsers::ParserProvider::provider_getParserMethod»
- «EXPAND impl::parsers::ParserProvider::provider_providesMethod»
- «EXPAND impl::parsers::ParserProvider::HintAdapterClass»
-«ELSE-»
- «EXPAND impl::parsers::ParserProvider::accessorMethod_direct-»
-«ENDIF-»
- «EXPAND additions-»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::providers::ParserUtils»
+
+«DEFINE Main FOR gmfgen::GenParsers-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
+
+«EXPAND xpt::Common::generatedClassComment»
+public class «className»«EXPAND extendsList»«EXPAND implementsList» {
+ «EXPAND impl::parsers::ParserProvider::parsers FOREACH editorGen.diagram.topLevelNodes»
+ «EXPAND impl::parsers::ParserProvider::parsers FOREACH editorGen.diagram.childNodes»
+ «EXPAND impl::parsers::ParserProvider::parsers FOREACH editorGen.diagram.links»
+
+«IF extensibleViaService-»
+ «EXPAND impl::parsers::ParserProvider::getParserByVisualIdMethod-»
+ «EXPAND impl::parsers::ParserProvider::accessorMethod_delegate2providers-»
+ «EXPAND impl::parsers::ParserProvider::provider_getParserMethod»
+ «EXPAND impl::parsers::ParserProvider::provider_providesMethod»
+ «EXPAND impl::parsers::ParserProvider::HintAdapterClass»
+«ELSE-»
+ «EXPAND impl::parsers::ParserProvider::accessorMethod_direct-»
+«ENDIF-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::GenParsers»«IF extensibleViaService» extends org.eclipse.gmf.runtime.common.core.service.AbstractProvider«ENDIF»«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::GenParsers»«IF extensibleViaService» extends org.eclipse.gmf.runtime.common.core.service.AbstractProvider«ENDIF»«ENDDEFINE»
-«DEFINE implementsList FOR gmfgen::GenParsers»«IF extensibleViaService» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider«ENDIF»«ENDDEFINE»
+«DEFINE implementsList FOR gmfgen::GenParsers»«IF extensibleViaService» implements org.eclipse.gmf.runtime.common.ui.services.parser.IParserProvider«ENDIF»«ENDDEFINE»
/*
* this/self - aka hintHolder, visual element to present a text (i.e. one of Node's labels)
@@ -50,12 +50,12 @@ public class «className»«EXPAND extendsList»«EXPAND implementsList» {
* modelFacet - may be null
* parsedElement - accessor to EObject being edited
*/
-«DEFINE accessorCall(elementTypeHolder : gmfgen::GenCommonBase, labelModelFacet : gmfgen::LabelModelFacet, parsedElement : String) FOR gmfgen::GenCommonBase-»
-«IF getDiagram().editorGen.labelParsers.extensibleViaService-»
-«EXPAND impl::parsers::ParserProvider::accessorCall_delegate2providers(elementTypeHolder, labelModelFacet, parsedElement)-»
-«ELSE-»
-«EXPAND impl::parsers::ParserProvider::accessorCall_direct(elementTypeHolder, labelModelFacet, parsedElement)-»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE additions FOR gmfgen::GenParsers»«ENDDEFINE»
+«DEFINE accessorCall(elementTypeHolder : gmfgen::GenCommonBase, labelModelFacet : gmfgen::LabelModelFacet, parsedElement : String) FOR gmfgen::GenCommonBase-»
+«IF getDiagram().editorGen.labelParsers.extensibleViaService-»
+«EXPAND impl::parsers::ParserProvider::accessorCall_delegate2providers(elementTypeHolder, labelModelFacet, parsedElement)-»
+«ELSE-»
+«EXPAND impl::parsers::ParserProvider::accessorCall_direct(elementTypeHolder, labelModelFacet, parsedElement)-»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenParsers»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/parsers/PredefinedParser.xpt b/plugins/org.eclipse.gmf.codegen/templates/parsers/PredefinedParser.xpt
index 48a3c7adc..48d773467 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/parsers/PredefinedParser.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/parsers/PredefinedParser.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -13,83 +13,83 @@
* initial API
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION impl::parsers::i18n»
+«EXTENSION impl::parsers::i18n»
-«DEFINE Main FOR gmfgen::PredefinedParser»
-«EXPAND xpt::Common::copyright FOR holder.editorGen-»
-package «holder.implPackageName»;
+«DEFINE Main FOR gmfgen::PredefinedParser»
+«EXPAND xpt::Common::copyright FOR holder.editorGen-»
+package «holder.implPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifiedClassName FOR holder» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifiedClassName FOR holder» {
-«EXPAND fields»
-«EXPAND cons»
-«EXPAND aux_methods»
-«EXPAND parser_getEditStringMethod»
-«EXPAND parser_isValidEditStringMethod»
-«EXPAND parser_getParseCommandMethod»
-«EXPAND parser_getPrintStringMethod»
-«EXPAND parser_isAffectingEventMethod»
-«EXPAND parser_getCompletionProcessorMethod»
-«EXPAND additions»
+«EXPAND fields»
+«EXPAND cons»
+«EXPAND aux_methods»
+«EXPAND parser_getEditStringMethod»
+«EXPAND parser_isValidEditStringMethod»
+«EXPAND parser_getParseCommandMethod»
+«EXPAND parser_getPrintStringMethod»
+«EXPAND parser_isAffectingEventMethod»
+«EXPAND parser_getCompletionProcessorMethod»
+«EXPAND additions»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::PredefinedParser»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::PredefinedParser»«ENDDEFINE»
-«DEFINE fields FOR gmfgen::PredefinedParser-»
-«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT or viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE fields FOR gmfgen::PredefinedParser-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT or viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+ «EXPAND xpt::Common::generatedMemberComment»
private String defaultPattern;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String defaultEditablePattern;
-«ENDIF-»
-«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT»
- «EXPAND xpt::Common::generatedMemberComment»
+«ENDIF-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.text.MessageFormat viewProcessor;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.text.MessageFormat editorProcessor;
-«ENDIF-»
-«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT»
- «EXPAND xpt::Common::generatedMemberComment»
+«ENDIF-»
+«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.text.MessageFormat editProcessor;
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE cons FOR gmfgen::PredefinedParser-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «className»(org.eclipse.emf.ecore.EAttribute[] features) {
+«DEFINE cons FOR gmfgen::PredefinedParser-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «className»(org.eclipse.emf.ecore.EAttribute[] features) {
super(features);
-«IF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE or editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE or editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
if (features.length != 1) {
throw new IllegalArgumentException(java.util.Arrays.toString(features));
}
-«ENDIF-»
+«ENDIF-»
}
- «EXPAND xpt::Common::generatedMemberComment»
- public «className»(org.eclipse.emf.ecore.EAttribute[] features, org.eclipse.emf.ecore.EAttribute[] editableFeatures) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «className»(org.eclipse.emf.ecore.EAttribute[] features, org.eclipse.emf.ecore.EAttribute[] editableFeatures) {
super(features, editableFeatures);
-«IF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE or editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE or editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
if (features.length != 1) {
throw new IllegalArgumentException(java.util.Arrays.toString(features));
}
if (editableFeatures.length != 1) {
throw new IllegalArgumentException(java.util.Arrays.toString(editableFeatures));
}
-«ENDIF-»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE aux_methods FOR gmfgen::PredefinedParser-»
-«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE aux_methods FOR gmfgen::PredefinedParser-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getDefaultPattern() {
if (defaultPattern == null) {
StringBuffer sb = new StringBuffer();
@@ -106,19 +106,19 @@ public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifie
return defaultPattern;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setViewPattern(String viewPattern) {
super.setViewPattern(viewPattern);
viewProcessor = null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setEditorPattern(String editorPattern) {
super.setEditorPattern(editorPattern);
editorProcessor = null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected java.text.MessageFormat getViewProcessor() {
if (viewProcessor == null) {
viewProcessor = new java.text.MessageFormat(getViewPattern() == null ? getDefaultPattern() : getViewPattern());
@@ -126,15 +126,15 @@ public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifie
return viewProcessor;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected java.text.MessageFormat getEditorProcessor() {
if (editorProcessor == null) {
editorProcessor = new java.text.MessageFormat(getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern());
}
return editorProcessor;
}
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
- «EXPAND xpt::Common::generatedMemberComment»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getDefaultPattern() {
if (defaultPattern == null) {
StringBuffer sb = new StringBuffer();
@@ -151,9 +151,9 @@ public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifie
}
return defaultPattern;
}
-«ENDIF-»
-«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT or editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
- «EXPAND xpt::Common::generatedMemberComment»
+«ENDIF-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT or editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getDefaultEditablePattern() {
if (defaultEditablePattern == null) {
StringBuffer sb = new StringBuffer();
@@ -169,9 +169,9 @@ public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifie
}
return defaultEditablePattern;
}
-«ENDIF-»
-«IF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF or editMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
- «EXPAND xpt::Common::generatedMemberComment»
+«ENDIF-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF or editMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getDefaultEditablePattern() {
if (defaultEditablePattern == null) {
StringBuffer sb = new StringBuffer();
@@ -188,135 +188,135 @@ public class «className» extends «EXPAND impl::parsers::AbstractParser::qualifie
}
return defaultEditablePattern;
}
-«ENDIF-»
-«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
- «EXPAND xpt::Common::generatedMemberComment»
+«ENDIF-»
+«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setEditPattern(String editPattern) {
super.setEditPattern(editPattern);
editProcessor = null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected java.text.MessageFormat getEditProcessor() {
if (editProcessor == null) {
editProcessor = new java.text.MessageFormat(getEditPattern() == null ? getDefaultEditablePattern() : getEditPattern());
}
return editProcessor;
}
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
- «EXPAND xpt::Common::generatedMemberComment»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getEditPattern() {
String pattern = super.getEditPattern();
- return pattern != null ? pattern : " ";«EXPAND xpt::Common::nonNLS»
+ return pattern != null ? pattern : " ";«EXPAND xpt::Common::nonNLS»
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE parser_getEditStringMethod FOR gmfgen::PredefinedParser-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE parser_getEditStringMethod FOR gmfgen::PredefinedParser-»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getEditString(org.eclipse.core.runtime.IAdaptable adapter, int flags) {
-«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) adapter.getAdapter(org.eclipse.emf.ecore.EObject.class);
return getEditorProcessor().format(getEditableValues(element), new StringBuffer(), new java.text.FieldPosition(0)).toString();
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) adapter.getAdapter(org.eclipse.emf.ecore.EObject.class);
String pattern = getEditorPattern() == null ? getDefaultEditablePattern() : getEditorPattern();
return String.format(pattern, getEditableValues(element));
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
- return "";«EXPAND xpt::Common::nonNLS»
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
+ return "";«EXPAND xpt::Common::nonNLS»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) adapter.getAdapter(org.eclipse.emf.ecore.EObject.class);
String s = org.eclipse.emf.ecore.util.EcoreUtil.convertToString(editableFeatures[0].getEAttributeType(), element.eGet(editableFeatures[0]));
- return s != null ? s : "";«EXPAND xpt::Common::nonNLS»
-«ENDIF-»
+ return s != null ? s : "";«EXPAND xpt::Common::nonNLS»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE parser_isValidEditStringMethod FOR gmfgen::PredefinedParser-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE parser_isValidEditStringMethod FOR gmfgen::PredefinedParser-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus isValidEditString(org.eclipse.core.runtime.IAdaptable adapter, String editString) {
-«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
java.text.ParsePosition pos = new java.text.ParsePosition(0);
Object[] values = getEditProcessor().parse(editString, pos);
if (values == null) {
return new org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus(
- «holder.editorGen.plugin.getActivatorQualifiedClassName()».ID,
+ «holder.editorGen.plugin.getActivatorQualifiedClassName()».ID,
org.eclipse.gmf.runtime.common.ui.services.parser.IParserEditStatus.UNEDITABLE,
org.eclipse.osgi.util.NLS.bind(
- «EXPAND xpt::Externalizer::accessorCall(i18nKeyForMessageFormatParserInvalidInputError()) FOR holder.editorGen»,
+ «EXPAND xpt::Externalizer::accessorCall(i18nKeyForMessageFormatParserInvalidInputError()) FOR holder.editorGen»,
new Integer(pos.getErrorIndex())));
}
return validateNewValues(values);
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.UNEDITABLE_STATUS;
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
if (editString == null) {
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.UNEDITABLE_STATUS;
}
Object[] values = editString.split(getEditPattern());
return validateNewValues(values);
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
return org.eclipse.gmf.runtime.common.ui.services.parser.ParserEditStatus.EDITABLE_STATUS;
-«ENDIF-»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE parser_getParseCommandMethod FOR gmfgen::PredefinedParser-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE parser_getParseCommandMethod FOR gmfgen::PredefinedParser-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.common.core.command.ICommand getParseCommand(org.eclipse.core.runtime.IAdaptable adapter, String newString, int flags) {
-«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+«IF editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
Object[] values = getEditProcessor().parse(newString, new java.text.ParsePosition(0));
return getParseCommand(adapter, values, flags);
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
if (newString == null) {
return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
}
Object[] values = newString.split(getEditPattern());
return super.getParseCommand(adapter, values, flags);
-«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
+«ELSEIF editMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
Object value = org.eclipse.emf.ecore.util.EcoreUtil.createFromString(editableFeatures[0].getEAttributeType(), newString);
return getParseCommand(adapter, new Object[] { value }, flags);
-«ENDIF-»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE parser_getPrintStringMethod FOR gmfgen::PredefinedParser-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE parser_getPrintStringMethod FOR gmfgen::PredefinedParser-»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getPrintString(org.eclipse.core.runtime.IAdaptable adapter, int flags) {
-«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
+«IF viewMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT-»
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) adapter.getAdapter(org.eclipse.emf.ecore.EObject.class);
return getViewProcessor().format(getValues(element), new StringBuffer(), new java.text.FieldPosition(0)).toString();
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::PRINTF-»
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) adapter.getAdapter(org.eclipse.emf.ecore.EObject.class);
return String.format(getViewPattern() == null ? getDefaultPattern() : getViewPattern(), getValues(element));
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
- return "";«EXPAND xpt::Common::nonNLS»
-«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::REGEXP-»
+ return "";«EXPAND xpt::Common::nonNLS»
+«ELSEIF viewMethod = gmfgen::LabelTextAccessMethod::NATIVE-»
org.eclipse.emf.ecore.EObject element = (org.eclipse.emf.ecore.EObject) adapter.getAdapter(org.eclipse.emf.ecore.EObject.class);
String s = org.eclipse.emf.ecore.util.EcoreUtil.convertToString(features[0].getEAttributeType(), element.eGet(features[0]));
- return s != null ? s : "";«EXPAND xpt::Common::nonNLS»
-«ENDIF-»
+ return s != null ? s : "";«EXPAND xpt::Common::nonNLS»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE parser_isAffectingEventMethod FOR gmfgen::PredefinedParser-»
-«REM»NO-OP, rely on superclass for now«ENDREM-»
-«ENDDEFINE»
+«DEFINE parser_isAffectingEventMethod FOR gmfgen::PredefinedParser-»
+«REM»NO-OP, rely on superclass for now«ENDREM-»
+«ENDDEFINE»
-«DEFINE parser_getCompletionProcessorMethod FOR gmfgen::PredefinedParser-»
-«REM»NO-OP, rely on superclass for now«ENDREM-»
-«ENDDEFINE»
+«DEFINE parser_getCompletionProcessorMethod FOR gmfgen::PredefinedParser-»
+«REM»NO-OP, rely on superclass for now«ENDREM-»
+«ENDDEFINE»
-«DEFINE i18nValues FOR gmfgen::GenParsers-»
-«IF (implementations)[gmfgen::PredefinedParser]->exists(p | p.editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT)»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForMessageFormatParserInvalidInputError(), 'Invalid input at {0}')-»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE i18nValues FOR gmfgen::GenParsers-»
+«IF (implementations)[gmfgen::PredefinedParser]->exists(p | p.editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT)»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForMessageFormatParserInvalidInputError(), 'Invalid input at {0}')-»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE i18nAccessors FOR gmfgen::GenParsers-»
-«IF (implementations)[gmfgen::PredefinedParser]->exists(p | p.editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT)»
- «EXPAND xpt::Externalizer::accessorField(i18nKeyForMessageFormatParserInvalidInputError())-»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE i18nAccessors FOR gmfgen::GenParsers-»
+«IF (implementations)[gmfgen::PredefinedParser]->exists(p | p.editMethod = gmfgen::LabelTextAccessMethod::MESSAGE_FORMAT)»
+ «EXPAND xpt::Externalizer::accessorField(i18nKeyForMessageFormatParserInvalidInputError())-»
+«ENDIF-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/Common.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/Common.xpt
index 8ded7fb84..e4275e795 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/Common.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/Common.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,83 +10,83 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::NonNLSUtils»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::NonNLSUtils»
+«EXTENSION xpt::StringOperations»
-«DEFINE copyright FOR gmfgen::GenEditorGenerator-»
-«IF copyrightText <> null-»
+«DEFINE copyright FOR gmfgen::GenEditorGenerator-»
+«IF copyrightText <> null-»
/*
- * «copyrightText.xpandReplaceAll('\n', '\n * ')»
+ * «copyrightText.xpandReplaceAll('\n', '\n * ')»
*/
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE xcopyright FOR gmfgen::GenEditorGenerator-»
-«IF copyrightText <> null-»
+«DEFINE xcopyright FOR gmfgen::GenEditorGenerator-»
+«IF copyrightText <> null-»
<!--
-«copyrightText»
+«copyrightText»
-->
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE generatedClassComment FOR OclAny»«EXPAND generatedClassComment('')»«ENDDEFINE»
-«DEFINE generatedClassComment(comment : String) FOR OclAny-»
+«DEFINE generatedClassComment FOR OclAny»«EXPAND generatedClassComment('')»«ENDDEFINE»
+«DEFINE generatedClassComment(comment : String) FOR OclAny-»
/**
-«IF comment.xpandLength() > 0-»
- * «comment.xpandReplaceAll('\n', '\n * ')»
-«ENDIF-»
+«IF comment.xpandLength() > 0-»
+ * «comment.xpandReplaceAll('\n', '\n * ')»
+«ENDIF-»
* @generated
- */«ENDDEFINE»
+ */«ENDDEFINE»
-«DEFINE generatedMemberComment FOR Collection(OclAny)»«EXPAND generatedMemberComment('') FOR ''»«ENDDEFINE»
-«DEFINE generatedMemberComment FOR OclAny»«EXPAND generatedMemberComment('')»«ENDDEFINE»
-«DEFINE generatedMemberComment(comment : String) FOR OclAny-»
+«DEFINE generatedMemberComment FOR Collection(OclAny)»«EXPAND generatedMemberComment('') FOR ''»«ENDDEFINE»
+«DEFINE generatedMemberComment FOR OclAny»«EXPAND generatedMemberComment('')»«ENDDEFINE»
+«DEFINE generatedMemberComment(comment : String) FOR OclAny-»
/**
-«IF comment.xpandLength() > 0-»
- * «comment.xpandReplaceAll('\n', '\n * ')»
-«ENDIF-»
+«IF comment.xpandLength() > 0-»
+ * «comment.xpandReplaceAll('\n', '\n * ')»
+«ENDIF-»
* @generated
- */«ENDDEFINE»
+ */«ENDDEFINE»
-«DEFINE xmlGeneratedTag FOR OclAny»<?gmfgen generated="true"?>«ENDDEFINE»
+«DEFINE xmlGeneratedTag FOR OclAny»<?gmfgen generated="true"?>«ENDDEFINE»
-«DEFINE getSaveOptions FOR gmfgen::GenDiagram»«getDiagramEditorUtilQualifiedClassName()».getSaveOptions()«ENDDEFINE»
+«DEFINE getSaveOptions FOR gmfgen::GenDiagram»«getDiagramEditorUtilQualifiedClassName()».getSaveOptions()«ENDDEFINE»
-«DEFINE setCharset(varName : String) FOR gmfgen::GenDiagram-»
-«getDiagramEditorUtilQualifiedClassName()».setCharset(«varName»);
-«ENDDEFINE»
+«DEFINE setCharset(varName : String) FOR gmfgen::GenDiagram-»
+«getDiagramEditorUtilQualifiedClassName()».setCharset(«varName»);
+«ENDDEFINE»
-«DEFINE nonNLS FOR OclAny»«EXPAND nonNLS(1)»«ENDDEFINE»
+«DEFINE nonNLS FOR OclAny»«EXPAND nonNLS(1)»«ENDDEFINE»
-«DEFINE nonNLS FOR Collection(OclAny)»«EXPAND nonNLS FOR getNonNLSCounter(self)»«ENDDEFINE»
+«DEFINE nonNLS FOR Collection(OclAny)»«EXPAND nonNLS FOR getNonNLSCounter(self)»«ENDDEFINE»
-«DEFINE nonNLS FOR Collection(Integer)»«EXPAND nonNLS FOREACH self»«ENDDEFINE»
+«DEFINE nonNLS FOR Collection(Integer)»«EXPAND nonNLS FOREACH self»«ENDDEFINE»
-«DEFINE nonNLS(i : Integer) FOR OclAny»«EXPAND nonNLS FOR i»«ENDDEFINE»
+«DEFINE nonNLS(i : Integer) FOR OclAny»«EXPAND nonNLS FOR i»«ENDDEFINE»
-«DEFINE nonNLS FOR Integer» //$NON-NLS-«self»$«ENDDEFINE»
+«DEFINE nonNLS FOR Integer» //$NON-NLS-«self»$«ENDDEFINE»
-«DEFINE caseVisualID FOR gmfgen::GenCommonBase»case «EXPAND xpt::editor::VisualIDRegistry::visualID»:«ENDDEFINE»
+«DEFINE caseVisualID FOR gmfgen::GenCommonBase»case «EXPAND xpt::editor::VisualIDRegistry::visualID»:«ENDDEFINE»
-«DEFINE addShortcutAnnotation(viewVar : String) FOR gmfgen::GenDiagram-»
+«DEFINE addShortcutAnnotation(viewVar : String) FOR gmfgen::GenDiagram-»
org.eclipse.emf.ecore.EAnnotation shortcutAnnotation = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEAnnotation();
- shortcutAnnotation.setSource("Shortcut");«EXPAND xpt::Common::nonNLS»
- shortcutAnnotation.getDetails().put("modelID", «EXPAND xpt::editor::VisualIDRegistry::modelID»);«EXPAND xpt::Common::nonNLS»
- «viewVar».getEAnnotations().add(shortcutAnnotation);
-«ENDDEFINE»
+ shortcutAnnotation.setSource("Shortcut");«EXPAND xpt::Common::nonNLS»
+ shortcutAnnotation.getDetails().put("modelID", «EXPAND xpt::editor::VisualIDRegistry::modelID»);«EXPAND xpt::Common::nonNLS»
+ «viewVar».getEAnnotations().add(shortcutAnnotation);
+«ENDDEFINE»
-«DEFINE packageStatement FOR String-»
-«IF self.xpandSplit('\\.')->size() > 1-»
-package «FOREACH let tmpVar = self.xpandSplit('\\.') in if tmpVar->size() < 2 then Sequence{}[String] else tmpVar->subSequence(1, tmpVar->size() - 1) endif AS s SEPARATOR '.'»«s»«ENDFOREACH»;«ENDIF-»
-«ENDDEFINE»
+«DEFINE packageStatement FOR String-»
+«IF self.xpandSplit('\\.')->size() > 1-»
+package «FOREACH let tmpVar = self.xpandSplit('\\.') in if tmpVar->size() < 2 then Sequence{}[String] else tmpVar->subSequence(1, tmpVar->size() - 1) endif AS s SEPARATOR '.'»«s»«ENDFOREACH»;«ENDIF-»
+«ENDDEFINE»
// Provides handy single point to override generation of assert statements
// TODO refactor this Common.xpt into different flavours - like CommonCodeStyle (nls, assert), CommonSnippets(pkgStmt, setCharset, getSaveOptions) and so on
-«DEFINE _assert(condition : String) FOR OclAny-»
-assert «condition»;«IF condition.isQuoted('\"')»«EXPAND nonNLS»«ENDIF»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE _assert(condition : String) FOR OclAny-»
+assert «condition»;«IF condition.isQuoted('\"')»«EXPAND nonNLS»«ENDIF»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/ConstraintProviders.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/ConstraintProviders.xpt
index 1deb7b49c..162bc71db 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/ConstraintProviders.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/ConstraintProviders.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -9,93 +9,93 @@
* Contributors:
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::GenAuditRoot»
-«EXTENSION xpt::GenEditorGenerator»
-«EXTENSION gmf::CodeGenerationUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::GenAuditRoot»
+«EXTENSION xpt::GenEditorGenerator»
+«EXTENSION gmf::CodeGenerationUtils»
-«DEFINE extensions FOR gmfgen::GenEditorGenerator-»
-«IF hasAudits(self)»«EXPAND extensions FOR audits»«ENDIF-»
-«ENDDEFINE»
+«DEFINE extensions FOR gmfgen::GenEditorGenerator-»
+«IF hasAudits(self)»«EXPAND extensions FOR audits»«ENDIF-»
+«ENDDEFINE»
-«DEFINE extensions FOR gmfgen::GenAuditRoot-»
-«EXPAND extensions_emfv_constraintProviders»
-«EXPAND extensions_emfv_constraintBindings»
-«EXPAND extensions_emfv_uiContexts»
-«ENDDEFINE»
+«DEFINE extensions FOR gmfgen::GenAuditRoot-»
+«EXPAND extensions_emfv_constraintProviders»
+«EXPAND extensions_emfv_constraintBindings»
+«EXPAND extensions_emfv_uiContexts»
+«ENDDEFINE»
//
// Extension point: org.eclipse.emf.validation.constraintProviders
//
-«DEFINE extensions_emfv_constraintProviders FOR gmfgen::GenAuditRoot-»
+«DEFINE extensions_emfv_constraintProviders FOR gmfgen::GenAuditRoot-»
<extension point="org.eclipse.emf.validation.constraintProviders">
- «EXPAND xpt::Common::xmlGeneratedTag»
- «EXPAND declareCategory FOREACH categories-»
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ «EXPAND declareCategory FOREACH categories-»
<constraintProvider cache="true">
-«FOREACH getAllTargetedModelPackages(self) AS p-»
- <package namespaceUri="«p.ecorePackage.nsURI»"/>
-«ENDFOREACH-»
- «EXPAND defineCategory FOREACH categories-»
+«FOREACH getAllTargetedModelPackages(self) AS p-»
+ <package namespaceUri="«p.ecorePackage.nsURI»"/>
+«ENDFOREACH-»
+ «EXPAND defineCategory FOREACH categories-»
</constraintProvider>
</extension>
-«ENDDEFINE»
+«ENDDEFINE»
//
// Extension point: org.eclipse.emf.validation.constraintBindings
//
-«DEFINE extensions_emfv_constraintBindings FOR gmfgen::GenAuditRoot-»
+«DEFINE extensions_emfv_constraintBindings FOR gmfgen::GenAuditRoot-»
<extension point="org.eclipse.emf.validation.constraintBindings">
- «EXPAND xpt::Common::xmlGeneratedTag»
-«FOREACH clientContexts->asSequence() AS ctx-»
- <clientContext default="false" id="«getQualifiedIdentity(ctx)»">
- <selector class="«ctx.getQualifiedClassName()»"/>
+ «EXPAND xpt::Common::xmlGeneratedTag»
+«FOREACH clientContexts->asSequence() AS ctx-»
+ <clientContext default="false" id="«getQualifiedIdentity(ctx)»">
+ <selector class="«ctx.getQualifiedClassName()»"/>
</clientContext>
- <binding context="«getQualifiedIdentity(ctx)»">
- «FOREACH rules->select(r | r.target <> null and r.target.contextSelector = ctx)->asSequence() /*alternative: ctx.ruleTargets.contains(r.target)*/ AS rule-»
- <constraint ref="«editorGen.plugin.iD».«escapeXML(rule.id)»"/>
- «ENDFOREACH-»
+ <binding context="«getQualifiedIdentity(ctx)»">
+ «FOREACH rules->select(r | r.target <> null and r.target.contextSelector = ctx)->asSequence() /*alternative: ctx.ruleTargets.contains(r.target)*/ AS rule-»
+ <constraint ref="«editorGen.plugin.iD».«escapeXML(rule.id)»"/>
+ «ENDFOREACH-»
</binding>
-«ENDFOREACH-»
+«ENDFOREACH-»
</extension>
-«ENDDEFINE»
+«ENDDEFINE»
//
// Extension point: org.eclipse.emf.validation.ui.UIRegisteredClientContext
//
-«DEFINE extensions_emfv_uiContexts FOR gmfgen::GenAuditRoot-»
-«IF editorGen.diagram.liveValidationUIFeedback»
+«DEFINE extensions_emfv_uiContexts FOR gmfgen::GenAuditRoot-»
+«IF editorGen.diagram.liveValidationUIFeedback»
<extension point="org.eclipse.emf.validation.ui.UIRegisteredClientContext">
- «EXPAND xpt::Common::xmlGeneratedTag»
-«FOREACH clientContexts->asSequence() AS ctx-»
- <clientContext id="«getQualifiedIdentity(ctx)»"/>
-«ENDFOREACH-»
+ «EXPAND xpt::Common::xmlGeneratedTag»
+«FOREACH clientContexts->asSequence() AS ctx-»
+ <clientContext id="«getQualifiedIdentity(ctx)»"/>
+«ENDFOREACH-»
</extension>
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE declareCategory FOR gmfgen::GenAuditContainer-»
- <category id="«EXPAND _pathMap»" mandatory="false" name="«IF name <> null»«escapeXML(name)»«ELSE»«EXPAND _pathMap»«ENDIF»">
- <![CDATA[«(if description <> null then description else '' endif)»]]>
+«DEFINE declareCategory FOR gmfgen::GenAuditContainer-»
+ <category id="«EXPAND _pathMap»" mandatory="false" name="«IF name <> null»«escapeXML(name)»«ELSE»«EXPAND _pathMap»«ENDIF»">
+ <![CDATA[«(if description <> null then description else '' endif)»]]>
</category>
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE defineCategory FOR gmfgen::GenAuditContainer-»
- <constraints categories="«EXPAND _pathMap»">
- «FOREACH audits->select(a | a.target <> null and a.target.getTargetClass() <> null)->asSequence() AS audit-»
- <constraint id="«escapeXML(audit.id)»"
- «IF audit.requiresConstraintAdapter»lang="Java" class="«audit.getConstraintAdapterQualifiedClassName()»"«ELSE»lang="OCL"«ENDIF»
- name="«escapeXML((if audit.name <> null then audit.name else audit.id endif))»"
- mode="«IF audit.useInLiveMode»Live«ELSE»Batch«ENDIF»"
- severity="«audit.severity.repr()»" statusCode="200">
- «IF not audit.requiresConstraintAdapter»<![CDATA[«(if audit.rule <> null then audit.rule.body else '' endif)»]]>«ENDIF»
- <description><![CDATA[«(if audit.description <> null then audit.description else '' endif)»]]></description>
- <message><![CDATA[«IF audit.message <> null»«audit.message»«ELSE»«(if audit.name <> null then audit.name else audit.id endif)» audit violated«ENDIF»]]></message>
- <target class="«audit.target.getTargetClassModelQualifiedName()»"/>
+«DEFINE defineCategory FOR gmfgen::GenAuditContainer-»
+ <constraints categories="«EXPAND _pathMap»">
+ «FOREACH audits->select(a | a.target <> null and a.target.getTargetClass() <> null)->asSequence() AS audit-»
+ <constraint id="«escapeXML(audit.id)»"
+ «IF audit.requiresConstraintAdapter»lang="Java" class="«audit.getConstraintAdapterQualifiedClassName()»"«ELSE»lang="OCL"«ENDIF»
+ name="«escapeXML((if audit.name <> null then audit.name else audit.id endif))»"
+ mode="«IF audit.useInLiveMode»Live«ELSE»Batch«ENDIF»"
+ severity="«audit.severity.repr()»" statusCode="200">
+ «IF not audit.requiresConstraintAdapter»<![CDATA[«(if audit.rule <> null then audit.rule.body else '' endif)»]]>«ENDIF»
+ <description><![CDATA[«(if audit.description <> null then audit.description else '' endif)»]]></description>
+ <message><![CDATA[«IF audit.message <> null»«audit.message»«ELSE»«(if audit.name <> null then audit.name else audit.id endif)» audit violated«ENDIF»]]></message>
+ <target class="«audit.target.getTargetClassModelQualifiedName()»"/>
</constraint>
- «ENDFOREACH-»
+ «ENDFOREACH-»
</constraints>
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _pathMap FOR gmfgen::GenAuditContainer»«FOREACH path->asSequence() AS p SEPARATOR '/' »«escapeXML(p.id)»«ENDFOREACH»«ENDDEFINE»
+«DEFINE _pathMap FOR gmfgen::GenAuditContainer»«FOREACH path->asSequence() AS p SEPARATOR '/' »«escapeXML(p.id)»«ENDFOREACH»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/Externalizer.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/Externalizer.xpt
index 028c59371..3c8f809a4 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/Externalizer.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/Externalizer.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,93 +10,93 @@
* Anna Karjakina (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::ExternalizerUtils»
+«EXTENSION xpt::ExternalizerUtils»
-«DEFINE Access FOR gmfgen::GenEditorGenerator-»
-«EXPAND xpt::Common::copyright-»
-package «getExternalizerPackageName(self)»;
+«DEFINE Access FOR gmfgen::GenEditorGenerator-»
+«EXPAND xpt::Common::copyright-»
+package «getExternalizerPackageName(self)»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «getExternalizerClassName()» extends org.eclipse.osgi.util.NLS {
+«EXPAND xpt::Common::generatedClassComment»
+public class «getExternalizerClassName()» extends org.eclipse.osgi.util.NLS {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
static {
- org.eclipse.osgi.util.NLS.initializeMessages("«getExternalizerClassName().toLower()»", «getExternalizerClassName()».class); «EXPAND xpt::Common::nonNLS»
+ org.eclipse.osgi.util.NLS.initializeMessages("«getExternalizerClassName().toLower()»", «getExternalizerClassName()».class); «EXPAND xpt::Common::nonNLS»
}
- «EXPAND xpt::Common::generatedMemberComment»
- private «getExternalizerClassName()»() {
+ «EXPAND xpt::Common::generatedMemberComment»
+ private «getExternalizerClassName()»() {
}
- «EXPAND Fields»
+ «EXPAND Fields»
//TODO: put accessor fields manually
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE Fields FOR gmfgen::GenEditorGenerator»
- «EXPAND impl::actions::CreateShortcutAction::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::CreationWizard::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::CreationWizardPage::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::DiagramEditorUtil::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::DocumentProvider::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::InitDiagramFileAction::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::NewDiagramFileWizard::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::Editor::i18nAccessors FOR editor-»
- «EXPAND xpt::editor::ElementChooser::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::ShortcutCreationWizard::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::ModelElementSelectionPage::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::ValidateAction::i18nAccessors FOR diagram-»
- «EXPAND xpt::editor::palette::PaletteFactory::i18nAccessors FOR diagram.palette-»
- «EXPAND xpt::application::ActionBarAdvisor::i18nAccessors FOR application-»
- «EXPAND xpt::application::WorkbenchWindowAdvisor::i18nAccessors FOR application-»
- «EXPAND xpt::application::WizardNewFileCreationPage::i18nAccessors FOR application-»
- «EXPAND impl::diagram::editparts::CompartmentEditPart::i18nAccessors FOR diagram-»
- «EXPAND xpt::diagram::editpolicies::OpenDiagram::i18nAccessors FOR diagram-»
- «EXPAND xpt::navigator::NavigatorContentProvider::i18nAccessors FOR navigator-»
- «EXPAND xpt::navigator::NavigatorActionProvider::i18nAccessors FOR navigator-»
- «EXPAND impl::parsers::AbstractParser::i18nAccessors FOR labelParsers-»
- «EXPAND parsers::PredefinedParser::i18nAccessors FOR labelParsers-»
- «EXPAND xpt::providers::ModelingAssistantProvider::i18nAccessors FOR diagram-»
-«ENDDEFINE»
+«DEFINE Fields FOR gmfgen::GenEditorGenerator»
+ «EXPAND impl::actions::CreateShortcutAction::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::CreationWizard::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::CreationWizardPage::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::DiagramEditorUtil::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::DocumentProvider::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::InitDiagramFileAction::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::NewDiagramFileWizard::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::Editor::i18nAccessors FOR editor-»
+ «EXPAND xpt::editor::ElementChooser::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::ShortcutCreationWizard::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::ModelElementSelectionPage::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::ValidateAction::i18nAccessors FOR diagram-»
+ «EXPAND xpt::editor::palette::PaletteFactory::i18nAccessors FOR diagram.palette-»
+ «EXPAND xpt::application::ActionBarAdvisor::i18nAccessors FOR application-»
+ «EXPAND xpt::application::WorkbenchWindowAdvisor::i18nAccessors FOR application-»
+ «EXPAND xpt::application::WizardNewFileCreationPage::i18nAccessors FOR application-»
+ «EXPAND impl::diagram::editparts::CompartmentEditPart::i18nAccessors FOR diagram-»
+ «EXPAND xpt::diagram::editpolicies::OpenDiagram::i18nAccessors FOR diagram-»
+ «EXPAND xpt::navigator::NavigatorContentProvider::i18nAccessors FOR navigator-»
+ «EXPAND xpt::navigator::NavigatorActionProvider::i18nAccessors FOR navigator-»
+ «EXPAND impl::parsers::AbstractParser::i18nAccessors FOR labelParsers-»
+ «EXPAND parsers::PredefinedParser::i18nAccessors FOR labelParsers-»
+ «EXPAND xpt::providers::ModelingAssistantProvider::i18nAccessors FOR diagram-»
+«ENDDEFINE»
-«DEFINE Values FOR gmfgen::GenEditorGenerator»
+«DEFINE Values FOR gmfgen::GenEditorGenerator»
# TODO: manually put keys and values
-«EXPAND impl::actions::CreateShortcutAction::i18nValues FOR diagram-»
-«EXPAND xpt::editor::CreationWizard::i18nValues FOR diagram-»
-«EXPAND xpt::editor::CreationWizardPage::i18nValues FOR diagram-»
-«EXPAND xpt::editor::DiagramEditorUtil::i18nValues FOR diagram-»
-«EXPAND xpt::editor::DocumentProvider::i18nValues FOR diagram-»
-«EXPAND xpt::editor::InitDiagramFileAction::i18nValues FOR diagram-»
-«EXPAND xpt::editor::NewDiagramFileWizard::i18nValues FOR diagram-»
-«EXPAND xpt::editor::Editor::i18nValues FOR editor-»
-«EXPAND xpt::editor::ElementChooser::i18nValues FOR diagram-»
-«EXPAND xpt::editor::ShortcutCreationWizard::i18nValues FOR diagram-»
-«EXPAND xpt::editor::ModelElementSelectionPage::i18nValues FOR diagram-»
-«EXPAND xpt::editor::ValidateAction::i18nValues FOR diagram-»
-«EXPAND xpt::editor::palette::PaletteFactory::i18nValues FOR diagram.palette-»
-«EXPAND xpt::application::ActionBarAdvisor::i18nValues FOR application-»
-«EXPAND xpt::application::WorkbenchWindowAdvisor::i18nValues FOR application-»
-«EXPAND xpt::application::WizardNewFileCreationPage::i18nValues FOR application-»
-«EXPAND impl::diagram::editparts::CompartmentEditPart::i18nValues FOR diagram-»
-«EXPAND xpt::diagram::editpolicies::OpenDiagram::i18nValues FOR diagram-»
-«EXPAND xpt::navigator::NavigatorContentProvider::i18nValues FOR navigator-»
-«EXPAND xpt::navigator::NavigatorActionProvider::i18nValues FOR navigator-»
-«EXPAND impl::parsers::AbstractParser::i18nValues FOR labelParsers-»
-«EXPAND parsers::PredefinedParser::i18nValues FOR labelParsers-»
-«EXPAND xpt::providers::ModelingAssistantProvider::i18nValues FOR diagram-»
-«ENDDEFINE»
+«EXPAND impl::actions::CreateShortcutAction::i18nValues FOR diagram-»
+«EXPAND xpt::editor::CreationWizard::i18nValues FOR diagram-»
+«EXPAND xpt::editor::CreationWizardPage::i18nValues FOR diagram-»
+«EXPAND xpt::editor::DiagramEditorUtil::i18nValues FOR diagram-»
+«EXPAND xpt::editor::DocumentProvider::i18nValues FOR diagram-»
+«EXPAND xpt::editor::InitDiagramFileAction::i18nValues FOR diagram-»
+«EXPAND xpt::editor::NewDiagramFileWizard::i18nValues FOR diagram-»
+«EXPAND xpt::editor::Editor::i18nValues FOR editor-»
+«EXPAND xpt::editor::ElementChooser::i18nValues FOR diagram-»
+«EXPAND xpt::editor::ShortcutCreationWizard::i18nValues FOR diagram-»
+«EXPAND xpt::editor::ModelElementSelectionPage::i18nValues FOR diagram-»
+«EXPAND xpt::editor::ValidateAction::i18nValues FOR diagram-»
+«EXPAND xpt::editor::palette::PaletteFactory::i18nValues FOR diagram.palette-»
+«EXPAND xpt::application::ActionBarAdvisor::i18nValues FOR application-»
+«EXPAND xpt::application::WorkbenchWindowAdvisor::i18nValues FOR application-»
+«EXPAND xpt::application::WizardNewFileCreationPage::i18nValues FOR application-»
+«EXPAND impl::diagram::editparts::CompartmentEditPart::i18nValues FOR diagram-»
+«EXPAND xpt::diagram::editpolicies::OpenDiagram::i18nValues FOR diagram-»
+«EXPAND xpt::navigator::NavigatorContentProvider::i18nValues FOR navigator-»
+«EXPAND xpt::navigator::NavigatorActionProvider::i18nValues FOR navigator-»
+«EXPAND impl::parsers::AbstractParser::i18nValues FOR labelParsers-»
+«EXPAND parsers::PredefinedParser::i18nValues FOR labelParsers-»
+«EXPAND xpt::providers::ModelingAssistantProvider::i18nValues FOR diagram-»
+«ENDDEFINE»
-«DEFINE accessorField(key : String) FOR OclAny»
- «EXPAND xpt::Common::generatedMemberComment»
- public static String «escapeIllegalKeySymbols(key)»;
-«ENDDEFINE»
+«DEFINE accessorField(key : String) FOR OclAny»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static String «escapeIllegalKeySymbols(key)»;
+«ENDDEFINE»
-«DEFINE messageEntry(key : String, message : String) FOR OclAny-»
-«escapeIllegalKeySymbols(key)»=«escapeIllegalMessageSymbols(message)»
-«ENDDEFINE»
+«DEFINE messageEntry(key : String, message : String) FOR OclAny-»
+«escapeIllegalKeySymbols(key)»=«escapeIllegalMessageSymbols(message)»
+«ENDDEFINE»
-«DEFINE accessorCall(key : String) FOR gmfgen::GenEditorGenerator-»
-«getExternalizerPackageName(self)».«getExternalizerClassName()».«escapeIllegalKeySymbols(key)»«ENDDEFINE»
+«DEFINE accessorCall(key : String) FOR gmfgen::GenEditorGenerator-»
+«getExternalizerPackageName(self)».«getExternalizerClassName()».«escapeIllegalKeySymbols(key)»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/ActionBarAdvisor.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/ActionBarAdvisor.xpt
index 62d2aa2f5..ff644af58 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/ActionBarAdvisor.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/ActionBarAdvisor.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,67 +10,67 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::application::i18n»
+«EXTENSION xpt::application::i18n»
-«DEFINE ActionBarAdvisor FOR gmfgen::GenApplication-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
+«DEFINE ActionBarAdvisor FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.ActionBarAdvisor {
+«EXPAND xpt::Common::generatedClassComment»
+public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.ActionBarAdvisor {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.ui.actions.ActionFactory.IWorkbenchAction lockToolBarAction;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.ui.actions.ActionFactory.IWorkbenchAction toggleCoolbarAction;
- «EXPAND xpt::Common::generatedMemberComment»
- public «actionBarAdvisorClassName»(org.eclipse.ui.application.IActionBarConfigurer configurer) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «actionBarAdvisorClassName»(org.eclipse.ui.application.IActionBarConfigurer configurer) {
super(configurer);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.ui.IWorkbenchWindow getWindow() {
return getActionBarConfigurer().getWindowConfigurer().getWindow();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void makeActions(org.eclipse.ui.IWorkbenchWindow window) {
toggleCoolbarAction = org.eclipse.ui.actions.ActionFactory.TOGGLE_COOLBAR.create(window);
register(toggleCoolbarAction);
lockToolBarAction = org.eclipse.ui.actions.ActionFactory.LOCK_TOOL_BAR.create(window);
register(lockToolBarAction);
- «EXPAND makeAction('window') FOREACH sharedContributionItems-»
+ «EXPAND makeAction('window') FOREACH sharedContributionItems-»
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void fillMenuBar(org.eclipse.jface.action.IMenuManager menu) {
- «EXPAND fill('menu') FOR mainMenu-»
+ «EXPAND fill('menu') FOR mainMenu-»
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void fillCoolBar(org.eclipse.jface.action.ICoolBarManager toolBar) {
org.eclipse.jface.action.IMenuManager popUpMenu = new org.eclipse.jface.action.MenuManager();
popUpMenu.add(new org.eclipse.jface.action.ActionContributionItem(lockToolBarAction));
popUpMenu.add(new org.eclipse.jface.action.ActionContributionItem(toggleCoolbarAction));
toolBar.setContextMenuManager(popUpMenu);
- «EXPAND fill('toolBar') FOR mainToolBar-»
+ «EXPAND fill('toolBar') FOR mainToolBar-»
}
- «EXPAND openEditor FOR editorGen.editor-»
+ «EXPAND openEditor FOR editorGen.editor-»
- «EXPAND actions-»
+ «EXPAND actions-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE openEditor FOR gmfgen::GenEditorView-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE openEditor FOR gmfgen::GenEditorView-»
+ «EXPAND xpt::Common::generatedMemberComment»
private static boolean openEditor(org.eclipse.ui.IWorkbench workbench, org.eclipse.emf.common.util.URI fileURI) {
org.eclipse.ui.IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
org.eclipse.ui.IWorkbenchPage page = workbenchWindow.getActivePage();
@@ -78,9 +78,9 @@ public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.Acti
workbench.getEditorRegistry().getDefaultEditor(fileURI.toFileString());
if (editorDescriptor == null) {
org.eclipse.jface.dialogs.MessageDialog.openError(workbenchWindow.getShell(),
- «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForDefaultFileEditorErrorDialog(editorGen.application))) FOR editorGen»,
+ «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForDefaultFileEditorErrorDialog(editorGen.application))) FOR editorGen»,
org.eclipse.osgi.util.NLS.bind(
- «EXPAND xpt::Externalizer::accessorCall(messageKey(i18nKeyForDefaultFileEditorErrorDialog(editorGen.application))) FOR editorGen»,
+ «EXPAND xpt::Externalizer::accessorCall(messageKey(i18nKeyForDefaultFileEditorErrorDialog(editorGen.application))) FOR editorGen»,
fileURI.toFileString()));
return false;
} else {
@@ -89,87 +89,87 @@ public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.Acti
} catch (org.eclipse.ui.PartInitException exception) {
org.eclipse.jface.dialogs.MessageDialog.openError(
workbenchWindow.getShell(),
- «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForDefaultEditorOpenErrorDialog(editorGen.application))) FOR editorGen»,
+ «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForDefaultEditorOpenErrorDialog(editorGen.application))) FOR editorGen»,
exception.getMessage());
return false;
}
}
return true;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE makeAction(windowVar : String) FOR gmfgen::GenContributionItem»
- «ERROR 'Can not make action for ' + self.repr()»
-«ENDDEFINE»
+«DEFINE makeAction(windowVar : String) FOR gmfgen::GenContributionItem»
+ «ERROR 'Can not make action for ' + self.repr()»
+«ENDDEFINE»
-«DEFINE makeAction(windowVar : String) FOR gmfgen::GenActionFactoryContributionItem»
- register(org.eclipse.ui.actions.ActionFactory.«name».create(«windowVar»));
-«ENDDEFINE»
+«DEFINE makeAction(windowVar : String) FOR gmfgen::GenActionFactoryContributionItem»
+ register(org.eclipse.ui.actions.ActionFactory.«name».create(«windowVar»));
+«ENDDEFINE»
-«DEFINE fill(managerVar : String) FOR gmfgen::GenContributionManager»
- «EXPAND contribute(managerVar) FOREACH items-»
-«ENDDEFINE»
+«DEFINE fill(managerVar : String) FOR gmfgen::GenContributionManager»
+ «EXPAND contribute(managerVar) FOREACH items-»
+«ENDDEFINE»
-«DEFINE contribute(managerVar : String) FOR gmfgen::GenContributionItem»
- «ERROR 'Can not contribute item: ' + self.repr()»
-«ENDDEFINE»
+«DEFINE contribute(managerVar : String) FOR gmfgen::GenContributionItem»
+ «ERROR 'Can not contribute item: ' + self.repr()»
+«ENDDEFINE»
-«DEFINE contribute(managerVar : String) FOR gmfgen::GenGroupMarker»
- «managerVar».add(new org.eclipse.jface.action.GroupMarker(«groupName»));
-«ENDDEFINE»
+«DEFINE contribute(managerVar : String) FOR gmfgen::GenGroupMarker»
+ «managerVar».add(new org.eclipse.jface.action.GroupMarker(«groupName»));
+«ENDDEFINE»
-«DEFINE contribute(managerVar : String) FOR gmfgen::GenSeparator»
- «managerVar».add(new org.eclipse.jface.action.Separator(«IF null <> groupName»«groupName»«ENDIF»));
-«ENDDEFINE»
+«DEFINE contribute(managerVar : String) FOR gmfgen::GenSeparator»
+ «managerVar».add(new org.eclipse.jface.action.Separator(«IF null <> groupName»«groupName»«ENDIF»));
+«ENDDEFINE»
-«DEFINE contribute(managerVar : String) FOR gmfgen::GenMenuManager»
- «LET managerVar + 'X' AS menuVar-»
+«DEFINE contribute(managerVar : String) FOR gmfgen::GenMenuManager»
+ «LET managerVar + 'X' AS menuVar-»
{
- org.eclipse.jface.action.IMenuManager «menuVar» = new org.eclipse.jface.action.MenuManager(
- «IF null <> name»«EXPAND xpt::Externalizer::accessorCall(i18nKeyForMenu(self)) FOR editorGen»«ELSE»null«ENDIF»«IF null <> iD», «iD»«ENDIF»);
- «EXPAND contribute(menuVar) FOREACH items-»
- «managerVar».add(«menuVar»);
+ org.eclipse.jface.action.IMenuManager «menuVar» = new org.eclipse.jface.action.MenuManager(
+ «IF null <> name»«EXPAND xpt::Externalizer::accessorCall(i18nKeyForMenu(self)) FOR editorGen»«ELSE»null«ENDIF»«IF null <> iD», «iD»«ENDIF»);
+ «EXPAND contribute(menuVar) FOREACH items-»
+ «managerVar».add(«menuVar»);
}
- «ENDLET-»
-«ENDDEFINE»
+ «ENDLET-»
+«ENDDEFINE»
-«DEFINE contribute(managerVar : String) FOR gmfgen::GenToolBarManager»
- «LET managerVar + 'X' AS toolBarVar-»
+«DEFINE contribute(managerVar : String) FOR gmfgen::GenToolBarManager»
+ «LET managerVar + 'X' AS toolBarVar-»
{
- org.eclipse.jface.action.IToolBarManager «toolBarVar» = new org.eclipse.jface.action.ToolBarManager();
- «EXPAND contribute(toolBarVar) FOREACH items-»
- «managerVar».add(new org.eclipse.jface.action.ToolBarContributionItem(«toolBarVar»«IF null <> iD», «iD»«ENDIF»));
+ org.eclipse.jface.action.IToolBarManager «toolBarVar» = new org.eclipse.jface.action.ToolBarManager();
+ «EXPAND contribute(toolBarVar) FOREACH items-»
+ «managerVar».add(new org.eclipse.jface.action.ToolBarContributionItem(«toolBarVar»«IF null <> iD», «iD»«ENDIF»));
}
- «ENDLET-»
-«ENDDEFINE»
-
-«DEFINE contribute(managerVar : String) FOR gmfgen::GenSharedContributionItem»
- «EXPAND contributeShared(managerVar) FOR actualItem-»
-«ENDDEFINE»
-
-«DEFINE contributeShared(managerVar : String) FOR gmfgen::GenContributionItem»
- «ERROR 'Can not contribute shared item: ' + self.repr()»
-«ENDDEFINE»
-
-«DEFINE contributeShared(managerVar : String) FOR gmfgen::GenActionFactoryContributionItem»
- «managerVar».add(getAction(org.eclipse.ui.actions.ActionFactory.«name».getId()));
-«ENDDEFINE»
-
-«DEFINE actions FOR gmfgen::GenApplication»
-«EXPAND NewDiagramAction-»
-«EXPAND OpenUriAction-»
-«EXPAND OpenAction-»
-«EXPAND AboutAction-»
-«ENDDEFINE»
-
-«DEFINE NewDiagramAction FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedClassComment»
+ «ENDLET-»
+«ENDDEFINE»
+
+«DEFINE contribute(managerVar : String) FOR gmfgen::GenSharedContributionItem»
+ «EXPAND contributeShared(managerVar) FOR actualItem-»
+«ENDDEFINE»
+
+«DEFINE contributeShared(managerVar : String) FOR gmfgen::GenContributionItem»
+ «ERROR 'Can not contribute shared item: ' + self.repr()»
+«ENDDEFINE»
+
+«DEFINE contributeShared(managerVar : String) FOR gmfgen::GenActionFactoryContributionItem»
+ «managerVar».add(getAction(org.eclipse.ui.actions.ActionFactory.«name».getId()));
+«ENDDEFINE»
+
+«DEFINE actions FOR gmfgen::GenApplication»
+«EXPAND NewDiagramAction-»
+«EXPAND OpenUriAction-»
+«EXPAND OpenAction-»
+«EXPAND AboutAction-»
+«ENDDEFINE»
+
+«DEFINE NewDiagramAction FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedClassComment»
public static class NewDiagramAction extends org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void run(org.eclipse.jface.action.IAction action) {
- «editorGen.diagram.getCreationWizardQualifiedClassName()» wizard =
- new «editorGen.diagram.getCreationWizardQualifiedClassName()»();
+ «editorGen.diagram.getCreationWizardQualifiedClassName()» wizard =
+ new «editorGen.diagram.getCreationWizardQualifiedClassName()»();
wizard.init(getWindow().getWorkbench(), org.eclipse.jface.viewers.StructuredSelection.EMPTY);
org.eclipse.jface.wizard.WizardDialog wizardDialog =
new org.eclipse.jface.wizard.WizardDialog(getWindow().getShell(), wizard);
@@ -177,13 +177,13 @@ public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.Acti
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE OpenUriAction FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedClassComment»
+«DEFINE OpenUriAction FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedClassComment»
public static class OpenURIAction extends org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void run(org.eclipse.jface.action.IAction action) {
org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog loadResourceDialog =
new org.eclipse.emf.edit.ui.action.LoadResourceAction.LoadResourceDialog(getWindow().getShell());
@@ -195,13 +195,13 @@ public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.Acti
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE OpenAction FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedClassComment»
+«DEFINE OpenAction FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedClassComment»
public static class OpenAction extends org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void run(org.eclipse.jface.action.IAction action) {
org.eclipse.swt.widgets.FileDialog fileDialog =
new org.eclipse.swt.widgets.FileDialog(getWindow().getShell(), org.eclipse.swt.SWT.OPEN);
@@ -212,55 +212,55 @@ public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.Acti
}
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE AboutAction FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedClassComment»
+«DEFINE AboutAction FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedClassComment»
public static class AboutAction extends org.eclipse.emf.common.ui.action.WorkbenchWindowActionDelegate {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void run(org.eclipse.jface.action.IAction action) {
org.eclipse.jface.dialogs.MessageDialog.openInformation(getWindow().getShell(),
- «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForAboutDialog(self))) FOR editorGen»,
- «EXPAND xpt::Externalizer::accessorCall(messageKey(i18nKeyForAboutDialog(self))) FOR editorGen»
+ «EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForAboutDialog(self))) FOR editorGen»,
+ «EXPAND xpt::Externalizer::accessorCall(messageKey(i18nKeyForAboutDialog(self))) FOR editorGen»
);
}
}
-«ENDDEFINE»
-
-«DEFINE additions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
-
-«DEFINE i18nAccessors FOR gmfgen::GenApplication-»
-«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForDefaultFileEditorErrorDialog(self)))-»
-«EXPAND xpt::Externalizer::accessorField(messageKey(i18nKeyForDefaultFileEditorErrorDialog(self)))-»
-«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForDefaultEditorOpenErrorDialog(self)))-»
-«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForAboutDialog(self)))-»
-«EXPAND xpt::Externalizer::accessorField(messageKey(i18nKeyForAboutDialog(self)))-»
-«IF null <> mainMenu-»
-«EXPAND internal_i18nAccessors FOR mainMenu-»
-«EXPAND internal_i18nAccessors FOREACH collectGenMenuManagers(mainMenu.items)-»
-«ENDIF»
-«EXPAND internal_i18nAccessors FOREACH collectGenMenuManagers(sharedContributionItems)-»
-«ENDDEFINE»
-
-«DEFINE internal_i18nAccessors FOR gmfgen::GenMenuManager-»
-«IF null <> name»«EXPAND xpt::Externalizer::accessorField(i18nKeyForMenu(self))»«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE i18nValues FOR gmfgen::GenApplication-»
-«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForDefaultFileEditorErrorDialog(self)), 'Error')-»
-«EXPAND xpt::Externalizer::messageEntry(messageKey(i18nKeyForDefaultFileEditorErrorDialog(self)), 'There is no editor registered for the file \"{0}\"')-»
-«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForDefaultEditorOpenErrorDialog(self)), 'Open Editor')-»
-«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForAboutDialog(self)), 'About')-»
-«EXPAND xpt::Externalizer::messageEntry(messageKey(i18nKeyForAboutDialog(self)), editorGen.modelID + ' Diagram Editor')-»
-«IF null <> mainMenu-»
-«EXPAND internal_i18nValues FOR mainMenu-»
-«EXPAND internal_i18nValues FOREACH collectGenMenuManagers(mainMenu.items)-»
-«ENDIF»
-«EXPAND internal_i18nValues FOREACH collectGenMenuManagers(sharedContributionItems)-»
-«ENDDEFINE»
-
-«DEFINE internal_i18nValues FOR gmfgen::GenMenuManager-»
-«IF null <> name»«EXPAND xpt::Externalizer::messageEntry(i18nKeyForMenu(self), name)»«ENDIF-»
-«ENDDEFINE»
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
+
+«DEFINE i18nAccessors FOR gmfgen::GenApplication-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForDefaultFileEditorErrorDialog(self)))-»
+«EXPAND xpt::Externalizer::accessorField(messageKey(i18nKeyForDefaultFileEditorErrorDialog(self)))-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForDefaultEditorOpenErrorDialog(self)))-»
+«EXPAND xpt::Externalizer::accessorField(titleKey(i18nKeyForAboutDialog(self)))-»
+«EXPAND xpt::Externalizer::accessorField(messageKey(i18nKeyForAboutDialog(self)))-»
+«IF null <> mainMenu-»
+«EXPAND internal_i18nAccessors FOR mainMenu-»
+«EXPAND internal_i18nAccessors FOREACH collectGenMenuManagers(mainMenu.items)-»
+«ENDIF»
+«EXPAND internal_i18nAccessors FOREACH collectGenMenuManagers(sharedContributionItems)-»
+«ENDDEFINE»
+
+«DEFINE internal_i18nAccessors FOR gmfgen::GenMenuManager-»
+«IF null <> name»«EXPAND xpt::Externalizer::accessorField(i18nKeyForMenu(self))»«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE i18nValues FOR gmfgen::GenApplication-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForDefaultFileEditorErrorDialog(self)), 'Error')-»
+«EXPAND xpt::Externalizer::messageEntry(messageKey(i18nKeyForDefaultFileEditorErrorDialog(self)), 'There is no editor registered for the file \"{0}\"')-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForDefaultEditorOpenErrorDialog(self)), 'Open Editor')-»
+«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForAboutDialog(self)), 'About')-»
+«EXPAND xpt::Externalizer::messageEntry(messageKey(i18nKeyForAboutDialog(self)), editorGen.modelID + ' Diagram Editor')-»
+«IF null <> mainMenu-»
+«EXPAND internal_i18nValues FOR mainMenu-»
+«EXPAND internal_i18nValues FOREACH collectGenMenuManagers(mainMenu.items)-»
+«ENDIF»
+«EXPAND internal_i18nValues FOREACH collectGenMenuManagers(sharedContributionItems)-»
+«ENDDEFINE»
+
+«DEFINE internal_i18nValues FOR gmfgen::GenMenuManager-»
+«IF null <> name»«EXPAND xpt::Externalizer::messageEntry(i18nKeyForMenu(self), name)»«ENDIF-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Application.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Application.xpt
index 72e6c7aeb..cfd355825 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Application.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Application.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,33 +10,33 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE Application FOR gmfgen::GenApplication-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
+«DEFINE Application FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «className» implements org.eclipse.equinox.app.IApplication {
+«EXPAND xpt::Common::generatedClassComment»
+public class «className» implements org.eclipse.equinox.app.IApplication {
-«EXPAND run-»
+«EXPAND run-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void stop() {
}
-«EXPAND additions-»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE run FOR gmfgen::GenApplication-»
+«DEFINE run FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public Object start(org.eclipse.equinox.app.IApplicationContext context) throws Exception {
org.eclipse.swt.widgets.Display display = org.eclipse.ui.PlatformUI.createDisplay();
try {
int returnCode = org.eclipse.ui.PlatformUI.createAndRunWorkbench(display,
- new «getWorkbenchAdvisorQualifiedClassName()»());
+ new «getWorkbenchAdvisorQualifiedClassName()»());
if (returnCode == org.eclipse.ui.PlatformUI.RETURN_RESTART) {
return org.eclipse.equinox.app.IApplication.EXIT_RESTART;
}
@@ -45,7 +45,7 @@ public class «className» implements org.eclipse.equinox.app.IApplication {
display.dispose();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Perspective.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Perspective.xpt
index 91504c441..9bfd82aaf 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Perspective.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/Perspective.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,36 +10,36 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE Perspective FOR gmfgen::GenApplication-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
+«DEFINE Perspective FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «perspectiveClassName» implements org.eclipse.ui.IPerspectiveFactory {
- «EXPAND createInitialLayout-»
- «EXPAND additions-»
-«ENDDEFINE»
-«DEFINE createInitialLayout FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+«EXPAND xpt::Common::generatedClassComment»
+public class «perspectiveClassName» implements org.eclipse.ui.IPerspectiveFactory {
+ «EXPAND createInitialLayout-»
+ «EXPAND additions-»
+«ENDDEFINE»
+«DEFINE createInitialLayout FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
public void createInitialLayout(org.eclipse.ui.IPageLayout layout) {
layout.setEditorAreaVisible(true);
- layout.addPerspectiveShortcut(«getWorkbenchAdvisorQualifiedClassName()».PERSPECTIVE_ID);
+ layout.addPerspectiveShortcut(«getWorkbenchAdvisorQualifiedClassName()».PERSPECTIVE_ID);
org.eclipse.ui.IFolderLayout right = layout.createFolder(
- "right", org.eclipse.ui.IPageLayout.RIGHT, 0.6f, layout.getEditorArea()); «EXPAND xpt::Common::nonNLS»
+ "right", org.eclipse.ui.IPageLayout.RIGHT, 0.6f, layout.getEditorArea()); «EXPAND xpt::Common::nonNLS»
right.addView(org.eclipse.ui.IPageLayout.ID_OUTLINE);
org.eclipse.ui.IFolderLayout bottomRight = layout.createFolder(
- "bottomRight", org.eclipse.ui.IPageLayout.BOTTOM, 0.6f, "right"); «EXPAND xpt::Common::nonNLS» «EXPAND xpt::Common::nonNLS(2)»
+ "bottomRight", org.eclipse.ui.IPageLayout.BOTTOM, 0.6f, "right"); «EXPAND xpt::Common::nonNLS» «EXPAND xpt::Common::nonNLS(2)»
bottomRight.addView(org.eclipse.ui.IPageLayout.ID_PROP_SHEET);
- «EXPAND layoutAdditions-»
+ «EXPAND layoutAdditions-»
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE layoutAdditions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
+«DEFINE layoutAdditions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WizardNewFileCreationPage.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WizardNewFileCreationPage.xpt
index 18e424c40..f09f863a8 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WizardNewFileCreationPage.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WizardNewFileCreationPage.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,31 +10,31 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::application::i18n»
+«EXTENSION xpt::application::i18n»
-«DEFINE WizardNewFileCreationPage FOR gmfgen::GenApplication-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
+«DEFINE WizardNewFileCreationPage FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
-«EXPAND xpt::Common::generatedClassComment»
+«EXPAND xpt::Common::generatedClassComment»
public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPage {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.jface.viewers.IStructuredSelection currentSelection;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private String initialFileName;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.core.runtime.IPath initialContainerFullPath;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.swt.widgets.Text fileNameEditor;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public WizardNewFileCreationPage(String name, org.eclipse.jface.viewers.IStructuredSelection currentSelection) {
super(name);
this.currentSelection = currentSelection;
@@ -44,12 +44,12 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.jface.viewers.IStructuredSelection getSelection() {
return currentSelection;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getFileName() {
if (fileNameEditor == null) {
return initialFileName;
@@ -61,7 +61,7 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
return path.lastSegment();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setFileName(String fileName) {
if (fileNameEditor == null) {
initialFileName = fileName;
@@ -70,7 +70,7 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
setFilePath(getContainerFullPath(), fileName);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.core.runtime.IPath getContainerFullPath() {
if (fileNameEditor == null) {
return initialContainerFullPath;
@@ -89,7 +89,7 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
return path.addTrailingSeparator();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setContainerFullPath(org.eclipse.core.runtime.IPath containerPath) {
if (fileNameEditor == null) {
initialContainerFullPath = containerPath;
@@ -98,7 +98,7 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
setFilePath(containerPath, getFileName());
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.core.runtime.IPath getFilePath() {
String fileName = fileNameEditor.getText().trim();
if (fileName.length() == 0) {
@@ -107,7 +107,7 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
return new org.eclipse.core.runtime.Path(fileNameEditor.getText());
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setFilePath(org.eclipse.core.runtime.IPath containerPath, String fileName) {
if (fileName == null) {
fileName = ""; //$NON-NLS-1$
@@ -126,17 +126,17 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
setPageComplete(validatePage());
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void createControl(org.eclipse.swt.widgets.Composite parent) {
org.eclipse.swt.widgets.Composite plate = new org.eclipse.swt.widgets.Composite(parent, org.eclipse.swt.SWT.NONE);
plate.setLayout(new org.eclipse.swt.layout.GridLayout(2, false));
org.eclipse.swt.widgets.Label label = new org.eclipse.swt.widgets.Label(plate, org.eclipse.swt.SWT.NONE);
- label.setText(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardFileLabel(self)) FOR editorGen»);
+ label.setText(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardFileLabel(self)) FOR editorGen»);
label.setLayoutData(new org.eclipse.swt.layout.GridData(org.eclipse.swt.SWT.BEGINNING, org.eclipse.swt.SWT.CENTER, false, false, 2, 1));
fileNameEditor = new org.eclipse.swt.widgets.Text(plate, org.eclipse.swt.SWT.SINGLE | org.eclipse.swt.SWT.BORDER);
fileNameEditor.setLayoutData(new org.eclipse.swt.layout.GridData(org.eclipse.swt.SWT.FILL, org.eclipse.swt.SWT.CENTER, true, false));
org.eclipse.swt.widgets.Button button = new org.eclipse.swt.widgets.Button(plate, org.eclipse.swt.SWT.PUSH);
- button.setText(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardBrowseButton(self)) FOR editorGen»);
+ button.setText(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardBrowseButton(self)) FOR editorGen»);
button.setLayoutData(new org.eclipse.swt.layout.GridData(org.eclipse.swt.SWT.BEGINNING, org.eclipse.swt.SWT.CENTER, false, false));
// logic
@@ -150,7 +150,7 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
org.eclipse.swt.widgets.FileDialog dialog = new org.eclipse.swt.widgets.FileDialog(getShell(), org.eclipse.swt.SWT.SAVE);
- dialog.setText(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardSelectDialog(self)) FOR editorGen»);
+ dialog.setText(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardSelectDialog(self)) FOR editorGen»);
dialog.setFileName(getFileName());
String fileName = dialog.open();
if (fileName != null) {
@@ -168,39 +168,39 @@ public class WizardNewFileCreationPage extends org.eclipse.jface.wizard.WizardPa
setControl(plate);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean validatePage() {
String fileName = fileNameEditor.getText().trim();
if (fileName.length() == 0) {
- setErrorMessage(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardEmpty(self)) FOR editorGen»);
+ setErrorMessage(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardEmpty(self)) FOR editorGen»);
return false;
}
if (!new org.eclipse.core.runtime.Path("").isValidPath(fileName)) { //$NON-NLS-1$
- setErrorMessage(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardInvalid(self)) FOR editorGen»);
+ setErrorMessage(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForNewFileWizardInvalid(self)) FOR editorGen»);
return false;
}
setErrorMessage(null);
return true;
}
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
-
-«DEFINE additions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
-
-«DEFINE i18nValues FOR gmfgen::GenApplication-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardFileLabel(self), 'File:')-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardBrowseButton(self), 'Browse')-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardSelectDialog(self), 'Select new file')-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardEmpty(self), 'Specify file name')-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardInvalid(self), 'Invalid file name')-»
-«ENDDEFINE»
-
-«DEFINE i18nAccessors FOR gmfgen::GenApplication-»
- «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardFileLabel(self))-»
- «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardBrowseButton(self))-»
- «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardSelectDialog(self))-»
- «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardEmpty(self))-»
- «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardInvalid(self))-»
-«ENDDEFINE»
+«ENDDEFINE»
+
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
+
+«DEFINE i18nValues FOR gmfgen::GenApplication-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardFileLabel(self), 'File:')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardBrowseButton(self), 'Browse')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardSelectDialog(self), 'Select new file')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardEmpty(self), 'Specify file name')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForNewFileWizardInvalid(self), 'Invalid file name')-»
+«ENDDEFINE»
+
+«DEFINE i18nAccessors FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardFileLabel(self))-»
+ «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardBrowseButton(self))-»
+ «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardSelectDialog(self))-»
+ «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardEmpty(self))-»
+ «EXPAND xpt::Externalizer::accessorField(i18nKeyForNewFileWizardInvalid(self))-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchAdvisor.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchAdvisor.xpt
index db12c6d41..b38892004 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchAdvisor.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchAdvisor.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,54 +10,54 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE WorkbenchAdvisor FOR gmfgen::GenApplication-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
+«DEFINE WorkbenchAdvisor FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «workbenchAdvisorClassName» extends org.eclipse.ui.application.WorkbenchAdvisor {
-«EXPAND perspectiveId-»
+«EXPAND xpt::Common::generatedClassComment»
+public class «workbenchAdvisorClassName» extends org.eclipse.ui.application.WorkbenchAdvisor {
+«EXPAND perspectiveId-»
-«EXPAND getInitialWindowPerspectiveId-»
+«EXPAND getInitialWindowPerspectiveId-»
-«EXPAND initialize-»
+«EXPAND initialize-»
-«EXPAND createWorkbenchWindowAdvisor-»
+«EXPAND createWorkbenchWindowAdvisor-»
-«EXPAND additions-»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE perspectiveId FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
- public static final String PERSPECTIVE_ID = "«perspectiveId»"; «EXPAND xpt::Common::nonNLS»
-«ENDDEFINE»
+«DEFINE perspectiveId FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final String PERSPECTIVE_ID = "«perspectiveId»"; «EXPAND xpt::Common::nonNLS»
+«ENDDEFINE»
-«DEFINE getInitialWindowPerspectiveId FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getInitialWindowPerspectiveId FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
public String getInitialWindowPerspectiveId() {
return PERSPECTIVE_ID;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE initialize FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE initialize FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
public void initialize(org.eclipse.ui.application.IWorkbenchConfigurer configurer) {
super.initialize(configurer);
configurer.setSaveAndRestore(true);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createWorkbenchWindowAdvisor FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createWorkbenchWindowAdvisor FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.ui.application.WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
org.eclipse.ui.application.IWorkbenchWindowConfigurer configurer) {
- return new «getWorkbenchWindowAdvisorQualifiedClassName()»(configurer);
+ return new «getWorkbenchWindowAdvisorQualifiedClassName()»(configurer);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchWindowAdvisor.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchWindowAdvisor.xpt
index 164aeb308..9b8056094 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchWindowAdvisor.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/WorkbenchWindowAdvisor.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,54 +10,54 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::application::i18n»
+«EXTENSION xpt::application::i18n»
-«DEFINE WorkbenchWindowAdvisor FOR gmfgen::GenApplication-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «packageName»;
+«DEFINE WorkbenchWindowAdvisor FOR gmfgen::GenApplication-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «packageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «workbenchWindowAdvisorClassName» extends org.eclipse.ui.application.WorkbenchWindowAdvisor {
+«EXPAND xpt::Common::generatedClassComment»
+public class «workbenchWindowAdvisorClassName» extends org.eclipse.ui.application.WorkbenchWindowAdvisor {
- «EXPAND xpt::Common::generatedMemberComment»
- public «workbenchWindowAdvisorClassName»(org.eclipse.ui.application.IWorkbenchWindowConfigurer configurer) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «workbenchWindowAdvisorClassName»(org.eclipse.ui.application.IWorkbenchWindowConfigurer configurer) {
super(configurer);
}
- «EXPAND createActionBarAdvisor-»
+ «EXPAND createActionBarAdvisor-»
- «EXPAND preWindowOpen-»
+ «EXPAND preWindowOpen-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createActionBarAdvisor FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createActionBarAdvisor FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.ui.application.ActionBarAdvisor createActionBarAdvisor(org.eclipse.ui.application.IActionBarConfigurer configurer) {
- return new «getActionBarAdvisorQualifiedClassName()»(configurer);
+ return new «getActionBarAdvisorQualifiedClassName()»(configurer);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE preWindowOpen FOR gmfgen::GenApplication-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE preWindowOpen FOR gmfgen::GenApplication-»
+ «EXPAND xpt::Common::generatedMemberComment»
public void preWindowOpen() {
org.eclipse.ui.application.IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new org.eclipse.swt.graphics.Point(1000, 700));
- configurer.setTitle(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForWindowTitle(self)) FOR editorGen»);
+ configurer.setTitle(«EXPAND xpt::Externalizer::accessorCall(i18nKeyForWindowTitle(self)) FOR editorGen»);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenApplication-»
-«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenApplication-»
+«ENDDEFINE»
-«DEFINE i18nAccessors FOR gmfgen::GenApplication-»
-«EXPAND xpt::Externalizer::accessorField(i18nKeyForWindowTitle(self))-»
-«ENDDEFINE»
+«DEFINE i18nAccessors FOR gmfgen::GenApplication-»
+«EXPAND xpt::Externalizer::accessorField(i18nKeyForWindowTitle(self))-»
+«ENDDEFINE»
-«DEFINE i18nValues FOR gmfgen::GenApplication-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForWindowTitle(self), title)-»
-«ENDDEFINE»
+«DEFINE i18nValues FOR gmfgen::GenApplication-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForWindowTitle(self), title)-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/extensions.xpt
index 3b6969d40..5d78e9f86 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/application/extensions.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/application/extensions.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,85 +10,85 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE extensions FOR gmfgen::GenApplication-»
+«DEFINE extensions FOR gmfgen::GenApplication-»
- <extension id="«iD»" point="org.eclipse.core.runtime.applications">
- «EXPAND xpt::Common::xmlGeneratedTag»
+ <extension id="«iD»" point="org.eclipse.core.runtime.applications">
+ «EXPAND xpt::Common::xmlGeneratedTag»
<application>
- <run class="«getQualifiedClassName()»"/>
+ <run class="«getQualifiedClassName()»"/>
</application>
</extension>
<extension point="org.eclipse.ui.perspectives" id="rcp-perspective">
- «EXPAND xpt::Common::xmlGeneratedTag»
+ «EXPAND xpt::Common::xmlGeneratedTag»
<perspective
- id="«perspectiveId»"
+ id="«perspectiveId»"
name="%perspectiveName"
- class="«getPerspectiveQualifiedClassName()»">
+ class="«getPerspectiveQualifiedClassName()»">
</perspective>
</extension>
<extension point="org.eclipse.ui.commands" id="rcp-menu-commands">
- «EXPAND xpt::Common::xmlGeneratedTag»
+ «EXPAND xpt::Common::xmlGeneratedTag»
<command
name="%openURIActionLabel"
description="%openURIActionDescription"
categoryId="org.eclipse.ui.category.file"
- id="«editorGen.plugin.iD».OpenURICommand"/>
+ id="«editorGen.plugin.iD».OpenURICommand"/>
<command
name="%openActionLabel"
description="%openActionDescription"
categoryId="org.eclipse.ui.category.file"
- id="«editorGen.plugin.iD».OpenCommand"/>
+ id="«editorGen.plugin.iD».OpenCommand"/>
</extension>
<extension point="org.eclipse.ui.bindings" id="rcp-command-bindings">
- «EXPAND xpt::Common::xmlGeneratedTag»
+ «EXPAND xpt::Common::xmlGeneratedTag»
<key
- commandId="«editorGen.plugin.iD».OpenURICommand"
+ commandId="«editorGen.plugin.iD».OpenURICommand"
sequence="M1+U"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
<key
- commandId="«editorGen.plugin.iD».OpenCommand"
+ commandId="«editorGen.plugin.iD».OpenCommand"
sequence="M1+O"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
</extension>
<extension point="org.eclipse.ui.actionSets" id="rcp-actions">
- «EXPAND xpt::Common::xmlGeneratedTag»
+ «EXPAND xpt::Common::xmlGeneratedTag»
<actionSet
label="%applicationActionSetLabel"
visible="true"
- id="«editorGen.plugin.iD».ActionSet">
+ id="«editorGen.plugin.iD».ActionSet">
<action
label="%newDiagramActionLabel"
- class="«getActionBarAdvisorQualifiedClassName()»$NewDiagramAction"
+ class="«getActionBarAdvisorQualifiedClassName()»$NewDiagramAction"
menubarPath="file/new/additions"
- id="«editorGen.plugin.iD».NewDiagramAction">
+ id="«editorGen.plugin.iD».NewDiagramAction">
</action>
<action
label="%aboutActionLabel"
- class="«getActionBarAdvisorQualifiedClassName()»$AboutAction"
+ class="«getActionBarAdvisorQualifiedClassName()»$AboutAction"
menubarPath="help/additions"
- id="«editorGen.plugin.iD».AboutAction">
+ id="«editorGen.plugin.iD».AboutAction">
</action>
<action
label="%openURIActionLabel"
- definitionId="«editorGen.plugin.iD».OpenURICommand"
- class="«getActionBarAdvisorQualifiedClassName()»$OpenURIAction"
+ definitionId="«editorGen.plugin.iD».OpenURICommand"
+ class="«getActionBarAdvisorQualifiedClassName()»$OpenURIAction"
menubarPath="file/additions"
- id="«editorGen.plugin.iD».OpenURIAction">
+ id="«editorGen.plugin.iD».OpenURIAction">
</action>
<action
label="%openActionLabel"
- definitionId="«editorGen.plugin.iD».OpenCommand"
- class="«getActionBarAdvisorQualifiedClassName()»$OpenAction"
+ definitionId="«editorGen.plugin.iD».OpenCommand"
+ class="«getActionBarAdvisorQualifiedClassName()»$OpenAction"
menubarPath="file/additions"
- id="«editorGen.plugin.iD».OpenAction">
+ id="«editorGen.plugin.iD».OpenAction">
</action>
</actionSet>
</extension>
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkCommand.xpt
index 834a0d269..52dfb75a5 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,110 +10,110 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::diagram::Utils»
-«DEFINE CreateLinkCommand FOR gmfgen::GenLink»«EXPAND Main»«ENDDEFINE»
+«DEFINE CreateLinkCommand FOR gmfgen::GenLink»«EXPAND Main»«ENDDEFINE»
-«DEFINE Main FOR gmfgen::GenLink-»
-«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
-package «diagram.editCommandsPackageName»;
+«DEFINE Main FOR gmfgen::GenLink-»
+«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
+package «diagram.editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
- «EXPAND xpt::diagram::commands::CreateLinkUtils::fields FOR modelFacet-»
+«EXPAND xpt::Common::generatedClassComment»
+public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
+ «EXPAND xpt::diagram::commands::CreateLinkUtils::fields FOR modelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest request, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest request, org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target) {
super(request.getLabel(), null, request);
- «EXPAND xpt::diagram::commands::CreateLinkUtils::_init FOR modelFacet-»
+ «EXPAND xpt::diagram::commands::CreateLinkUtils::_init FOR modelFacet-»
}
- «EXPAND xpt::diagram::commands::CreateLinkUtils::canCreate(self) FOR modelFacet-»
+ «EXPAND xpt::diagram::commands::CreateLinkUtils::canCreate(self) FOR modelFacet-»
- «EXPAND doExecuteWithResultMethod»
+ «EXPAND doExecuteWithResultMethod»
- «EXPAND doConfigure(self) FOR modelFacet-»
+ «EXPAND doConfigure(self) FOR modelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void setElementToEdit(org.eclipse.emf.ecore.EObject element) {
throw new UnsupportedOperationException();
}
- «EXPAND xpt::diagram::commands::CreateLinkUtils::accessors FOR modelFacet-»
-«EXPAND additions-»
+ «EXPAND xpt::diagram::commands::CreateLinkUtils::accessors FOR modelFacet-»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenLink»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenLink»«ENDDEFINE»
-«DEFINE doExecuteWithResultMethod FOR gmfgen::GenLink»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE doExecuteWithResultMethod FOR gmfgen::GenLink»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
if (!canExecute()) {
- throw new org.eclipse.core.commands.ExecutionException("Invalid arguments in create link command");«EXPAND xpt::Common::nonNLS»
+ throw new org.eclipse.core.commands.ExecutionException("Invalid arguments in create link command");«EXPAND xpt::Common::nonNLS»
}
- «EXPAND execute(self) FOR modelFacet»
+ «EXPAND execute(self) FOR modelFacet»
}
-«ENDDEFINE»
-
-«DEFINE execute(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet»«ENDDEFINE»
-
-«DEFINE execute(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet»
-«IF (if sourceMetaFeature = null then containmentMetaFeature.ecoreFeature.changeable else sourceMetaFeature.ecoreFeature.changeable endif) and targetMetaFeature.ecoreFeature.changeable-»
- «EXPAND MetaModel::NewInstance('newElement') FOR metaClass-»
- «EXPAND MetaModel::modifyFeature((if hasContainerOtherThanSource(self) then 'getContainer()' else 'getSource()' endif), containmentMetaFeature.genClass, 'newElement') FOR containmentMetaFeature-»
- «IF sourceMetaFeature <> null-»
- «EXPAND MetaModel::modifyFeature('newElement', metaClass, 'getSource()') FOR sourceMetaFeature-»
- «ENDIF-»
- «EXPAND MetaModel::modifyFeature('newElement', metaClass, 'getTarget()') FOR targetMetaFeature-»
- «IF hasExplicitChildFeature(self)-»
- «IF sourceMetaFeature <> null-»
- «EXPAND MetaModel::modifyFeature('getContainer()', containmentMetaFeature.genClass, 'newElement') FOR childMetaFeature-»
- «ELSE-»
- «EXPAND MetaModel::modifyFeature('getSource()', getSourceType(), 'newElement') FOR childMetaFeature-»
- «ENDIF-»
- «ENDIF-»
- «EXPAND initialize(link, 'newElement')-»
+«ENDDEFINE»
+
+«DEFINE execute(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet»«ENDDEFINE»
+
+«DEFINE execute(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet»
+«IF (if sourceMetaFeature = null then containmentMetaFeature.ecoreFeature.changeable else sourceMetaFeature.ecoreFeature.changeable endif) and targetMetaFeature.ecoreFeature.changeable-»
+ «EXPAND MetaModel::NewInstance('newElement') FOR metaClass-»
+ «EXPAND MetaModel::modifyFeature((if hasContainerOtherThanSource(self) then 'getContainer()' else 'getSource()' endif), containmentMetaFeature.genClass, 'newElement') FOR containmentMetaFeature-»
+ «IF sourceMetaFeature <> null-»
+ «EXPAND MetaModel::modifyFeature('newElement', metaClass, 'getSource()') FOR sourceMetaFeature-»
+ «ENDIF-»
+ «EXPAND MetaModel::modifyFeature('newElement', metaClass, 'getTarget()') FOR targetMetaFeature-»
+ «IF hasExplicitChildFeature(self)-»
+ «IF sourceMetaFeature <> null-»
+ «EXPAND MetaModel::modifyFeature('getContainer()', containmentMetaFeature.genClass, 'newElement') FOR childMetaFeature-»
+ «ELSE-»
+ «EXPAND MetaModel::modifyFeature('getSource()', getSourceType(), 'newElement') FOR childMetaFeature-»
+ «ENDIF-»
+ «ENDIF-»
+ «EXPAND initialize(link, 'newElement')-»
doConfigure(newElement, monitor, info);
- ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).setNewElement(«EXPAND MetaModel::DowncastToEObject('newElement') FOR metaClass»);
+ ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).setNewElement(«EXPAND MetaModel::DowncastToEObject('newElement') FOR metaClass»);
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(newElement);
-«ELSE-»
+«ELSE-»
throw new UnsupportedOperationException();
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE initialize(link : gmfgen::GenLink, newElementvVar : String) FOR gmfgen::TypeModelFacet»«IF modelElementInitializer <> null-»
-«link.diagram.getElementTypesQualifiedClassName()».init_«link.getUniqueIdentifier()»(«newElementvVar»);
-«ENDIF»«ENDDEFINE»
+«DEFINE initialize(link : gmfgen::GenLink, newElementvVar : String) FOR gmfgen::TypeModelFacet»«IF modelElementInitializer <> null-»
+«link.diagram.getElementTypesQualifiedClassName()».init_«link.getUniqueIdentifier()»(«newElementvVar»);
+«ENDIF»«ENDDEFINE»
-«DEFINE execute(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet»
-«IF metaFeature.ecoreFeature.changeable-»
+«DEFINE execute(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet»
+«IF metaFeature.ecoreFeature.changeable-»
if (getSource() != null && getTarget() != null) {
- «EXPAND MetaModel::modifyFeature('getSource()', getSourceType(), 'getTarget()') FOR metaFeature-»
+ «EXPAND MetaModel::modifyFeature('getSource()', getSourceType(), 'getTarget()') FOR metaFeature-»
}
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult();
-«ELSE-»
+«ELSE-»
throw new UnsupportedOperationException();
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE doConfigure(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet»«ENDDEFINE»
+«DEFINE doConfigure(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet»«ENDDEFINE»
/*
* TODO invocation of configure command should be optional, and better yet,
* configuration should rather happen from EditPolicy then from within creation command
*/
-«DEFINE doConfigure(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected void doConfigure(«EXPAND MetaModel::QualifiedClassName FOR metaClass» newElement, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
+«DEFINE doConfigure(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void doConfigure(«EXPAND MetaModel::QualifiedClassName FOR metaClass» newElement, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getElementType();
- org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest configureRequest = new org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest(getEditingDomain(), «EXPAND MetaModel::DowncastToEObject('newElement') FOR metaClass», elementType);
+ org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest configureRequest = new org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest(getEditingDomain(), «EXPAND MetaModel::DowncastToEObject('newElement') FOR metaClass», elementType);
configureRequest.setClientContext(((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
configureRequest.setParameter(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest.SOURCE, getSource());
@@ -123,4 +123,4 @@ public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.c
configureCommand.execute(monitor, info);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkUtils.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkUtils.xpt
index ae204e6ef..d3aab5aaa 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkUtils.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateLinkUtils.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,139 +10,139 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::diagram::Utils»
-«REM»
+«REM»
Check whether link may be created.
-«ENDREM»
-«DEFINE canCreate(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+«ENDREM»
+«DEFINE canCreate(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean canExecute() {
if (source == null && target == null) {
return false;
}
- if (source != null && «EXPAND MetaModel::NotInstance('source') FOR getSourceType()») {
+ if (source != null && «EXPAND MetaModel::NotInstance('source') FOR getSourceType()») {
return false;
}
- if (target != null && «EXPAND MetaModel::NotInstance('target') FOR getTargetType()») {
+ if (target != null && «EXPAND MetaModel::NotInstance('target') FOR getTargetType()») {
return false;
}
if (getSource() == null) {
return true; // link creation is in progress; source is not defined yet
}
// target may be null here but it's possible to check constraint
- «EXPAND canCreateElement(link)-»
+ «EXPAND canCreateElement(link)-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE canCreateElement(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE canCreateElement(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«DEFINE canCreateElement(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
-«IF hasContainerOtherThanSource(self)-»
+«DEFINE canCreateElement(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+«IF hasContainerOtherThanSource(self)-»
if (getContainer() == null) {
return false;
}
-«ENDIF-»
- return «EXPAND validatorInvocation FOR link»(«IF hasContainerOtherThanSource(self)»getContainer(), «ENDIF»getSource(), getTarget());
-«ENDDEFINE»
+«ENDIF-»
+ return «EXPAND validatorInvocation FOR link»(«IF hasContainerOtherThanSource(self)»getContainer(), «ENDIF»getSource(), getTarget());
+«ENDDEFINE»
-«DEFINE canCreateElement(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
- return «EXPAND validatorInvocation FOR link»(getSource(), getTarget());
-«ENDDEFINE»
+«DEFINE canCreateElement(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
+ return «EXPAND validatorInvocation FOR link»(getSource(), getTarget());
+«ENDDEFINE»
-«DEFINE validatorInvocation FOR gmfgen::GenLink-»
-«diagram.getBaseItemSemanticEditPolicyQualifiedClassName()».«diagram.getLinkCreationConstraintsClassName()».canCreate«getUniqueIdentifier()-»
-«ENDDEFINE»
+«DEFINE validatorInvocation FOR gmfgen::GenLink-»
+«diagram.getBaseItemSemanticEditPolicyQualifiedClassName()».«diagram.getLinkCreationConstraintsClassName()».canCreate«getUniqueIdentifier()-»
+«ENDDEFINE»
-«REM»
+«REM»
Fields of command that creates link.
-«ENDREM»
-«DEFINE fields FOR gmfgen::LinkModelFacet»
- «EXPAND xpt::Common::generatedMemberComment»
+«ENDREM»
+«DEFINE fields FOR gmfgen::LinkModelFacet»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject source;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject target;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE fields FOR gmfgen::TypeLinkModelFacet»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE fields FOR gmfgen::TypeLinkModelFacet»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject source;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject target;
-«IF hasContainerOtherThanSource(self)»
+«IF hasContainerOtherThanSource(self)»
- «EXPAND xpt::Common::generatedMemberComment»
- private final «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» container;
-«ENDIF-»
-«ENDDEFINE»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private final «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» container;
+«ENDIF-»
+«ENDDEFINE»
-«REM»
+«REM»
Field accessors of command that creates link.
-«ENDREM»
-«DEFINE accessors FOR gmfgen::LinkModelFacet-»
+«ENDREM»
+«DEFINE accessors FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getSource() {
- return «EXPAND MetaModel::CastEObject('source') FOR getSourceType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getSource() {
+ return «EXPAND MetaModel::CastEObject('source') FOR getSourceType()»;
}
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» getTarget() {
- return «EXPAND MetaModel::CastEObject('target') FOR getTargetType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» getTarget() {
+ return «EXPAND MetaModel::CastEObject('target') FOR getTargetType()»;
}
- «EXPAND containerAccessor-»
-«ENDDEFINE»
+ «EXPAND containerAccessor-»
+«ENDDEFINE»
-«DEFINE containerAccessor FOR gmfgen::LinkModelFacet»«ENDDEFINE»
+«DEFINE containerAccessor FOR gmfgen::LinkModelFacet»«ENDDEFINE»
-«DEFINE containerAccessor FOR gmfgen::TypeLinkModelFacet-»
-«IF hasContainerOtherThanSource(self)-»
+«DEFINE containerAccessor FOR gmfgen::TypeLinkModelFacet-»
+«IF hasContainerOtherThanSource(self)-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» getContainer() {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» getContainer() {
return container;
}
- «EXPAND xpt::Common::generatedMemberComment(
+ «EXPAND xpt::Common::generatedMemberComment(
'Default approach is to traverse ancestors of the source to find instance of container.\n' +
'Modify with appropriate logic.'
- )»
- private static «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» deduceContainer(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target) {
+ )»
+ private static «EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» deduceContainer(org.eclipse.emf.ecore.EObject source, org.eclipse.emf.ecore.EObject target) {
// Find container element for the new link.
// Climb up by containment hierarchy starting from the source
// and return the first element that is instance of the container class.
for (org.eclipse.emf.ecore.EObject element = source; element != null; element = element.eContainer()) {
- if («EXPAND MetaModel::IsInstance('element') FOR containmentMetaFeature.genClass») {
- return «EXPAND MetaModel::CastEObject('element') FOR containmentMetaFeature.genClass»;
+ if («EXPAND MetaModel::IsInstance('element') FOR containmentMetaFeature.genClass») {
+ return «EXPAND MetaModel::CastEObject('element') FOR containmentMetaFeature.genClass»;
}
}
return null;
}
-«ENDIF-»
+«ENDIF-»
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
Part of the constructor that performs initialization.
-«ENDREM»
-«DEFINE _init FOR gmfgen::LinkModelFacet-»
+«ENDREM»
+«DEFINE _init FOR gmfgen::LinkModelFacet-»
this.source = source;
this.target = target;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _init FOR gmfgen::TypeLinkModelFacet-»
+«DEFINE _init FOR gmfgen::TypeLinkModelFacet-»
this.source = source;
this.target = target;
-«IF hasContainerOtherThanSource(self)-»
+«IF hasContainerOtherThanSource(self)-»
container = deduceContainer(source, target);
-«ENDIF-»
-«ENDDEFINE» \ No newline at end of file
+«ENDIF-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateNodeCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateNodeCommand.xpt
index 61c72f676..3255cd599 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateNodeCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateNodeCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,43 +10,43 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::diagram::Utils»
-«DEFINE CreateNodeCommand FOR gmfgen::GenNode-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editCommandsPackageName»;
+«DEFINE CreateNodeCommand FOR gmfgen::GenNode-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
+«EXPAND xpt::Common::generatedClassComment»
+public class «createCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
- «EXPAND _constructor-»
+ «EXPAND _constructor-»
- «EXPAND getElementToEdit-»
+ «EXPAND getElementToEdit-»
- «EXPAND canExecuteMethod-»
+ «EXPAND canExecuteMethod-»
- «EXPAND doExecuteWithResultMethod»
+ «EXPAND doExecuteWithResultMethod»
- «EXPAND doConfigureMethod»
+ «EXPAND doConfigureMethod»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
+«DEFINE _constructor FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «createCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
super(req.getLabel(), null, req);
}
-«ENDDEFINE»
+«ENDDEFINE»
/*
* TODO: either use setElementToEdit, or generate downcasted version (which may be troublesome if containment and child features point to a different parent)
*/
-«DEFINE getElementToEdit FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment('FIXME: replace with setElementToEdit()')»
+«DEFINE getElementToEdit FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment('FIXME: replace with setElementToEdit()')»
protected org.eclipse.emf.ecore.EObject getElementToEdit() {
org.eclipse.emf.ecore.EObject container = ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getContainer();
if (container instanceof org.eclipse.gmf.runtime.notation.View) {
@@ -54,35 +54,35 @@ protected org.eclipse.emf.ecore.EObject getElementToEdit() {
}
return container;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE doExecuteWithResultMethod FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE doExecuteWithResultMethod FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
-«IF modelFacet.isPhantomElement()-»
- «EXPAND phantomElementCreation(self, 'newElement') FOR modelFacet»
-«ELSE-»
- «EXPAND normalElementCreation(self, 'newElement') FOR modelFacet»
-«ENDIF»
- «EXPAND initialize(self, 'newElement') FOR modelFacet-»
-«IF true/*FIXME boolean needsExternalConfiguration*/»
+«IF modelFacet.isPhantomElement()-»
+ «EXPAND phantomElementCreation(self, 'newElement') FOR modelFacet»
+«ELSE-»
+ «EXPAND normalElementCreation(self, 'newElement') FOR modelFacet»
+«ENDIF»
+ «EXPAND initialize(self, 'newElement') FOR modelFacet-»
+«IF true/*FIXME boolean needsExternalConfiguration*/»
doConfigure(newElement, monitor, info);
-«ENDIF»
- ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).setNewElement(«EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass»);
+«ENDIF»
+ ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).setNewElement(«EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass»);
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(newElement);
}
-«ENDDEFINE»
+«ENDDEFINE»
/*
* Unlike original CreateElementCommand, we don't keep track of IStatus from configureCommand.execute,
* nor allow status setting from doDefaultCreation. The reason is ICommandProxy#execute implementation,
* which ignores any status from wrapped ICommand. Besides, both CommandResult and IStatus seems too much to me.
*/
-«DEFINE doConfigureMethod FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected void doConfigure(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.metaClass» newElement, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
+«DEFINE doConfigureMethod FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected void doConfigure(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.metaClass» newElement, org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = ((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getElementType();
- org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest configureRequest = new org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest(getEditingDomain(), «EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass», elementType);
+ org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest configureRequest = new org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest(getEditingDomain(), «EXPAND MetaModel::DowncastToEObject('newElement') FOR modelFacet.metaClass», elementType);
configureRequest.setClientContext(((org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest) getRequest()).getClientContext());
configureRequest.addParameters(getRequest().getParameters());
org.eclipse.gmf.runtime.common.core.command.ICommand configureCommand = elementType.getEditCommand(configureRequest);
@@ -90,45 +90,45 @@ protected org.eclipse.emf.ecore.EObject getElementToEdit() {
configureCommand.execute(monitor, info);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE canExecuteMethod FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE canExecuteMethod FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean canExecute() {
-«IF modelFacet.isPhantomElement()-»
+«IF modelFacet.isPhantomElement()-»
return true;
-«ELSE-»
- «EXPAND canExecute_Normal FOR modelFacet»
-«ENDIF-»
+«ELSE-»
+ «EXPAND canExecute_Normal FOR modelFacet»
+«ENDIF-»
}
-«ENDDEFINE»
-
-«DEFINE canExecute_Normal FOR gmfgen::TypeModelFacet-»
-«IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0 or (childMetaFeature <> containmentMetaFeature and childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0)-»
- «EXPAND MetaModel::DeclareAndAssign('container', 'getElementToEdit()') FOR containmentMetaFeature.genClass-»
- «IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0-»
- «IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) = 1»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature» != null) {
- «ELSE-»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature».size() >= «containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer)») {
- «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE canExecute_Normal FOR gmfgen::TypeModelFacet-»
+«IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0 or (childMetaFeature <> containmentMetaFeature and childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0)-»
+ «EXPAND MetaModel::DeclareAndAssign('container', 'getElementToEdit()') FOR containmentMetaFeature.genClass-»
+ «IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0-»
+ «IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) = 1»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature» != null) {
+ «ELSE-»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR containmentMetaFeature».size() >= «containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer)») {
+ «ENDIF-»
return false;
}
- «ENDIF-»
- «IF childMetaFeature <> containmentMetaFeature and childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0-»
- «IF childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) = 1-»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature» != null) {
- «ELSE-»
- if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature».size() >= «childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer)») {
- «ENDIF-»
+ «ENDIF-»
+ «IF childMetaFeature <> containmentMetaFeature and childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0-»
+ «IF childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) = 1-»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature» != null) {
+ «ELSE-»
+ if («EXPAND MetaModel::getFeatureValue('container', containmentMetaFeature.genClass) FOR childMetaFeature».size() >= «childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer)») {
+ «ENDIF-»
return false;
}
- «ENDIF-»
-«ENDIF-»
+ «ENDIF-»
+«ENDIF-»
return true;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE phantomElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
+«DEFINE phantomElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
// 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();
@@ -136,26 +136,26 @@ protected org.eclipse.emf.ecore.EObject getElementToEdit() {
// return null;
// }
org.eclipse.emf.ecore.resource.Resource resource = getElementToEdit().eResource();
- «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
- resource.getContents().add(«EXPAND MetaModel::DowncastToEObject(varName) FOR metaClass»);
-«ENDDEFINE»
-
-«DEFINE normalElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
- «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
-«IF containmentMetaFeature <> null-»
- «EXPAND MetaModel::DeclareAndAssign('owner', 'getElementToEdit()') FOR containmentMetaFeature.genClass»
- «EXPAND MetaModel::modifyFeature('owner', containmentMetaFeature.genClass, varName) FOR containmentMetaFeature-»
-«ELSE-»
+ «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
+ resource.getContents().add(«EXPAND MetaModel::DowncastToEObject(varName) FOR metaClass»);
+«ENDDEFINE»
+
+«DEFINE normalElementCreation(node : gmfgen::GenNode, varName : String) FOR gmfgen::TypeModelFacet-»
+ «EXPAND MetaModel::NewInstance(varName) FOR metaClass»
+«IF containmentMetaFeature <> null-»
+ «EXPAND MetaModel::DeclareAndAssign('owner', 'getElementToEdit()') FOR containmentMetaFeature.genClass»
+ «EXPAND MetaModel::modifyFeature('owner', containmentMetaFeature.genClass, varName) FOR containmentMetaFeature-»
+«ELSE-»
//
- // FIXME no containment feature found in the genmodel, toolsmith need to manually write code here to add «varName» to a parent
+ // FIXME no containment feature found in the genmodel, toolsmith need to manually write code here to add «varName» to a parent
//
-«ENDIF»
-«IF hasExplicitChildFeature(self)-»
- «EXPAND MetaModel::DeclareAndAssign('childHolder', 'getElementToEdit()') FOR childMetaFeature.genClass»
- «EXPAND MetaModel::modifyFeature('childHolder', childMetaFeature.genClass, varName) FOR childMetaFeature»
-«ENDIF-»
-«ENDDEFINE»
-
-«DEFINE initialize(node : gmfgen::GenNode, newElementVar : String) FOR gmfgen::TypeModelFacet»«IF modelElementInitializer <> null-»
-«node.getDiagram().getElementTypesQualifiedClassName()».init_«node.getUniqueIdentifier()»(«newElementVar»);
-«ENDIF»«ENDDEFINE» \ No newline at end of file
+«ENDIF»
+«IF hasExplicitChildFeature(self)-»
+ «EXPAND MetaModel::DeclareAndAssign('childHolder', 'getElementToEdit()') FOR childMetaFeature.genClass»
+ «EXPAND MetaModel::modifyFeature('childHolder', childMetaFeature.genClass, varName) FOR childMetaFeature»
+«ENDIF-»
+«ENDDEFINE»
+
+«DEFINE initialize(node : gmfgen::GenNode, newElementVar : String) FOR gmfgen::TypeModelFacet»«IF modelElementInitializer <> null-»
+«node.getDiagram().getElementTypesQualifiedClassName()».init_«node.getUniqueIdentifier()»(«newElementVar»);
+«ENDIF»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateRefLinkCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateRefLinkCommand.xpt
index e6c6c33ee..247a3b12f 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateRefLinkCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateRefLinkCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,9 +10,9 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
/*
* TODO: remove the template, as it's no longer in use
*/
-«DEFINE CreateRefLinkCommand FOR gmfgen::GenLink»«EXPAND CreateLinkCommand::Main»«ENDDEFINE»
+«DEFINE CreateRefLinkCommand FOR gmfgen::GenLink»«EXPAND CreateLinkCommand::Main»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateShortcutDecorationsCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateShortcutDecorationsCommand.xpt
index c37e96208..fa9d86b85 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateShortcutDecorationsCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/CreateShortcutDecorationsCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,21 +10,21 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE CreateShortcutDecorationsCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «editCommandsPackageName»;
+«DEFINE CreateShortcutDecorationsCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «createShortcutDecorationsCommandClassName»
+«EXPAND xpt::Common::generatedClassComment»
+public class «createShortcutDecorationsCommandClassName»
extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.util.List myDescriptors;
- «EXPAND xpt::Common::generatedMemberComment»
- public «createShortcutDecorationsCommandClassName»(
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «createShortcutDecorationsCommandClassName»(
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
org.eclipse.gmf.runtime.notation.View parentView,
java.util.List viewDescriptors) {
@@ -32,15 +32,15 @@ public class «createShortcutDecorationsCommandClassName»
myDescriptors = viewDescriptors;
}
- «EXPAND xpt::Common::generatedMemberComment»
- public «createShortcutDecorationsCommandClassName»(
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «createShortcutDecorationsCommandClassName»(
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain,
org.eclipse.gmf.runtime.notation.View parentView,
org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor viewDescriptor) {
this(editingDomain, parentView, java.util.Collections.singletonList(viewDescriptor));
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(
org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)
throws org.eclipse.core.commands.ExecutionException {
@@ -51,10 +51,10 @@ public class «createShortcutDecorationsCommandClassName»
(org.eclipse.gmf.runtime.notation.View) nextDescriptor.getAdapter(
org.eclipse.gmf.runtime.notation.View.class);
if (view != null && view.getEAnnotation("Shortcut") == null) { //$NON-NLS-1$
- «EXPAND xpt::Common::addShortcutAnnotation('view')-»
+ «EXPAND xpt::Common::addShortcutAnnotation('view')-»
}
}
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkCommand.xpt
index 8d67c76d8..59ed1a339 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,37 +10,37 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::GenModelUtils»
-«DEFINE ReorientLinkCommand FOR gmfgen::GenLink-»
-«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
-package «diagram.editCommandsPackageName»;
+«DEFINE ReorientLinkCommand FOR gmfgen::GenLink-»
+«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
+package «diagram.editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «reorientCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
+«EXPAND xpt::Common::generatedClassComment»
+public class «reorientCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final int reorientDirection;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject oldEnd;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject newEnd;
- «EXPAND xpt::Common::generatedMemberComment»
- public «reorientCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest request) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «reorientCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest request) {
super(request.getLabel(), request.getRelationship(), request);
reorientDirection = request.getDirection();
oldEnd = request.getOldRelationshipEnd();
newEnd = request.getNewRelationshipEnd();
}
- «EXPAND xpt::diagram::commands::ReorientLinkUtils::canReorient(self) FOR modelFacet-»
- «EXPAND xpt::diagram::commands::ReorientLinkUtils::reorient FOR modelFacet-»
- «EXPAND xpt::diagram::commands::ReorientLinkUtils::accessors-»
+ «EXPAND xpt::diagram::commands::ReorientLinkUtils::canReorient(self) FOR modelFacet-»
+ «EXPAND xpt::diagram::commands::ReorientLinkUtils::reorient FOR modelFacet-»
+ «EXPAND xpt::diagram::commands::ReorientLinkUtils::accessors-»
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkUtils.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkUtils.xpt
index 36426d4af..9b106d3f5 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkUtils.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkUtils.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,87 +10,87 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::diagram::Utils»
-«REM»
+«REM»
Expands to all accessor methods for link and it's ends.
-«ENDREM»
-«DEFINE accessors FOR gmfgen::GenLink-»
- «EXPAND linkAccessor FOR modelFacet-»
- «EXPAND oldSourceAccessor FOR modelFacet-»
- «EXPAND newSourceAccessor FOR modelFacet-»
- «EXPAND oldTargetAccessor FOR modelFacet-»
- «EXPAND newTargetAccessor FOR modelFacet-»
-«ENDDEFINE»
-
-«DEFINE linkAccessor FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
-
-«DEFINE linkAccessor FOR gmfgen::TypeLinkModelFacet-»
-
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR metaClass» getLink() {
- return «EXPAND MetaModel::CastEObject('getElementToEdit()') FOR metaClass»;
+«ENDREM»
+«DEFINE accessors FOR gmfgen::GenLink-»
+ «EXPAND linkAccessor FOR modelFacet-»
+ «EXPAND oldSourceAccessor FOR modelFacet-»
+ «EXPAND newSourceAccessor FOR modelFacet-»
+ «EXPAND oldTargetAccessor FOR modelFacet-»
+ «EXPAND newTargetAccessor FOR modelFacet-»
+«ENDDEFINE»
+
+«DEFINE linkAccessor FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
+
+«DEFINE linkAccessor FOR gmfgen::TypeLinkModelFacet-»
+
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR metaClass» getLink() {
+ return «EXPAND MetaModel::CastEObject('getElementToEdit()') FOR metaClass»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE oldSourceAccessor FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE oldSourceAccessor FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«DEFINE oldSourceAccessor FOR gmfgen::TypeLinkModelFacet-»
+«DEFINE oldSourceAccessor FOR gmfgen::TypeLinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getOldSource() {
- return «EXPAND MetaModel::CastEObject('oldEnd') FOR getSourceType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getOldSource() {
+ return «EXPAND MetaModel::CastEObject('oldEnd') FOR getSourceType()»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE oldSourceAccessor FOR gmfgen::FeatureLinkModelFacet-»
+«DEFINE oldSourceAccessor FOR gmfgen::FeatureLinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getOldSource() {
- return «EXPAND MetaModel::CastEObject('referenceOwner') FOR getSourceType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getOldSource() {
+ return «EXPAND MetaModel::CastEObject('referenceOwner') FOR getSourceType()»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE newSourceAccessor FOR gmfgen::LinkModelFacet-»
+«DEFINE newSourceAccessor FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getNewSource() {
- return «EXPAND MetaModel::CastEObject('newEnd') FOR getSourceType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getSourceType()» getNewSource() {
+ return «EXPAND MetaModel::CastEObject('newEnd') FOR getSourceType()»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE oldTargetAccessor FOR gmfgen::LinkModelFacet-»
+«DEFINE oldTargetAccessor FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» getOldTarget() {
- return «EXPAND MetaModel::CastEObject('oldEnd') FOR getTargetType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» getOldTarget() {
+ return «EXPAND MetaModel::CastEObject('oldEnd') FOR getTargetType()»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE newTargetAccessor FOR gmfgen::LinkModelFacet-»
+«DEFINE newTargetAccessor FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» getNewTarget() {
- return «EXPAND MetaModel::CastEObject('newEnd') FOR getTargetType()»;
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» getNewTarget() {
+ return «EXPAND MetaModel::CastEObject('newEnd') FOR getTargetType()»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
Generates canExecute() method for the command that reorients link.
Implementation should perform all static checks that command can be executed.
-«ENDREM»
-«DEFINE canReorient(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+«ENDREM»
+«DEFINE canReorient(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public boolean canExecute() {
- «EXPAND checkLinkValidity-»
+ «EXPAND checkLinkValidity-»
if (reorientDirection == org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
@@ -100,117 +100,117 @@
return false;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean canReorientSource() {
- «EXPAND checkSourceRequestValidity(link)-»
+ «EXPAND checkSourceRequestValidity(link)-»
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean canReorientTarget() {
- «EXPAND checkTargetRequestValidity(link)-»
+ «EXPAND checkTargetRequestValidity(link)-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE checkLinkValidity FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE checkLinkValidity FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«DEFINE checkLinkValidity FOR gmfgen::TypeLinkModelFacet-»
- if («EXPAND MetaModel::NotInstance('getElementToEdit()') FOR metaClass») {
+«DEFINE checkLinkValidity FOR gmfgen::TypeLinkModelFacet-»
+ if («EXPAND MetaModel::NotInstance('getElementToEdit()') FOR metaClass») {
return false;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE checkLinkValidity FOR gmfgen::FeatureLinkModelFacet-»
- if («EXPAND MetaModel::NotInstance('referenceOwner') FOR getSourceType()») {
+«DEFINE checkLinkValidity FOR gmfgen::FeatureLinkModelFacet-»
+ if («EXPAND MetaModel::NotInstance('referenceOwner') FOR getSourceType()») {
return false;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE checkSourceRequestValidity(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE checkSourceRequestValidity(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«DEFINE checkSourceRequestValidity(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
- if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getSourceType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getSourceType()»)) {
+«DEFINE checkSourceRequestValidity(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+ if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getSourceType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getSourceType()»)) {
return false;
}
- «EXPAND extractFeatureWithCheck('getLink()', metaClass, 'target', getTargetType()) FOR targetMetaFeature-»
- «EXPAND checkLinkConstraint(link, 'getNewSource()', 'target')-»
-«ENDDEFINE»
+ «EXPAND extractFeatureWithCheck('getLink()', metaClass, 'target', getTargetType()) FOR targetMetaFeature-»
+ «EXPAND checkLinkConstraint(link, 'getNewSource()', 'target')-»
+«ENDDEFINE»
-«REM»
+«REM»
When feature source is being reoriented oldEnd is the link target.
-«ENDREM»
-«DEFINE checkSourceRequestValidity(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
- if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getTargetType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getSourceType()»)) {
+«ENDREM»
+«DEFINE checkSourceRequestValidity(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
+ if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getTargetType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getSourceType()»)) {
return false;
}
- return «EXPAND checkLinkConstraintInvocation FOR link»(getNewSource(), getOldTarget());
-«ENDDEFINE»
+ return «EXPAND checkLinkConstraintInvocation FOR link»(getNewSource(), getOldTarget());
+«ENDDEFINE»
-«DEFINE checkTargetRequestValidity(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE checkTargetRequestValidity(link : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«DEFINE checkTargetRequestValidity(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
- if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getTargetType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getTargetType()»)) {
+«DEFINE checkTargetRequestValidity(link : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+ if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getTargetType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getTargetType()»)) {
return false;
}
- «IF sourceMetaFeature <> null-»
- «EXPAND extractFeatureWithCheck('getLink()', metaClass, 'source', getSourceType()) FOR sourceMetaFeature-»
- «ELSE-»
- if (!(«EXPAND MetaModel::IsContainerInstance('getLink()', metaClass) FOR getSourceType()»)) {
+ «IF sourceMetaFeature <> null-»
+ «EXPAND extractFeatureWithCheck('getLink()', metaClass, 'source', getSourceType()) FOR sourceMetaFeature-»
+ «ELSE-»
+ if (!(«EXPAND MetaModel::IsContainerInstance('getLink()', metaClass) FOR getSourceType()»)) {
return false;
}
- «EXPAND MetaModel::DeclareAndAssignContainer('source', 'getLink()', metaClass) FOR getSourceType()»
- «ENDIF-»
- «EXPAND checkLinkConstraint(link, 'source', 'getNewTarget()')-»
-«ENDDEFINE»
+ «EXPAND MetaModel::DeclareAndAssignContainer('source', 'getLink()', metaClass) FOR getSourceType()»
+ «ENDIF-»
+ «EXPAND checkLinkConstraint(link, 'source', 'getNewTarget()')-»
+«ENDDEFINE»
-«DEFINE checkTargetRequestValidity(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
- if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getTargetType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getTargetType()»)) {
+«DEFINE checkTargetRequestValidity(link : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
+ if (!(«EXPAND MetaModel::IsInstance('oldEnd') FOR getTargetType()» && «EXPAND MetaModel::IsInstance('newEnd') FOR getTargetType()»)) {
return false;
}
- return «EXPAND checkLinkConstraintInvocation FOR link»(getOldSource(), getNewTarget());
-«ENDDEFINE»
+ return «EXPAND checkLinkConstraintInvocation FOR link»(getOldSource(), getNewTarget());
+«ENDDEFINE»
-«DEFINE extractFeatureWithCheck(containerVar : String, containerMetaClass : genmodel::GenClass, _var : String, varMetaClass : genmodel::GenClass) FOR genmodel::GenFeature-»
- «IF ecoreFeature.many-»
- if («EXPAND MetaModel::getFeatureValue(containerVar, containerMetaClass)».size() != 1) {
+«DEFINE extractFeatureWithCheck(containerVar : String, containerMetaClass : genmodel::GenClass, _var : String, varMetaClass : genmodel::GenClass) FOR genmodel::GenFeature-»
+ «IF ecoreFeature.many-»
+ if («EXPAND MetaModel::getFeatureValue(containerVar, containerMetaClass)».size() != 1) {
return false;
}
- «EXPAND MetaModel::DeclareAndAssign2(_var, containerVar, containerMetaClass, self, 'get(0)', true) FOR varMetaClass»
- «ELSE-»
- «EXPAND MetaModel::DeclareAndAssign(_var, containerVar, containerMetaClass, self) FOR varMetaClass»
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE checkLinkConstraint(link : gmfgen::GenLink, sourceVar : String, targetVar : String) FOR gmfgen::TypeLinkModelFacet-»
- «IF hasContainerOtherThanSource(self)-»
- if (!(«EXPAND MetaModel::IsContainerInstance('getLink()', metaClass) FOR containmentMetaFeature.genClass»)) {
+ «EXPAND MetaModel::DeclareAndAssign2(_var, containerVar, containerMetaClass, self, 'get(0)', true) FOR varMetaClass»
+ «ELSE-»
+ «EXPAND MetaModel::DeclareAndAssign(_var, containerVar, containerMetaClass, self) FOR varMetaClass»
+ «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE checkLinkConstraint(link : gmfgen::GenLink, sourceVar : String, targetVar : String) FOR gmfgen::TypeLinkModelFacet-»
+ «IF hasContainerOtherThanSource(self)-»
+ if (!(«EXPAND MetaModel::IsContainerInstance('getLink()', metaClass) FOR containmentMetaFeature.genClass»)) {
return false;
}
- «EXPAND MetaModel::DeclareAndAssignContainer('container', 'getLink()', metaClass) FOR containmentMetaFeature.genClass»
- return «EXPAND checkLinkConstraintInvocation FOR link»(container, «sourceVar», «targetVar»);
- «ELSE-»
- return «EXPAND checkLinkConstraintInvocation FOR link»(«sourceVar», «targetVar»);
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE checkLinkConstraintInvocation FOR gmfgen::GenLink-»
- «diagram.getBaseItemSemanticEditPolicyQualifiedClassName()».«diagram.getLinkCreationConstraintsClassName()».canExist«getUniqueIdentifier()»
-«ENDDEFINE»
-
-«REM»
+ «EXPAND MetaModel::DeclareAndAssignContainer('container', 'getLink()', metaClass) FOR containmentMetaFeature.genClass»
+ return «EXPAND checkLinkConstraintInvocation FOR link»(container, «sourceVar», «targetVar»);
+ «ELSE-»
+ return «EXPAND checkLinkConstraintInvocation FOR link»(«sourceVar», «targetVar»);
+ «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE checkLinkConstraintInvocation FOR gmfgen::GenLink-»
+ «diagram.getBaseItemSemanticEditPolicyQualifiedClassName()».«diagram.getLinkCreationConstraintsClassName()».canExist«getUniqueIdentifier()»
+«ENDDEFINE»
+
+«REM»
Generates doExecuteWithResult() method for the command that reorients link.
Implementation should throw ExecutionException if it can't execute the command.
-«ENDREM»
-«DEFINE reorient FOR gmfgen::LinkModelFacet-»
+«ENDREM»
+«DEFINE reorient FOR gmfgen::LinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(
org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info)
throws org.eclipse.core.commands.ExecutionException {
if (!canExecute()) {
- throw new org.eclipse.core.commands.ExecutionException("Invalid arguments in reorient link command"); «EXPAND xpt::Common::nonNLS»
+ throw new org.eclipse.core.commands.ExecutionException("Invalid arguments in reorient link command"); «EXPAND xpt::Common::nonNLS»
}
if (reorientDirection == org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest.REORIENT_SOURCE) {
return reorientSource();
@@ -221,82 +221,82 @@
throw new IllegalStateException();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult reorientSource() throws org.eclipse.core.commands.ExecutionException {
- «EXPAND reorientSource-»
+ «EXPAND reorientSource-»
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult reorientTarget() throws org.eclipse.core.commands.ExecutionException {
- «EXPAND reorientTarget-»
+ «EXPAND reorientTarget-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE reorientSource FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE reorientSource FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«REM»
+«REM»
Shouldn't we change link container here?
[artem] especially when there's explicit childMetaFeature and
we changed source to another, but didn't change the container. Perhaps,
makes sense to deduceContainer() using new source?
-«ENDREM»
-«DEFINE reorientSource FOR gmfgen::TypeLinkModelFacet-»
-«IF (if sourceMetaFeature = null then containmentMetaFeature.ecoreFeature.changeable else sourceMetaFeature.ecoreFeature.changeable endif)-»
-«IF sourceMetaFeature <> null-»
- «EXPAND changeTarget('getLink()', metaClass, 'getOldSource()', 'getNewSource()') FOR sourceMetaFeature-»
-«ELSE-»
- «EXPAND changeSource('getLink()', 'getOldSource()', 'getNewSource()', getSourceType()) FOR (if hasExplicitChildFeature(self) then childMetaFeature else containmentMetaFeature endif)-»
-«ENDIF-»
+«ENDREM»
+«DEFINE reorientSource FOR gmfgen::TypeLinkModelFacet-»
+«IF (if sourceMetaFeature = null then containmentMetaFeature.ecoreFeature.changeable else sourceMetaFeature.ecoreFeature.changeable endif)-»
+«IF sourceMetaFeature <> null-»
+ «EXPAND changeTarget('getLink()', metaClass, 'getOldSource()', 'getNewSource()') FOR sourceMetaFeature-»
+«ELSE-»
+ «EXPAND changeSource('getLink()', 'getOldSource()', 'getNewSource()', getSourceType()) FOR (if hasExplicitChildFeature(self) then childMetaFeature else containmentMetaFeature endif)-»
+«ENDIF-»
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(getLink());
-«ELSE-»
+«ELSE-»
throw new UnsupportedOperationException();
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«REM»
+«REM»
When feature source is being reoriented oldEnd is the link target.
-«ENDREM»
-«DEFINE reorientSource FOR gmfgen::FeatureLinkModelFacet-»
-«IF metaFeature.ecoreFeature.changeable-»
- «EXPAND changeSource('getOldTarget()', 'getOldSource()', 'getNewSource()', getSourceType()) FOR metaFeature-»
+«ENDREM»
+«DEFINE reorientSource FOR gmfgen::FeatureLinkModelFacet-»
+«IF metaFeature.ecoreFeature.changeable-»
+ «EXPAND changeSource('getOldTarget()', 'getOldSource()', 'getNewSource()', getSourceType()) FOR metaFeature-»
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(referenceOwner);
-«ELSE-»
+«ELSE-»
throw new UnsupportedOperationException();
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE reorientTarget FOR gmfgen::LinkModelFacet-»
-«ENDDEFINE»
+«DEFINE reorientTarget FOR gmfgen::LinkModelFacet-»
+«ENDDEFINE»
-«DEFINE reorientTarget FOR gmfgen::TypeLinkModelFacet-»
-«IF targetMetaFeature.ecoreFeature.changeable-»
- «EXPAND changeTarget('getLink()', metaClass, 'getOldTarget()', 'getNewTarget()') FOR targetMetaFeature-»
+«DEFINE reorientTarget FOR gmfgen::TypeLinkModelFacet-»
+«IF targetMetaFeature.ecoreFeature.changeable-»
+ «EXPAND changeTarget('getLink()', metaClass, 'getOldTarget()', 'getNewTarget()') FOR targetMetaFeature-»
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(getLink());
-«ELSE-»
+«ELSE-»
throw new UnsupportedOperationException();
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE reorientTarget FOR gmfgen::FeatureLinkModelFacet-»
-«IF metaFeature.ecoreFeature.changeable-»
- «EXPAND changeTarget('getOldSource()', getSourceType(), 'getOldTarget()', 'getNewTarget()') FOR metaFeature-»
+«DEFINE reorientTarget FOR gmfgen::FeatureLinkModelFacet-»
+«IF metaFeature.ecoreFeature.changeable-»
+ «EXPAND changeTarget('getOldSource()', getSourceType(), 'getOldTarget()', 'getNewTarget()') FOR metaFeature-»
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult(referenceOwner);
-«ELSE-»
+«ELSE-»
throw new UnsupportedOperationException();
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«REM»
+«REM»
Replace old target with the new one in the source.
-«ENDREM»
-«DEFINE changeTarget(sourceVar : String, sourceVarGenClass : genmodel::GenClass, oldTargetVar : String, newTargetVar : String) FOR genmodel::GenFeature-»
-«EXPAND MetaModel::replaceFeatureValue(sourceVar, sourceVarGenClass, oldTargetVar, newTargetVar)»
-«ENDDEFINE»
+«ENDREM»
+«DEFINE changeTarget(sourceVar : String, sourceVarGenClass : genmodel::GenClass, oldTargetVar : String, newTargetVar : String) FOR genmodel::GenFeature-»
+«EXPAND MetaModel::replaceFeatureValue(sourceVar, sourceVarGenClass, oldTargetVar, newTargetVar)»
+«ENDDEFINE»
-«REM»
+«REM»
Move target from old source to the new one.
-«ENDREM»
-«DEFINE changeSource(targetVar : String, oldSourceVar : String, newSourceVar : String, sourceVarGenClass : genmodel::GenClass) FOR genmodel::GenFeature-»
-«EXPAND MetaModel::moveFeatureValue(oldSourceVar, newSourceVar, sourceVarGenClass, targetVar)»
-«ENDDEFINE»
+«ENDREM»
+«DEFINE changeSource(targetVar : String, oldSourceVar : String, newSourceVar : String, sourceVarGenClass : genmodel::GenClass) FOR genmodel::GenFeature-»
+«EXPAND MetaModel::moveFeatureValue(oldSourceVar, newSourceVar, sourceVarGenClass, targetVar)»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkViewCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkViewCommand.xpt
index 843be526a..2d9cb0c27 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkViewCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientLinkViewCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,26 +10,26 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE ReorientLinkViewCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «editCommandsPackageName»;
+«DEFINE ReorientLinkViewCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «reorientConnectionViewCommandClassName»
+«EXPAND xpt::Common::generatedClassComment»
+public class «reorientConnectionViewCommandClassName»
extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.core.runtime.IAdaptable edgeAdaptor;
- «EXPAND xpt::Common::generatedMemberComment»
- public «reorientConnectionViewCommandClassName»(
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «reorientConnectionViewCommandClassName»(
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain, String label) {
super(editingDomain, label, null);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public java.util.List getAffectedFiles() {
org.eclipse.gmf.runtime.notation.View view =
(org.eclipse.gmf.runtime.notation.View) edgeAdaptor.getAdapter(org.eclipse.gmf.runtime.notation.View.class);
@@ -39,25 +39,25 @@ public class «reorientConnectionViewCommandClassName»
return super.getAffectedFiles();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.core.runtime.IAdaptable getEdgeAdaptor() {
return edgeAdaptor;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void setEdgeAdaptor(org.eclipse.core.runtime.IAdaptable edgeAdaptor) {
this.edgeAdaptor = edgeAdaptor;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor progressMonitor, org.eclipse.core.runtime.IAdaptable info) {
- «EXPAND xpt::Common::_assert('null != edgeAdaptor : \"Null child in ' + reorientConnectionViewCommandClassName + '\"')-»
+ «EXPAND xpt::Common::_assert('null != edgeAdaptor : \"Null child in ' + reorientConnectionViewCommandClassName + '\"')-»
org.eclipse.gmf.runtime.notation.Edge edge = (org.eclipse.gmf.runtime.notation.Edge) getEdgeAdaptor().getAdapter(org.eclipse.gmf.runtime.notation.Edge.class);
- «EXPAND xpt::Common::_assert('null != edge : \"Null edge in ' + reorientConnectionViewCommandClassName + '\"')-»
+ «EXPAND xpt::Common::_assert('null != edge : \"Null edge in ' + reorientConnectionViewCommandClassName + '\"')-»
org.eclipse.gmf.runtime.notation.View tempView = edge.getSource();
edge.setSource(edge.getTarget());
edge.setTarget(tempView);
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult();
}
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientRefLinkCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientRefLinkCommand.xpt
index 838323956..8eea2e27e 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientRefLinkCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/commands/ReorientRefLinkCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,41 +10,41 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::GenModelUtils»
-«DEFINE ReorientRefLinkCommand FOR gmfgen::GenLink-»
-«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
-package «diagram.editCommandsPackageName»;
+«DEFINE ReorientRefLinkCommand FOR gmfgen::GenLink-»
+«EXPAND xpt::Common::copyright FOR diagram.editorGen-»
+package «diagram.editCommandsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «reorientCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
+«EXPAND xpt::Common::generatedClassComment»
+public class «reorientCommandClassName» extends org.eclipse.gmf.runtime.emf.type.core.commands.EditElementCommand {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final int reorientDirection;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject referenceOwner;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject oldEnd;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.emf.ecore.EObject newEnd;
- «EXPAND xpt::Common::generatedMemberComment»
- public «reorientCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest request) {
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «reorientCommandClassName»(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest request) {
super(request.getLabel(), null, request);
reorientDirection = request.getDirection();
referenceOwner = request.getReferenceOwner();
oldEnd = request.getOldRelationshipEnd();
newEnd = request.getNewRelationshipEnd();
}
- «EXPAND xpt::diagram::commands::ReorientLinkUtils::canReorient(self) FOR modelFacet-»
- «EXPAND xpt::diagram::commands::ReorientLinkUtils::reorient FOR modelFacet-»
- «EXPAND xpt::diagram::commands::ReorientLinkUtils::accessors-»
+ «EXPAND xpt::diagram::commands::ReorientLinkUtils::canReorient(self) FOR modelFacet-»
+ «EXPAND xpt::diagram::commands::ReorientLinkUtils::reorient FOR modelFacet-»
+ «EXPAND xpt::diagram::commands::ReorientLinkUtils::accessors-»
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/BaseEditHelper.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/BaseEditHelper.xpt
index 06da9d382..d12ff14ec 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/BaseEditHelper.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/BaseEditHelper.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,25 +10,25 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE BaseEditHelper FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «editHelpersPackageName»;
+«DEFINE BaseEditHelper FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editHelpersPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «baseEditHelperClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper {
+«EXPAND xpt::Common::generatedClassComment»
+public class «baseEditHelperClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND getEditHelperAdvice-»
+ «EXPAND getEditHelperAdvice-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getInsteadCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
org.eclipse.gmf.runtime.common.core.command.ICommand epCommand =
- (org.eclipse.gmf.runtime.common.core.command.ICommand) req.getParameter(«EXPAND editPolicyCommand»);
- req.setParameter(«EXPAND editPolicyCommand», null);
+ (org.eclipse.gmf.runtime.common.core.command.ICommand) req.getParameter(«EXPAND editPolicyCommand»);
+ req.setParameter(«EXPAND editPolicyCommand», null);
org.eclipse.gmf.runtime.common.core.command.ICommand ehCommand = super.getInsteadCommand(req);
if (epCommand == null) {
return ehCommand;
@@ -43,57 +43,57 @@ public class «baseEditHelperClassName» extends org.eclipse.gmf.runtime.emf.type.
return command;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
return null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getCreateRelationshipCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
return null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyElementCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
return null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.ICommand getDestroyReferenceCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req) {
return null;
}
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- public static final String «EXPAND editPolicyCommand» = "edit policy command"; //$NON-NLS-1$
+«DEFINE attributes FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final String «EXPAND editPolicyCommand» = "edit policy command"; //$NON-NLS-1$
- «EXPAND xpt::Common::generatedMemberComment»
- public static final String «EXPAND contextElementType» = "context element type"; //$NON-NLS-1$
-«ENDDEFINE»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final String «EXPAND contextElementType» = "context element type"; //$NON-NLS-1$
+«ENDDEFINE»
-«DEFINE editPolicyCommand FOR gmfgen::GenDiagram»EDIT_POLICY_COMMAND«ENDDEFINE»
+«DEFINE editPolicyCommand FOR gmfgen::GenDiagram»EDIT_POLICY_COMMAND«ENDDEFINE»
-«DEFINE contextElementType FOR gmfgen::GenDiagram»CONTEXT_ELEMENT_TYPE«ENDDEFINE»
+«DEFINE contextElementType FOR gmfgen::GenDiagram»CONTEXT_ELEMENT_TYPE«ENDDEFINE»
-«DEFINE editPolicyCommandConstant FOR gmfgen::GenDiagram»«getBaseEditHelperQualifiedClassName()».«EXPAND editPolicyCommand»«ENDDEFINE»
+«DEFINE editPolicyCommandConstant FOR gmfgen::GenDiagram»«getBaseEditHelperQualifiedClassName()».«EXPAND editPolicyCommand»«ENDDEFINE»
-«DEFINE contextElementTypeConstant FOR gmfgen::GenDiagram»«getBaseEditHelperQualifiedClassName()».«EXPAND contextElementType»«ENDDEFINE»
+«DEFINE contextElementTypeConstant FOR gmfgen::GenDiagram»«getBaseEditHelperQualifiedClassName()».«EXPAND contextElementType»«ENDDEFINE»
-«DEFINE getEditHelperAdvice FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getEditHelperAdvice FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice[] getEditHelperAdvice(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
- if (req.getParameter(«EXPAND contextElementType») instanceof org.eclipse.gmf.runtime.emf.type.core.IElementType) {
- return org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry.getInstance().getEditHelperAdvice((org.eclipse.gmf.runtime.emf.type.core.IElementType) req.getParameter(«EXPAND contextElementType»));
+ if (req.getParameter(«EXPAND contextElementType») instanceof org.eclipse.gmf.runtime.emf.type.core.IElementType) {
+ return org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry.getInstance().getEditHelperAdvice((org.eclipse.gmf.runtime.emf.type.core.IElementType) req.getParameter(«EXPAND contextElementType»));
}
return super.getEditHelperAdvice(req);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelper.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelper.xpt
index 948d5b677..ba2d7ca73 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelper.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelper.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,16 +10,16 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE EditHelper FOR gmfgen::MetamodelType-»
-«EXPAND xpt::Common::copyright FOR diagramElement.getDiagram().editorGen-»
-package «diagramElement.getDiagram().editHelpersPackageName»;
+«DEFINE EditHelper FOR gmfgen::MetamodelType-»
+«EXPAND xpt::Common::copyright FOR diagramElement.getDiagram().editorGen-»
+package «diagramElement.getDiagram().editHelpersPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editHelperClassName» extends «diagramElement.getDiagram().getBaseEditHelperQualifiedClassName()» {
- «EXPAND additions-»
+«EXPAND xpt::Common::generatedClassComment»
+public class «editHelperClassName» extends «diagramElement.getDiagram().getBaseEditHelperQualifiedClassName()» {
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::MetamodelType»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::MetamodelType»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelperAdvice.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelperAdvice.xpt
index 82c0cc541..6313d3d08 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelperAdvice.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/edithelpers/EditHelperAdvice.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,16 +10,16 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE EditHelperAdvice FOR gmfgen::SpecializationType-»
-«EXPAND xpt::Common::copyright FOR diagramElement.getDiagram().editorGen-»
-package «diagramElement.getDiagram().editHelpersPackageName»;
+«DEFINE EditHelperAdvice FOR gmfgen::SpecializationType-»
+«EXPAND xpt::Common::copyright FOR diagramElement.getDiagram().editorGen-»
+package «diagramElement.getDiagram().editHelpersPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editHelperAdviceClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice {
- «EXPAND additions-»
+«EXPAND xpt::Common::generatedClassComment»
+public class «editHelperAdviceClassName» extends org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice {
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::SpecializationType»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::SpecializationType»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
index b761e84ee..5f2aec5ab 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/Common.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,106 +10,106 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::StringOperations»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::StringOperations»
-«DEFINE visualIDConstant FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
- public static final int VISUAL_ID = «visualID»;
-«ENDDEFINE»
+«DEFINE visualIDConstant FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static final int VISUAL_ID = «visualID»;
+«ENDDEFINE»
-«DEFINE behaviour FOR gmfgen::GenCommonBase-»
- «EXPAND behaviour FOREACH behaviour-»
-«ENDDEFINE»
+«DEFINE behaviour FOR gmfgen::GenCommonBase-»
+ «EXPAND behaviour FOREACH behaviour-»
+«ENDDEFINE»
-«DEFINE behaviour FOR gmfgen::Behaviour-»
-«ENDDEFINE»
+«DEFINE behaviour FOR gmfgen::Behaviour-»
+«ENDDEFINE»
-«DEFINE behaviour FOR gmfgen::CustomBehaviour-»
-«IF editPolicyQualifiedClassName = null or editPolicyQualifiedClassName.trim().xpandLength() = 0-»
- removeEditPolicy(«key»); «IF key.xpandStartsWith('\"') and key.xpandEndsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
-«ELSE-»
- installEditPolicy(«key», new «getEditPolicyQualifiedClassName()»()); «IF key.xpandStartsWith('\"') and key.xpandEndsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
-«ENDIF-»
-«ENDDEFINE»
+«DEFINE behaviour FOR gmfgen::CustomBehaviour-»
+«IF editPolicyQualifiedClassName = null or editPolicyQualifiedClassName.trim().xpandLength() = 0-»
+ removeEditPolicy(«key»); «IF key.xpandStartsWith('\"') and key.xpandEndsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
+«ELSE-»
+ installEditPolicy(«key», new «getEditPolicyQualifiedClassName()»()); «IF key.xpandStartsWith('\"') and key.xpandEndsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE behaviour FOR gmfgen::OpenDiagramBehaviour-»
+«DEFINE behaviour FOR gmfgen::OpenDiagramBehaviour-»
installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.OPEN_ROLE,
- new «getEditPolicyQualifiedClassName()»());
-«ENDDEFINE»
+ new «getEditPolicyQualifiedClassName()»());
+«ENDDEFINE»
-«DEFINE labelFigure FOR gmfgen::ParentAssignedViewmap-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE labelFigure FOR gmfgen::ParentAssignedViewmap-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createFigure() {
- // Parent should assign one using «EXPAND impl::diagram::editparts::TextAware::labelSetterName»() method
+ // Parent should assign one using «EXPAND impl::diagram::editparts::TextAware::labelSetterName»() method
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE labelFigure FOR gmfgen::Viewmap-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE labelFigure FOR gmfgen::Viewmap-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createFigure() {
org.eclipse.draw2d.IFigure label = createFigurePrim();
defaultText = getLabelTextHelper(label);
return label;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createFigurePrim() {
- «EXPAND labelFigurePrim FOR self-»
-«ENDDEFINE»
+ «EXPAND labelFigurePrim FOR self-»
+«ENDDEFINE»
-«DEFINE labelFigurePrim FOR gmfgen::FigureViewmap-»
-«IF figureQualifiedClassName = null-»
+«DEFINE labelFigurePrim FOR gmfgen::FigureViewmap-»
+«IF figureQualifiedClassName = null-»
return new org.eclipse.draw2d.Label();
-«ELSE-»
- return new «figureQualifiedClassName»();
-«ENDIF-»
+«ELSE-»
+ return new «figureQualifiedClassName»();
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE labelFigurePrim FOR gmfgen::SnippetViewmap-»
- return «body»;
+«DEFINE labelFigurePrim FOR gmfgen::SnippetViewmap-»
+ return «body»;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE labelFigurePrim FOR gmfgen::InnerClassViewmap-»
- return new «className»();
+«DEFINE labelFigurePrim FOR gmfgen::InnerClassViewmap-»
+ return new «className»();
}
- «classBody»
-«ENDDEFINE»
+ «classBody»
+«ENDDEFINE»
-«DEFINE labelFigurePrim FOR gmfgen::Viewmap-»
- «ERROR 'Unknown viewmap: ' + self.repr()-»
+«DEFINE labelFigurePrim FOR gmfgen::Viewmap-»
+ «ERROR 'Unknown viewmap: ' + self.repr()-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE notationalListeners FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE notationalListeners FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void addNotationalListeners() {
super.addNotationalListeners();
- addListenerFilter("PrimaryView", this, getPrimaryView()); «EXPAND xpt::Common::nonNLS»
+ addListenerFilter("PrimaryView", this, getPrimaryView()); «EXPAND xpt::Common::nonNLS»
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void removeNotationalListeners() {
super.removeNotationalListeners();
- removeListenerFilter("PrimaryView"); «EXPAND xpt::Common::nonNLS»
+ removeListenerFilter("PrimaryView"); «EXPAND xpt::Common::nonNLS»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleBounds FOR gmfgen::GenCommonBase-»
+«DEFINE handleBounds FOR gmfgen::GenCommonBase-»
if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Width().equals(feature) ||
org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getSize_Height().equals(feature) ||
org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_X().equals(feature) ||
org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getLocation_Y().equals(feature)) {
refreshBounds();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE handleText FOR gmfgen::GenCommonBase-»
+«DEFINE handleText FOR gmfgen::GenCommonBase-»
if (org.eclipse.gmf.runtime.notation.NotationPackage.eINSTANCE.getFontStyle_FontColor().equals(feature)) {
Integer c = (Integer) event.getNewValue();
setFontColor(org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramColorRegistry.getInstance().getColor(c));
@@ -138,18 +138,18 @@
}
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE installSemanticEditPolicy FOR gmfgen::GenCommonBase-»
- «IF sansDomain-»
+«DEFINE installSemanticEditPolicy FOR gmfgen::GenCommonBase-»
+ «IF sansDomain-»
removeEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE);
- «ELSE-»
-installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE, new «getItemSemanticEditPolicyQualifiedClassName()»());
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE installCanonicalEditPolicy FOR gmfgen::GenContainerBase-»
- «IF needsCanonicalEditPolicy()-»
-installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new «getCanonicalEditPolicyQualifiedClassName()»());
- «ENDIF-»
-«ENDDEFINE» \ No newline at end of file
+ «ELSE-»
+installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.SEMANTIC_ROLE, new «getItemSemanticEditPolicyQualifiedClassName()»());
+ «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE installCanonicalEditPolicy FOR gmfgen::GenContainerBase-»
+ «IF needsCanonicalEditPolicy()-»
+installEditPolicy(org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles.CANONICAL_ROLE, new «getCanonicalEditPolicyQualifiedClassName()»());
+ «ENDIF-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/EditPartFactory.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/EditPartFactory.xpt
index e258445f3..c2e26fd47 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/EditPartFactory.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editparts/EditPartFactory.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,43 +10,43 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE EditPartFactory FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «editPartsPackageName»;
+«DEFINE EditPartFactory FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «editPartsPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPartFactoryClassName» implements org.eclipse.gef.EditPartFactory {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPartFactoryClassName» implements org.eclipse.gef.EditPartFactory {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gef.EditPart createEditPart(org.eclipse.gef.EditPart context, Object model) {
if (model instanceof org.eclipse.gmf.runtime.notation.View) {
org.eclipse.gmf.runtime.notation.View view = (org.eclipse.gmf.runtime.notation.View) model;
- switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(view)) {
- «EXPAND createEditPart FOR self-»
- «FOREACH getAllNodes()->asSequence() AS node-»
- «EXPAND createEditPart FOR node-»
- «EXPAND createEditPart FOREACH node.labels-»
- «ENDFOREACH-»
- «EXPAND createEditPart FOREACH compartments-»
- «FOREACH links->asSequence() AS link-»
- «EXPAND createEditPart FOR link-»
- «EXPAND createEditPart FOREACH link.labels»
- «ENDFOREACH-»
+ switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(view)) {
+ «EXPAND createEditPart FOR self-»
+ «FOREACH getAllNodes()->asSequence() AS node-»
+ «EXPAND createEditPart FOR node-»
+ «EXPAND createEditPart FOREACH node.labels-»
+ «ENDFOREACH-»
+ «EXPAND createEditPart FOREACH compartments-»
+ «FOREACH links->asSequence() AS link-»
+ «EXPAND createEditPart FOR link-»
+ «EXPAND createEditPart FOREACH link.labels»
+ «ENDFOREACH-»
}
}
return createUnrecognizedEditPart(context, model);
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gef.EditPart createUnrecognizedEditPart(org.eclipse.gef.EditPart context, Object model) {
// Handle creation of unrecognized child node EditParts here
return null;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public static org.eclipse.gef.tools.CellEditorLocator getTextCellEditorLocator(
org.eclipse.gmf.runtime.diagram.ui.editparts.ITextAwareEditPart source) {
if (source.getFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel)
@@ -56,23 +56,23 @@ public class «editPartFactoryClassName» implements org.eclipse.gef.EditPartFacto
}
}
- «EXPAND xpt::Common::generatedClassComment»
+ «EXPAND xpt::Common::generatedClassComment»
static private class TextCellEditorLocator implements org.eclipse.gef.tools.CellEditorLocator {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel wrapLabel;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public TextCellEditorLocator(org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel wrapLabel) {
this.wrapLabel = wrapLabel;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel getWrapLabel() {
return wrapLabel;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void relocate(org.eclipse.jface.viewers.CellEditor celleditor) {
org.eclipse.swt.widgets.Text text = (org.eclipse.swt.widgets.Text) celleditor.getControl();
org.eclipse.draw2d.geometry.Rectangle rect = getWrapLabel().getTextBounds().getCopy();
@@ -91,23 +91,23 @@ public class «editPartFactoryClassName» implements org.eclipse.gef.EditPartFacto
}
}
- «EXPAND xpt::Common::generatedClassComment»
+ «EXPAND xpt::Common::generatedClassComment»
private static class LabelCellEditorLocator implements org.eclipse.gef.tools.CellEditorLocator {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.Label label;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public LabelCellEditorLocator(org.eclipse.draw2d.Label label) {
this.label = label;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public org.eclipse.draw2d.Label getLabel() {
return label;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void relocate(org.eclipse.jface.viewers.CellEditor celleditor) {
org.eclipse.swt.widgets.Text text = (org.eclipse.swt.widgets.Text) celleditor.getControl();
org.eclipse.draw2d.geometry.Rectangle rect = getLabel().getTextBounds().getCopy();
@@ -121,9 +121,9 @@ public class «editPartFactoryClassName» implements org.eclipse.gef.EditPartFacto
}
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE createEditPart FOR gmfgen::GenCommonBase»
- «EXPAND xpt::Common::caseVisualID»
- return new «getEditPartQualifiedClassName()»(view);
-«ENDDEFINE»
+«DEFINE createEditPart FOR gmfgen::GenCommonBase»
+ «EXPAND xpt::Common::caseVisualID»
+ return new «getEditPartQualifiedClassName()»(view);
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
index 638b04f35..7499274e8 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,143 +10,143 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«EXTENSION xpt::diagram::editpolicies::Utils»
-«EXTENSION xpt::diagram::Utils»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::expressions::ValueExpression»
-«EXTENSION xpt::StringOperations»
+«EXTENSION xpt::diagram::editpolicies::Utils»
+«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::expressions::ValueExpression»
+«EXTENSION xpt::StringOperations»
-«DEFINE BaseItemSemanticEditPolicy FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «getDiagram().editPoliciesPackageName»;
+«DEFINE BaseItemSemanticEditPolicy FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «getDiagram().editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «baseItemSemanticEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy {
+«EXPAND xpt::Common::generatedClassComment»
+public class «baseItemSemanticEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.SemanticEditPolicy {
- «EXPAND attributes-»
+ «EXPAND attributes-»
- «EXPAND _constructor-»
+ «EXPAND _constructor-»
- «EXPAND xpt::Common::generatedMemberComment(
+ «EXPAND xpt::Common::generatedMemberComment(
'Extended request data key to hold editpart visual id.\n' +
'Add visual id of edited editpart to extended data of the request\n' +
'so command switch can decide what kind of diagram element is being edited.\n' +
'It is done in those cases when it\'s not possible to deduce diagram\n' +
'element kind from domain element.\n'
- )»
+ )»
public org.eclipse.gef.commands.Command getCommand(org.eclipse.gef.Request request) {
if (request instanceof org.eclipse.gef.requests.ReconnectRequest) {
Object view = ((org.eclipse.gef.requests.ReconnectRequest) request).getConnectionEditPart().getModel();
if (view instanceof org.eclipse.gmf.runtime.notation.View) {
- Integer id = new Integer(«EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»((org.eclipse.gmf.runtime.notation.View) view));
+ Integer id = new Integer(«EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»((org.eclipse.gmf.runtime.notation.View) view));
request.getExtendedData().put(VISUAL_ID_KEY, id);
}
}
return super.getCommand(request);
}
- «EXPAND xpt::Common::generatedMemberComment('Returns visual id from request parameters.')»
+ «EXPAND xpt::Common::generatedMemberComment('Returns visual id from request parameters.')»
protected int getVisualID(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request) {
Object id = request.getParameter(VISUAL_ID_KEY);
return id instanceof Integer ? ((Integer) id).intValue() : -1;
}
- «EXPAND semanticPart-»
+ «EXPAND semanticPart-»
- «EXPAND xpt::Common::generatedMemberComment('Returns editing domain from the host edit part.')»
+ «EXPAND xpt::Common::generatedMemberComment('Returns editing domain from the host edit part.')»
protected org.eclipse.emf.transaction.TransactionalEditingDomain getEditingDomain() {
return ((org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) getHost()).getEditingDomain();
}
- «EXPAND addDestroyShortcutsCommand-»
+ «EXPAND addDestroyShortcutsCommand-»
- «EXPAND linkConstraints-»
+ «EXPAND linkConstraints-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE attributes FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment('Extended request data key to hold editpart visual id.')»
- public static final String VISUAL_ID_KEY = "visual_id"; «EXPAND xpt::Common::nonNLS»
+«DEFINE attributes FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment('Extended request data key to hold editpart visual id.')»
+ public static final String VISUAL_ID_KEY = "visual_id"; «EXPAND xpt::Common::nonNLS»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.gmf.runtime.emf.type.core.IElementType myElementType;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
- protected «baseItemSemanticEditPolicyClassName»(org.eclipse.gmf.runtime.emf.type.core.IElementType elementType) {
+«DEFINE _constructor FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ protected «baseItemSemanticEditPolicyClassName»(org.eclipse.gmf.runtime.emf.type.core.IElementType elementType) {
myElementType = elementType;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addDestroyShortcutsCommand FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment('Clean all shortcuts to the host element from the same diagram')»
+«DEFINE addDestroyShortcutsCommand FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment('Clean all shortcuts to the host element from the same diagram')»
protected void addDestroyShortcutsCommand(org.eclipse.gmf.runtime.common.core.command.ICompositeCommand cmd, org.eclipse.gmf.runtime.notation.View view) {
- «EXPAND xpt::Common::_assert('view.getEAnnotation(\"Shortcut\") == null')-»
+ «EXPAND xpt::Common::_assert('view.getEAnnotation(\"Shortcut\") == null')-»
for (java.util.Iterator it = view.getDiagram().getChildren().iterator(); it.hasNext();) {
org.eclipse.gmf.runtime.notation.View nextView = (org.eclipse.gmf.runtime.notation.View) it.next();
- if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) {«EXPAND xpt::Common::nonNLS»
+ if (nextView.getEAnnotation("Shortcut") == null || !nextView.isSetElement() || nextView.getElement() != view.getElement()) {«EXPAND xpt::Common::nonNLS»
continue;
}
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), nextView));
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE semanticPart FOR gmfgen::GenDiagram-»
- «EXPAND getSemanticCommand-»
+«DEFINE semanticPart FOR gmfgen::GenDiagram-»
+ «EXPAND getSemanticCommand-»
- «EXPAND addDeleteViewCommand-»
+ «EXPAND addDeleteViewCommand-»
- «EXPAND getEditHelperCommand-»
+ «EXPAND getEditHelperCommand-»
- «EXPAND getContextElementType-»
+ «EXPAND getContextElementType-»
- «EXPAND getSemanticCommandSwitch-»
+ «EXPAND getSemanticCommandSwitch-»
- «EXPAND getConfigureCommand-»
+ «EXPAND getConfigureCommand-»
- «EXPAND getCreateRelationshipCommand-»
+ «EXPAND getCreateRelationshipCommand-»
- «EXPAND getCreateCommand-»
+ «EXPAND getCreateCommand-»
- «EXPAND getSetCommand-»
+ «EXPAND getSetCommand-»
- «EXPAND getEditContextCommand-»
+ «EXPAND getEditContextCommand-»
- «EXPAND getDestroyElementCommand-»
+ «EXPAND getDestroyElementCommand-»
- «EXPAND getDestroyReferenceCommand-»
+ «EXPAND getDestroyReferenceCommand-»
- «EXPAND getDuplicateCommand-»
+ «EXPAND getDuplicateCommand-»
- «EXPAND getMoveCommand-»
+ «EXPAND getMoveCommand-»
- «EXPAND getReorientReferenceRelationshipCommand-»
+ «EXPAND getReorientReferenceRelationshipCommand-»
- «EXPAND getReorientRelationshipCommand-»
+ «EXPAND getReorientRelationshipCommand-»
- «EXPAND getGEFWrapper-»
-«ENDDEFINE»
+ «EXPAND getGEFWrapper-»
+«ENDDEFINE»
-«DEFINE getEditHelperCommand FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getEditHelperCommand FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gef.commands.Command getEditHelperCommand(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request, org.eclipse.gef.commands.Command editPolicyCommand) {
if (editPolicyCommand != null) {
org.eclipse.gmf.runtime.common.core.command.ICommand command = editPolicyCommand instanceof org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy ? ((org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy) editPolicyCommand).getICommand() : new org.eclipse.gmf.runtime.diagram.ui.commands.CommandProxy(editPolicyCommand);
- request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::editPolicyCommandConstant», command);
+ request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::editPolicyCommandConstant», command);
}
org.eclipse.gmf.runtime.emf.type.core.IElementType requestContextElementType = getContextElementType(request);
- request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::contextElementTypeConstant», requestContextElementType);
+ request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::contextElementTypeConstant», requestContextElementType);
org.eclipse.gmf.runtime.common.core.command.ICommand command = requestContextElementType.getEditCommand(request);
- request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::editPolicyCommandConstant», null);
- request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::contextElementTypeConstant», null);
+ request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::editPolicyCommandConstant», null);
+ request.setParameter(«EXPAND xpt::diagram::edithelpers::BaseEditHelper::contextElementTypeConstant», null);
if (command != null) {
if (!(command instanceof org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand)) {
command = new org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand(getEditingDomain(), command.getLabel()).compose(command);
@@ -155,18 +155,18 @@ public class «baseItemSemanticEditPolicyClassName» extends org.eclipse.gmf.runti
}
return editPolicyCommand;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getContextElementType FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getContextElementType FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gmf.runtime.emf.type.core.IElementType getContextElementType(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request) {
- org.eclipse.gmf.runtime.emf.type.core.IElementType requestContextElementType = «getElementTypesQualifiedClassName()».getElementType(getVisualID(request));
+ org.eclipse.gmf.runtime.emf.type.core.IElementType requestContextElementType = «getElementTypesQualifiedClassName()».getElementType(getVisualID(request));
return requestContextElementType != null ? requestContextElementType : myElementType;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getSemanticCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getSemanticCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getSemanticCommand(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest request) {
org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest completedRequest = completeRequest(request);
org.eclipse.gef.commands.Command semanticCommand = getSemanticCommandSwitch(completedRequest);
@@ -177,18 +177,18 @@ protected org.eclipse.gef.commands.Command getSemanticCommand(org.eclipse.gmf.ru
}
return semanticCommand;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addDeleteViewCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE addDeleteViewCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command addDeleteViewCommand(org.eclipse.gef.commands.Command mainCommand, org.eclipse.gmf.runtime.emf.type.core.requests.DestroyRequest completedRequest){
org.eclipse.gef.commands.Command deleteViewCommand = getGEFWrapper(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), (org.eclipse.gmf.runtime.notation.View) getHost().getModel()));
return mainCommand == null ? deleteViewCommand : mainCommand.chain(deleteViewCommand);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getSemanticCommandSwitch FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getSemanticCommandSwitch FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getSemanticCommandSwitch(org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest req) {
if (req instanceof org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest) {
return getCreateRelationshipCommand((org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest) req);
@@ -215,282 +215,282 @@ protected org.eclipse.gef.commands.Command getSemanticCommandSwitch(org.eclipse.
}
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getConfigureCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getConfigureCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getCreateRelationshipCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getCreateRelationshipCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getCreateRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getCreateCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getCreateCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getSetCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getSetCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getSetCommand(org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getEditContextCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getEditContextCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getEditContextCommand(org.eclipse.gmf.runtime.emf.type.core.requests.GetEditContextRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDestroyElementCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDestroyElementCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDestroyReferenceCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDestroyReferenceCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDestroyReferenceCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDuplicateCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDuplicateCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDuplicateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getMoveCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getMoveCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getMoveCommand(org.eclipse.gmf.runtime.emf.type.core.requests.MoveRequest req) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getReorientReferenceRelationshipCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getReorientReferenceRelationshipCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getReorientReferenceRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest req) {
return org.eclipse.gef.commands.UnexecutableCommand.INSTANCE;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getReorientRelationshipCommand FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getReorientRelationshipCommand FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getReorientRelationshipCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest req) {
return org.eclipse.gef.commands.UnexecutableCommand.INSTANCE;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getGEFWrapper FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getGEFWrapper FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected final org.eclipse.gef.commands.Command getGEFWrapper(org.eclipse.gmf.runtime.common.core.command.ICommand cmd) {
return new org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy(cmd);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
FIXME need to check constraint's provider to ensure we don't generate a field
for e.g. Java (or Literal, which is unlikely, though) expressions
-«ENDREM»
-«DEFINE linkConstraints FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::generatedClassComment»
-public static class «getLinkCreationConstraintsClassName()» {
-
-«IF null <> editorGen.expressionProviders-»
- «EXPAND xpt::Common::generatedMemberComment»
- private static final String OPPOSITE_END_VAR = "oppositeEnd"; «EXPAND xpt::Common::nonNLS»
-
-«FOREACH getValidLinkConstraints(self) AS lc-»
-«IF lc.sourceEnd <> null-»
- «EXPAND xpt::Common::generatedMemberComment»
- private static «editorGen.expressionProviders.getAbstractExpressionQualifiedClassName()» «sourceConstraintFieldName(lc.link)»;
-«ENDIF-»
-«IF lc.targetEnd <> null-»
- «EXPAND xpt::Common::generatedMemberComment»
- private static «editorGen.expressionProviders.getAbstractExpressionQualifiedClassName()» «targetConstraintFieldName(lc.link)»;
-«ENDIF-»
-«ENDFOREACH»
-«ENDIF-»
-
- «EXPAND canCreate FOREACH links-»
- «EXPAND canExist FOREACH links-»
+«ENDREM»
+«DEFINE linkConstraints FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::generatedClassComment»
+public static class «getLinkCreationConstraintsClassName()» {
+
+«IF null <> editorGen.expressionProviders-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private static final String OPPOSITE_END_VAR = "oppositeEnd"; «EXPAND xpt::Common::nonNLS»
+
+«FOREACH getValidLinkConstraints(self) AS lc-»
+«IF lc.sourceEnd <> null-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private static «editorGen.expressionProviders.getAbstractExpressionQualifiedClassName()» «sourceConstraintFieldName(lc.link)»;
+«ENDIF-»
+«IF lc.targetEnd <> null-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ private static «editorGen.expressionProviders.getAbstractExpressionQualifiedClassName()» «targetConstraintFieldName(lc.link)»;
+«ENDIF-»
+«ENDFOREACH»
+«ENDIF-»
+
+ «EXPAND canCreate FOREACH links-»
+ «EXPAND canExist FOREACH links-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE canCreate FOR gmfgen::GenLink»
+«DEFINE canCreate FOR gmfgen::GenLink»
-«EXPAND xpt::Common::generatedMemberComment»
-public static boolean canCreate«getUniqueIdentifier()»(«EXPAND canCreateParameters FOR modelFacet») {
- «EXPAND checkEMFConstraints FOR modelFacet-»
- return canExist«getUniqueIdentifier()»(«EXPAND canCreateValues FOR modelFacet»);
+«EXPAND xpt::Common::generatedMemberComment»
+public static boolean canCreate«getUniqueIdentifier()»(«EXPAND canCreateParameters FOR modelFacet») {
+ «EXPAND checkEMFConstraints FOR modelFacet-»
+ return canExist«getUniqueIdentifier()»(«EXPAND canCreateValues FOR modelFacet»);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
XXX for now, both constraints are injected into single method
which may nob be suitable for modification especially when mixing
java and ocl constraints (former requires manual code).
Better approach would be:
if either is non-null and providers are not the same - introduce two methods,
to check source and target separately. Otherwize, do it inplace.
-«ENDREM»
-«DEFINE canExist FOR gmfgen::GenLink»
+«ENDREM»
+«DEFINE canExist FOR gmfgen::GenLink»
- «EXPAND xpt::Common::generatedMemberComment»
- public static boolean canExist«getUniqueIdentifier()»(«EXPAND canCreateParameters FOR modelFacet») {
-«IF creationConstraints <> null and (creationConstraints.isValid() and null <> getDiagram().editorGen.expressionProviders)-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public static boolean canExist«getUniqueIdentifier()»(«EXPAND canCreateParameters FOR modelFacet») {
+«IF creationConstraints <> null and (creationConstraints.isValid() and null <> getDiagram().editorGen.expressionProviders)-»
try {
-«IF null <> creationConstraints.sourceEnd-»
- «EXPAND checkAdditionalConstraint(creationConstraints.sourceEnd, sourceConstraintFieldName(self), 'source', 'target', creationConstraints.getSourceEndContextClass(), creationConstraints.getTargetEndContextClass()) FOR creationConstraints.sourceEnd.provider-»
-«ENDIF-»
-«IF null <> creationConstraints.targetEnd-»
- «EXPAND checkAdditionalConstraint(creationConstraints.targetEnd, targetConstraintFieldName(self), 'target', 'source', creationConstraints.getTargetEndContextClass(), creationConstraints.getSourceEndContextClass()) FOR creationConstraints.targetEnd.provider-»
-«ENDIF-»
+«IF null <> creationConstraints.sourceEnd-»
+ «EXPAND checkAdditionalConstraint(creationConstraints.sourceEnd, sourceConstraintFieldName(self), 'source', 'target', creationConstraints.getSourceEndContextClass(), creationConstraints.getTargetEndContextClass()) FOR creationConstraints.sourceEnd.provider-»
+«ENDIF-»
+«IF null <> creationConstraints.targetEnd-»
+ «EXPAND checkAdditionalConstraint(creationConstraints.targetEnd, targetConstraintFieldName(self), 'target', 'source', creationConstraints.getTargetEndContextClass(), creationConstraints.getSourceEndContextClass()) FOR creationConstraints.targetEnd.provider-»
+«ENDIF-»
return true;
} catch(Exception e) {
- «getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Link constraint evaluation error", e); «EXPAND xpt::Common::nonNLS»
+ «getDiagram().editorGen.plugin.getActivatorQualifiedClassName()».getInstance().logError("Link constraint evaluation error", e); «EXPAND xpt::Common::nonNLS»
return false;
}
-«ELSE-»
+«ELSE-»
return true;
-«ENDIF-»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE canCreateParameters FOR gmfgen::LinkModelFacet»«EXPAND incorrectLinkModelFacet»«ENDDEFINE»
-«DEFINE canCreateParameters FOR gmfgen::TypeLinkModelFacet»«IF hasContainerOtherThanSource(self)»«EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» container, «ENDIF»«EXPAND sourceTargetParameters»«ENDDEFINE»
-«DEFINE canCreateParameters FOR gmfgen::FeatureLinkModelFacet»«EXPAND sourceTargetParameters»«ENDDEFINE»
+«DEFINE canCreateParameters FOR gmfgen::LinkModelFacet»«EXPAND incorrectLinkModelFacet»«ENDDEFINE»
+«DEFINE canCreateParameters FOR gmfgen::TypeLinkModelFacet»«IF hasContainerOtherThanSource(self)»«EXPAND MetaModel::QualifiedClassName FOR containmentMetaFeature.genClass» container, «ENDIF»«EXPAND sourceTargetParameters»«ENDDEFINE»
+«DEFINE canCreateParameters FOR gmfgen::FeatureLinkModelFacet»«EXPAND sourceTargetParameters»«ENDDEFINE»
-«DEFINE sourceTargetParameters FOR gmfgen::LinkModelFacet»«EXPAND MetaModel::QualifiedClassName FOR getSourceType()» source, «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» target«ENDDEFINE»
+«DEFINE sourceTargetParameters FOR gmfgen::LinkModelFacet»«EXPAND MetaModel::QualifiedClassName FOR getSourceType()» source, «EXPAND MetaModel::QualifiedClassName FOR getTargetType()» target«ENDDEFINE»
-«DEFINE canCreateValues FOR gmfgen::LinkModelFacet»«EXPAND incorrectLinkModelFacet»«ENDDEFINE»
-«DEFINE canCreateValues FOR gmfgen::TypeLinkModelFacet»«IF hasContainerOtherThanSource(self)»container, «ENDIF»source, target«ENDDEFINE»
-«DEFINE canCreateValues FOR gmfgen::FeatureLinkModelFacet»source, target«ENDDEFINE»
+«DEFINE canCreateValues FOR gmfgen::LinkModelFacet»«EXPAND incorrectLinkModelFacet»«ENDDEFINE»
+«DEFINE canCreateValues FOR gmfgen::TypeLinkModelFacet»«IF hasContainerOtherThanSource(self)»container, «ENDIF»source, target«ENDDEFINE»
+«DEFINE canCreateValues FOR gmfgen::FeatureLinkModelFacet»source, target«ENDDEFINE»
-«DEFINE checkEMFConstraints FOR gmfgen::LinkModelFacet»«EXPAND incorrectLinkModelFacet»«ENDDEFINE»
+«DEFINE checkEMFConstraints FOR gmfgen::LinkModelFacet»«EXPAND incorrectLinkModelFacet»«ENDDEFINE»
-«DEFINE checkEMFConstraints FOR gmfgen::TypeLinkModelFacet-»
- «LET childMetaFeature <> containmentMetaFeature and childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0 AS checkChildFeatureUpperBound-»
- «IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0 or checkChildFeatureUpperBound-»
-if («getContainerVariable(self)» != null) {
- «EXPAND checkEMFConstraints(self) FOR containmentMetaFeature-»
- «IF checkChildFeatureUpperBound-»
- «EXPAND checkEMFConstraints(self) FOR childMetaFeature-»
- «ENDIF-»
+«DEFINE checkEMFConstraints FOR gmfgen::TypeLinkModelFacet-»
+ «LET childMetaFeature <> containmentMetaFeature and childMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0 AS checkChildFeatureUpperBound-»
+ «IF containmentMetaFeature.ecoreFeature.upperBound.oclAsType(Integer) > 0 or checkChildFeatureUpperBound-»
+if («getContainerVariable(self)» != null) {
+ «EXPAND checkEMFConstraints(self) FOR containmentMetaFeature-»
+ «IF checkChildFeatureUpperBound-»
+ «EXPAND checkEMFConstraints(self) FOR childMetaFeature-»
+ «ENDIF-»
}
- «ENDIF-»
- «ENDLET-»
-«ENDDEFINE»
+ «ENDIF-»
+ «ENDLET-»
+«ENDDEFINE»
-«DEFINE checkEMFConstraints(modelFacet : gmfgen::TypeLinkModelFacet) FOR genmodel::GenFeature-»
-«IF ecoreFeature.upperBound.oclAsType(Integer) > 0-»
-if («EXPAND featureBoundComparator(getContainerVariable(modelFacet), modelFacet.getSourceType())») {
+«DEFINE checkEMFConstraints(modelFacet : gmfgen::TypeLinkModelFacet) FOR genmodel::GenFeature-»
+«IF ecoreFeature.upperBound.oclAsType(Integer) > 0-»
+if («EXPAND featureBoundComparator(getContainerVariable(modelFacet), modelFacet.getSourceType())») {
return false;
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE checkEMFConstraints FOR gmfgen::FeatureLinkModelFacet-»
+«DEFINE checkEMFConstraints FOR gmfgen::FeatureLinkModelFacet-»
if (source != null) {
- if («EXPAND featureBoundsConditionClause('source', getSourceType()) FOR metaFeature») {
+ if («EXPAND featureBoundsConditionClause('source', getSourceType()) FOR metaFeature») {
return false;
}
- «IF isContains(metaFeature)-»
+ «IF isContains(metaFeature)-»
if (source == target) {
return false;
}
- «ENDIF-»
+ «ENDIF-»
}
-«IF getReverse(metaFeature) <> null-»
-if (target != null && («EXPAND featureBoundsConditionClause('target', getTargetType()) FOR getReverse(metaFeature)»)) {
+«IF getReverse(metaFeature) <> null-»
+if (target != null && («EXPAND featureBoundsConditionClause('target', getTargetType()) FOR getReverse(metaFeature)»)) {
return false;
}
-«ENDIF»
-«ENDDEFINE»
+«ENDIF»
+«ENDDEFINE»
-«DEFINE featureBoundsConditionClause(targetVar : String, targetType : genmodel::GenClass) FOR genmodel::GenFeature-»
-«REM»Checking upper bounds if was specified in MM«ENDREM»«-»
-«IF ecoreFeature.upperBound.oclAsType(Integer) > 0»«EXPAND featureBoundComparator(targetVar, targetType)»«ENDIF-»
-«REM»Checking uniqueness in addition if upper bounds > 1«ENDREM»«-»
-«IF ecoreFeature.upperBound.oclAsType(Integer) > 1» || «ENDIF-»
-«REM»Checking uniqueness in if upper bounds > 1 or < 0«ENDREM»«-»
-«IF ecoreFeature.upperBound.oclAsType(Integer) <> 1»«EXPAND featureUniquenessComparator(targetVar, targetType)»«ENDIF»
-«ENDDEFINE»
+«DEFINE featureBoundsConditionClause(targetVar : String, targetType : genmodel::GenClass) FOR genmodel::GenFeature-»
+«REM»Checking upper bounds if was specified in MM«ENDREM»«-»
+«IF ecoreFeature.upperBound.oclAsType(Integer) > 0»«EXPAND featureBoundComparator(targetVar, targetType)»«ENDIF-»
+«REM»Checking uniqueness in addition if upper bounds > 1«ENDREM»«-»
+«IF ecoreFeature.upperBound.oclAsType(Integer) > 1» || «ENDIF-»
+«REM»Checking uniqueness in if upper bounds > 1 or < 0«ENDREM»«-»
+«IF ecoreFeature.upperBound.oclAsType(Integer) <> 1»«EXPAND featureUniquenessComparator(targetVar, targetType)»«ENDIF»
+«ENDDEFINE»
-«DEFINE featureBoundComparator(featureVar : String, featureVarGenClass : genmodel::GenClass) FOR genmodel::GenFeature»«EXPAND MetaModel::getFeatureValue(featureVar, featureVarGenClass)»«IF ecoreFeature.upperBound.oclAsType(Integer) = 1» != null«ELSE».size() >= «ecoreFeature.upperBound.oclAsType(Integer)»«ENDIF»«ENDDEFINE»
-«DEFINE featureUniquenessComparator(featureVar : String, featureVarGenClass : genmodel::GenClass) FOR genmodel::GenFeature»«EXPAND MetaModel::getFeatureValue(featureVar, featureVarGenClass) FOR self».contains(target)«ENDDEFINE»
+«DEFINE featureBoundComparator(featureVar : String, featureVarGenClass : genmodel::GenClass) FOR genmodel::GenFeature»«EXPAND MetaModel::getFeatureValue(featureVar, featureVarGenClass)»«IF ecoreFeature.upperBound.oclAsType(Integer) = 1» != null«ELSE».size() >= «ecoreFeature.upperBound.oclAsType(Integer)»«ENDIF»«ENDDEFINE»
+«DEFINE featureUniquenessComparator(featureVar : String, featureVarGenClass : genmodel::GenClass) FOR genmodel::GenFeature»«EXPAND MetaModel::getFeatureValue(featureVar, featureVarGenClass) FOR self».contains(target)«ENDDEFINE»
-«DEFINE checkAdditionalConstraint(valueExpr : gmfgen::ValueExpression, constraintFieldName : String, sourceEndVar : String, targetEndVar : String, context : genmodel::GenClass, oppositeEndContext : genmodel::GenClass) FOR gmfgen::GenExpressionProviderBase»
-«ERROR 'Have no idea what extra constraints to check for ' + self.repr()»
-«ENDDEFINE»
+«DEFINE checkAdditionalConstraint(valueExpr : gmfgen::ValueExpression, constraintFieldName : String, sourceEndVar : String, targetEndVar : String, context : genmodel::GenClass, oppositeEndContext : genmodel::GenClass) FOR gmfgen::GenExpressionProviderBase»
+«ERROR 'Have no idea what extra constraints to check for ' + self.repr()»
+«ENDDEFINE»
-«DEFINE checkAdditionalConstraint(valueExpr : gmfgen::ValueExpression, constraintFieldName : String, sourceEndVar : String, targetEndVar : String, context : genmodel::GenClass, oppositeEndContext : genmodel::GenClass) FOR gmfgen::GenExpressionInterpreter-»
- if («sourceEndVar» == null) {
+«DEFINE checkAdditionalConstraint(valueExpr : gmfgen::ValueExpression, constraintFieldName : String, sourceEndVar : String, targetEndVar : String, context : genmodel::GenClass, oppositeEndContext : genmodel::GenClass) FOR gmfgen::GenExpressionInterpreter-»
+ if («sourceEndVar» == null) {
return true;
}
- if («constraintFieldName» == null) {
- java.util.Map env = java.util.Collections.singletonMap(OPPOSITE_END_VAR, «EXPAND MetaModel::MetaClass FOR oppositeEndContext»);
- «constraintFieldName» = «getQualifiedClassName()».«getExpressionAccessor(valueExpr)»(«valueExpr.getBodyString()», «EXPAND MetaModel::MetaClass FOR context», env); «EXPAND xpt::Common::nonNLS»
+ if («constraintFieldName» == null) {
+ java.util.Map env = java.util.Collections.singletonMap(OPPOSITE_END_VAR, «EXPAND MetaModel::MetaClass FOR oppositeEndContext»);
+ «constraintFieldName» = «getQualifiedClassName()».«getExpressionAccessor(valueExpr)»(«valueExpr.getBodyString()», «EXPAND MetaModel::MetaClass FOR context», env); «EXPAND xpt::Common::nonNLS»
}
- Object «sourceEndVar»Val = «constraintFieldName».evaluate(«sourceEndVar», java.util.Collections.singletonMap(OPPOSITE_END_VAR, «targetEndVar»));
- if (false == «sourceEndVar»Val instanceof Boolean || !((Boolean) «sourceEndVar»Val).booleanValue()) {
+ Object «sourceEndVar»Val = «constraintFieldName».evaluate(«sourceEndVar», java.util.Collections.singletonMap(OPPOSITE_END_VAR, «targetEndVar»));
+ if (false == «sourceEndVar»Val instanceof Boolean || !((Boolean) «sourceEndVar»Val).booleanValue()) {
return false;
} // else fall-through
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE checkAdditionalConstraint(valueExpr : gmfgen::ValueExpression, constraintFieldName : String, sourceEndVar : String, targetEndVar : String, context : genmodel::GenClass, oppositeEndContext : genmodel::GenClass) FOR gmfgen::GenJavaExpressionProvider-»
-«IF injectExpressionBody and (valueExpr.body <> null and valueExpr.body.xpandLength() <> 0)-»
- «valueExpr.body»
-«ELSEIF throwException or (injectExpressionBody and (valueExpr.body = null or valueExpr.body.xpandLength() = 0))-»
- // TODO: implement this method, using «sourceEndVar» and «targetEndVar»
+«DEFINE checkAdditionalConstraint(valueExpr : gmfgen::ValueExpression, constraintFieldName : String, sourceEndVar : String, targetEndVar : String, context : genmodel::GenClass, oppositeEndContext : genmodel::GenClass) FOR gmfgen::GenJavaExpressionProvider-»
+«IF injectExpressionBody and (valueExpr.body <> null and valueExpr.body.xpandLength() <> 0)-»
+ «valueExpr.body»
+«ELSEIF throwException or (injectExpressionBody and (valueExpr.body = null or valueExpr.body.xpandLength() = 0))-»
+ // TODO: implement this method, using «sourceEndVar» and «targetEndVar»
// to access link source and target, respectively
// Ensure that you remove @generated or mark it @generated NOT
if (Boolean.TRUE.booleanValue()) {
- throw new java.lang.UnsupportedOperationException("No java implementation provided");«EXPAND xpt::Common::nonNLS»
+ throw new java.lang.UnsupportedOperationException("No java implementation provided");«EXPAND xpt::Common::nonNLS»
}
-«ELSE-»
- if (Boolean.TRUE.booleanValue()) {«REM»just in case there are two consecutive java expression with neither throw nor inject - avoid unreachable code.«ENDREM»
+«ELSE-»
+ if (Boolean.TRUE.booleanValue()) {«REM»just in case there are two consecutive java expression with neither throw nor inject - avoid unreachable code.«ENDREM»
return false;
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE incorrectLinkModelFacet FOR gmfgen::LinkModelFacet»«ERROR 'Unrecognized link model facet: ' + self.repr()»«ENDDEFINE»
+«DEFINE incorrectLinkModelFacet FOR gmfgen::LinkModelFacet»«ERROR 'Unrecognized link model facet: ' + self.repr()»«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE»
-«DEFINE defaultConstructor FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «itemSemanticEditPolicyClassName»() {
- «EXPAND defaultConstructorBody-»
+«DEFINE defaultConstructor FOR gmfgen::GenCommonBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «itemSemanticEditPolicyClassName»() {
+ «EXPAND defaultConstructorBody-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
This method should be called only with diagram, node or link used as a parameter
(then elementType != null)
-«ENDREM»
-«DEFINE defaultConstructorBody FOR gmfgen::GenCommonBase-»
- «IF elementType = null-»
- «ERROR 'No element type in the passed node. Only diagram, node or link are supported in this template: ' + self.repr()-»
- «ENDIF-»
- super(«EXPAND xpt::providers::ElementTypes::accessElementType»);
-«ENDDEFINE» \ No newline at end of file
+«ENDREM»
+«DEFINE defaultConstructorBody FOR gmfgen::GenCommonBase-»
+ «IF elementType = null-»
+ «ERROR 'No element type in the passed node. Only diagram, node or link are supported in this template: ' + self.repr()-»
+ «ENDIF-»
+ super(«EXPAND xpt::providers::ElementTypes::accessElementType»);
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt
index 182dbc866..60833ebb5 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,19 +10,19 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE ChildContainerCanonicalEditPolicy FOR gmfgen::GenChildContainer-»
- «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPoliciesPackageName»;
+«DEFINE ChildContainerCanonicalEditPolicy FOR gmfgen::GenChildContainer-»
+ «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPoliciesPackageName»;
- «EXPAND xpt::Common::generatedClassComment»
-public class «canonicalEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy {
+ «EXPAND xpt::Common::generatedClassComment»
+public class «canonicalEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy {
- «EXPAND xpt::diagram::updater::containerBaseCanonicalMethods::containerBaseCanonicalMethods-»
+ «EXPAND xpt::diagram::updater::containerBaseCanonicalMethods::containerBaseCanonicalMethods-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenChildContainer»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenChildContainer»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/CompartmentItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/CompartmentItemSemanticEditPolicy.xpt
index e6cb655fd..246b8b853 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/CompartmentItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/CompartmentItemSemanticEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,29 +10,29 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE CompartmentItemSemanticEditPolicy FOR gmfgen::GenCompartment-»
- «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPoliciesPackageName»;
+«DEFINE CompartmentItemSemanticEditPolicy FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPoliciesPackageName»;
- «EXPAND xpt::Common::generatedClassComment»
-public class «itemSemanticEditPolicyClassName» extends «getDiagram().getBaseItemSemanticEditPolicyQualifiedClassName()» {
+ «EXPAND xpt::Common::generatedClassComment»
+public class «itemSemanticEditPolicyClassName» extends «getDiagram().getBaseItemSemanticEditPolicyQualifiedClassName()» {
- «EXPAND _constructor-»
+ «EXPAND _constructor-»
- «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR childNodes->asSequence()-»
+ «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR childNodes->asSequence()-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE _constructor FOR gmfgen::GenCompartment-»
- «EXPAND xpt::Common::generatedMemberComment»
- public «itemSemanticEditPolicyClassName»() {
- «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructorBody FOR node-»
+«DEFINE _constructor FOR gmfgen::GenCompartment-»
+ «EXPAND xpt::Common::generatedMemberComment»
+ public «itemSemanticEditPolicyClassName»() {
+ «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructorBody FOR node-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenCompartment-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenCompartment-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt
index b066d7d5b..b5305fa30 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,75 +10,75 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::diagram::editpolicies::Utils»
-«EXTENSION xpt::diagram::updater::Utils»
-«EXTENSION xpt::GenModelUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::diagram::editpolicies::Utils»
+«EXTENSION xpt::diagram::updater::Utils»
+«EXTENSION xpt::GenModelUtils»
-«DEFINE DiagramCanonicalEditPolicy FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::copyright FOR editorGen-»
-package «editPoliciesPackageName»;
+«DEFINE DiagramCanonicalEditPolicy FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::copyright FOR editorGen-»
+package «editPoliciesPackageName»;
- «EXPAND xpt::Common::generatedClassComment»
-public class «canonicalEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalConnectionEditPolicy {
+ «EXPAND xpt::Common::generatedClassComment»
+public class «canonicalEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalConnectionEditPolicy {
- «EXPAND xpt::diagram::updater::containerBaseCanonicalMethods::containerBaseCanonicalMethods-»
+ «EXPAND xpt::diagram::updater::containerBaseCanonicalMethods::containerBaseCanonicalMethods-»
- «EXPAND getSemanticConnectionsList-»
+ «EXPAND getSemanticConnectionsList-»
- «EXPAND getSourceElement-»
+ «EXPAND getSourceElement-»
- «EXPAND getTargetElement-»
+ «EXPAND getTargetElement-»
- «EXPAND shouldIncludeConnection-»
+ «EXPAND shouldIncludeConnection-»
- «EXPAND refreshSemantic-»
+ «EXPAND refreshSemantic-»
- «EXPAND getDiagram-»
+ «EXPAND getDiagram-»
- «EXPAND refreshLinks-»
- «EXPAND additions-»
+ «EXPAND refreshLinks-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getSemanticConnectionsList FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getSemanticConnectionsList FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected java.util.List getSemanticConnectionsList() {
return java.util.Collections.EMPTY_LIST;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getSourceElement FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getSourceElement FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.emf.ecore.EObject getSourceElement(org.eclipse.emf.ecore.EObject relationship) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getTargetElement FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getTargetElement FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.emf.ecore.EObject getTargetElement(org.eclipse.emf.ecore.EObject relationship) {
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE shouldIncludeConnection FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE shouldIncludeConnection FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected boolean shouldIncludeConnection(org.eclipse.gmf.runtime.notation.Edge connector, java.util.Collection children) {
return false;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshSemantic FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshSemantic FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshSemantic() {
java.util.List createdViews = new java.util.LinkedList();
createdViews.addAll(refreshSemanticChildren());
java.util.List createdConnectionViews = new java.util.LinkedList();
createdConnectionViews.addAll(refreshSemanticConnections());
- «IF not links->isEmpty()-»
+ «IF not links->isEmpty()-»
createdConnectionViews.addAll(refreshConnections());
- «ENDIF-»
+ «ENDIF-»
if (createdViews.size() > 1) {
// perform a layout of the container
@@ -89,29 +89,29 @@ protected void refreshSemantic() {
createdViews.addAll(createdConnectionViews);
makeViewsImmutable(createdViews);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE refreshLinks FOR gmfgen::GenDiagram-»
- «IF not links->isEmpty()-»
- «EXPAND refreshConnections-»
+«DEFINE refreshLinks FOR gmfgen::GenDiagram-»
+ «IF not links->isEmpty()-»
+ «EXPAND refreshConnections-»
- «EXPAND collectAllLinks-»
+ «EXPAND collectAllLinks-»
- «EXPAND createConnections-»
+ «EXPAND createConnections-»
- «EXPAND getEditPart-»
- «ENDIF-»
-«ENDDEFINE»
+ «EXPAND getEditPart-»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE refreshConnections FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE refreshConnections FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.util.Collection refreshConnections() {
java.util.Map domain2NotationMap = new java.util.HashMap();
java.util.Collection linkDescriptors = collectAllLinks(getDiagram(), domain2NotationMap);
java.util.Collection existingLinks = new java.util.LinkedList(getDiagram().getEdges());
for (java.util.Iterator linksIterator = existingLinks.iterator(); linksIterator.hasNext();) {
org.eclipse.gmf.runtime.notation.Edge nextDiagramLink = (org.eclipse.gmf.runtime.notation.Edge) linksIterator.next();
- int diagramLinkVisualID = «EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(nextDiagramLink);
+ int diagramLinkVisualID = «EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(nextDiagramLink);
if (diagramLinkVisualID == -1) {
if (nextDiagramLink.getSource() != null && nextDiagramLink.getTarget() != null) {
linksIterator.remove();
@@ -122,7 +122,7 @@ private java.util.Collection refreshConnections() {
org.eclipse.emf.ecore.EObject diagramLinkSrc = nextDiagramLink.getSource().getElement();
org.eclipse.emf.ecore.EObject diagramLinkDst = nextDiagramLink.getTarget().getElement();
for (java.util.Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
- «editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()» nextLinkDescriptor = («editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()») linkDescriptorsIterator.next();
+ «editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()» nextLinkDescriptor = («editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()») linkDescriptorsIterator.next();
if (diagramLinkObject == nextLinkDescriptor.getModelElement() && diagramLinkSrc == nextLinkDescriptor.getSource() && diagramLinkDst == nextLinkDescriptor.getDestination() && diagramLinkVisualID == nextLinkDescriptor.getVisualID()) {
linksIterator.remove();
linkDescriptorsIterator.remove();
@@ -133,17 +133,17 @@ private java.util.Collection refreshConnections() {
deleteViews(existingLinks.iterator());
return createConnections(linkDescriptors, domain2NotationMap);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE collectAllLinks FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE collectAllLinks FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.util.Collection collectAllLinks(org.eclipse.gmf.runtime.notation.View view, java.util.Map domain2NotationMap) {
- if (!«EXPAND xpt::editor::VisualIDRegistry::modelID».equals(«EXPAND xpt::editor::VisualIDRegistry::getModelIDMethodCall»(view))) {
+ if (!«EXPAND xpt::editor::VisualIDRegistry::modelID».equals(«EXPAND xpt::editor::VisualIDRegistry::getModelIDMethodCall»(view))) {
return java.util.Collections.EMPTY_LIST;
}
java.util.Collection result = new java.util.LinkedList();
- switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(view)) {
- «EXPAND caseSemanticElement FOREACH getAllSemanticElements(self)-»
+ switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(view)) {
+ «EXPAND caseSemanticElement FOREACH getAllSemanticElements(self)-»
}
for (java.util.Iterator children = view.getChildren().iterator(); children.hasNext();) {
result.addAll(collectAllLinks((org.eclipse.gmf.runtime.notation.View) children.next(), domain2NotationMap));
@@ -153,43 +153,43 @@ private java.util.Collection collectAllLinks(org.eclipse.gmf.runtime.notation.Vi
}
return result;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE caseSemanticElement FOR gmfgen::GenCommonBase-»
-«EXPAND xpt::Common::caseVisualID» {
+«DEFINE caseSemanticElement FOR gmfgen::GenCommonBase-»
+«EXPAND xpt::Common::caseVisualID» {
if (!domain2NotationMap.containsKey(view.getElement())) {
-«REM»
+«REM»
Processing each domain element only once. Prevents us from
having duplicated links if a shortcut to one of the "main"
diagram elements present on diagram.
-«ENDREM»«-»
- result.addAll(«EXPAND xpt::diagram::updater::DiagramUpdater::getContainedLinksMethodCall»(view));
+«ENDREM»«-»
+ result.addAll(«EXPAND xpt::diagram::updater::DiagramUpdater::getContainedLinksMethodCall»(view));
}
- if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { «EXPAND xpt::Common::nonNLS»
-«REM»
+ if (!domain2NotationMap.containsKey(view.getElement()) || view.getEAnnotation("Shortcut") == null) { «EXPAND xpt::Common::nonNLS»
+«REM»
Storing element view or replacing shortcut by the "original" element view.
-«ENDREM»«-»
+«ENDREM»«-»
domain2NotationMap.put(view.getElement(), view);
}
break;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
GMF has no links to "leaf" child nodes.
-«ENDREM»
-«DEFINE caseSemanticElement FOR gmfgen::GenChildLabelNode»«ENDDEFINE»
+«ENDREM»
+«DEFINE caseSemanticElement FOR gmfgen::GenChildLabelNode»«ENDDEFINE»
-«DEFINE colectContainedLink FOR gmfgen::GenLink-»
-«EXPAND xpt::diagram::updater::DiagramUpdater::getContainedLinksMethodCall»(modelElement));
-«ENDDEFINE»
+«DEFINE colectContainedLink FOR gmfgen::GenLink-»
+«EXPAND xpt::diagram::updater::DiagramUpdater::getContainedLinksMethodCall»(modelElement));
+«ENDDEFINE»
-«DEFINE createConnections FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE createConnections FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
private java.util.Collection createConnections(java.util.Collection linkDescriptors, java.util.Map domain2NotationMap) {
java.util.List adapters = new java.util.LinkedList();
for (java.util.Iterator linkDescriptorsIterator = linkDescriptors.iterator(); linkDescriptorsIterator.hasNext();) {
- final «editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()» nextLinkDescriptor = («editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()») linkDescriptorsIterator.next();
+ final «editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()» nextLinkDescriptor = («editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()») linkDescriptorsIterator.next();
org.eclipse.gef.EditPart sourceEditPart = getEditPart(nextLinkDescriptor.getSource(), domain2NotationMap);
org.eclipse.gef.EditPart targetEditPart = getEditPart(nextLinkDescriptor.getDestination(), domain2NotationMap);
if (sourceEditPart == null || targetEditPart == null) {
@@ -213,10 +213,10 @@ private java.util.Collection createConnections(java.util.Collection linkDescript
}
return adapters;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getEditPart FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getEditPart FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gef.EditPart getEditPart(org.eclipse.emf.ecore.EObject domainModelElement, java.util.Map domain2NotationMap) {
org.eclipse.gmf.runtime.notation.View view = (org.eclipse.gmf.runtime.notation.View) domain2NotationMap.get(domainModelElement);
if (view != null) {
@@ -224,17 +224,17 @@ private org.eclipse.gef.EditPart getEditPart(org.eclipse.emf.ecore.EObject domai
}
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDiagram FOR gmfgen::GenContainerBase-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDiagram FOR gmfgen::GenContainerBase-»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.gmf.runtime.notation.Diagram getDiagram() {
return ((org.eclipse.gmf.runtime.notation.View) getHost().getModel()).getDiagram();
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE incorrectLinkModelFacet FOR gmfgen::LinkModelFacet-»
- «ERROR 'Incorrect LinkModelFacet: ' + self.repr()»
-«ENDDEFINE»
+«DEFINE incorrectLinkModelFacet FOR gmfgen::LinkModelFacet-»
+ «ERROR 'Incorrect LinkModelFacet: ' + self.repr()»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenDiagram»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
index b57aba71d..12f46f89d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/DiagramItemSemanticEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,54 +10,54 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE DiagramItemSemanticEditPolicy FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «editPoliciesPackageName»;
+«DEFINE DiagramItemSemanticEditPolicy FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «editPoliciesPackageName»;
- «EXPAND xpt::Common::generatedClassComment»
-public class «itemSemanticEditPolicyClassName» extends «getBaseItemSemanticEditPolicyQualifiedClassName()» {
+ «EXPAND xpt::Common::generatedClassComment»
+public class «itemSemanticEditPolicyClassName» extends «getBaseItemSemanticEditPolicyQualifiedClassName()» {
- «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
+ «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
- «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR topLevelNodes->asSequence()-»
+ «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR topLevelNodes->asSequence()-»
- «EXPAND getDuplicateCommand-»
+ «EXPAND getDuplicateCommand-»
- «EXPAND DuplicateAnythingCommand-»
+ «EXPAND DuplicateAnythingCommand-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDuplicateCommand FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDuplicateCommand FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDuplicateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req) {
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain = ((org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) getHost()).getEditingDomain();
return getGEFWrapper(new DuplicateAnythingCommand(editingDomain, req));
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE DuplicateAnythingCommand FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedClassComment»
+«DEFINE DuplicateAnythingCommand FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedClassComment»
private static class DuplicateAnythingCommand extends org.eclipse.gmf.runtime.emf.commands.core.commands.DuplicateEObjectsCommand {
- «EXPAND DAC_constructor-»
+ «EXPAND DAC_constructor-»
- «EXPAND DAC_additions-»
+ «EXPAND DAC_additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE DAC_constructor FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE DAC_constructor FOR gmfgen::GenDiagram-»
+ «EXPAND xpt::Common::generatedMemberComment»
public DuplicateAnythingCommand(org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain, org.eclipse.gmf.runtime.emf.type.core.requests.DuplicateElementsRequest req) {
super(editingDomain, req.getLabel(), req.getElementsToBeDuplicated(), req.getAllDuplicatedElementsMap());
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE DAC_additions FOR gmfgen::GenDiagram-»
-«ENDDEFINE»
+«DEFINE DAC_additions FOR gmfgen::GenDiagram-»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenDiagram-»
-«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenDiagram-»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt
index 98da1f761..8bfd88d26 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/GraphicalNodeEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,34 +10,34 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«DEFINE GraphicalNodeEditPolicy FOR gmfgen::GenNode-»
-«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPoliciesPackageName»;
+«DEFINE GraphicalNodeEditPolicy FOR gmfgen::GenNode-»
+«EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «graphicalNodeEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy {
+«EXPAND xpt::Common::generatedClassComment»
+public class «graphicalNodeEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.GraphicalNodeEditPolicy {
- «EXPAND xpt::Common::generatedClassComment»
+ «EXPAND xpt::Common::generatedClassComment»
protected org.eclipse.gef.commands.Command getConnectionCompleteCommand(
org.eclipse.gef.requests.CreateConnectionRequest request) {
org.eclipse.gmf.runtime.emf.type.core.IElementType elementType = getElementType(request);
- «FOREACH reorientedIncomingLinks->asSequence() AS link-»
- if («EXPAND xpt::providers::ElementTypes::accessElementType FOR link» == elementType) {
- «IF link.outgoingCreationAllowed-»
+ «FOREACH reorientedIncomingLinks->asSequence() AS link-»
+ if («EXPAND xpt::providers::ElementTypes::accessElementType FOR link» == elementType) {
+ «IF link.outgoingCreationAllowed-»
if (request.getSourceEditPart() != getHost()) {
- «ENDIF-»
+ «ENDIF-»
return getConnectionWithReorientedViewCompleteCommand(request);
- «IF link.outgoingCreationAllowed-»
+ «IF link.outgoingCreationAllowed-»
}
- «ENDIF-»
+ «ENDIF-»
}
- «ENDFOREACH-»
+ «ENDFOREACH-»
return super.getConnectionCompleteCommand(request);
}
- «EXPAND xpt::Common::generatedClassComment»
+ «EXPAND xpt::Common::generatedClassComment»
protected org.eclipse.gmf.runtime.emf.type.core.IElementType getElementType(
org.eclipse.gef.requests.CreateConnectionRequest request) {
if (request instanceof org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewAndElementRequest) {
@@ -50,7 +50,7 @@ public class «graphicalNodeEditPolicyClassName» extends org.eclipse.gmf.runtime.
return null;
}
- «EXPAND xpt::Common::generatedClassComment»
+ «EXPAND xpt::Common::generatedClassComment»
protected org.eclipse.gef.commands.Command getConnectionWithReorientedViewCompleteCommand(
org.eclipse.gef.requests.CreateConnectionRequest request) {
org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy c =
@@ -59,14 +59,14 @@ public class «graphicalNodeEditPolicyClassName» extends org.eclipse.gmf.runtime.
(org.eclipse.gmf.runtime.common.core.command.CompositeCommand) c.getICommand();
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain =
((org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) getHost()).getEditingDomain();
- «getDiagram().getReorientConnectionViewCommandQualifiedClassName()» rcvCommand =
- new «getDiagram().getReorientConnectionViewCommandQualifiedClassName()»(editingDomain, null);
+ «getDiagram().getReorientConnectionViewCommandQualifiedClassName()» rcvCommand =
+ new «getDiagram().getReorientConnectionViewCommandQualifiedClassName()»(editingDomain, null);
rcvCommand.setEdgeAdaptor(getViewAdapter());
cc.compose(rcvCommand);
return c;
}
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenNode»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenNode»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/LinkItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/LinkItemSemanticEditPolicy.xpt
index 12dcc1694..5b2049992 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/LinkItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/LinkItemSemanticEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,46 +11,46 @@
* Michael Golubev (Borland) - [243151] explicit source/target for links
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION xpt::diagram::editpolicies::LinkUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION xpt::diagram::editpolicies::LinkUtils»
-«DEFINE LinkItemSemanticEditPolicy FOR gmfgen::GenLink-»
- «EXPAND xpt::Common::copyright FOR diagram.editorGen-»
-package «getDiagram().editPoliciesPackageName»;
+«DEFINE LinkItemSemanticEditPolicy FOR gmfgen::GenLink-»
+ «EXPAND xpt::Common::copyright FOR diagram.editorGen-»
+package «getDiagram().editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «itemSemanticEditPolicyClassName» extends «diagram.getBaseItemSemanticEditPolicyQualifiedClassName()» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «itemSemanticEditPolicyClassName» extends «diagram.getBaseItemSemanticEditPolicyQualifiedClassName()» {
- «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
+ «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
- «EXPAND classBody-»
+ «EXPAND classBody-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE classBody FOR gmfgen::GenLink-»
- «EXPAND getDestroySemanticCommand(self) FOR modelFacet -»
- «IF isTypeLink()»«EXPAND xpt::diagram::editpolicies::linkCommands::linkCommands»«ENDIF-»
-«ENDDEFINE»
+«DEFINE classBody FOR gmfgen::GenLink-»
+ «EXPAND getDestroySemanticCommand(self) FOR modelFacet -»
+ «IF isTypeLink()»«EXPAND xpt::diagram::editpolicies::linkCommands::linkCommands»«ENDIF-»
+«ENDDEFINE»
-«DEFINE getDestroySemanticCommand(gmfgen::GenLink genLink) FOR gmfgen::LinkModelFacet-»
- «ERROR 'Unsupported model facet: ' + self.repr()-»
-«ENDDEFINE»
+«DEFINE getDestroySemanticCommand(gmfgen::GenLink genLink) FOR gmfgen::LinkModelFacet-»
+ «ERROR 'Unsupported model facet: ' + self.repr()-»
+«ENDDEFINE»
-«DEFINE getDestroySemanticCommand(gmfgen::GenLink genLink) FOR gmfgen::FeatureLinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDestroySemanticCommand(gmfgen::GenLink genLink) FOR gmfgen::FeatureLinkModelFacet-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDestroyReferenceCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest req) {
- return getGEFWrapper(«EXPAND impl::diagram::commands::DeleteLinkCommand::newDeleteReferenceLinkCommand(genLink, 'req')»);
+ return getGEFWrapper(«EXPAND impl::diagram::commands::DeleteLinkCommand::newDeleteReferenceLinkCommand(genLink, 'req')»);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDestroySemanticCommand(gmfgen::GenLink genLink) FOR gmfgen::TypeLinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDestroySemanticCommand(gmfgen::GenLink genLink) FOR gmfgen::TypeLinkModelFacet-»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
- return getGEFWrapper(«EXPAND impl::diagram::commands::DeleteLinkCommand::newDeleteLinkWithClassCommand(genLink, 'req')»);
+ return getGEFWrapper(«EXPAND impl::diagram::commands::DeleteLinkCommand::newDeleteLinkWithClassCommand(genLink, 'req')»);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenLink»«ENDDEFINE» \ No newline at end of file
+«DEFINE additions FOR gmfgen::GenLink»«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/NodeItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/NodeItemSemanticEditPolicy.xpt
index 9af33b7fa..8d168a828 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/NodeItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/NodeItemSemanticEditPolicy.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,131 +11,131 @@
* Artem Tikhomirov (Borland) - [257632] do not rely on EditPart presence for element deletion
*/
-«REM»
+«REM»
This template should be called only for non-design nodes (modelFacet != null)
because *ItemSemanticEditPolicy responsible for dealing with semantic model
elements and meaningless (should not be generated) for pure design nodes.
-«ENDREM»
+«ENDREM»
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::editpolicies::Utils»
+«EXTENSION xpt::diagram::editpolicies::Utils»
-«DEFINE NodeItemSemanticEditPolicy FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
-package «getDiagram().editPoliciesPackageName»;
+«DEFINE NodeItemSemanticEditPolicy FOR gmfgen::GenNode-»
+ «EXPAND xpt::Common::copyright FOR getDiagram().editorGen-»
+package «getDiagram().editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «itemSemanticEditPolicyClassName» extends «getDiagram().getBaseItemSemanticEditPolicyQualifiedClassName()» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «itemSemanticEditPolicyClassName» extends «getDiagram().getBaseItemSemanticEditPolicyQualifiedClassName()» {
- «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
+ «EXPAND xpt::diagram::editpolicies::BaseItemSemanticEditPolicy::defaultConstructor-»
- «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR childNodes->asSequence()-»
+ «EXPAND xpt::diagram::editpolicies::childContainerCreateCommand::childContainerCreateCommand FOR childNodes->asSequence()-»
- «EXPAND getDestroyElementCommand-»
- «IF hasChildrenOrCompartments(self)-»
- «EXPAND addDestroyChildNodesCommand-»
- «ENDIF-»
- «EXPAND xpt::diagram::editpolicies::linkCommands::linkCommands-»
+ «EXPAND getDestroyElementCommand-»
+ «IF hasChildrenOrCompartments(self)-»
+ «EXPAND addDestroyChildNodesCommand-»
+ «ENDIF-»
+ «EXPAND xpt::diagram::editpolicies::linkCommands::linkCommands-»
- «EXPAND additions-»
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getDestroyElementCommand FOR gmfgen::GenNode-»
-«EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getDestroyElementCommand FOR gmfgen::GenNode-»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getDestroyElementCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest req) {
org.eclipse.gmf.runtime.notation.View view = (org.eclipse.gmf.runtime.notation.View) getHost().getModel();
org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand cmd = new org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand(getEditingDomain(), null);
cmd.setTransactionNestingEnabled(false);
- «EXPAND destroyEdges('view')-»
- org.eclipse.emf.ecore.EAnnotation annotation = view.getEAnnotation("Shortcut");«EXPAND xpt::Common::nonNLS»
+ «EXPAND destroyEdges('view')-»
+ org.eclipse.emf.ecore.EAnnotation annotation = view.getEAnnotation("Shortcut");«EXPAND xpt::Common::nonNLS»
if (annotation == null) {
- // there are indirectly referenced children, need extra commands: «childNodes->union(compartments.childNodes->asBag())->exists(not isDirectlyOwned(self))»
-«IF hasChildrenOrCompartments(self)-»
+ // there are indirectly referenced children, need extra commands: «childNodes->union(compartments.childNodes->asBag())->exists(not isDirectlyOwned(self))»
+«IF hasChildrenOrCompartments(self)-»
addDestroyChildNodesCommand(cmd);
-«ENDIF-»
+«ENDIF-»
addDestroyShortcutsCommand(cmd, view);
// delete host element
cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(req));
- } else {«REM»Here, we may play smart and don't generate else for non-toplevel nodes(which can't be shortcuts). Is it worth doing?«ENDREM»
+ } else {«REM»Here, we may play smart and don't generate else for non-toplevel nodes(which can't be shortcuts). Is it worth doing?«ENDREM»
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), view));
}
return getGEFWrapper(cmd.reduce());
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addDestroyChildNodesCommand FOR gmfgen::GenNode-»
+«DEFINE addDestroyChildNodesCommand FOR gmfgen::GenNode-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private void addDestroyChildNodesCommand(org.eclipse.gmf.runtime.common.core.command.ICompositeCommand cmd) {
org.eclipse.gmf.runtime.notation.View view = (org.eclipse.gmf.runtime.notation.View) getHost().getModel();
for (java.util.Iterator nit = view.getChildren().iterator(); nit.hasNext();) {
org.eclipse.gmf.runtime.notation.Node node = (org.eclipse.gmf.runtime.notation.Node) nit.next();
- switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(node)) {
- «EXPAND destroyChildNodes('node', self) FOREACH childNodes-»
- «IF compartments->notEmpty()»«FOREACH compartments AS compartment-»
- «EXPAND xpt::Common::caseVisualID FOR compartment»
+ switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(node)) {
+ «EXPAND destroyChildNodes('node', self) FOREACH childNodes-»
+ «IF compartments->notEmpty()»«FOREACH compartments AS compartment-»
+ «EXPAND xpt::Common::caseVisualID FOR compartment»
for (java.util.Iterator cit = node.getChildren().iterator(); cit.hasNext();) {
org.eclipse.gmf.runtime.notation.Node cnode = (org.eclipse.gmf.runtime.notation.Node) cit.next();
- switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(cnode)) {
- «EXPAND destroyChildNodes('cnode', self) FOREACH compartment.childNodes-»
+ switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(cnode)) {
+ «EXPAND destroyChildNodes('cnode', self) FOREACH compartment.childNodes-»
}
}
break;
- «ENDFOREACH»«ENDIF-»
+ «ENDFOREACH»«ENDIF-»
}
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE destroyChildNodes(nodeVar : String, gmfgen::GenNode genNode) FOR gmfgen::GenChildNode-»
-«EXPAND xpt::Common::caseVisualID»
- «EXPAND destroyEdges(nodeVar)-»
- cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(new org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest(getEditingDomain(), «nodeVar».getElement(), false))); // directlyOwned: «self.isDirectlyOwned(genNode)»
- // don't need explicit deletion of «nodeVar» as parent's view deletion would clean child views as well
- // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), «nodeVar»));
+«DEFINE destroyChildNodes(nodeVar : String, gmfgen::GenNode genNode) FOR gmfgen::GenChildNode-»
+«EXPAND xpt::Common::caseVisualID»
+ «EXPAND destroyEdges(nodeVar)-»
+ cmd.add(new org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand(new org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest(getEditingDomain(), «nodeVar».getElement(), false))); // directlyOwned: «self.isDirectlyOwned(genNode)»
+ // don't need explicit deletion of «nodeVar» as parent's view deletion would clean child views as well
+ // cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), «nodeVar»));
break;
-«ENDDEFINE»
+«ENDDEFINE»
// @param view - Notation element for the passed node
// assumes 'cmd' to point to composite command
-«DEFINE destroyEdges(String view) FOR gmfgen::GenNode-»
-«REM»
+«DEFINE destroyEdges(String view) FOR gmfgen::GenNode-»
+«REM»
XXX: Though semantic editpolicy is supposed to create commands that operate with semantic elements only,
old code used to delegate child/link deletion to respective editparts, which in turn led to semantic commands
being combined with notational commands (BaseItemSemanticEditPolicy#addDeleteViewCommand()).
---
Use DiagramUpdater.get[Incoming|Outgoing]View instead, to clean links that are not present on a diagram
(but don't forget to clean corresponding Edge, if any)
-«ENDREM-»
-«IF genIncomingLinks->notEmpty()-»
- for (java.util.Iterator it = «view».getTargetEdges().iterator(); it.hasNext();) {
+«ENDREM-»
+«IF genIncomingLinks->notEmpty()-»
+ for (java.util.Iterator it = «view».getTargetEdges().iterator(); it.hasNext();) {
org.eclipse.gmf.runtime.notation.Edge incomingLink = (org.eclipse.gmf.runtime.notation.Edge) it.next();
-«FOREACH genIncomingLinks AS il-»
- if («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(incomingLink) == «EXPAND xpt::editor::VisualIDRegistry::visualID FOR il») {
- «EXPAND impl::diagram::commands::DeleteLinkCommand::newRequest('r', 'incomingLink') FOR il-»
- cmd.add(«EXPAND impl::diagram::commands::DeleteLinkCommand::newInstance('r') FOR il»);
+«FOREACH genIncomingLinks AS il-»
+ if («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(incomingLink) == «EXPAND xpt::editor::VisualIDRegistry::visualID FOR il») {
+ «EXPAND impl::diagram::commands::DeleteLinkCommand::newRequest('r', 'incomingLink') FOR il-»
+ cmd.add(«EXPAND impl::diagram::commands::DeleteLinkCommand::newInstance('r') FOR il»);
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), incomingLink));
continue;
}
-«ENDFOREACH-»
+«ENDFOREACH-»
}
-«ENDIF-»
-«IF genOutgoingLinks->notEmpty()-»
- for (java.util.Iterator it = «view».getSourceEdges().iterator(); it.hasNext();) {
+«ENDIF-»
+«IF genOutgoingLinks->notEmpty()-»
+ for (java.util.Iterator it = «view».getSourceEdges().iterator(); it.hasNext();) {
org.eclipse.gmf.runtime.notation.Edge outgoingLink = (org.eclipse.gmf.runtime.notation.Edge) it.next();
-«FOREACH genOutgoingLinks AS ol-»
- if («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(outgoingLink) == «EXPAND xpt::editor::VisualIDRegistry::visualID FOR ol») {
- «EXPAND impl::diagram::commands::DeleteLinkCommand::newRequest('r', 'outgoingLink') FOR ol-»
- cmd.add(«EXPAND impl::diagram::commands::DeleteLinkCommand::newInstance('r') FOR ol»);
+«FOREACH genOutgoingLinks AS ol-»
+ if («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR getDiagram()»(outgoingLink) == «EXPAND xpt::editor::VisualIDRegistry::visualID FOR ol») {
+ «EXPAND impl::diagram::commands::DeleteLinkCommand::newRequest('r', 'outgoingLink') FOR ol-»
+ cmd.add(«EXPAND impl::diagram::commands::DeleteLinkCommand::newInstance('r') FOR ol»);
cmd.add(new org.eclipse.gmf.runtime.diagram.core.commands.DeleteCommand(getEditingDomain(), outgoingLink));
continue;
}
-«ENDFOREACH-»
+«ENDFOREACH-»
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::GenNode»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::GenNode»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/OpenDiagram.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/OpenDiagram.xpt
index 08a5977fd..a8d634e67 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/OpenDiagram.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/OpenDiagram.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -9,29 +9,29 @@
* Contributors:
* Artem Tikhomirov (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::editpolicies::Utils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::diagram::editpolicies::Utils»
-«DEFINE OpenDiagram FOR gmfgen::OpenDiagramBehaviour»
-«EXPAND xpt::Common::copyright FOR subject.getDiagram().editorGen-»
-package «subject.getDiagram().editPoliciesPackageName»;
+«DEFINE OpenDiagram FOR gmfgen::OpenDiagramBehaviour»
+«EXPAND xpt::Common::copyright FOR subject.getDiagram().editorGen-»
+package «subject.getDiagram().editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «editPolicyClassName» extends «EXPAND extendsList» {
+«EXPAND xpt::Common::generatedClassComment»
+public class «editPolicyClassName» extends «EXPAND extendsList» {
-«EXPAND getOpenCommand-»
+«EXPAND getOpenCommand-»
-«EXPAND openCommandClass-»
+«EXPAND openCommandClass-»
-«EXPAND additions-»
+«EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE extendsList FOR gmfgen::OpenDiagramBehaviour»org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy«ENDDEFINE»
+«DEFINE extendsList FOR gmfgen::OpenDiagramBehaviour»org.eclipse.gmf.runtime.diagram.ui.editpolicies.OpenEditPolicy«ENDDEFINE»
-«DEFINE getOpenCommand FOR gmfgen::OpenDiagramBehaviour»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getOpenCommand FOR gmfgen::OpenDiagramBehaviour»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getOpenCommand(org.eclipse.gef.Request request) {
org.eclipse.gef.EditPart targetEditPart = getTargetEditPart(request);
if (false == targetEditPart.getModel() instanceof org.eclipse.gmf.runtime.notation.View) {
@@ -44,33 +44,33 @@ public class «editPolicyClassName» extends «EXPAND extendsList» {
}
return new org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy(new OpenDiagramCommand((org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle) link));
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE openCommandClass FOR gmfgen::OpenDiagramBehaviour»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE openCommandClass FOR gmfgen::OpenDiagramBehaviour»
+ «EXPAND xpt::Common::generatedMemberComment»
private static class OpenDiagramCommand extends org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private final org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle diagramFacet;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
OpenDiagramCommand(org.eclipse.gmf.runtime.notation.HintedDiagramLinkStyle linkStyle) {
// editing domain is taken for original diagram,
// if we open diagram from another file, we should use another editing domain
- super(org.eclipse.emf.transaction.util.TransactionUtil.getEditingDomain(linkStyle), «EXPAND xpt::Externalizer::accessorCall(i18nKeyForOpenCommandName()) FOR subject.getDiagram().editorGen», null);
+ super(org.eclipse.emf.transaction.util.TransactionUtil.getEditingDomain(linkStyle), «EXPAND xpt::Externalizer::accessorCall(i18nKeyForOpenCommandName()) FOR subject.getDiagram().editorGen», null);
diagramFacet = linkStyle;
}
// FIXME canExecute if !(readOnly && getDiagramToOpen == null), i.e. open works on ro diagrams only when there's associated diagram already
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.common.core.command.CommandResult doExecuteWithResult(org.eclipse.core.runtime.IProgressMonitor monitor, org.eclipse.core.runtime.IAdaptable info) throws org.eclipse.core.commands.ExecutionException {
try {
org.eclipse.gmf.runtime.notation.Diagram diagram = getDiagramToOpen();
if (diagram == null) {
diagram = intializeNewDiagram();
}
- «EXPAND xpt::navigator::getEditorInput::defineURIEditorInput('diagram') FOR subject.getDiagram()-»
+ «EXPAND xpt::navigator::getEditorInput::defineURIEditorInput('diagram') FOR subject.getDiagram()-»
org.eclipse.ui.IWorkbenchPage page = org.eclipse.ui.PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
page.openEditor(editorInput, getEditorID());
return org.eclipse.gmf.runtime.common.core.command.CommandResult.newOKCommandResult();
@@ -79,19 +79,19 @@ public class «editPolicyClassName» extends «EXPAND extendsList» {
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.notation.Diagram getDiagramToOpen() {
return diagramFacet.getDiagramLink();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.notation.Diagram intializeNewDiagram() throws org.eclipse.core.commands.ExecutionException {
org.eclipse.gmf.runtime.notation.Diagram d = org.eclipse.gmf.runtime.diagram.core.services.ViewService.createDiagram(getDiagramDomainElement(), getDiagramKind(), getPreferencesHint());
if (d == null) {
throw new org.eclipse.core.commands.ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind");
}
diagramFacet.setDiagramLink(d);
- «EXPAND xpt::Common::_assert('diagramFacet.eResource() != null')-»
+ «EXPAND xpt::Common::_assert('diagramFacet.eResource() != null')-»
diagramFacet.eResource().getContents().add(d);
org.eclipse.emf.ecore.EObject container = diagramFacet.eContainer();
while (container instanceof org.eclipse.gmf.runtime.notation.View) {
@@ -99,18 +99,18 @@ public class «editPolicyClassName» extends «EXPAND extendsList» {
container = container.eContainer();
}
try {
- «IF null = subject.getDiagram().editorGen.application-»
+ «IF null = subject.getDiagram().editorGen.application-»
new org.eclipse.ui.actions.WorkspaceModifyOperation() {
protected void execute(org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException, java.lang.reflect.InvocationTargetException, InterruptedException {
try {
- «ENDIF-»
+ «ENDIF-»
for (java.util.Iterator it = diagramFacet.eResource().getResourceSet().getResources().iterator(); it.hasNext();) {
org.eclipse.emf.ecore.resource.Resource nextResource = (org.eclipse.emf.ecore.resource.Resource) it.next();
if (nextResource.isLoaded() && !getEditingDomain().isReadOnly(nextResource)) {
- nextResource.save(«EXPAND xpt::Common::getSaveOptions FOR subject.getDiagram()»);
+ nextResource.save(«EXPAND xpt::Common::getSaveOptions FOR subject.getDiagram()»);
}
}
- «IF null = subject.getDiagram().editorGen.application-»
+ «IF null = subject.getDiagram().editorGen.application-»
} catch (java.io.IOException ex) {
throw new java.lang.reflect.InvocationTargetException(ex, "Save operation failed");
}
@@ -121,45 +121,45 @@ public class «editPolicyClassName» extends «EXPAND extendsList» {
} catch (InterruptedException e) {
throw new org.eclipse.core.commands.ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", e);
}
- «ELSE-»
+ «ELSE-»
} catch (java.io.IOException ex) {
throw new org.eclipse.core.commands.ExecutionException("Can't create diagram of '" + getDiagramKind() + "' kind", ex);
}
- «ENDIF-»
+ «ENDIF-»
return d;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.emf.ecore.EObject getDiagramDomainElement() {
// use same element as associated with EP
return ((org.eclipse.gmf.runtime.notation.View) diagramFacet.eContainer()).getElement();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint getPreferencesHint() {
// XXX prefhint from target diagram's editor?
- return «EXPAND xpt::plugin::Activator::preferenceHintAccess FOR subject.getDiagram().editorGen»;
+ return «EXPAND xpt::plugin::Activator::preferenceHintAccess FOR subject.getDiagram().editorGen»;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getDiagramKind() {
- return «IF diagramKind = null»«EXPAND xpt::editor::VisualIDRegistry::modelID FOR subject.getDiagram()»«ELSE»"«diagramKind»"«ENDIF»;
+ return «IF diagramKind = null»«EXPAND xpt::editor::VisualIDRegistry::modelID FOR subject.getDiagram()»«ELSE»"«diagramKind»"«ENDIF»;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected String getEditorID() {
- return «IF editorID = null»«subject.getDiagram().editorGen.editor.getQualifiedClassName()».ID«ELSE»"«editorID»"«ENDIF»;
+ return «IF editorID = null»«subject.getDiagram().editorGen.editor.getQualifiedClassName()».ID«ELSE»"«editorID»"«ENDIF»;
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE additions FOR gmfgen::OpenDiagramBehaviour»«ENDDEFINE»
+«DEFINE additions FOR gmfgen::OpenDiagramBehaviour»«ENDDEFINE»
-«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Externalizer::accessorField(i18nKeyForOpenCommandName())-»
-«ENDDEFINE»
+«DEFINE i18nAccessors FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Externalizer::accessorField(i18nKeyForOpenCommandName())-»
+«ENDDEFINE»
-«DEFINE i18nValues FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForOpenCommandName(), 'Open Diagram')-»
-«ENDDEFINE»
+«DEFINE i18nValues FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForOpenCommandName(), 'Open Diagram')-»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt
index 042d095b6..2eaa2a968 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/TextFeedback.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2006, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,30 +10,30 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«DEFINE TextSelectionEditPolicy FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «editPoliciesPackageName»;
+«DEFINE TextSelectionEditPolicy FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «textSelectionEditPolicyClassName» extends org.eclipse.gef.editpolicies.SelectionEditPolicy {
+«EXPAND xpt::Common::generatedClassComment»
+public class «textSelectionEditPolicyClassName» extends org.eclipse.gef.editpolicies.SelectionEditPolicy {
- «EXPAND textFeedback FOR self-»
+ «EXPAND textFeedback FOR self-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE TextNonResizableEditPolicy FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «editPoliciesPackageName»;
+«DEFINE TextNonResizableEditPolicy FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «editPoliciesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx {
+«EXPAND xpt::Common::generatedClassComment»
+public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runtime.diagram.ui.editpolicies.NonResizableEditPolicyEx {
- «EXPAND textFeedback FOR self-»
+ «EXPAND textFeedback FOR self-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected java.util.List createSelectionHandles() {
org.eclipse.gef.handles.MoveHandle moveHandle =
new org.eclipse.gef.handles.MoveHandle((org.eclipse.gef.GraphicalEditPart) getHost());
@@ -42,19 +42,19 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
return java.util.Collections.singletonList(moveHandle);
}
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE textFeedback FOR gmfgen::GenDiagram»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE textFeedback FOR gmfgen::GenDiagram»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.IFigure selectionFeedbackFigure;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.IFigure focusFeedbackFigure;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.FigureListener hostPositionListener;
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void showPrimarySelection() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getHostFigure()).setSelected(true);
@@ -65,7 +65,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void showSelection() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getHostFigure()).setSelected(true);
@@ -79,7 +79,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void hideSelection() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getHostFigure()).setSelected(false);
@@ -94,7 +94,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void showFocus() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getHostFigure()).setFocus(true);
@@ -105,7 +105,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void hideFocus() {
if (getHostFigure() instanceof org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) {
((org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel) getHostFigure()).setFocus(false);
@@ -117,7 +117,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.geometry.Rectangle getFeedbackBounds() {
org.eclipse.draw2d.geometry.Rectangle bounds;
if (getHostFigure() instanceof org.eclipse.draw2d.Label) {
@@ -131,7 +131,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
return bounds;
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createSelectionFeedbackFigure() {
if (getHostFigure() instanceof org.eclipse.draw2d.Label) {
org.eclipse.draw2d.Label feedbackFigure = new org.eclipse.draw2d.Label();
@@ -146,7 +146,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.draw2d.IFigure createFocusFeedbackFigure() {
return new org.eclipse.draw2d.Figure() {
@@ -156,7 +156,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
};
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void updateLabel(org.eclipse.draw2d.Label target) {
org.eclipse.draw2d.Label source = (org.eclipse.draw2d.Label) getHostFigure();
target.setText(source.getText());
@@ -164,7 +164,7 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
target.setFont(source.getFont());
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshSelectionFeedback() {
if (selectionFeedbackFigure != null) {
if (selectionFeedbackFigure instanceof org.eclipse.draw2d.Label) {
@@ -176,20 +176,20 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected void refreshFocusFeedback() {
if (focusFeedbackFigure != null) {
focusFeedbackFigure.setBounds(getFeedbackBounds());
}
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void refreshFeedback() {
refreshSelectionFeedback();
refreshFocusFeedback();
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private org.eclipse.draw2d.FigureListener getHostPositionListener() {
if (hostPositionListener == null) {
hostPositionListener = new org.eclipse.draw2d.FigureListener() {
@@ -200,4 +200,4 @@ public class «textNonResizableEditPolicyClassName» extends org.eclipse.gmf.runti
}
return hostPositionListener;
}
-«ENDDEFINE»
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/childContainerCreateCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
index e52aed10d..c967f74ba 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/childContainerCreateCommand.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,24 +10,24 @@
* Alexander Shatalin (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«EXTENSION xpt::GenModelUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«EXTENSION xpt::GenModelUtils»
-«DEFINE childContainerCreateCommand FOR Sequence(gmfgen::GenNode)-»
-«IF not self->isEmpty()-»
+«DEFINE childContainerCreateCommand FOR Sequence(gmfgen::GenNode)-»
+«IF not self->isEmpty()-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getCreateCommand(org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest req) {
-«FOREACH self AS n-»
- «EXPAND childNodeCreateCommand(n) FOR n.modelFacet-»
-«ENDFOREACH-»
+«FOREACH self AS n-»
+ «EXPAND childNodeCreateCommand(n) FOR n.modelFacet-»
+«ENDFOREACH-»
return super.getCreateCommand(req);
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE childNodeCreateCommand(node : gmfgen::GenNode) FOR gmfgen::TypeModelFacet-»
-if («EXPAND xpt::providers::ElementTypes::accessElementType FOR node» == req.getElementType()) {
- return getGEFWrapper(new «node.getCreateCommandQualifiedClassName()»(req));
+«DEFINE childNodeCreateCommand(node : gmfgen::GenNode) FOR gmfgen::TypeModelFacet-»
+if («EXPAND xpt::providers::ElementTypes::accessElementType FOR node» == req.getElementType()) {
+ return getGEFWrapper(new «node.getCreateCommandQualifiedClassName()»(req));
}
-«ENDDEFINE» \ No newline at end of file
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/linkCommands.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/linkCommands.xpt
index c399b08a6..2adc020a4 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/linkCommands.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/editpolicies/linkCommands.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -12,12 +12,12 @@
* Michael Golubev (Borland) - [243151] explicit source/target for links
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::editpolicies::Utils»
-«EXTENSION xpt::GenModelUtils»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«EXTENSION xpt::diagram::editpolicies::Utils»
+«EXTENSION xpt::GenModelUtils»
-«REM»
+«REM»
* Start start of link creation.
* User click to this editpart and start dragging with link tool.
* Complete end of the command
@@ -37,23 +37,23 @@
* in the latter case it is assumed that its a TypeLink (so its model facet is LinkTypeModelFacet),
* because RefLinks don't have underlying semantic identity
*
-«ENDREM»
+«ENDREM»
-«DEFINE linkCommands FOR gmfgen::GenLinkEnd-»
- «IF getAllPotentialLinks(self)->size() > 0-»
- «EXPAND createLinkCommands -»
- «ENDIF-»
- «IF getReroutableTypeLinks(self)->size() > 0-»
- «EXPAND reorientTypeLinkCommands -»
- «ENDIF-»
- «IF getReroutableRefLinks(self)->size() > 0-»
- «EXPAND reorientRefLinkCommands -»
- «ENDIF-»
-«ENDDEFINE»
+«DEFINE linkCommands FOR gmfgen::GenLinkEnd-»
+ «IF getAllPotentialLinks(self)->size() > 0-»
+ «EXPAND createLinkCommands -»
+ «ENDIF-»
+ «IF getReroutableTypeLinks(self)->size() > 0-»
+ «EXPAND reorientTypeLinkCommands -»
+ «ENDIF-»
+ «IF getReroutableRefLinks(self)->size() > 0-»
+ «EXPAND reorientRefLinkCommands -»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE createLinkCommands FOR gmfgen::GenLinkEnd-»
+«DEFINE createLinkCommands FOR gmfgen::GenLinkEnd-»
-«EXPAND xpt::Common::generatedMemberComment»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getCreateRelationshipCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
org.eclipse.gef.commands.Command command = req.getTarget() == null ?
@@ -61,84 +61,84 @@ protected org.eclipse.gef.commands.Command getCreateRelationshipCommand(
return command != null ? command : super.getCreateRelationshipCommand(req);
}
-«EXPAND xpt::Common::generatedMemberComment»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getStartCreateRelationshipCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
- «EXPAND startLinkCommands(self) FOREACH getAllPotentialLinks(self)-»
+ «EXPAND startLinkCommands(self) FOREACH getAllPotentialLinks(self)-»
return null;
}
-«EXPAND xpt::Common::generatedMemberComment»
+«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.gef.commands.Command getCompleteCreateRelationshipCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest req) {
- «EXPAND completeLinkCommands(self) FOREACH getAllPotentialLinks(self)-»
+ «EXPAND completeLinkCommands(self) FOREACH getAllPotentialLinks(self)-»
return null;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE startLinkCommands(linkEnd : gmfgen::GenLinkEnd) FOR gmfgen::GenLink-»
-if («EXPAND xpt::providers::ElementTypes::accessElementType» == req.getElementType()) {
- «IF createStartLinkCommand(self, linkEnd)-»
- return getGEFWrapper(new «getCreateCommandQualifiedClassName()»(req,
- «IF createStartIncomingLinkCommand(self, linkEnd)-»
+«DEFINE startLinkCommands(linkEnd : gmfgen::GenLinkEnd) FOR gmfgen::GenLink-»
+if («EXPAND xpt::providers::ElementTypes::accessElementType» == req.getElementType()) {
+ «IF createStartLinkCommand(self, linkEnd)-»
+ return getGEFWrapper(new «getCreateCommandQualifiedClassName()»(req,
+ «IF createStartIncomingLinkCommand(self, linkEnd)-»
req.getTarget(), req.getSource()
- «ELSE-»
+ «ELSE-»
req.getSource(), req.getTarget()
- «ENDIF-»
+ «ENDIF-»
));
- «ELSE-»
+ «ELSE-»
return null;
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE completeLinkCommands(linkEnd : gmfgen::GenLinkEnd) FOR gmfgen::GenLink-»
-if («EXPAND xpt::providers::ElementTypes::accessElementType» == req.getElementType()) {
- «IF createCompleteLinkCommand(self, linkEnd)-»
- return getGEFWrapper(new «getCreateCommandQualifiedClassName()»(req,
- «IF createCompleteOutgoingLinkCommand(self, linkEnd)-»
+«DEFINE completeLinkCommands(linkEnd : gmfgen::GenLinkEnd) FOR gmfgen::GenLink-»
+if («EXPAND xpt::providers::ElementTypes::accessElementType» == req.getElementType()) {
+ «IF createCompleteLinkCommand(self, linkEnd)-»
+ return getGEFWrapper(new «getCreateCommandQualifiedClassName()»(req,
+ «IF createCompleteOutgoingLinkCommand(self, linkEnd)-»
req.getTarget(), req.getSource()
- «ELSE-»
+ «ELSE-»
req.getSource(), req.getTarget()
- «ENDIF-»
+ «ENDIF-»
));
- «ELSE-»
+ «ELSE-»
return null;
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE reorientTypeLinkCommands FOR gmfgen::GenLinkEnd-»
+«DEFINE reorientTypeLinkCommands FOR gmfgen::GenLinkEnd-»
-«EXPAND xpt::Common::generatedMemberComment(
+«EXPAND xpt::Common::generatedMemberComment(
'Returns command to reorient EClass based link. New link target or source\n' +
'should be the domain model element associated with this node.\n'
-)»
+)»
protected org.eclipse.gef.commands.Command getReorientRelationshipCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest req) {
switch (getVisualID(req)) {
- «EXPAND reorientLinkCommand FOREACH getReroutableTypeLinks(self)-»
+ «EXPAND reorientLinkCommand FOREACH getReroutableTypeLinks(self)-»
}
return super.getReorientRelationshipCommand(req);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE reorientRefLinkCommands FOR gmfgen::GenLinkEnd-»
+«DEFINE reorientRefLinkCommands FOR gmfgen::GenLinkEnd-»
-«EXPAND xpt::Common::generatedMemberComment(
+«EXPAND xpt::Common::generatedMemberComment(
'Returns command to reorient EReference based link. New link target or source\n' +
'should be the domain model element associated with this node.\n'
-)»
+)»
protected org.eclipse.gef.commands.Command getReorientReferenceRelationshipCommand(
org.eclipse.gmf.runtime.emf.type.core.requests.ReorientReferenceRelationshipRequest req) {
switch (getVisualID(req)) {
- «EXPAND reorientLinkCommand FOREACH getReroutableRefLinks(self)-»
+ «EXPAND reorientLinkCommand FOREACH getReroutableRefLinks(self)-»
}
return super.getReorientReferenceRelationshipCommand(req);
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE reorientLinkCommand FOR gmfgen::GenLink-»
-«EXPAND xpt::Common::caseVisualID»
- return getGEFWrapper(new «getReorientCommandQualifiedClassName()»(req));
-«ENDDEFINE»
+«DEFINE reorientLinkCommand FOR gmfgen::GenLink-»
+«EXPAND xpt::Common::caseVisualID»
+ return getGEFWrapper(new «getReorientCommandQualifiedClassName()»(req));
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/PreferenceInitializer.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/PreferenceInitializer.xpt
index e01559b95..64fcb98a2 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/PreferenceInitializer.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/PreferenceInitializer.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,103 +10,103 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::diagram::Utils»
-«DEFINE className FOR gmfgen::GenDiagram»DiagramPreferenceInitializer«ENDDEFINE»
+«DEFINE className FOR gmfgen::GenDiagram»DiagramPreferenceInitializer«ENDDEFINE»
-«DEFINE qualifiedClassName FOR gmfgen::GenDiagram»«preferencesPackageName».«EXPAND className»«ENDDEFINE»
+«DEFINE qualifiedClassName FOR gmfgen::GenDiagram»«preferencesPackageName».«EXPAND className»«ENDDEFINE»
-«DEFINE PreferenceInitializer FOR gmfgen::GenDiagram-»
-«EXPAND xpt::Common::copyright FOR editorGen-»
-package «preferencesPackageName»;
+«DEFINE PreferenceInitializer FOR gmfgen::GenDiagram-»
+«EXPAND xpt::Common::copyright FOR editorGen-»
+package «preferencesPackageName»;
-«EXPAND xpt::Common::generatedClassComment»
-public class «EXPAND className» extends org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer {
+«EXPAND xpt::Common::generatedClassComment»
+public class «EXPAND className» extends org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer {
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public void initializeDefaultPreferences() {
org.eclipse.jface.preference.IPreferenceStore store = getPreferenceStore();
-«IF preferences = null-»
- «EXPAND initDefaults('store') FOREACH allPreferencePages(self)»
-«ELSE»«REM»default values for predefined pages will be set manually«ENDREM-»
- «EXPAND initDefaults('store') FOREACH (allPreferencePages(self))[gmfgen::GenCustomPreferencePage]»
- «EXPAND initDefaults('store') FOR preferences-»
-«ENDIF-»
+«IF preferences = null-»
+ «EXPAND initDefaults('store') FOREACH allPreferencePages(self)»
+«ELSE»«REM»default values for predefined pages will be set manually«ENDREM-»
+ «EXPAND initDefaults('store') FOREACH (allPreferencePages(self))[gmfgen::GenCustomPreferencePage]»
+ «EXPAND initDefaults('store') FOR preferences-»
+«ENDIF-»
}
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.jface.preference.IPreferenceStore getPreferenceStore() {
- return «editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore();
+ return «editorGen.plugin.getActivatorQualifiedClassName()».getInstance().getPreferenceStore();
}
}
-«ENDDEFINE»
-
-«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenPreferencePage»«ERROR 'Abstract define for ' + self.repr()»«ENDDEFINE»
-
-«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenStandardPreferencePage-»
-«EXPAND impl::preferences::StandardPage::call_initDefaults(storeVar)»
-«ENDDEFINE»
-
-«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenCustomPreferencePage-»
-«EXPAND impl::preferences::CustomPage::call_initDefaults(storeVar)»
-«ENDDEFINE»
-
-«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenDiagramPreferences»
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_CONNECTION_HANDLES, «showConnectionHandles»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_POPUP_BARS, «showPopupBars»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_ENABLE_ANIMATED_LAYOUT, «enableAnimatedLayout»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_ENABLE_ANIMATED_ZOOM, «enableAnimatedZoom»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_ENABLE_ANTIALIAS, «enableAntiAlias»);
- «EXPAND initDefaultFont(storeVar, 'PREF_DEFAULT_FONT') FOR defaultFont-»
- «EXPAND initDefaultColor(storeVar, 'PREF_FONT_COLOR') FOR fontColor-»
- «EXPAND initDefaultColor(storeVar, 'PREF_FILL_COLOR') FOR fillColor-»
- «EXPAND initDefaultColor(storeVar, 'PREF_LINE_COLOR') FOR lineColor-»
- «EXPAND initDefaultColor(storeVar, 'PREF_NOTE_FILL_COLOR') FOR noteFillColor-»
- «EXPAND initDefaultColor(storeVar, 'PREF_NOTE_LINE_COLOR') FOR noteLineColor-»
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE, org.eclipse.gmf.runtime.notation.Routing.«lineStyle»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_RULERS, «showRulers»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_RULER_UNITS, org.eclipse.gef.rulers.RulerProvider.UNIT_«rulerUnits»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_GRID, «showGrid»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SNAP_TO_GRID, «snapToGrid»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SNAP_TO_GEOMETRY, «snapToGeometry»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_GRID_SPACING, «gridSpacing»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_PROMPT_ON_DEL_FROM_MODEL, «promptOnDelFromModel»);
- «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_PROMPT_ON_DEL_FROM_DIAGRAM, «promptOnDelFromDiagram»);
-«ENDDEFINE»
-
-«DEFINE initDefaultColor(storeVar : String, prefName : String) FOR gmfgen::GenColor»
- org.eclipse.jface.preference.PreferenceConverter.setDefault(«storeVar»,
- org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.«prefName», «EXPAND rgb»);
-«ENDDEFINE»
-
-«DEFINE initDefaultFont(storeVar : String, prefName : String) FOR gmfgen::GenFont»
- org.eclipse.jface.preference.PreferenceConverter.setDefault(«storeVar»,
- org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.«prefName», «EXPAND fontData»);
-«ENDDEFINE»
-
-«DEFINE rgb FOR gmfgen::GenColor»
- «ERROR 'Unknown colour: ' + self.repr()»
-«ENDDEFINE»
-
-«DEFINE rgb FOR gmfgen::GenConstantColor»
- org.eclipse.gmf.runtime.diagram.ui.figures.DiagramColorConstants.«name».getRGB()
-«ENDDEFINE»
-
-«DEFINE rgb FOR gmfgen::GenRGBColor»
- new org.eclipse.swt.graphics.RGB(«red», «green», «blue»)
-«ENDDEFINE»
-
-«DEFINE fontData FOR gmfgen::GenFont»
- «ERROR 'Unknown font: ' + self.repr()»
-«ENDDEFINE»
-
-«DEFINE fontData FOR gmfgen::GenCustomFont»
- new org.eclipse.swt.graphics.FontData("«name»", «height», org.eclipse.swt.SWT.«style»)
-«ENDDEFINE»
-
-«DEFINE fontData FOR gmfgen::GenStandardFont»
- org.eclipse.jface.resource.JFaceResources.get«name»Font().getFontData()
-«ENDDEFINE»
+«ENDDEFINE»
+
+«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenPreferencePage»«ERROR 'Abstract define for ' + self.repr()»«ENDDEFINE»
+
+«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenStandardPreferencePage-»
+«EXPAND impl::preferences::StandardPage::call_initDefaults(storeVar)»
+«ENDDEFINE»
+
+«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenCustomPreferencePage-»
+«EXPAND impl::preferences::CustomPage::call_initDefaults(storeVar)»
+«ENDDEFINE»
+
+«DEFINE initDefaults(storeVar : String) FOR gmfgen::GenDiagramPreferences»
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_CONNECTION_HANDLES, «showConnectionHandles»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_POPUP_BARS, «showPopupBars»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_ENABLE_ANIMATED_LAYOUT, «enableAnimatedLayout»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_ENABLE_ANIMATED_ZOOM, «enableAnimatedZoom»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_ENABLE_ANTIALIAS, «enableAntiAlias»);
+ «EXPAND initDefaultFont(storeVar, 'PREF_DEFAULT_FONT') FOR defaultFont-»
+ «EXPAND initDefaultColor(storeVar, 'PREF_FONT_COLOR') FOR fontColor-»
+ «EXPAND initDefaultColor(storeVar, 'PREF_FILL_COLOR') FOR fillColor-»
+ «EXPAND initDefaultColor(storeVar, 'PREF_LINE_COLOR') FOR lineColor-»
+ «EXPAND initDefaultColor(storeVar, 'PREF_NOTE_FILL_COLOR') FOR noteFillColor-»
+ «EXPAND initDefaultColor(storeVar, 'PREF_NOTE_LINE_COLOR') FOR noteLineColor-»
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_LINE_STYLE, org.eclipse.gmf.runtime.notation.Routing.«lineStyle»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_RULERS, «showRulers»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_RULER_UNITS, org.eclipse.gef.rulers.RulerProvider.UNIT_«rulerUnits»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SHOW_GRID, «showGrid»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SNAP_TO_GRID, «snapToGrid»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_SNAP_TO_GEOMETRY, «snapToGeometry»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_GRID_SPACING, «gridSpacing»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_PROMPT_ON_DEL_FROM_MODEL, «promptOnDelFromModel»);
+ «storeVar».setDefault(org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.PREF_PROMPT_ON_DEL_FROM_DIAGRAM, «promptOnDelFromDiagram»);
+«ENDDEFINE»
+
+«DEFINE initDefaultColor(storeVar : String, prefName : String) FOR gmfgen::GenColor»
+ org.eclipse.jface.preference.PreferenceConverter.setDefault(«storeVar»,
+ org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.«prefName», «EXPAND rgb»);
+«ENDDEFINE»
+
+«DEFINE initDefaultFont(storeVar : String, prefName : String) FOR gmfgen::GenFont»
+ org.eclipse.jface.preference.PreferenceConverter.setDefault(«storeVar»,
+ org.eclipse.gmf.runtime.diagram.ui.preferences.IPreferenceConstants.«prefName», «EXPAND fontData»);
+«ENDDEFINE»
+
+«DEFINE rgb FOR gmfgen::GenColor»
+ «ERROR 'Unknown colour: ' + self.repr()»
+«ENDDEFINE»
+
+«DEFINE rgb FOR gmfgen::GenConstantColor»
+ org.eclipse.gmf.runtime.diagram.ui.figures.DiagramColorConstants.«name».getRGB()
+«ENDDEFINE»
+
+«DEFINE rgb FOR gmfgen::GenRGBColor»
+ new org.eclipse.swt.graphics.RGB(«red», «green», «blue»)
+«ENDDEFINE»
+
+«DEFINE fontData FOR gmfgen::GenFont»
+ «ERROR 'Unknown font: ' + self.repr()»
+«ENDDEFINE»
+
+«DEFINE fontData FOR gmfgen::GenCustomFont»
+ new org.eclipse.swt.graphics.FontData("«name»", «height», org.eclipse.swt.SWT.«style»)
+«ENDDEFINE»
+
+«DEFINE fontData FOR gmfgen::GenStandardFont»
+ org.eclipse.jface.resource.JFaceResources.get«name»Font().getFontData()
+«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/extensions.xpt
index d0bd2742c..fc807fd03 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/extensions.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/preferences/extensions.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -10,40 +10,40 @@
* Dmitry Stadnik (Borland) - initial API and implementation
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::Utils»
+«EXTENSION xpt::diagram::Utils»
-«DEFINE extensions FOR gmfgen::GenDiagram-»
+«DEFINE extensions FOR gmfgen::GenDiagram-»
<extension point="org.eclipse.core.runtime.preferences" id="prefs">
- «EXPAND xpt::Common::xmlGeneratedTag»
- <initializer class="«EXPAND xpt::diagram::preferences::PreferenceInitializer::qualifiedClassName»"/>
+ «EXPAND xpt::Common::xmlGeneratedTag»
+ <initializer class="«EXPAND xpt::diagram::preferences::PreferenceInitializer::qualifiedClassName»"/>
</extension>
-«IF preferencePages->size() > 0-»
+«IF preferencePages->size() > 0-»
<extension point="org.eclipse.ui.preferencePages" id="prefpages">
- «EXPAND xpt::Common::xmlGeneratedTag»
-«EXPAND preferencePage FOREACH allPreferencePages(self)-»
+ «EXPAND xpt::Common::xmlGeneratedTag»
+«EXPAND preferencePage FOREACH allPreferencePages(self)-»
</extension>
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE preferencePage FOR gmfgen::GenPreferencePage-»
+«DEFINE preferencePage FOR gmfgen::GenPreferencePage-»
<page
- id="«iD»"
- name="%prefpage.«iD»"
-«IF null <> parent-»
- category="«parent.iD»"
-«ENDIF-»
- class="«getQualifiedClassName()»">
+ id="«iD»"
+ name="%prefpage.«iD»"
+«IF null <> parent-»
+ category="«parent.iD»"
+«ENDIF-»
+ class="«getQualifiedClassName()»">
</page>
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE i18n FOR gmfgen::GenDiagram»
+«DEFINE i18n FOR gmfgen::GenDiagram»
# Preferences
-«FOREACH allPreferencePages(self) AS p-»
-prefpage.«p.iD»=«p.name»
-«ENDFOREACH»
-«ENDDEFINE» \ No newline at end of file
+«FOREACH allPreferencePages(self) AS p-»
+prefpage.«p.iD»=«p.name»
+«ENDFOREACH»
+«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt
index 798714837..b110c4b92 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt
@@ -1,4 +1,4 @@
-/*
+/*
* Copyright (c) 2007, 2009 Borland Software Corporation
*
* All rights reserved. This program and the accompanying materials
@@ -11,122 +11,122 @@
* Michael Golubev (Borland) - [243151] explicit source/target for links
*/
-«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
-«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
+«IMPORT 'http://www.eclipse.org/gmf/2009/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/GenModel'»
+«IMPORT 'http://www.eclipse.org/emf/2002/Ecore'»
-«EXTENSION xpt::diagram::updater::Utils»
-«EXTENSION xpt::diagram::editpolicies::LinkUtils»
-«EXTENSION xpt::GenModelUtils»
-«EXTENSION gmf::GenModelUtils»
+«EXTENSION xpt::diagram::updater::Utils»
+«EXTENSION xpt::diagram::editpolicies::LinkUtils»
+«EXTENSION xpt::GenModelUtils»
+«EXTENSION gmf::GenModelUtils»
-«DEFINE DiagramUpdater FOR gmfgen::GenDiagramUpdater-»
- «EXPAND xpt::Common::copyright FOR editorGen-»
-package «editorGen.editor.packageName»;
+«DEFINE DiagramUpdater FOR gmfgen::GenDiagramUpdater-»
+ «EXPAND xpt::Common::copyright FOR editorGen-»
+package «editorGen.editor.packageName»;
- «EXPAND xpt::Common::generatedClassComment»
-public class «diagramUpdaterClassName» {
- «EXPAND isShortcutOrphaned-»
-«LET editorGen.diagram.getAllContainers()->select(container | hasSemanticChildren(container))->asSequence() AS semanticContainers-»
+ «EXPAND xpt::Common::generatedClassComment»
+public class «diagramUpdaterClassName» {
+ «EXPAND isShortcutOrphaned-»
+«LET editorGen.diagram.getAllContainers()->select(container | hasSemanticChildren(container))->asSequence() AS semanticContainers-»
- «EXPAND getGenericSemanticChildrenOfView(semanticContainers)-»
- «EXPAND getSemanticChildrenOfView FOREACH semanticContainers-»
- «EXPAND getPhantomNodesIterator-»
-«ENDLET-»
+ «EXPAND getGenericSemanticChildrenOfView(semanticContainers)-»
+ «EXPAND getSemanticChildrenOfView FOREACH semanticContainers-»
+ «EXPAND getPhantomNodesIterator-»
+«ENDLET-»
- «EXPAND getGenericConnectedLinks(getAllSemanticElements(editorGen.diagram), getContainedLinksMethodNameSuffix())-»
+ «EXPAND getGenericConnectedLinks(getAllSemanticElements(editorGen.diagram), getContainedLinksMethodNameSuffix())-»
- «EXPAND getGenericConnectedLinks(getAllSemanticDiagramElements(editorGen.diagram), getIncomingLinksMethodNameSuffix())-»
+ «EXPAND getGenericConnectedLinks(getAllSemanticDiagramElements(editorGen.diagram), getIncomingLinksMethodNameSuffix())-»
- «EXPAND getGenericConnectedLinks(getAllSemanticDiagramElements(editorGen.diagram), getOutgoingLinksMethodNameSuffix())-»
- «EXPAND getContainedLinks FOREACH getAllSemanticElements(editorGen.diagram)-»
- «EXPAND getIncomingLinks FOREACH getAllSemanticDiagramElements(editorGen.diagram)-»
- «EXPAND getOutgoingLinks FOREACH getAllSemanticDiagramElements(editorGen.diagram)-»
- «EXPAND getContainedLinksByTypeMethod FOREACH getAllContainedLinks(editorGen.diagram)-»
- «EXPAND getIncomingLinksByTypeMethod FOREACH getAllIncomingLinks(editorGen.diagram)-»
- «EXPAND getOutgoingLinksByTypeMethod FOREACH getAllOutgoingLinks(editorGen.diagram)-»
-
- «EXPAND additions-»
+ «EXPAND getGenericConnectedLinks(getAllSemanticDiagramElements(editorGen.diagram), getOutgoingLinksMethodNameSuffix())-»
+ «EXPAND getContainedLinks FOREACH getAllSemanticElements(editorGen.diagram)-»
+ «EXPAND getIncomingLinks FOREACH getAllSemanticDiagramElements(editorGen.diagram)-»
+ «EXPAND getOutgoingLinks FOREACH getAllSemanticDiagramElements(editorGen.diagram)-»
+ «EXPAND getContainedLinksByTypeMethod FOREACH getAllContainedLinks(editorGen.diagram)-»
+ «EXPAND getIncomingLinksByTypeMethod FOREACH getAllIncomingLinks(editorGen.diagram)-»
+ «EXPAND getOutgoingLinksByTypeMethod FOREACH getAllOutgoingLinks(editorGen.diagram)-»
+
+ «EXPAND additions-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«REM»
+«REM»
Currently shortcuts are supported only for domain-based diagram element.
This means, view.isSetElement() == true.
-«ENDREM»
-«DEFINE isShortcutOrphaned FOR gmfgen::GenDiagramUpdater-»
- «IF not editorGen.diagram.containsShortcutsTo->isEmpty()-»
+«ENDREM»
+«DEFINE isShortcutOrphaned FOR gmfgen::GenDiagramUpdater-»
+ «IF not editorGen.diagram.containsShortcutsTo->isEmpty()-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
public static boolean isShortcutOrphaned(org.eclipse.gmf.runtime.notation.View view) {
return !view.isSetElement() || view.getElement() == null || view.getElement().eIsProxy();
}
- «ENDIF-»
-«ENDDEFINE»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE getGenericSemanticChildrenOfView(semanticContainers : Sequence(gmfgen::GenContainerBase)) FOR gmfgen::GenDiagramUpdater-»
- «EXPAND xpt::Common::generatedMemberComment»
+«DEFINE getGenericSemanticChildrenOfView(semanticContainers : Sequence(gmfgen::GenContainerBase)) FOR gmfgen::GenDiagramUpdater-»
+ «EXPAND xpt::Common::generatedMemberComment»
public static java.util.List getSemanticChildren(org.eclipse.gmf.runtime.notation.View view) {
- «IF not semanticContainers->isEmpty()-»
- switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(view)) {
- «EXPAND getSemanticChildrenCase FOREACH semanticContainers-»
+ «IF not semanticContainers->isEmpty()-»
+ switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(view)) {
+ «EXPAND getSemanticChildrenCase FOREACH semanticContainers-»
}
- «ENDIF-»
+ «ENDIF-»
return java.util.Collections.EMPTY_LIST;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getSemanticChildrenCase FOR gmfgen::GenContainerBase-»
-«EXPAND xpt::Common::caseVisualID»
- return «EXPAND getSemanticChildrenMethodName»(view);
-«ENDDEFINE»
+«DEFINE getSemanticChildrenCase FOR gmfgen::GenContainerBase-»
+«EXPAND xpt::Common::caseVisualID»
+ return «EXPAND getSemanticChildrenMethodName»(view);
+«ENDDEFINE»
-«DEFINE getSemanticChildrenOfView FOR gmfgen::GenContainerBase-»
+«DEFINE getSemanticChildrenOfView FOR gmfgen::GenContainerBase-»
- «EXPAND xpt::Common::generatedMemberComment»
-public static java.util.List «EXPAND getSemanticChildrenMethodName»(org.eclipse.gmf.runtime.notation.View view) {
- «IF getSemanticChildrenChildFeatures(self)->size() > 0 or self.getPhantomNodes()->size() > 0-»
- «EXPAND defineModelElement-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public static java.util.List «EXPAND getSemanticChildrenMethodName»(org.eclipse.gmf.runtime.notation.View view) {
+ «IF getSemanticChildrenChildFeatures(self)->size() > 0 or self.getPhantomNodes()->size() > 0-»
+ «EXPAND defineModelElement-»
java.util.List result = new java.util.LinkedList();
-«REM»childMetaFeature can be null here!«ENDREM»«-»
- «FOREACH getSemanticChildrenChildFeatures(self) AS childMetaFeature-»
- «IF null = childMetaFeature-»
+«REM»childMetaFeature can be null here!«ENDREM»«-»
+ «FOREACH getSemanticChildrenChildFeatures(self) AS childMetaFeature-»
+ «IF null = childMetaFeature-»
{ /*FIXME no containment/child feature found in the genmodel, toolsmith need to specify Class here manually*/ childElement = /*FIXME no containment/child feature found in the genmodel, toolsmith need to specify correct one here manually*/;
- «ELSEIF isListType(childMetaFeature)-»
- for (java.util.Iterator it = «EXPAND MetaModel::getFeatureValue('modelElement', self.getModelElementType()) FOR childMetaFeature».iterator(); it.hasNext();) {
- «EXPAND MetaModel::DeclareAndAssign('childElement', 'it.next()', true) FOR getTypeGenClassX(childMetaFeature)»
- «ELSE-»
- { «EXPAND MetaModel::DeclareAndAssign('childElement', 'modelElement', self.getModelElementType(), childMetaFeature) FOR getTypeGenClassX(childMetaFeature)»
- «ENDIF-»
- int visualID = «EXPAND xpt::editor::VisualIDRegistry::getNodeVisualIDMethodCall FOR getDiagram()»(view, «EXPAND MetaModel::DowncastToEObject('childElement') FOR getTypeGenClassX(childMetaFeature)»);
- «EXPAND checkChildElementVisualID(null <> childMetaFeature and isListType(childMetaFeature)) FOREACH getSemanticChildren(self, childMetaFeature)-»
+ «ELSEIF isListType(childMetaFeature)-»
+ for (java.util.Iterator it = «EXPAND MetaModel::getFeatureValue('modelElement', self.getModelElementType()) FOR childMetaFeature».iterator(); it.hasNext();) {
+ «EXPAND MetaModel::DeclareAndAssign('childElement', 'it.next()', true) FOR getTypeGenClassX(childMetaFeature)»
+ «ELSE-»
+ { «EXPAND MetaModel::DeclareAndAssign('childElement', 'modelElement', self.getModelElementType(), childMetaFeature) FOR getTypeGenClassX(childMetaFeature)»
+ «ENDIF-»
+ int visualID = «EXPAND xpt::editor::VisualIDRegistry::getNodeVisualIDMethodCall FOR getDiagram()»(view, «EXPAND MetaModel::DowncastToEObject('childElement') FOR getTypeGenClassX(childMetaFeature)»);
+ «EXPAND checkChildElementVisualID(null <> childMetaFeature and isListType(childMetaFeature)) FOREACH getSemanticChildren(self, childMetaFeature)-»
}
- «ENDFOREACH-»
- «IF not self.getPhantomNodes()->isEmpty()-»
+ «ENDFOREACH-»
+ «IF not self.getPhantomNodes()->isEmpty()-»
org.eclipse.emf.ecore.resource.Resource resource = modelElement.eResource();
for (java.util.Iterator semanticIterator = getPhantomNodesIterator(resource); semanticIterator.hasNext();) {
org.eclipse.emf.ecore.EObject childElement = (org.eclipse.emf.ecore.EObject) semanticIterator.next();
if (childElement == modelElement) {
continue;
}
- «EXPAND addNextIfPhantom FOREACH self.getPhantomNodes()-»
+ «EXPAND addNextIfPhantom FOREACH self.getPhantomNodes()-»
}
- «ENDIF-»
+ «ENDIF-»
return result;
- «ELSE-»
+ «ELSE-»
return java.util.Collections.EMPTY_LIST;
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE defineModelElement FOR gmfgen::GenContainerBase-»
+«DEFINE defineModelElement FOR gmfgen::GenContainerBase-»
if (!view.isSetElement()) {
return java.util.Collections.EMPTY_LIST;
}
-«EXPAND MetaModel::DeclareAndAssign('modelElement', 'view.getElement()') FOR self.getModelElementType()»
-«ENDDEFINE»
+«EXPAND MetaModel::DeclareAndAssign('modelElement', 'view.getElement()') FOR self.getModelElementType()»
+«ENDDEFINE»
-«DEFINE defineModelElement FOR gmfgen::GenCompartment-»
+«DEFINE defineModelElement FOR gmfgen::GenCompartment-»
if (false == view.eContainer() instanceof org.eclipse.gmf.runtime.notation.View) {
return java.util.Collections.EMPTY_LIST;
}
@@ -134,355 +134,355 @@ org.eclipse.gmf.runtime.notation.View containerView = (org.eclipse.gmf.runtime.n
if (!containerView.isSetElement()) {
return java.util.Collections.EMPTY_LIST;
}
-«EXPAND MetaModel::DeclareAndAssign('modelElement', 'containerView.getElement()') FOR self.getModelElementType()»
-«ENDDEFINE»
+«EXPAND MetaModel::DeclareAndAssign('modelElement', 'containerView.getElement()') FOR self.getModelElementType()»
+«ENDDEFINE»
-«DEFINE getSemanticChildrenMethodName FOR gmfgen::GenContainerBase»get«getUniqueIdentifier()»SemanticChildren«ENDDEFINE»
+«DEFINE getSemanticChildrenMethodName FOR gmfgen::GenContainerBase»get«getUniqueIdentifier()»SemanticChildren«ENDDEFINE»
-«DEFINE getSemanticChildrenMethodCall FOR gmfgen::GenContainerBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND getSemanticChildrenMethodName»«ENDDEFINE»
+«DEFINE getSemanticChildrenMethodCall FOR gmfgen::GenContainerBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND getSemanticChildrenMethodName»«ENDDEFINE»
-«DEFINE checkChildElementVisualID(inLoop : Boolean) FOR gmfgen::GenNode-»
-if (visualID == «EXPAND xpt::editor::VisualIDRegistry::visualID») {
- result.add(new «getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName()»(«IF null <> modelFacet.childMetaFeature»«EXPAND MetaModel::DowncastToEObject('childElement') FOR getTypeGenClassX(modelFacet.childMetaFeature)»«ENDIF», visualID));
-«IF inLoop-»
+«DEFINE checkChildElementVisualID(inLoop : Boolean) FOR gmfgen::GenNode-»
+if (visualID == «EXPAND xpt::editor::VisualIDRegistry::visualID») {
+ result.add(new «getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName()»(«IF null <> modelFacet.childMetaFeature»«EXPAND MetaModel::DowncastToEObject('childElement') FOR getTypeGenClassX(modelFacet.childMetaFeature)»«ENDIF», visualID));
+«IF inLoop-»
continue;
-«ENDIF-»
+«ENDIF-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addNextIfPhantom FOR gmfgen::GenNode-»
-if («EXPAND xpt::editor::VisualIDRegistry::getNodeVisualIDMethodCall FOR getDiagram()»(view, childElement) == «EXPAND xpt::editor::VisualIDRegistry::visualID») {
- result.add(new «getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName()»(childElement, «EXPAND xpt::editor::VisualIDRegistry::visualID»));
+«DEFINE addNextIfPhantom FOR gmfgen::GenNode-»
+if («EXPAND xpt::editor::VisualIDRegistry::getNodeVisualIDMethodCall FOR getDiagram()»(view, childElement) == «EXPAND xpt::editor::VisualIDRegistry::visualID») {
+ result.add(new «getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName()»(childElement, «EXPAND xpt::editor::VisualIDRegistry::visualID»));
continue;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getPhantomNodesIterator FOR gmfgen::GenDiagramUpdater-»
- «IF not editorGen.diagram.getPhantomNodes()->isEmpty()-»
+«DEFINE getPhantomNodesIterator FOR gmfgen::GenDiagramUpdater-»
+ «IF not editorGen.diagram.getPhantomNodes()->isEmpty()-»
- «EXPAND xpt::Common::generatedMemberComment»
+ «EXPAND xpt::Common::generatedMemberComment»
private static java.util.Iterator getPhantomNodesIterator(org.eclipse.emf.ecore.resource.Resource resource) {
return resource.getAllContents();
}
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE getGenericConnectedLinks(linkContainers : Sequence(gmfgen::GenCommonBase), methodNameSuffix : String) FOR gmfgen::GenDiagramUpdater-»
- «EXPAND xpt::Common::generatedMemberComment»
-public static java.util.List get«methodNameSuffix»Links(org.eclipse.gmf.runtime.notation.View view) {
- «IF not linkContainers->isEmpty()-»
- switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(view)) {
- «EXPAND getContainedLinksCase(methodNameSuffix) FOREACH linkContainers-»
+ «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE getGenericConnectedLinks(linkContainers : Sequence(gmfgen::GenCommonBase), methodNameSuffix : String) FOR gmfgen::GenDiagramUpdater-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public static java.util.List get«methodNameSuffix»Links(org.eclipse.gmf.runtime.notation.View view) {
+ «IF not linkContainers->isEmpty()-»
+ switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall FOR editorGen.diagram»(view)) {
+ «EXPAND getContainedLinksCase(methodNameSuffix) FOREACH linkContainers-»
}
- «ENDIF-»
+ «ENDIF-»
return java.util.Collections.EMPTY_LIST;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getContainedLinksCase(methodNameSuffix : String) FOR gmfgen::GenCommonBase-»
-«EXPAND xpt::Common::caseVisualID»
- return «EXPAND linkGetterName(methodNameSuffix)»(view);
-«ENDDEFINE»
+«DEFINE getContainedLinksCase(methodNameSuffix : String) FOR gmfgen::GenCommonBase-»
+«EXPAND xpt::Common::caseVisualID»
+ return «EXPAND linkGetterName(methodNameSuffix)»(view);
+«ENDDEFINE»
-«REM»This DEFING can be used from other templates to inject call to the corresponding method«ENDREM»
-«DEFINE getContainedLinksMethodCall FOR gmfgen::GenCommonBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND linkGetterName(getContainedLinksMethodNameSuffix())»«ENDDEFINE»
+«REM»This DEFING can be used from other templates to inject call to the corresponding method«ENDREM»
+«DEFINE getContainedLinksMethodCall FOR gmfgen::GenCommonBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND linkGetterName(getContainedLinksMethodNameSuffix())»«ENDDEFINE»
-«REM»This DEFING can be used from other templates to inject call to the corresponding method«ENDREM»
-«DEFINE getIncomingLinksMethodCall FOR gmfgen::GenCommonBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND linkGetterName(getIncomingLinksMethodNameSuffix())»«ENDDEFINE»
+«REM»This DEFING can be used from other templates to inject call to the corresponding method«ENDREM»
+«DEFINE getIncomingLinksMethodCall FOR gmfgen::GenCommonBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND linkGetterName(getIncomingLinksMethodNameSuffix())»«ENDDEFINE»
-«REM»This DEFING can be used from other templates to inject call to the corresponding method«ENDREM»
-«DEFINE getOutgoingLinksMethodCall FOR gmfgen::GenCommonBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND linkGetterName(getOutgoingLinksMethodNameSuffix())»«ENDDEFINE»
+«REM»This DEFING can be used from other templates to inject call to the corresponding method«ENDREM»
+«DEFINE getOutgoingLinksMethodCall FOR gmfgen::GenCommonBase»«getDiagram().editorGen.diagramUpdater.getDiagramUpdaterQualifiedClassName()».«EXPAND linkGetterName(getOutgoingLinksMethodNameSuffix())»«ENDDEFINE»
-«DEFINE linkGetterName(suffix : String) FOR gmfgen::GenCommonBase»get«getUniqueIdentifier()»«suffix»Links«ENDDEFINE»
+«DEFINE linkGetterName(suffix : String) FOR gmfgen::GenCommonBase»get«getUniqueIdentifier()»«suffix»Links«ENDDEFINE»
-«DEFINE getContainedLinks FOR gmfgen::GenCommonBase-»
- «EXPAND getConnectedLinks(getContainedLinks(self.getMetaClass(), getDiagram()), getContainedLinksMethodNameSuffix(), false)-»
-«ENDDEFINE»
+«DEFINE getContainedLinks FOR gmfgen::GenCommonBase-»
+ «EXPAND getConnectedLinks(getContainedLinks(self.getMetaClass(), getDiagram()), getContainedLinksMethodNameSuffix(), false)-»
+«ENDDEFINE»
-«DEFINE getIncomingLinks FOR gmfgen::GenLinkEnd-»
- «EXPAND getConnectedLinks(getIncomingLinks(self), getIncomingLinksMethodNameSuffix(), true)-»
-«ENDDEFINE»
+«DEFINE getIncomingLinks FOR gmfgen::GenLinkEnd-»
+ «EXPAND getConnectedLinks(getIncomingLinks(self), getIncomingLinksMethodNameSuffix(), true)-»
+«ENDDEFINE»
-«DEFINE getOutgoingLinks FOR gmfgen::GenLinkEnd-»
- «EXPAND getConnectedLinks(getOutgoingLinks(self), getOutgoingLinksMethodNameSuffix(), false)-»
-«ENDDEFINE»
+«DEFINE getOutgoingLinks FOR gmfgen::GenLinkEnd-»
+ «EXPAND getConnectedLinks(getOutgoingLinks(self), getOutgoingLinksMethodNameSuffix(), false)-»
+«ENDDEFINE»
-«DEFINE getConnectedLinks(genLinks : Sequence(gmfgen::GenLink), methodNameSuffix : String, needCrossReferencer : Boolean) FOR gmfgen::GenCommonBase-»
+«DEFINE getConnectedLinks(genLinks : Sequence(gmfgen::GenLink), methodNameSuffix : String, needCrossReferencer : Boolean) FOR gmfgen::GenCommonBase-»
- «EXPAND xpt::Common::generatedMemberComment»
-public static java.util.List «EXPAND linkGetterName(methodNameSuffix)»(org.eclipse.gmf.runtime.notation.View view) {
- «IF not genLinks->isEmpty()-»
- «LET self.getMetaClass() AS metaclass-»
- «EXPAND MetaModel::DeclareAndAssign('modelElement', 'view.getElement()') FOR metaclass»
- «IF needCrossReferencer-»
+ «EXPAND xpt::Common::generatedMemberComment»
+public static java.util.List «EXPAND linkGetterName(methodNameSuffix)»(org.eclipse.gmf.runtime.notation.View view) {
+ «IF not genLinks->isEmpty()-»
+ «LET self.getMetaClass() AS metaclass-»
+ «EXPAND MetaModel::DeclareAndAssign('modelElement', 'view.getElement()') FOR metaclass»
+ «IF needCrossReferencer-»
java.util.Map crossReferences = org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
- «ENDIF-»
+ «ENDIF-»
java.util.List result = new java.util.LinkedList();
- «EXPAND colectConnectedLinks(methodNameSuffix, needCrossReferencer, isExternalInterface(metaclass)) FOREACH genLinks-»
+ «EXPAND colectConnectedLinks(methodNameSuffix, needCrossReferencer, isExternalInterface(metaclass)) FOREACH genLinks-»
return result;
- «ENDLET-»
- «ELSE-»
+ «ENDLET-»
+ «ELSE-»
return java.util.Collections.EMPTY_LIST;
- «ENDIF-»
+ «ENDIF-»
}
-«ENDDEFINE»
-
-«DEFINE colectConnectedLinks(methodNameSuffix : String, needCrossReferencer : Boolean, isExternalInterface : Boolean) FOR gmfgen::GenLink-»
-«IF isExternalInterface-»
- if («EXPAND MetaModel::IsInstance('modelElement') FOR modelFacet.getLinkEndType(methodNameSuffix)») {
-«ENDIF-»
- result.addAll(«EXPAND chooseConnectedLinksByTypeMethodName(methodNameSuffix, self) FOR modelFacet»(«IF isExternalInterface-»
-«EXPAND MetaModel::CastEObject('modelElement') FOR modelFacet.getLinkEndType(methodNameSuffix)»«ELSE»modelElement«ENDIF»«IF needCrossReferencer», crossReferences«ENDIF»));
-«IF isExternalInterface-»
+«ENDDEFINE»
+
+«DEFINE colectConnectedLinks(methodNameSuffix : String, needCrossReferencer : Boolean, isExternalInterface : Boolean) FOR gmfgen::GenLink-»
+«IF isExternalInterface-»
+ if («EXPAND MetaModel::IsInstance('modelElement') FOR modelFacet.getLinkEndType(methodNameSuffix)») {
+«ENDIF-»
+ result.addAll(«EXPAND chooseConnectedLinksByTypeMethodName(methodNameSuffix, self) FOR modelFacet»(«IF isExternalInterface-»
+«EXPAND MetaModel::CastEObject('modelElement') FOR modelFacet.getLinkEndType(methodNameSuffix)»«ELSE»modelElement«ENDIF»«IF needCrossReferencer», crossReferences«ENDIF»));
+«IF isExternalInterface-»
}
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE chooseConnectedLinksByTypeMethodName(methodNameSuffix : String, genLink : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
- «EXPAND incorrectLinkModelFacet-»
-«ENDDEFINE»
+«DEFINE chooseConnectedLinksByTypeMethodName(methodNameSuffix : String, genLink : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+ «EXPAND incorrectLinkModelFacet-»
+«ENDDEFINE»
-«REM»
+«REM»
For FeatureModelFacet-based links we are calling
getOutgoing???Links instead of getContained???Links
-«ENDREM»
-«DEFINE chooseConnectedLinksByTypeMethodName(methodNameSuffix : String, genLink : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
-«IF getContainedLinksMethodNameSuffix() = methodNameSuffix»«EXPAND getConnectedLinksByTypeMethodName(getOutgoingLinksMethodNameSuffix()) FOR genLink-»
-«ELSE»«EXPAND getConnectedLinksByTypeMethodName(methodNameSuffix) FOR genLink-»
-«ENDIF-»
-«ENDDEFINE»
-
-«REM»
+«ENDREM»
+«DEFINE chooseConnectedLinksByTypeMethodName(methodNameSuffix : String, genLink : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
+«IF getContainedLinksMethodNameSuffix() = methodNameSuffix»«EXPAND getConnectedLinksByTypeMethodName(getOutgoingLinksMethodNameSuffix()) FOR genLink-»
+«ELSE»«EXPAND getConnectedLinksByTypeMethodName(methodNameSuffix) FOR genLink-»
+«ENDIF-»
+«ENDDEFINE»
+
+«REM»
For TypeModelFacet-based links we are calling
getContained???Links instead of getOutgoinf???Links
if sourceMetaFeature was not specified
-«ENDREM»
-«DEFINE chooseConnectedLinksByTypeMethodName(methodNameSuffix : String, genLink : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
-«IF getOutgoingLinksMethodNameSuffix() = methodNameSuffix and null = sourceMetaFeature»«EXPAND getConnectedLinksByTypeMethodName(getContainedLinksMethodNameSuffix()) FOR genLink-»
-«ELSE»«EXPAND getConnectedLinksByTypeMethodName(methodNameSuffix) FOR genLink-»
-«ENDIF-»
-«ENDDEFINE»
+«ENDREM»
+«DEFINE chooseConnectedLinksByTypeMethodName(methodNameSuffix : String, genLink : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+«IF getOutgoingLinksMethodNameSuffix() = methodNameSuffix and null = sourceMetaFeature»«EXPAND getConnectedLinksByTypeMethodName(getContainedLinksMethodNameSuffix()) FOR genLink-»
+«ELSE»«EXPAND getConnectedLinksByTypeMethodName(methodNameSuffix) FOR genLink-»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE getContainedLinksByTypeMethod FOR gmfgen::GenLink»«EXPAND getContainedLinksByTypeMethod(self) FOR modelFacet»«ENDDEFINE»
+«DEFINE getContainedLinksByTypeMethod FOR gmfgen::GenLink»«EXPAND getContainedLinksByTypeMethod(self) FOR modelFacet»«ENDDEFINE»
-«DEFINE getConnectedLinksByTypeMethodName(suffix : String) FOR gmfgen::GenLink»get«suffix»«EXPAND getConnectedLinksByTypeMethodFragment FOR modelFacet»_«visualID»«ENDDEFINE»
+«DEFINE getConnectedLinksByTypeMethodName(suffix : String) FOR gmfgen::GenLink»get«suffix»«EXPAND getConnectedLinksByTypeMethodFragment FOR modelFacet»_«visualID»«ENDDEFINE»
-«DEFINE getConnectedLinksByTypeMethodFragment FOR gmfgen::TypeLinkModelFacet»TypeModelFacetLinks_«metaClass.ecoreClass.name»«ENDDEFINE»
+«DEFINE getConnectedLinksByTypeMethodFragment FOR gmfgen::TypeLinkModelFacet»TypeModelFacetLinks_«metaClass.ecoreClass.name»«ENDDEFINE»
-«DEFINE getConnectedLinksByTypeMethodFragment FOR gmfgen::FeatureLinkModelFacet»FeatureModelFacetLinks_«metaFeature.genClass.ecoreClass.name»_«metaFeature.ecoreFeature.name.firstToUpper()»«ENDDEFINE»
+«DEFINE getConnectedLinksByTypeMethodFragment FOR gmfgen::FeatureLinkModelFacet»FeatureModelFacetLinks_«metaFeature.genClass.ecoreClass.name»_«metaFeature.ecoreFeature.name.firstToUpper()»«ENDDEFINE»
-«DEFINE getConnectedLinksByTypeMethodFragment FOR gmfgen::LinkModelFacet-»
- «EXPAND incorrectLinkModelFacet-»
-«ENDDEFINE»
+«DEFINE getConnectedLinksByTypeMethodFragment FOR gmfgen::LinkModelFacet-»
+ «EXPAND incorrectLinkModelFacet-»
+«ENDDEFINE»
-«DEFINE getContainedLinksByTypeMethod(genLink : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
- «EXPAND incorrectLinkModelFacet-»
-«ENDDEFINE»
+«DEFINE getContainedLinksByTypeMethod(genLink : gmfgen::GenLink) FOR gmfgen::LinkModelFacet-»
+ «EXPAND incorrectLinkModelFacet-»
+«ENDDEFINE»
-«DEFINE getContainedLinksByTypeMethod(genLink : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet»«ENDDEFINE»
+«DEFINE getContainedLinksByTypeMethod(genLink : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet»«ENDDEFINE»
-«DEFINE getContainedLinksByTypeMethod(genLink : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+«DEFINE getContainedLinksByTypeMethod(genLink : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
- «EXPAND xpt::Common::generatedMemberComment»
-private static java.util.Collection «EXPAND getConnectedLinksByTypeMethodName(getContainedLinksMethodNameSuffix()) FOR genLink»(«EXPAND MetaModel::QualifiedClassName FOR childMetaFeature.genClass» container) {
- «EXPAND getContainedLinksByTypeMethodBody(genLink, false)-»
+ «EXPAND xpt::Common::generatedMemberComment»
+private static java.util.Collection «EXPAND getConnectedLinksByTypeMethodName(getContainedLinksMethodNameSuffix()) FOR genLink»(«EXPAND MetaModel::QualifiedClassName FOR childMetaFeature.genClass» container) {
+ «EXPAND getContainedLinksByTypeMethodBody(genLink, false)-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getContainedLinksByTypeMethodBody(genLink : gmfgen::GenLink, sourceVarDefined : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+«DEFINE getContainedLinksByTypeMethodBody(genLink : gmfgen::GenLink, sourceVarDefined : Boolean) FOR gmfgen::TypeLinkModelFacet-»
java.util.Collection result = new java.util.LinkedList();
- «LET isListType(childMetaFeature) AS inLoop-»
-«IF inLoop-»
-for (java.util.Iterator links = «EXPAND MetaModel::getFeatureValue('container', childMetaFeature.genClass) FOR childMetaFeature».iterator(); links.hasNext();) {
+ «LET isListType(childMetaFeature) AS inLoop-»
+«IF inLoop-»
+for (java.util.Iterator links = «EXPAND MetaModel::getFeatureValue('container', childMetaFeature.genClass) FOR childMetaFeature».iterator(); links.hasNext();) {
org.eclipse.emf.ecore.EObject linkObject = (org.eclipse.emf.ecore.EObject ) links.next();
- if («EXPAND MetaModel::NotInstance('linkObject') FOR metaClass») {
+ if («EXPAND MetaModel::NotInstance('linkObject') FOR metaClass») {
continue;
}
- «EXPAND MetaModel::DeclareAndAssign('link', 'linkObject') FOR metaClass»
-«ELSE-»
- «IF getTypeGenClassX(childMetaFeature) = metaClass-»
- «EXPAND MetaModel::DeclareAndAssign('link', 'container', getSourceType(), childMetaFeature) FOR metaClass»
- «ELSE-»
- «EXPAND MetaModel::DeclareAndAssign('linkObject', 'container', getSourceType(), childMetaFeature) FOR getTypeGenClassX(childMetaFeature)»
- if («EXPAND MetaModel::NotInstance('linkObject') FOR metaClass») {
+ «EXPAND MetaModel::DeclareAndAssign('link', 'linkObject') FOR metaClass»
+«ELSE-»
+ «IF getTypeGenClassX(childMetaFeature) = metaClass-»
+ «EXPAND MetaModel::DeclareAndAssign('link', 'container', getSourceType(), childMetaFeature) FOR metaClass»
+ «ELSE-»
+ «EXPAND MetaModel::DeclareAndAssign('linkObject', 'container', getSourceType(), childMetaFeature) FOR getTypeGenClassX(childMetaFeature)»
+ if («EXPAND MetaModel::NotInstance('linkObject') FOR metaClass») {
return result;
}
- «EXPAND MetaModel::DeclareAndAssign('link', 'linkObject') FOR metaClass»
- «ENDIF-»
-«ENDIF-»
- «EXPAND checkLinkVisualID(genLink, inLoop)-»
- «EXPAND defineLinkDestination(inLoop)-»
- «IF null <> sourceMetaFeature-»
- «EXPAND defineLinkSource(inLoop)-»
- «IF sourceVarDefined-»
- «EXPAND checkLinkSource(inLoop)-»
- «ENDIF-»
- «EXPAND addLinkDescriptor(genLink, 'src', 'dst')-»
- «ELSE-»
- «EXPAND addLinkDescriptor(genLink, 'container', 'dst')-»
- «ENDIF-»
-«IF inLoop-»
+ «EXPAND MetaModel::DeclareAndAssign('link', 'linkObject') FOR metaClass»
+ «ENDIF-»
+«ENDIF-»
+ «EXPAND checkLinkVisualID(genLink, inLoop)-»
+ «EXPAND defineLinkDestination(inLoop)-»
+ «IF null <> sourceMetaFeature-»
+ «EXPAND defineLinkSource(inLoop)-»
+ «IF sourceVarDefined-»
+ «EXPAND checkLinkSource(inLoop)-»
+ «ENDIF-»
+ «EXPAND addLinkDescriptor(genLink, 'src', 'dst')-»
+ «ELSE-»
+ «EXPAND addLinkDescriptor(genLink, 'container', 'dst')-»
+ «ENDIF-»
+«IF inLoop-»
}
-«ENDIF-»
- «ENDLET-»
+«ENDIF-»
+ «ENDLET-»
return result;
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE addLinkDescriptor(genLink : gmfgen::GenLink, srcVar : String, dstVar : String) FOR gmfgen::TypeLinkModelFacet-»
-result.add(new «genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()»(«EXPAND MetaModel::DowncastToEObject(srcVar) FOR getSourceType()», «EXPAND MetaModel::DowncastToEObject(dstVar) FOR getTargetType()», «EXPAND MetaModel::DowncastToEObject('link') FOR metaClass», «EXPAND xpt::providers::ElementTypes::accessElementType FOR genLink», «EXPAND xpt::editor::VisualIDRegistry::visualID FOR genLink»));
-«ENDDEFINE»
+«DEFINE addLinkDescriptor(genLink : gmfgen::GenLink, srcVar : String, dstVar : String) FOR gmfgen::TypeLinkModelFacet-»
+result.add(new «genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()»(«EXPAND MetaModel::DowncastToEObject(srcVar) FOR getSourceType()», «EXPAND MetaModel::DowncastToEObject(dstVar) FOR getTargetType()», «EXPAND MetaModel::DowncastToEObject('link') FOR metaClass», «EXPAND xpt::providers::ElementTypes::accessElementType FOR genLink», «EXPAND xpt::editor::VisualIDRegistry::visualID FOR genLink»));
+«ENDDEFINE»
-«DEFINE checkLinkVisualID(genLink : gmfgen::GenLink, inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
-if («EXPAND xpt::editor::VisualIDRegistry::visualID FOR genLink» != «EXPAND xpt::editor::VisualIDRegistry::getLinkWithClassVisualIDMethodCall FOR genLink.getDiagram()»(«EXPAND MetaModel::DowncastToEObject('link') FOR metaClass»)) {
- «EXPAND stopLinkProcessing(inLoop)-»
+«DEFINE checkLinkVisualID(genLink : gmfgen::GenLink, inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+if («EXPAND xpt::editor::VisualIDRegistry::visualID FOR genLink» != «EXPAND xpt::editor::VisualIDRegistry::getLinkWithClassVisualIDMethodCall FOR genLink.getDiagram()»(«EXPAND MetaModel::DowncastToEObject('link') FOR metaClass»)) {
+ «EXPAND stopLinkProcessing(inLoop)-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE defineLinkSource(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
- «IF isListType(sourceMetaFeature)-»
-java.util.List sources = «EXPAND MetaModel::getFeatureValue('link', metaClass) FOR sourceMetaFeature»;
+«DEFINE defineLinkSource(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+ «IF isListType(sourceMetaFeature)-»
+java.util.List sources = «EXPAND MetaModel::getFeatureValue('link', metaClass) FOR sourceMetaFeature»;
Object theSource = sources.size() == 1 ? sources.get(0) : null;
-if («EXPAND MetaModel::NotInstance('theSource') FOR getSourceType()») {
- «EXPAND stopLinkProcessing(inLoop)-»
+if («EXPAND MetaModel::NotInstance('theSource') FOR getSourceType()») {
+ «EXPAND stopLinkProcessing(inLoop)-»
}
-«EXPAND MetaModel::DeclareAndAssign('src', 'theSource', true) FOR getSourceType()»
- «ELSE-»
-«EXPAND MetaModel::DeclareAndAssign('src', 'link', metaClass, sourceMetaFeature) FOR getSourceType()»
- «ENDIF-»
-«ENDDEFINE»
+«EXPAND MetaModel::DeclareAndAssign('src', 'theSource', true) FOR getSourceType()»
+ «ELSE-»
+«EXPAND MetaModel::DeclareAndAssign('src', 'link', metaClass, sourceMetaFeature) FOR getSourceType()»
+ «ENDIF-»
+«ENDDEFINE»
-«DEFINE checkLinkSource(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+«DEFINE checkLinkSource(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
if (src != source) {
- «EXPAND stopLinkProcessing(inLoop)-»
+ «EXPAND stopLinkProcessing(inLoop)-»
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE defineLinkDestination(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
- «IF isListType(targetMetaFeature)-»
-java.util.List targets = «EXPAND MetaModel::getFeatureValue('link', metaClass) FOR targetMetaFeature»;
+«DEFINE defineLinkDestination(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+ «IF isListType(targetMetaFeature)-»
+java.util.List targets = «EXPAND MetaModel::getFeatureValue('link', metaClass) FOR targetMetaFeature»;
Object theTarget = targets.size() == 1 ? targets.get(0) : null;
-if («EXPAND MetaModel::NotInstance('theTarget') FOR getTargetType()») {
- «EXPAND stopLinkProcessing(inLoop)-»
+if («EXPAND MetaModel::NotInstance('theTarget') FOR getTargetType()») {
+ «EXPAND stopLinkProcessing(inLoop)-»
}
-«EXPAND MetaModel::DeclareAndAssign('dst', 'theTarget', true) FOR getTargetType()»
- «ELSE-»
-«EXPAND MetaModel::DeclareAndAssign('dst', 'link', metaClass, targetMetaFeature) FOR getTargetType()»
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE stopLinkProcessing(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
-«IF inLoop-»
+«EXPAND MetaModel::DeclareAndAssign('dst', 'theTarget', true) FOR getTargetType()»
+ «ELSE-»
+«EXPAND MetaModel::DeclareAndAssign('dst', 'link', metaClass, targetMetaFeature) FOR getTargetType()»
+ «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE stopLinkProcessing(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+«IF inLoop-»
continue;
-«ELSE-»
+«ELSE-»
return result;
-«ENDIF-»
-«ENDDEFINE»
+«ENDIF-»
+«ENDDEFINE»
-«DEFINE getIncomingLinksByTypeMethod FOR gmfgen::GenLink-»
+«DEFINE getIncomingLinksByTypeMethod FOR gmfgen::GenLink-»
- «EXPAND xpt::Common::generatedMemberComment»
-private static java.util.Collection «EXPAND getConnectedLinksByTypeMethodName(getIncomingLinksMethodNameSuffix())»(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.getTargetType()» target, java.util.Map crossReferences) {
+ «EXPAND xpt::Common::generatedMemberComment»
+private static java.util.Collection «EXPAND getConnectedLinksByTypeMethodName(getIncomingLinksMethodNameSuffix())»(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.getTargetType()» target, java.util.Map crossReferences) {
java.util.Collection result = new java.util.LinkedList();
java.util.Collection settings = (java.util.Collection) crossReferences.get(target);
for (java.util.Iterator it = settings.iterator(); it.hasNext();) {
org.eclipse.emf.ecore.EStructuralFeature.Setting setting = (org.eclipse.emf.ecore.EStructuralFeature.Setting) it.next();
- «EXPAND getIncomingLinksByTypeMethodBody(self) FOR modelFacet-»
+ «EXPAND getIncomingLinksByTypeMethodBody(self) FOR modelFacet-»
}
return result;
}
-«ENDDEFINE»
+«ENDDEFINE»
-«DEFINE getIncomingLinksByTypeMethodBody(genLink : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
-if (setting.getEStructuralFeature() != «EXPAND MetaModel::MetaFeature FOR targetMetaFeature» || «EXPAND MetaModel::NotInstance('setting.getEObject()') FOR metaClass») {
+«DEFINE getIncomingLinksByTypeMethodBody(genLink : gmfgen::GenLink) FOR gmfgen::TypeLinkModelFacet-»
+if (setting.getEStructuralFeature() != «EXPAND MetaModel::MetaFeature FOR targetMetaFeature» || «EXPAND MetaModel::NotInstance('setting.getEObject()') FOR metaClass») {
continue;
}
-«EXPAND MetaModel::DeclareAndAssign('link', 'setting.getEObject()') FOR metaClass»
- «EXPAND checkLinkVisualID(genLink, true)-»
- «IF null <> sourceMetaFeature-»
- «EXPAND defineLinkSource(true)-»
- «EXPAND addLinkDescriptor(genLink, 'src', 'target')-»
- «ELSE-»
- «EXPAND defineLinkContainer(true)-»
- «EXPAND addLinkDescriptor(genLink, 'container', 'target')-»
-«REM»TODO: continue here.«ENDREM»
- «ENDIF-»
-«ENDDEFINE»
-
-«DEFINE defineLinkContainer(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
-if (false == «EXPAND MetaModel::IsContainerInstance('link', metaClass) FOR containmentMetaFeature.genClass») {
- «EXPAND stopLinkProcessing(inLoop)-»
+«EXPAND MetaModel::DeclareAndAssign('link', 'setting.getEObject()') FOR metaClass»
+ «EXPAND checkLinkVisualID(genLink, true)-»
+ «IF null <> sourceMetaFeature-»
+ «EXPAND defineLinkSource(true)-»
+ «EXPAND addLinkDescriptor(genLink, 'src', 'target')-»
+ «ELSE-»
+ «EXPAND defineLinkContainer(true)-»
+ «EXPAND addLinkDescriptor(genLink, 'container', 'target')-»
+«REM»TODO: continue here.«ENDREM»
+ «ENDIF-»
+«ENDDEFINE»
+
+«DEFINE defineLinkContainer(inLoop : Boolean) FOR gmfgen::TypeLinkModelFacet-»
+if (false == «EXPAND MetaModel::IsContainerInstance('link', metaClass) FOR containmentMetaFeature.genClass») {
+ «EXPAND stopLinkProcessing(inLoop)-»
}
-«EXPAND MetaModel::DeclareAndAssignContainer('container', 'link', metaClass) FOR containmentMetaFeature.genClass»
-«ENDDEFINE»
+«EXPAND MetaModel::DeclareAndAssignContainer('container', 'link', metaClass) FOR containmentMetaFeature.genClass»
+«ENDDEFINE»
-«DEFINE getIncomingLinksByTypeMethodBody(genLink : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
-if (setting.getEStructuralFeature() == «EXPAND MetaModel::MetaFeature FOR metaFeature») {
- result.add(new «genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()»(setting.getEObject(), «EXPAND MetaModel::DowncastToEObject('target') FOR getTargetType()», «EXPAND xpt::providers::ElementTypes::accessElementType FOR genLink», «EXPAND xpt::editor::VisualIDRegistry::visualID FOR genLink»));
+«DEFINE getIncomingLinksByTypeMethodBody(genLink : gmfgen::GenLink) FOR gmfgen::FeatureLinkModelFacet-»
+if (setting.getEStructuralFeature() == «EXPAND MetaModel::Met