Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoracuccuru2011-05-16 10:49:16 -0400
committeracuccuru2011-05-16 10:49:16 -0400
commit398fb255e6ae39fc88124fdccd4e376ad3caf531 (patch)
tree11acfb9282c2f6892a40f87be5460030ac1d3ad3 /extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext
parent98d99885802756708449ffc758aaf31c0e10f6d4 (diff)
downloadorg.eclipse.papyrus-398fb255e6ae39fc88124fdccd4e376ad3caf531.tar.gz
org.eclipse.papyrus-398fb255e6ae39fc88124fdccd4e376ad3caf531.tar.xz
org.eclipse.papyrus-398fb255e6ae39fc88124fdccd4e376ad3caf531.zip
Diffstat (limited to 'extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext')
-rw-r--r--extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src/org/eclipse/papyrus/operation/editor/xtext/utils/AlfParsingUtil.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src/org/eclipse/papyrus/operation/editor/xtext/utils/AlfParsingUtil.java b/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src/org/eclipse/papyrus/operation/editor/xtext/utils/AlfParsingUtil.java
index b82b80f5c50..159adf7e11b 100644
--- a/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src/org/eclipse/papyrus/operation/editor/xtext/utils/AlfParsingUtil.java
+++ b/extraplugins/alf/org.eclipse.papyrus.operation.editor.xtext/src/org/eclipse/papyrus/operation/editor/xtext/utils/AlfParsingUtil.java
@@ -72,7 +72,17 @@ public class AlfParsingUtil {
*/
public static void parseTest(String textualRepresentation) {
AlfParsingUtil parseAlf = new AlfParsingUtil();
- XtextResource xtextResource = parseAlf.getXtextResource(textualRepresentation);
+
+ String actualRepresentation = "" + textualRepresentation ;
+
+ // In this version of the Alf editor, the stereotype <<TextualRepresentation>> is not implemented yet
+ // The serialization prefixes the textual representation with the string "<<TextualRepresentation>>"
+ // It must be removed before creating the resource
+ if (actualRepresentation.startsWith("<<TextualRepresentation>>")) {
+ actualRepresentation = actualRepresentation.substring("<<TextualRepresentation>>".length()) ;
+ }
+
+ XtextResource xtextResource = parseAlf.getXtextResource(actualRepresentation);
System.out.println("///////////////////////// Test begin") ;

Back to the top