Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2009-02-19 08:41:06 -0500
committerashatalin2009-02-19 08:41:06 -0500
commit0702375a9c3b5c7a7fbfd8752448a23dc8848f38 (patch)
tree36f7a258d664cfa616a93048989039599613961c
parent38989ace85a97bb78a15e240a3695ddfc51610b2 (diff)
downloadorg.eclipse.gmf-tooling-0702375a9c3b5c7a7fbfd8752448a23dc8848f38.tar.gz
org.eclipse.gmf-tooling-0702375a9c3b5c7a7fbfd8752448a23dc8848f38.tar.xz
org.eclipse.gmf-tooling-0702375a9c3b5c7a7fbfd8752448a23dc8848f38.zip
String escaping switched on in templates in accordance with OCL string escaping - https://bugs.eclipse.org/bugs/show_bug.cgi?id=242880.
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/LinkEditPart.xpt9
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/NodeEditPart.xpt15
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/Common.xpt18
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/ActionBarAdvisor.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/CreateLinkUtils.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/ReorientLinkViewCommand.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editparts/Common.xpt4
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt13
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/linkCommands.xpt10
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DiagramEditorUtil.xpt8
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DocumentProvider.xpt12
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/Editor.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/InitDiagramFileAction.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/NewDiagramFileWizard.xpt6
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/VisualIDRegistry.xpt12
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/palette/PaletteFactory.xpt2
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ElementTypes.xpt3
-rw-r--r--plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/MetricProvider.xpt11
24 files changed, 66 insertions, 87 deletions
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt
index 3684ac32f..9e2796140 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CreateShortcutAction.xpt
@@ -20,7 +20,7 @@
«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
«EXPAND executeMethod»
«EXPAND additions-»
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt
index b469170ab..739ba7762 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/CustomAction.xpt
@@ -19,7 +19,7 @@
«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\.')->last()» extends org.eclipse.core.commands.AbstractHandler {
+public class «qualifiedClassName.xpandSplit('\\.')->last()» extends org.eclipse.core.commands.AbstractHandler {
«EXPAND xpt::Common::generatedMemberComment»
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException {
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt
index 260811374..c6a2f85c1 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/LoadResourceAction.xpt
@@ -19,7 +19,7 @@
«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+public class «qualifiedClassName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
«EXPAND executeMethod»
«EXPAND additions-»
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt
index ccb75d9b4..005887993 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/actions/extensions.xpt
@@ -94,8 +94,8 @@
</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 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-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/LinkEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/LinkEditPart.xpt
index 38c9fdd8e..7bb2f70f9 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/LinkEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/LinkEditPart.xpt
@@ -99,11 +99,10 @@
«DEFINE createLinkFigure FOR gmfgen::GenLink-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Creates figure for this edit part.
-
-Body of this method does not depend on settings in generation model
-so you may safely remove <i>generated</i> tag and modify it.
-'
+ '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»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/NodeEditPart.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/NodeEditPart.xpt
index a204dfc6b..df9a5b3e9 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/NodeEditPart.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/impl/diagram/editparts/NodeEditPart.xpt
@@ -371,11 +371,10 @@ new org.eclipse.gmf.runtime.diagram.ui.editpolicies.BorderItemSelectionEditPolic
«DEFINE createFigure FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Creates figure for this edit part.
-
-Body of this method does not depend on settings in generation model
-so you may safely remove <i>generated</i> tag and modify it.
-'
+ '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() {
org.eclipse.gmf.runtime.gef.ui.figures.NodeFigure figure = createNodePlate();
@@ -389,9 +388,9 @@ so you may safely remove <i>generated</i> tag and modify it.
«DEFINE setupContentPane FOR gmfgen::GenNode-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Default implementation treats passed figure as content pane.
-Respects layout one may have set for generated figure.
-@param nodeShape instance of generated figure class'
+ '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())-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt
index 008477657..bdb380165 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/parsers/CustomParser.xpt
@@ -19,7 +19,7 @@
«EXPAND xpt::Common::packageStatement FOR qualifiedName»
«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedName.xpandSplit('\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
+public class «qualifiedName.xpandSplit('\\.')->last()»«EXPAND extendsList»«EXPAND implementsList» {
«EXPAND body»
«EXPAND additions»
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/Common.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/Common.xpt
index 421705dbd..4ccb8ae96 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/Common.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/Common.xpt
@@ -20,9 +20,7 @@
«DEFINE copyright FOR gmfgen::GenEditorGenerator-»
«IF copyrightText <> null-»
/*
- * «copyrightText.xpandReplaceAll('
-', '
- * ')»
+ * «copyrightText.xpandReplaceAll('\n', '\n * ')»
*/
«ENDIF-»
«ENDDEFINE»
@@ -39,9 +37,7 @@
«DEFINE generatedClassComment(comment : String) FOR OclAny-»
/**
«IF comment.xpandLength() > 0-»
- * «comment.xpandReplaceAll('
-', '
- * ')»
+ * «comment.xpandReplaceAll('\n', '\n * ')»
«ENDIF-»
* @generated
*/«ENDDEFINE»
@@ -51,9 +47,7 @@
«DEFINE generatedMemberComment(comment : String) FOR OclAny-»
/**
«IF comment.xpandLength() > 0-»
- * «comment.xpandReplaceAll('
-', '
- * ')»
+ * «comment.xpandReplaceAll('\n', '\n * ')»
«ENDIF-»
* @generated
*/«ENDDEFINE»
@@ -87,12 +81,12 @@
«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-»
+«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.xpandToCharList()->includes('"')»«EXPAND nonNLS»«ENDIF»
+assert «condition»;«IF condition.xpandToCharList()->includes('\"')»«EXPAND nonNLS»«ENDIF»
«ENDDEFINE» \ No newline at end of file
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto
index 32cae5298..8e8bb5381 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/ExternalizerUtils.qvto
@@ -13,9 +13,9 @@ helper getExternalizerClassName() : String {
}
helper escapeIllegalKeySymbols(key : String) : String {
- return key.xpandReplaceAll('[=&"]', '').xpandReplaceAll('[ .]', '_')
+ return key.xpandReplaceAll('[=&\"]', '').xpandReplaceAll('[ .]', '_')
}
helper escapeIllegalMessageSymbols(message : String) : String {
- return message.xpandReplaceAll('!', '\\!')
+ return message.xpandReplaceAll('!', '\\\\!')
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/ActionBarAdvisor.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/ActionBarAdvisor.xpt
index cb8567652..afefe9c7e 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/ActionBarAdvisor.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/application/ActionBarAdvisor.xpt
@@ -250,7 +250,7 @@ public class «actionBarAdvisorClassName» extends org.eclipse.ui.application.Acti
«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(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')-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/CreateLinkUtils.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/CreateLinkUtils.xpt
index f19cbc901..2ef4afb83 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/CreateLinkUtils.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/CreateLinkUtils.xpt
@@ -113,8 +113,8 @@
}
«EXPAND xpt::Common::generatedMemberComment(
- 'Default approach is to traverse ancestors of the source to find instance of container.
-Modify with appropriate logic.'
+ '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) {
// Find container element for the new link.
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/ReorientLinkViewCommand.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/ReorientLinkViewCommand.xpt
index 0498a9209..cd996909c 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/ReorientLinkViewCommand.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/commands/ReorientLinkViewCommand.xpt
@@ -51,9 +51,9 @@ public class «reorientConnectionViewCommandClassName»
«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);
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editparts/Common.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editparts/Common.xpt
index b953130f1..abebed619 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editparts/Common.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editparts/Common.xpt
@@ -28,9 +28,9 @@
«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»
+ 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»
+ installEditPolicy(«key», new «getEditPolicyQualifiedClassName()»()); «IF key.xpandStartsWith('\"') and key.xpandEndsWith('\"')»«EXPAND xpt::Common::nonNLS»«ENDIF»
«ENDIF-»
«ENDDEFINE»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
index cb0d3784e..7e49fc54b 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/BaseItemSemanticEditPolicy.xpt
@@ -32,12 +32,11 @@ public class «baseItemSemanticEditPolicyClassName» extends org.eclipse.gmf.runti
«EXPAND _constructor-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Extended request data key to hold editpart visual id.
-Add visual id of edited editpart to extended data of the request
-so command switch can decide what kind of diagram element is being edited.
-It is done in those cases when it''s not possible to deduce diagram
-element kind from domain element.
-'
+ '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) {
@@ -89,7 +88,7 @@ element kind from domain element.
«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»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/linkCommands.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/linkCommands.xpt
index 297223b6f..ffd497348 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/linkCommands.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/diagram/editpolicies/linkCommands.xpt
@@ -111,9 +111,8 @@ if («EXPAND xpt::providers::ElementTypes::accessElementType» == req.getElementTy
«DEFINE reorientTypeLinkCommands FOR gmfgen::GenLinkEnd-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Returns command to reorient EClass based link. New link target or source
-should be the domain model element associated with this node.
-'
+ '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) {
@@ -127,9 +126,8 @@ protected org.eclipse.gef.commands.Command getReorientRelationshipCommand(
«DEFINE reorientRefLinkCommands FOR gmfgen::GenLinkEnd-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Returns command to reorient EReference based link. New link target or source
-should be the domain model element associated with this node.
-'
+ '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) {
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DiagramEditorUtil.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DiagramEditorUtil.xpt
index 17db5997a..10b8ea2b3 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DiagramEditorUtil.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DiagramEditorUtil.xpt
@@ -236,18 +236,14 @@ public class «diagramEditorUtilClassName» {
«ENDDEFINE»
«DEFINE createInitialModelMethod FOR gmfgen::GenDiagram»
- «EXPAND xpt::Common::generatedMemberComment('Create a new instance of domain element associated with canvas.
-<!-- begin-user-doc -->
-<!-- end-user-doc -->')»
+ «EXPAND xpt::Common::generatedMemberComment('Create a new instance of domain element associated with canvas.\n<!-- begin-user-doc -->\n<!-- end-user-doc -->')»
private static «EXPAND MetaModel::QualifiedClassName FOR domainDiagramElement» createInitialModel() {
return «EXPAND MetaModel::NewInstance FOR domainDiagramElement»;
}
«ENDDEFINE»
«DEFINE attachModelMethod FOR gmfgen::GenDiagram»
- «EXPAND xpt::Common::generatedMemberComment('Store model element in the resource.
-<!-- begin-user-doc -->
-<!-- end-user-doc -->')»
+ «EXPAND xpt::Common::generatedMemberComment('Store model element in the resource.\n<!-- begin-user-doc -->\n<!-- end-user-doc -->')»
private static void attachModelToResource(«EXPAND MetaModel::QualifiedClassName FOR domainDiagramElement» model, org.eclipse.emf.ecore.resource.Resource resource) {
resource.getContents().add(«IF hasDocumentRoot(self)»createDocumentRoot(model)«ELSE»«EXPAND MetaModel::DowncastToEObject('model') FOR domainDiagramElement»«ENDIF»);
}
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DocumentProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DocumentProvider.xpt
index c274dc9ac..5d0cf0b65 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DocumentProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/DocumentProvider.xpt
@@ -139,12 +139,12 @@ protected org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument
«DEFINE setupDocument FOR gmfgen::GenDiagram-»
«EXPAND xpt::Common::generatedMemberComment(
- 'Sets up the given document as it would be provided for the given element. The
-content of the document is not changed. This default implementation is empty.
-Subclasses may reimplement.
-
-@param element the blue-print element
-@param document the document to set up'
+ 'Sets up the given document as it would be provided for the given element. The\n' +
+ 'content of the document is not changed. This default implementation is empty.\n' +
+ 'Subclasses may reimplement.\n' +
+ '\n' +
+ '@param element the blue-print element\n' +
+ '@param document the document to set up'
protected void setupDocument(Object element, org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDocument document) {
// for subclasses
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/Editor.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/Editor.xpt
index 2c04ce16c..93903cb4e 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/Editor.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/Editor.xpt
@@ -388,7 +388,7 @@ protected abstract Object getJavaObject(org.eclipse.swt.dnd.TransferData data);
«ENDDEFINE»
«DEFINE i18nValues FOR gmfgen::GenEditorView-»
-«EXPAND xpt::Externalizer::messageEntry(i18nKeyForSavingDeletedFile(self), 'The original file "{0}" has been deleted.')-»
+«EXPAND xpt::Externalizer::messageEntry(i18nKeyForSavingDeletedFile(self), 'The original file \"{0}\" has been deleted.')-»
«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForSaveAsProblems(self)), 'Problem During Save As...')-»
«EXPAND xpt::Externalizer::messageEntry(messageKey(i18nKeyForSaveAsProblems(self)), 'Save could not be completed. Target file is already open in another editor.')-»
«EXPAND xpt::Externalizer::messageEntry(titleKey(i18nKeyForSaveProblems(self)), 'Save Problems')-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/InitDiagramFileAction.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/InitDiagramFileAction.xpt
index fa701d4b1..84536f72d 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/InitDiagramFileAction.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/InitDiagramFileAction.xpt
@@ -22,7 +22,7 @@
«EXPAND xpt::Common::packageStatement FOR qualifiedClassName»
«EXPAND xpt::Common::generatedClassComment»
-public class «qualifiedClassName.xpandSplit('\.')->last()»
+public class «qualifiedClassName.xpandSplit('\\.')->last()»
«IF editorGen.application = null-»
implements org.eclipse.ui.IObjectActionDelegate {
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/NewDiagramFileWizard.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/NewDiagramFileWizard.xpt
index be6fe7616..e71bd7fdb 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/NewDiagramFileWizard.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/NewDiagramFileWizard.xpt
@@ -40,9 +40,9 @@ public class «EXPAND className» extends org.eclipse.jface.wizard.Wizard {
public «EXPAND className»(org.eclipse.emf.common.util.URI domainModelURI,
org.eclipse.emf.ecore.EObject diagramRoot,
org.eclipse.emf.transaction.TransactionalEditingDomain editingDomain) {
- «EXPAND xpt::Common::_assert('domainModelURI != null : "Domain model uri must be specified"')-»
- «EXPAND xpt::Common::_assert('diagramRoot != null : "Doagram root element must be specified"')-»
- «EXPAND xpt::Common::_assert('editingDomain != null : "Editing domain must be specified"')-»
+ «EXPAND xpt::Common::_assert('domainModelURI != null : \"Domain model uri must be specified\"')-»
+ «EXPAND xpt::Common::_assert('diagramRoot != null : \"Doagram root element must be specified\"')-»
+ «EXPAND xpt::Common::_assert('editingDomain != null : \"Editing domain must be specified\"')-»
myFileCreationPage = new «EXPAND creationPage»(«EXPAND xpt::Externalizer::accessorCall(nameKey(i18nKeyForNewDiagramFileWizardCreationPage(self))) FOR editorGen», org.eclipse.jface.viewers.StructuredSelection.EMPTY);
myFileCreationPage.setTitle(«EXPAND xpt::Externalizer::accessorCall(titleKey(i18nKeyForNewDiagramFileWizardCreationPage(self))) FOR editorGen»);
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/VisualIDRegistry.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/VisualIDRegistry.xpt
index f1a4a8a91..d64ea5314 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/VisualIDRegistry.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/VisualIDRegistry.xpt
@@ -25,10 +25,9 @@
package «editorGen.editor.packageName»;
«EXPAND xpt::Common::generatedClassComment(
- 'This registry is used to determine which type of visual object should be
-created for the corresponding Diagram, Node, ChildNode or Link represented
-by a domain model object.
-'
+ 'This registry is used to determine which type of visual object should be\n' +
+ 'created for the corresponding Diagram, Node, ChildNode or Link represented\n' +
+ 'by a domain model object.\n'
public class «visualIDRegistryClassName» {
@@ -290,9 +289,8 @@ public static int «EXPAND getLinkWithClassVisualIDMethodName»(org.eclipse.emf.ec
«DEFINE isDiagram FOR gmfgen::GenDiagram-»
«IF null <> domainDiagramElement-»
«EXPAND xpt::Common::generatedMemberComment(
- 'User can change implementation of this method to handle some specific
-situations not covered by default logic.
-'
+ 'User can change implementation of this method to handle some specific\n' +
+ 'situations not covered by default logic.\n'
private static boolean isDiagram(«EXPAND MetaModel::QualifiedClassName FOR domainDiagramElement» element) {
return true;
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/palette/PaletteFactory.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/palette/PaletteFactory.xpt
index 08caa17f4..7becc3d99 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/palette/PaletteFactory.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/editor/palette/PaletteFactory.xpt
@@ -41,7 +41,7 @@ public class «factoryClassName» {
«ENDDEFINE»
«DEFINE createGroup FOR gmfgen::ToolGroup-»
- «EXPAND xpt::Common::generatedMemberComment('Creates "' + title + '" palette tool group')»
+ «EXPAND xpt::Common::generatedMemberComment('Creates \"' + title + '\" palette tool group')»
private org.eclipse.gef.palette.PaletteContainer «createMethodName»() {
«EXPAND newContainer('paletteContainer')-»
«EXPAND setIdentity('paletteContainer')-»
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ElementTypes.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ElementTypes.xpt
index 80f5cae47..6f4f07ee9 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ElementTypes.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/ElementTypes.xpt
@@ -172,8 +172,7 @@ public static org.eclipse.swt.graphics.Image getImage(org.eclipse.core.runtime.I
«ENDDEFINE»
«DEFINE getElement FOR gmfgen::GenDiagram-»
- «EXPAND xpt::Common::generatedMemberComment('Returns ''type'' of the ecore object associated with the hint.
-')»
+ «EXPAND xpt::Common::generatedMemberComment('Returns \'type\' of the ecore object associated with the hint.\n')»
public static org.eclipse.emf.ecore.ENamedElement getElement(org.eclipse.core.runtime.IAdaptable hint) {
Object type = hint.getAdapter(org.eclipse.gmf.runtime.emf.type.core.IElementType.class);
if (elements == null) {
diff --git a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/MetricProvider.xpt b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/MetricProvider.xpt
index 624425573..9218d3408 100644
--- a/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/MetricProvider.xpt
+++ b/plugins/org.eclipse.gmf.codegen/templates.migrated/xpt/providers/MetricProvider.xpt
@@ -217,8 +217,7 @@ public class «metricProviderClassName» {
«LET getNotationMetrics(metrics)->select(m | m.target.oclAsType(gmfgen::GenNotationElementTarget).element.ecoreClass.name = 'Diagram') AS diagramMetrics-»
«IF not diagramMetrics->isEmpty()-»
row = new ElementMetrics(diagram, formatViewName(diagram), new Metric[] {
-«EXPAND metricResult('diagram', false) FOREACH diagramMetrics SEPARATOR ',
-'»
+«EXPAND metricResult('diagram', false) FOREACH diagramMetrics SEPARATOR ',\n'»
});
row.diagramElementID = diagram.eResource().getURIFragment(diagram);
metricsList.add(row);
@@ -365,7 +364,7 @@ public class «metricProviderClassName» {
«DEFINE calcMethodArgs(metric : gmfgen::GenMetricRule) FOR gmfgen::GenNotationElementTarget»«EXPAND MetaModel::QualifiedClassName FOR element» target«ENDDEFINE»
-«DEFINE calcMethodBody(metric : gmfgen::GenMetricRule) FOR gmfgen::GenExpressionProviderBase»«ERROR 'No idea how to calculate metric''s value for ' + self.repr()»«ENDDEFINE»
+«DEFINE calcMethodBody(metric : gmfgen::GenMetricRule) FOR gmfgen::GenExpressionProviderBase»«ERROR 'No idea how to calculate metric\'s value for ' + self.repr()»«ENDDEFINE»
«DEFINE calcMethodBody(metric : gmfgen::GenMetricRule) FOR gmfgen::GenExpressionInterpreter-»
if («exprFieldName(metric)» == null) {
@@ -411,16 +410,14 @@ public class «metricProviderClassName» {
«EXPAND xpt::Common::generatedMemberComment»
private static String[] getMetricKeys() {
return new String[] {
- «FOREACH metrics->asSequence() AS m SEPARATOR ',
-'»«toStringLiteral(m.key)»«ENDFOREACH»
+ «FOREACH metrics->asSequence() AS m SEPARATOR ',\n'»«toStringLiteral(m.key)»«ENDFOREACH»
};
}
«EXPAND xpt::Common::generatedMemberComment»
private static String[] getMetricToolTips() {
return new String[] {
- «FOREACH metrics->asSequence() AS m SEPARATOR ',
-'-»
+ «FOREACH metrics->asSequence() AS m SEPARATOR ',\n'-»
«toStringLiteral((if m.name = null then m.key else m.name endif))»«IF m.description <> null» + '\n' + «toStringLiteral(m.description)» + '\n'«ENDIF»«IF null <> m.lowLimit» + «toStringLiteral('low: ' + m.lowLimit.repr())»«ENDIF»«IF null <> m.highLimit» + «toStringLiteral('high: ' + m.highLimit.repr())»«ENDIF-»
«ENDFOREACH»
};

Back to the top