Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2010-04-30 19:59:05 +0000
committeratikhomirov2010-04-30 19:59:05 +0000
commit393482d04e086654e960e68ae4857643d80ec38c (patch)
tree41f87024b62d020642b7a308826bcd5c06fd2bc7 /plugins
parent5e124b35f5fc85e513362f1f9549301058c58676 (diff)
downloadorg.eclipse.gmf-tooling-393482d04e086654e960e68ae4857643d80ec38c.tar.gz
org.eclipse.gmf-tooling-393482d04e086654e960e68ae4857643d80ec38c.tar.xz
org.eclipse.gmf-tooling-393482d04e086654e960e68ae4857643d80ec38c.zip
CodeStyle::newGenericInstance order of arguments changed to be consistent with other newGenericInstance args
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/CodeStyle.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/editparts/NodeEditPart.xpt12
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/impl/diagram/update/CanonicalUpdate.xpt16
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/diagram/updater/DiagramUpdater.xpt10
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DocumentProvider.xpt10
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetInfo.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/editor/palette/PaletteFactory.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorContentProvider.xpt24
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/Activator.xpt2
-rwxr-xr-xplugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricProvider.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt4
14 files changed, 47 insertions, 47 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates/CodeStyle.xpt b/plugins/org.eclipse.gmf.codegen/templates/CodeStyle.xpt
index 75830de87..ce1675587 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/CodeStyle.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/CodeStyle.xpt
@@ -27,7 +27,7 @@
// java.util.List<String> varName = new Type<TypeArgument>
// note, no constructor parameters, callers should add (); or whatever they think is reasonable
// XXX perhaps, varName should go first, to be consistent with iterate?
-«DEFINE newGenericInstance(String type, String typeArgument, String varName) FOR gmfgen::GenCommonBase»«EXPAND G(type, typeArgument)» «varName» = new «EXPAND G(type, typeArgument)»«ENDDEFINE»
+«DEFINE newGenericInstance(String varName, String type, String typeArgument) FOR gmfgen::GenCommonBase»«EXPAND G(type, typeArgument)» «varName» = new «EXPAND G(type, typeArgument)»«ENDDEFINE»
// new HashMap<Object, String>
«DEFINE newGenericInstance2(String varName, String type, String typeArgument1, String typeArgument2) FOR gmfgen::GenCommonBase»«EXPAND G2(type, typeArgument1, typeArgument2)» «varName»= new «EXPAND G2(type, typeArgument1, typeArgument2)»«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt
index 64b02bd36..85a1460ad 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/ChildContainerCanonicalEditPolicy.xpt
@@ -33,7 +33,7 @@ protected void refreshSemantic() {
if (resolveSemanticElement() == null) {
return;
}
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.IAdaptable', 'createdViews')»();
+ «EXPAND CodeStyle::newGenericInstance('createdViews', 'java.util.LinkedList', 'org.eclipse.core.runtime.IAdaptable')»();
«EXPAND impl::diagram::update::CanonicalUpdate::refreshSemanticChildren('createdViews', getDiagram().editorGen.diagramUpdater)-»
«EXPAND impl::diagram::update::CanonicalUpdate::executeLayoutCommand('createdViews')-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt
index feace593f..083683249 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/diagram/editpolicies/DiagramCanonicalEditPolicy.xpt
@@ -40,7 +40,7 @@ protected void refreshSemantic() {
if (resolveSemanticElement() == null) {
return;
}
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.IAdaptable', 'createdViews')»();
+ «EXPAND CodeStyle::newGenericInstance('createdViews', 'java.util.LinkedList', 'org.eclipse.core.runtime.IAdaptable')»();
«EXPAND impl::diagram::update::CanonicalUpdate::refreshSemanticChildren('createdViews', editorGen.diagramUpdater)-»
«IF links->notEmpty()-»
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 876e3f8ce..f7c44be6f 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
@@ -450,7 +450,7 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
}
}
«ENDDEFINE»
-
+
«DEFINE setLineWidth FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment»
protected void setLineWidth(int width) {
@@ -482,7 +482,7 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«DEFINE getMARelTypesOnSource FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment»
public «EXPAND CodeStyle::G('java.util.List', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')» getMARelTypesOnSource() {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types')»(«getAssistantOutgoingLinks(self)->size()»);
+ «EXPAND CodeStyle::newGenericInstance('types', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»(«getAssistantOutgoingLinks(self)->size()»);
«FOREACH getAssistantOutgoingLinks(self) AS link-»
types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
«ENDFOREACH-»
@@ -494,7 +494,7 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«DEFINE getMARelTypesOnTarget FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment»
public «EXPAND CodeStyle::G('java.util.List', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')» getMARelTypesOnTarget() {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types')»(«getAssistantIncomingLinks(self)->size()»);
+ «EXPAND CodeStyle::newGenericInstance('types', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»(«getAssistantIncomingLinks(self)->size()»);
«FOREACH getAssistantIncomingLinks(self) AS link-»
types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR link»);
«ENDFOREACH-»
@@ -506,7 +506,7 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«DEFINE getMARelTypesOnSourceAndTarget FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment»
public «EXPAND CodeStyle::G('java.util.List', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')» getMARelTypesOnSourceAndTarget(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart targetEditPart) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types')»();
+ «EXPAND CodeStyle::newGenericInstance('types', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»();
«FOREACH getAssistantOutgoingLinks(self) AS link-»
«FOREACH selectGenNodes(link.targets) AS target-»
if (targetEditPart instanceof «target.getEditPartQualifiedClassName()») {
@@ -522,7 +522,7 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«DEFINE getMATypesForSource FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment»
public «EXPAND CodeStyle::G('java.util.List', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')» getMATypesForSource(org.eclipse.gmf.runtime.emf.type.core.IElementType relationshipType) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types')»();
+ «EXPAND CodeStyle::newGenericInstance('types', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»();
«FOREACH getAssistantIncomingLinks(self) AS link SEPARATOR ' else '-»
if (relationshipType == «EXPAND xpt::providers::ElementTypes::accessElementType FOR link») {
«FOREACH selectGenNodes(link.sources) AS source-»
@@ -538,7 +538,7 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«DEFINE getMATypesForTarget FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment»
public «EXPAND CodeStyle::G('java.util.List', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')» getMATypesForTarget(org.eclipse.gmf.runtime.emf.type.core.IElementType relationshipType) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types')»();
+ «EXPAND CodeStyle::newGenericInstance('types', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»();
«FOREACH getAssistantOutgoingLinks(self) AS link SEPARATOR ' else '-»
if (relationshipType == «EXPAND xpt::providers::ElementTypes::accessElementType FOR link») {
«FOREACH selectGenNodes(link.targets) AS target-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/update/CanonicalUpdate.xpt b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/update/CanonicalUpdate.xpt
index 261c4828e..2a48c46f2 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/update/CanonicalUpdate.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/impl/diagram/update/CanonicalUpdate.xpt
@@ -64,7 +64,7 @@
protected java.util.List getSemanticChildrenList() {
«IF hasSemanticChildren(self) /*REVISIT: is there real need for this check - Generator seems to consult needsCanonicalEP, which in turns ensures there are semantic children?*/-»
org.eclipse.gmf.runtime.notation.View viewObject = (org.eclipse.gmf.runtime.notation.View) getHost().getModel();
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.emf.ecore.EObject', 'result')»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.emf.ecore.EObject')»();
«EXPAND CodeStyle::G('java.util.List', getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName())» childDescriptors = «EXPAND xpt::diagram::updater::DiagramUpdater::getSemanticChildrenMethodCall»(viewObject);
«EXPAND CodeStyle::iterate('d', getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName(), 'childDescriptors')-»
result.add(d.getModelElement());
@@ -115,9 +115,9 @@ private boolean isMyDiagramElement(org.eclipse.gmf.runtime.notation.View view) {
«DEFINE refreshSemanticChildren(String createdViewsVar, gmfgen::GenDiagramUpdater diagramUpdater) FOR gmfgen::GenContainerBase-»
«LET hasConformableSemanticChildren(self) AS childrenShareSameMetaclass-»
«EXPAND CodeStyle::G('java.util.List', diagramUpdater.getNodeDescriptorQualifiedClassName())» childDescriptors = «EXPAND xpt::diagram::updater::DiagramUpdater::getSemanticChildrenMethodCall»((org.eclipse.gmf.runtime.notation.View) getHost().getModel());
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'orphaned')»();
+ «EXPAND CodeStyle::newGenericInstance('orphaned', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View')»();
// we care to check only views we recognize as ours
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'knownViewChildren')»();
+ «EXPAND CodeStyle::newGenericInstance('knownViewChildren', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View')»();
«EXPAND CodeStyle::iterate('v', 'org.eclipse.gmf.runtime.notation.View', 'getViewChildren()')-»
if (isMyDiagramElement(v)) {
knownViewChildren.add(v);
@@ -134,9 +134,9 @@ private boolean isMyDiagramElement(org.eclipse.gmf.runtime.notation.View view) {
// to answer isOrphaned == true will be used for the domain element representation, see #cleanCanonicalSemanticChildren()
«EXPAND CodeStyle::iterate('next', diagramUpdater.getNodeDescriptorQualifiedClassName(), 'descriptorsIterator', 'childDescriptors.iterator()')-»
String hint = «EXPAND xpt::editor::VisualIDRegistry::typeMethodCall('next.getVisualID()')»;
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'perfectMatch')»(); // both semanticElement and hint match that of NodeDescriptor
+ «EXPAND CodeStyle::newGenericInstance('perfectMatch', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View')»(); // both semanticElement and hint match that of NodeDescriptor
«IF childrenShareSameMetaclass-»
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'potentialMatch')»(); // semanticElement matches, hint does not
+ «EXPAND CodeStyle::newGenericInstance('potentialMatch', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View')»(); // semanticElement matches, hint does not
«ENDIF-»
«EXPAND CodeStyle::iterate('childView', 'org.eclipse.gmf.runtime.notation.View', 'getViewChildren()')-»
org.eclipse.emf.ecore.EObject semanticElement = childView.getElement();
@@ -176,7 +176,7 @@ private boolean isMyDiagramElement(org.eclipse.gmf.runtime.notation.View view) {
«IF childrenShareSameMetaclass-»
org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand boundsCommand = new org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand(host().getEditingDomain(), org.eclipse.gmf.runtime.diagram.ui.l10n.DiagramUIMessages.SetLocationCommand_Label_Resize);
«ENDIF-»
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor', 'viewDescriptors')»(childDescriptors.size());
+ «EXPAND CodeStyle::newGenericInstance('viewDescriptors', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest.ViewDescriptor')»(childDescriptors.size());
«EXPAND CodeStyle::iterate('next', diagramUpdater.getNodeDescriptorQualifiedClassName(), 'childDescriptors')-»
String hint = «EXPAND xpt::editor::VisualIDRegistry::typeMethodCall('next.getVisualID()')»;
org.eclipse.core.runtime.IAdaptable elementAdapter = new CanonicalElementAdapter(next.getModelElement(), hint);
@@ -285,7 +285,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', editorGen.diagramUpdater.g
if (!«EXPAND xpt::editor::VisualIDRegistry::modelID».equals(«EXPAND xpt::editor::VisualIDRegistry::getModelIDMethodCall»(view))) {
return «EXPAND CodeStyle::emptyList»;
}
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName(), 'result')»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName())»();
switch («EXPAND xpt::editor::VisualIDRegistry::getVisualIDMethodCall»(view)) {
«EXPAND _caseSemanticElement FOREACH getAllSemanticElements(self)-»
}
@@ -302,7 +302,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', editorGen.diagramUpdater.g
«DEFINE createConnectionsMethod FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.core.runtime.IAdaptable')» createConnections(«EXPAND CodeStyle::G('java.util.Collection', editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName())» linkDescriptors, «EXPAND CodeStyle::G2('java.util.Map', 'org.eclipse.emf.ecore.EObject', 'org.eclipse.gmf.runtime.notation.View')» domain2NotationMap) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.IAdaptable', 'adapters')»();
+ «EXPAND CodeStyle::newGenericInstance('adapters', 'java.util.LinkedList', 'org.eclipse.core.runtime.IAdaptable')»();
«EXPAND CodeStyle::iterate('nextLinkDescriptor', editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName(), 'linkDescriptors')-»
org.eclipse.gef.EditPart sourceEditPart = getEditPart(nextLinkDescriptor.getSource(), domain2NotationMap);
org.eclipse.gef.EditPart targetEditPart = getEditPart(nextLinkDescriptor.getDestination(), domain2NotationMap);
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 beffbe5e1..95940f4da 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
@@ -84,7 +84,7 @@ public static «EXPAND CodeStyle::G('java.util.List', getNodeDescriptorQualified
public static «EXPAND CodeStyle::G('java.util.List', getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName())» «EXPAND getSemanticChildrenMethodName»(org.eclipse.gmf.runtime.notation.View view) {
«IF getSemanticChildrenChildFeatures(self)->size() > 0 or self.getPhantomNodes()->size() > 0-»
«EXPAND defineModelElement-»
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName(), 'result')»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', getDiagram().editorGen.diagramUpdater.getNodeDescriptorQualifiedClassName())»();
«REM»childMetaFeature can be null here!«ENDREM»«-»
«FOREACH getSemanticChildrenChildFeatures(self) AS childMetaFeature-»
«IF null = childMetaFeature-»
@@ -215,7 +215,7 @@ public static «EXPAND CodeStyle::G('java.util.List', getDiagram().editorGen.dia
«IF needCrossReferencer-»
java.util.Map crossReferences = org.eclipse.emf.ecore.util.EcoreUtil.CrossReferencer.find(view.eResource().getResourceSet().getResources());
«ENDIF-»
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName(), 'result')»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName())»();
«EXPAND colectConnectedLinks(methodNameSuffix, needCrossReferencer, isExternalInterface(metaclass)) FOREACH genLinks-»
return result;
«ENDLET-»
@@ -288,7 +288,7 @@ private static «EXPAND CodeStyle::G('java.util.Collection', genLink.getDiagram(
«ENDDEFINE»
«DEFINE getContainedLinksByTypeMethodBody(genLink : gmfgen::GenLink, sourceVarDefined : Boolean) FOR gmfgen::TypeLinkModelFacet-»
-«EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName(), 'result') FOR genLink»();
+«EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()) FOR genLink»();
«LET isListType(childMetaFeature) AS inLoop-»
«IF inLoop-»
for (java.util.Iterator links = «EXPAND MetaModel::getFeatureValue('container', childMetaFeature.genClass) FOR childMetaFeature».iterator(); links.hasNext();) {
@@ -380,7 +380,7 @@ return result;
«EXPAND xpt::Common::generatedMemberComment»
private static «EXPAND CodeStyle::G('java.util.Collection', getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName())» «EXPAND getConnectedLinksByTypeMethodName(getIncomingLinksMethodNameSuffix())»(«EXPAND MetaModel::QualifiedClassName FOR modelFacet.getTargetType()» target, java.util.Map crossReferences) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName(), 'result')»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName())»();
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();
@@ -434,7 +434,7 @@ private static «EXPAND CodeStyle::G('java.util.Collection', getDiagram().editor
«EXPAND xpt::Common::generatedMemberComment»
«EXPAND getOutgoingLinksByTypeMethodSignature FOR genLink» {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName(), 'result') FOR genLink»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', genLink.getDiagram().editorGen.diagramUpdater.getLinkDescriptorQualifiedClassName()) FOR genLink»();
«IF isListType(metaFeature)-»
for (java.util.Iterator destinations = «EXPAND MetaModel::getFeatureValue('source', getSourceType()) FOR metaFeature».iterator(); destinations.hasNext();) {
«EXPAND MetaModel::DeclareAndAssign('destination', 'destinations.next()', true) FOR getTargetType()»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt
index 9962e60fc..43793aef9 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DiagramEditorUtil.xpt
@@ -331,7 +331,7 @@ public class «diagramEditorUtilClassName» {
}
org.eclipse.gmf.runtime.notation.View view = null;
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gef.EditPart', 'editPartHolder')»();
+ «EXPAND CodeStyle::newGenericInstance('editPartHolder', 'java.util.LinkedList', 'org.eclipse.gef.EditPart')»();
if(hasStructuralURI && !lazyElement2ViewMap.getElement2ViewMap().isEmpty()) {
view = «EXPAND CodeStyle::castTyped('org.eclipse.gmf.runtime.notation.View')»lazyElement2ViewMap.getElement2ViewMap().get(targetElement);
} else if (findElementsInDiagramByID(diagramEditPart, targetElement, editPartHolder) > 0) {
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DocumentProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DocumentProvider.xpt
index b4506991d..61a91cea1 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DocumentProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/DocumentProvider.xpt
@@ -337,7 +337,7 @@ protected void disposeElementInfo(Object element, ElementInfo info) {
protected void doValidateState(Object element, Object computationContext) throws org.eclipse.core.runtime.CoreException {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.resources.IFile', 'files2Validate')»();
+ «EXPAND CodeStyle::newGenericInstance('files2Validate', 'java.util.LinkedList', 'org.eclipse.core.resources.IFile')»();
«EXPAND CodeStyle::iterate('nextResource', 'org.eclipse.emf.ecore.resource.Resource', 'it', 'info.getLoadedResourcesIterator()')-»
org.eclipse.core.resources.IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(nextResource);
if (file != null && file.isReadOnly()) {
@@ -443,7 +443,7 @@ public boolean isSynchronized(Object element) {
protected org.eclipse.core.runtime.jobs.ISchedulingRule getResetRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule', 'rules')»();
+ «EXPAND CodeStyle::newGenericInstance('rules', 'java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule')»();
«EXPAND CodeStyle::iterate('nextResource', 'org.eclipse.emf.ecore.resource.Resource', 'it', 'info.getLoadedResourcesIterator()')-»
org.eclipse.core.resources.IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -461,7 +461,7 @@ protected org.eclipse.core.runtime.jobs.ISchedulingRule getResetRule(Object elem
protected org.eclipse.core.runtime.jobs.ISchedulingRule getSaveRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule', 'rules')»();
+ «EXPAND CodeStyle::newGenericInstance('rules', 'java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule')»();
«EXPAND CodeStyle::iterate('nextResource', 'org.eclipse.emf.ecore.resource.Resource', 'it', 'info.getLoadedResourcesIterator()')-»
org.eclipse.core.resources.IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -479,7 +479,7 @@ protected org.eclipse.core.runtime.jobs.ISchedulingRule getSaveRule(Object eleme
protected org.eclipse.core.runtime.jobs.ISchedulingRule getSynchronizeRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule', 'rules')»();
+ «EXPAND CodeStyle::newGenericInstance('rules', 'java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule')»();
«EXPAND CodeStyle::iterate('nextResource', 'org.eclipse.emf.ecore.resource.Resource', 'it', 'info.getLoadedResourcesIterator()')-»
org.eclipse.core.resources.IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
@@ -497,7 +497,7 @@ protected org.eclipse.core.runtime.jobs.ISchedulingRule getSynchronizeRule(Objec
protected org.eclipse.core.runtime.jobs.ISchedulingRule getValidateStateRule(Object element) {
ResourceSetInfo info = getResourceSetInfo(element);
if (info != null) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule', 'files')»();
+ «EXPAND CodeStyle::newGenericInstance('files', 'java.util.LinkedList', 'org.eclipse.core.runtime.jobs.ISchedulingRule')»();
«EXPAND CodeStyle::iterate('nextResource', 'org.eclipse.emf.ecore.resource.Resource', 'it', 'info.getLoadedResourcesIterator()')-»
org.eclipse.core.resources.IFile file = org.eclipse.emf.workspace.util.WorkspaceSynchronizer.getFile(nextResource);
if (file != null) {
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetInfo.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetInfo.xpt
index 21eb8a44c..1627d23b3 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetInfo.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/ResourceSetInfo.xpt
@@ -76,7 +76,7 @@ protected class ResourceSetInfo extends ElementInfo {
private org.eclipse.emf.workspace.util.WorkspaceSynchronizer mySynchronizer;
«EXPAND xpt::Common::generatedMemberComment»
- private «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.emf.ecore.resource.Resource', 'myUnSynchronizedResources')»();
+ private «EXPAND CodeStyle::newGenericInstance('myUnSynchronizedResources', 'java.util.LinkedList', 'org.eclipse.emf.ecore.resource.Resource')»();
«ENDIF-»
«EXPAND xpt::Common::generatedMemberComment»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/palette/PaletteFactory.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/palette/PaletteFactory.xpt
index b7495d3f1..aa3827d3e 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/palette/PaletteFactory.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/editor/palette/PaletteFactory.xpt
@@ -109,7 +109,7 @@ org.eclipse.gef.palette.ToolEntry «toolVarName» = new org.eclipse.gef.palette.
«ELSE-»
«LET (if genNodes->isEmpty() then 'LinkToolEntry' else 'NodeToolEntry' endif) AS toolEntryClass-»
«IF elements->size() > 1-»
-«EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types') FOR elements->any(true)»(«elements->size()»);
+«EXPAND CodeStyle::newGenericInstance('types', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType') FOR elements->any(true)»(«elements->size()»);
«FOREACH elements->asSequence() AS e-»
types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR e»);
«ENDFOREACH-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorContentProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorContentProvider.xpt
index 1744eb494..e7f97ac50 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorContentProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/navigator/NavigatorContentProvider.xpt
@@ -224,10 +224,10 @@ public boolean hasChildren(Object element) {
«DEFINE getFileChildren FOR gmfgen::GenNavigator-»
«EXPAND getFileResource-»
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', getNavigatorItemQualifiedClassName(), 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.ArrayList', getNavigatorItemQualifiedClassName()) FOR editorGen.diagram»();
«LET getChildReferencesFrom(self, null) AS _references-»
«EXPAND initGroupVariables(self, _references, 'file', null) FOREACH getGroupNames(_references)-»
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.notation.View', 'topViews') FOR editorGen.diagram»(resource.getContents().size());
+ «EXPAND CodeStyle::newGenericInstance('topViews', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»(resource.getContents().size());
«EXPAND CodeStyle::iterate('o', 'org.eclipse.emf.ecore.EObject', 'resource.getContents()') FOR editorGen.diagram-»
if (o instanceof org.eclipse.gmf.runtime.notation.View) {
topViews.add((org.eclipse.gmf.runtime.notation.View) o);
@@ -295,7 +295,7 @@ private Object[] getViewChildren(org.eclipse.gmf.runtime.notation.View view, Obj
«DEFINE utilityMethods FOR gmfgen::GenNavigator-»
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» getLinksSourceByType(«EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.Edge') FOR editorGen.diagram» edges, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextEdge', 'org.eclipse.gmf.runtime.notation.Edge', 'edges') FOR editorGen.diagram-»
org.eclipse.gmf.runtime.notation.View nextEdgeSource = nextEdge.getSource();
if (type.equals(nextEdgeSource.getType()) && isOwnView(nextEdgeSource)) {
@@ -307,7 +307,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.n
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» getLinksTargetByType(«EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.Edge') FOR editorGen.diagram» edges, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextEdge', 'org.eclipse.gmf.runtime.notation.Edge', 'edges') FOR editorGen.diagram-»
org.eclipse.gmf.runtime.notation.View nextEdgeTarget = nextEdge.getTarget();
if (type.equals(nextEdgeTarget.getType()) && isOwnView(nextEdgeTarget)) {
@@ -319,7 +319,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.n
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» getOutgoingLinksByType(«EXPAND CodeStyle::G('java.util.Collection', '? extends org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» nodes, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextNode', 'org.eclipse.gmf.runtime.notation.View', 'nodes') FOR editorGen.diagram-»
result.addAll(selectViewsByType(nextNode.getSourceEdges(), type));
}
@@ -328,7 +328,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.n
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» getIncomingLinksByType(«EXPAND CodeStyle::G('java.util.Collection', '? extends org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» nodes, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextNode', 'org.eclipse.gmf.runtime.notation.View', 'nodes') FOR editorGen.diagram-»
result.addAll(selectViewsByType(nextNode.getTargetEdges(), type));
}
@@ -337,7 +337,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.n
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» getChildrenByType(«EXPAND CodeStyle::G('java.util.Collection', '? extends org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» nodes, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextNode', 'org.eclipse.gmf.runtime.notation.View', 'nodes') FOR editorGen.diagram-»
result.addAll(selectViewsByType(nextNode.getChildren(), type));
}
@@ -346,7 +346,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.n
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» getDiagramLinksByType(«EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.Diagram') FOR editorGen.diagram» diagrams, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextDiagram', 'org.eclipse.gmf.runtime.notation.Diagram', 'diagrams') FOR editorGen.diagram-»
result.addAll(selectViewsByType(nextDiagram.getEdges(), type));
}
@@ -356,7 +356,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.n
// TODO refactor as static method
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» selectViewsByType(«EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» views, String type) {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextView', 'org.eclipse.gmf.runtime.notation.View', 'views') FOR editorGen.diagram-»
if (type.equals(nextView.getType()) && isOwnView(nextView)) {
result.add(nextView);
@@ -372,7 +372,7 @@ private boolean isOwnView(org.eclipse.gmf.runtime.notation.View view) {
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', getNavigatorItemQualifiedClassName()) FOR editorGen.diagram» createNavigatorItems(«EXPAND CodeStyle::G('java.util.Collection', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram» views, Object parent, boolean isLeafs) {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', getNavigatorItemQualifiedClassName(), 'result') FOR editorGen.diagram»(views.size());
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.ArrayList', getNavigatorItemQualifiedClassName()) FOR editorGen.diagram»(views.size());
«EXPAND CodeStyle::iterate('nextView', 'org.eclipse.gmf.runtime.notation.View', 'views') FOR editorGen.diagram-»
result.add(new «getNavigatorItemQualifiedClassName()»(nextView, parent, isLeafs));
}
@@ -386,7 +386,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', getNavigatorItemQualifiedC
«EXPAND xpt::Common::generatedMemberComment»
private «EXPAND CodeStyle::G('java.util.Collection', getNavigatorItemQualifiedClassName()) FOR editorGen.diagram» getForeignShortcuts(org.eclipse.gmf.runtime.notation.Diagram diagram, Object parent) {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View', 'result') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', 'org.eclipse.gmf.runtime.notation.View') FOR editorGen.diagram»();
«EXPAND CodeStyle::iterate('nextView', 'org.eclipse.gmf.runtime.notation.View', 'it', 'diagram.getChildren().iterator()') FOR editorGen.diagram-»
if (!isOwnView(nextView) && nextView.getEAnnotation("Shortcut") != null) {«EXPAND xpt::Common::nonNLS»
result.add(nextView);
@@ -427,7 +427,7 @@ private «EXPAND CodeStyle::G('java.util.Collection', getNavigatorItemQualifiedC
«DEFINE caseNavigatorNode(navigator : gmfgen::GenNavigator) FOR gmfgen::GenCommonBase»
«EXPAND xpt::Common::caseVisualID» {
- «EXPAND CodeStyle::newGenericInstance('java.util.LinkedList', navigator.getAbstractNavigatorItemQualifiedClassName(), 'result')»();
+ «EXPAND CodeStyle::newGenericInstance('result', 'java.util.LinkedList', navigator.getAbstractNavigatorItemQualifiedClassName())»();
«EXPAND addForeignShortcuts FOR self-»
«EXPAND _nailedDownVariable('sv', 'view')»
«LET getChildReferencesFrom(navigator, self) AS _references-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/Activator.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/Activator.xpt
index 379ee79d1..94bede8fa 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/Activator.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/plugin/Activator.xpt
@@ -87,7 +87,7 @@ public class «activatorClassName» extends org.eclipse.ui.plugin.AbstractUIPlug
«EXPAND xpt::Common::generatedMemberComment»
protected org.eclipse.emf.edit.provider.ComposedAdapterFactory createAdapterFactory() {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.emf.common.notify.AdapterFactory', 'factories') FOR editorGen.diagram»();
+ «EXPAND CodeStyle::newGenericInstance('factories', 'java.util.ArrayList', 'org.eclipse.emf.common.notify.AdapterFactory') FOR editorGen.diagram»();
fillItemProviderFactories(factories);
return new org.eclipse.emf.edit.provider.ComposedAdapterFactory(factories);
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricProvider.xpt
index ab30a128d..7f97468aa 100755
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/MetricProvider.xpt
@@ -90,7 +90,7 @@ public class «metricProviderClassName» {
public void run() {
org.eclipse.gmf.runtime.notation.Diagram diagram = diagramEditPart.getDiagramView();
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'ElementMetrics', 'metrics')»(50);
+ «EXPAND CodeStyle::newGenericInstance('metrics', 'java.util.ArrayList', 'ElementMetrics')»(50);
«IF getNotationMetrics(editorGen.metrics)->notEmpty()-»
calculateNotationElementMetrics(diagram, metrics);
«ENDIF-»
@@ -284,7 +284,7 @@ public class «metricProviderClassName» {
java.util.Iterator/*<EObject>*/ it = next != null ? next.eAllContents() : java.util.Collections.EMPTY_LIST.iterator();
«EXPAND CodeStyle::newGenericInstance2('target2row', 'java.util.HashMap', 'org.eclipse.emf.ecore.EObject', 'ElementMetrics') FOR diagram»();
while (next != null) {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList','Metric', 'res') FOR diagram»(5);
+ «EXPAND CodeStyle::newGenericInstance('res', 'java.util.ArrayList','Metric') FOR diagram»(5);
«FOREACH metrics.metrics.target[gmfgen::GenDomainElementTarget].element[genmodel::GenClass] AS e-»
if («EXPAND MetaModel::MetaClass FOR e».isInstance(next)) {
«FOREACH metrics.metrics->select(m | m.target.getContext() = e) AS m-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt
index 2e17091a2..9cd68cbc4 100644
--- a/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates/xpt/providers/ModelingAssistantProvider.xpt
@@ -58,7 +58,7 @@ public class «modelingAssistantProviderClassName»
«FOREACH getAllContainers() AS container-»
«IF container.getAssistantNodes()->size() > 0-»
if (editPart instanceof «container.getEditPartQualifiedClassName()») {
- «EXPAND CodeStyle::newGenericInstance('java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType', 'types')»(«container.getAssistantNodes()->size()»);
+ «EXPAND CodeStyle::newGenericInstance('types', 'java.util.ArrayList', 'org.eclipse.gmf.runtime.emf.type.core.IElementType')»(«container.getAssistantNodes()->size()»);
«FOREACH container.getAssistantNodes()->asSequence() AS node-»
types.add(«EXPAND xpt::providers::ElementTypes::accessElementType FOR node»);
«ENDFOREACH-»
@@ -194,7 +194,7 @@ public class «modelingAssistantProviderClassName»
}
org.eclipse.gmf.runtime.notation.Diagram diagram =
(org.eclipse.gmf.runtime.notation.Diagram) editPart.getRoot().getContents().getModel();
- «EXPAND CodeStyle::newGenericInstance('java.util.HashSet', 'org.eclipse.emf.ecore.EObject', 'elements')»();
+ «EXPAND CodeStyle::newGenericInstance('elements', 'java.util.HashSet', 'org.eclipse.emf.ecore.EObject')»();
«EXPAND CodeStyle::iterate('element', 'org.eclipse.emf.ecore.EObject', 'it', 'diagram.getElement().eAllContents()')-»
if (isApplicableElement(element, types)) {
elements.add(element);

Back to the top