Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/.classpath8
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/.project39
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/.settings/org.deved.antlride.core.prefs24
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/META-INF/MANIFEST.MF30
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/about.html28
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelLexer.java2076
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelParser.java1014
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelLexer.java2410
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelParser.java3062
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelLexer.java2343
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelParser.java3269
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/build.properties7
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/plugin.properties12
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/plugin.xml59
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/build.xml208
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.g535
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.tokens53
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.g854
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.tokens67
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.g998
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.tokens67
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/icons/Property.gifbin329 -> 0 bytes
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/icons/default.gifbin577 -> 0 bytes
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/icons/error.gifbin609 -> 0 bytes
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/icons/exception.gifbin207 -> 0 bytes
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/resources/icons/warning.gifbin331 -> 0 bytes
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java173
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java209
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties120
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java130
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java124
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java160
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java53
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java80
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java72
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java116
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java272
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java50
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java43
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java57
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java99
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java114
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java173
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java97
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java136
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java52
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java37
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java123
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java76
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java76
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java77
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java40
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java89
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java74
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java102
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java63
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java112
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java63
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java96
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java96
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java178
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java63
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java61
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java92
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java65
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java63
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java61
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java62
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java64
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java60
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java100
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java65
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java77
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java81
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java53
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java113
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java109
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java249
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java52
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java105
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java155
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java89
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java90
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java72
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java112
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java120
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java243
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java50
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java51
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java112
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java154
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java149
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java88
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java67
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java37
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java29
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java43
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java33
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java35
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java50
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java46
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java48
-rw-r--r--plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties3
104 files changed, 0 insertions, 24273 deletions
diff --git a/plugins/others/org.eclipse.papyrus.parsers/.classpath b/plugins/others/org.eclipse.papyrus.parsers/.classpath
deleted file mode 100644
index 1cf8155fb36..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/.classpath
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="antlrsrc"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/plugins/others/org.eclipse.papyrus.parsers/.project b/plugins/others/org.eclipse.papyrus.parsers/.project
deleted file mode 100644
index d493937c3e4..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/.project
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.parsers</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.dltk.core.scriptbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.ibm.etools.common.migration.MigrationBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.deved.antlride.core.nature</nature>
- </natures>
-</projectDescription>
diff --git a/plugins/others/org.eclipse.papyrus.parsers/.settings/org.deved.antlride.core.prefs b/plugins/others/org.eclipse.papyrus.parsers/.settings/org.deved.antlride.core.prefs
deleted file mode 100644
index 986d95a8e54..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/.settings/org.deved.antlride.core.prefs
+++ /dev/null
@@ -1,24 +0,0 @@
-#Wed Aug 05 15:12:06 CEST 2009
-antlr_core_builder_Xconversiontimeout=1000
-antlr_core_builder_Xdfaverbose=false
-antlr_core_builder_Xm=4
-antlr_core_builder_Xmaxdfaedges=65534
-antlr_core_builder_Xnocollapse=false
-antlr_core_builder_Xnomergestopstates=false
-antlr_core_builder_Xnoprune=false
-antlr_core_builder_dfa=false
-antlr_core_builder_include_stacktrace_on_internal_errors=false
-antlr_core_builder_max_number_of_problems_reported_per_grammar=25
-antlr_core_builder_nfa=false
-antlr_core_builder_report=false
-antlr_core_builder_runtime=3.0.1
-antlr_core_code_generator_XdbgST=false
-antlr_core_code_generator_append_java_package_to_out_folder=true
-antlr_core_code_generator_debug=false
-antlr_core_code_generator_max_memory=0
-antlr_core_code_generator_out_folder=antlrsrc/
-antlr_core_code_generator_out_option=p
-antlr_core_code_generator_profile=false
-antlr_core_code_generator_trace=false
-antlr_core_mark_generated_resources_as_derived=false
-eclipse.preferences.version=1
diff --git a/plugins/others/org.eclipse.papyrus.parsers/.settings/org.eclipse.jdt.core.prefs b/plugins/others/org.eclipse.papyrus.parsers/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 52fcfecc119..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-#Tue Aug 26 17:00:38 CEST 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/plugins/others/org.eclipse.papyrus.parsers/META-INF/MANIFEST.MF b/plugins/others/org.eclipse.papyrus.parsers/META-INF/MANIFEST.MF
deleted file mode 100644
index 404cb810b4b..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,30 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.uml2.uml,
- org.eclipse.jface.text,
- org.eclipse.ui.editors,
- org.eclipse.papyrus.uml.tools.utils;bundle-version="0.9.0",
- org.eclipse.papyrus.extensionpoints.editors;bundle-version="0.9.0",
- org.antlr.runtime;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.papyrus.parsers,
- org.eclipse.papyrus.parsers.antlr,
- org.eclipse.papyrus.parsers.messages,
- org.eclipse.papyrus.parsers.modelgenerator,
- org.eclipse.papyrus.parsers.preferences,
- org.eclipse.papyrus.parsers.texteditor,
- org.eclipse.papyrus.parsers.texteditor.collaborationuselabel,
- org.eclipse.papyrus.parsers.texteditor.completionproposals,
- org.eclipse.papyrus.parsers.texteditor.parameterlabel,
- org.eclipse.papyrus.parsers.texteditor.propertylabel,
- org.eclipse.papyrus.parsers.util
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 0.9.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.parsers.PapyrusParsersPlugin
-Bundle-SymbolicName: org.eclipse.papyrus.parsers;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/plugins/others/org.eclipse.papyrus.parsers/about.html b/plugins/others/org.eclipse.papyrus.parsers/about.html
deleted file mode 100644
index 82d49bf5f81..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2007</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
diff --git a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelLexer.java b/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelLexer.java
deleted file mode 100644
index 94e2abff10a..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelLexer.java
+++ /dev/null
@@ -1,2076 +0,0 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g 2011-03-15 17:01:08
-
-package org.eclipse.papyrus.parsers.antlr;
-
-import org.eclipse.uml2.uml.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-
-import org.eclipse.papyrus.parsers.texteditor.collaborationuselabel.IContext;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-public class CollaborationUseLabelLexer extends Lexer {
- public static final int COMMA=30;
- public static final int DOUBLE_LT=41;
- public static final int ISEQ=38;
- public static final int MINUS=6;
- public static final int INCR=46;
- public static final int SHARP=7;
- public static final int DOUBLE_RCURLY=23;
- public static final int DECR=47;
- public static final int ARROW=34;
- public static final int DOUBLE_GT=44;
- public static final int RULE_ASSIGN=33;
- public static final int TILDE=8;
- public static final int PIPE=26;
- public static final int DOUBLE_PIPE=27;
- public static final int QUESTION_MARK=12;
- public static final int INTEGER=51;
- public static final int RCURLY=22;
- public static final int NL=11;
- public static final int LCURLY=20;
- public static final int LE=42;
- public static final int RPAREN=17;
- public static final int LPAREN=16;
- public static final int SINGLE_QUOTE=15;
- public static final int PLUS=5;
- public static final int REAL=53;
- public static final int LSQUARE=18;
- public static final int RANGE=29;
- public static final int FOUR_POINTS=32;
- public static final int DOUBLE_LCURLY=21;
- public static final int POINT=28;
- public static final int WS=10;
- public static final int ALPHA=49;
- public static final int EQ=37;
- public static final int LT=40;
- public static final int GT=43;
- public static final int DOUBLE_QUOTE=14;
- public static final int RSQUARE=19;
- public static final int DOUBLE_LOGICAL_AND=25;
- public static final int RANGE_VALUE=52;
- public static final int T__55=55;
- public static final int SEMI=31;
- public static final int GE=45;
- public static final int LNOT=13;
- public static final int ISNE=39;
- public static final int LOGICAL_AND=24;
- public static final int EOF=-1;
- public static final int COLON=4;
- public static final int DIV=36;
- public static final int INTEGER_OR_REAL_OR_RANGE=54;
- public static final int STAR=35;
- public static final int IDENTIFIER=9;
- public static final int UNDERSCORE=50;
- public static final int CALLOPERATION=48;
-
- // delegates
- // delegators
-
- public CollaborationUseLabelLexer() {;}
- public CollaborationUseLabelLexer(CharStream input) {
- this(input, new RecognizerSharedState());
- }
- public CollaborationUseLabelLexer(CharStream input, RecognizerSharedState state) {
- super(input,state);
-
- }
- public String getGrammarFileName() { return "D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g"; }
-
- // $ANTLR start "T__55"
- public final void mT__55() throws RecognitionException {
- try {
- int _type = T__55;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:22:7: ( '<Undefined>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:22:9: '<Undefined>'
- {
- match("<Undefined>"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__55"
-
- // $ANTLR start "NL"
- public final void mNL() throws RecognitionException {
- try {
- int _type = NL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:319:3: ( ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' ) )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:319:5: ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' )
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:319:5: ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' )
- int alt1=4;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0=='\r') ) {
- int LA1_1 = input.LA(2);
-
- if ( (LA1_1=='\n') ) {
- alt1=1;
- }
- else {
- alt1=3;}
- }
- else if ( (LA1_0=='\n') ) {
- int LA1_2 = input.LA(2);
-
- if ( (LA1_2=='\r') ) {
- alt1=2;
- }
- else {
- alt1=4;}
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 1, 0, input);
-
- throw nvae;
- }
- switch (alt1) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:319:7: '\\r' '\\n'
- {
- match('\r'); if (state.failed) return ;
- match('\n'); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:320:7: '\\n' '\\r'
- {
- match('\n'); if (state.failed) return ;
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:321:7: '\\r'
- {
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:322:7: '\\n'
- {
- match('\n'); if (state.failed) return ;
-
- }
- break;
-
- }
-
- if ( state.backtracking==0 ) {
- _channel=HIDDEN;
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "NL"
-
- // $ANTLR start "WS"
- public final void mWS() throws RecognitionException {
- try {
- int _type = WS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:329:3: ( ( ' ' | '\\t' | '\\f' )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:329:6: ( ' ' | '\\t' | '\\f' )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:329:6: ( ' ' | '\\t' | '\\f' )+
- int cnt2=0;
- loop2:
- do {
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0=='\t'||LA2_0=='\f'||LA2_0==' ') ) {
- alt2=1;
- }
-
-
- switch (alt2) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:
- {
- if ( input.LA(1)=='\t'||input.LA(1)=='\f'||input.LA(1)==' ' ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt2 >= 1 ) break loop2;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(2, input);
- throw eee;
- }
- cnt2++;
- } while (true);
-
- if ( state.backtracking==0 ) {
- _channel=HIDDEN;
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "WS"
-
- // $ANTLR start "QUESTION_MARK"
- public final void mQUESTION_MARK() throws RecognitionException {
- try {
- int _type = QUESTION_MARK;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:333:3: ( '?' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:333:5: '?'
- {
- match('?'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "QUESTION_MARK"
-
- // $ANTLR start "LNOT"
- public final void mLNOT() throws RecognitionException {
- try {
- int _type = LNOT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:337:3: ( '!' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:337:5: '!'
- {
- match('!'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LNOT"
-
- // $ANTLR start "DOUBLE_QUOTE"
- public final void mDOUBLE_QUOTE() throws RecognitionException {
- try {
- int _type = DOUBLE_QUOTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:341:3: ( '\\\"' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:341:5: '\\\"'
- {
- match('\"'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_QUOTE"
-
- // $ANTLR start "SINGLE_QUOTE"
- public final void mSINGLE_QUOTE() throws RecognitionException {
- try {
- int _type = SINGLE_QUOTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:345:3: ( '\\'' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:345:5: '\\''
- {
- match('\''); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SINGLE_QUOTE"
-
- // $ANTLR start "LPAREN"
- public final void mLPAREN() throws RecognitionException {
- try {
- int _type = LPAREN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:349:3: ( '(' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:349:5: '('
- {
- match('('); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LPAREN"
-
- // $ANTLR start "RPAREN"
- public final void mRPAREN() throws RecognitionException {
- try {
- int _type = RPAREN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:353:3: ( ')' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:353:5: ')'
- {
- match(')'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RPAREN"
-
- // $ANTLR start "LSQUARE"
- public final void mLSQUARE() throws RecognitionException {
- try {
- int _type = LSQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:357:3: ( '[' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:357:5: '['
- {
- match('['); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LSQUARE"
-
- // $ANTLR start "RSQUARE"
- public final void mRSQUARE() throws RecognitionException {
- try {
- int _type = RSQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:361:3: ( ']' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:361:5: ']'
- {
- match(']'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RSQUARE"
-
- // $ANTLR start "LCURLY"
- public final void mLCURLY() throws RecognitionException {
- try {
- int _type = LCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:365:3: ( '{' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:365:5: '{'
- {
- match('{'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LCURLY"
-
- // $ANTLR start "DOUBLE_LCURLY"
- public final void mDOUBLE_LCURLY() throws RecognitionException {
- try {
- int _type = DOUBLE_LCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:369:3: ( '{{' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:369:5: '{{'
- {
- match("{{"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LCURLY"
-
- // $ANTLR start "RCURLY"
- public final void mRCURLY() throws RecognitionException {
- try {
- int _type = RCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:372:3: ( '}' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:372:5: '}'
- {
- match('}'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RCURLY"
-
- // $ANTLR start "DOUBLE_RCURLY"
- public final void mDOUBLE_RCURLY() throws RecognitionException {
- try {
- int _type = DOUBLE_RCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:376:3: ( '}}' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:376:5: '}}'
- {
- match("}}"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_RCURLY"
-
- // $ANTLR start "LOGICAL_AND"
- public final void mLOGICAL_AND() throws RecognitionException {
- try {
- int _type = LOGICAL_AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:380:3: ( '&' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:380:5: '&'
- {
- match('&'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LOGICAL_AND"
-
- // $ANTLR start "DOUBLE_LOGICAL_AND"
- public final void mDOUBLE_LOGICAL_AND() throws RecognitionException {
- try {
- int _type = DOUBLE_LOGICAL_AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:384:3: ( '&&' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:384:5: '&&'
- {
- match("&&"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LOGICAL_AND"
-
- // $ANTLR start "PIPE"
- public final void mPIPE() throws RecognitionException {
- try {
- int _type = PIPE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:388:3: ( '|' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:388:5: '|'
- {
- match('|'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "PIPE"
-
- // $ANTLR start "DOUBLE_PIPE"
- public final void mDOUBLE_PIPE() throws RecognitionException {
- try {
- int _type = DOUBLE_PIPE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:392:3: ( '||' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:392:5: '||'
- {
- match("||"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_PIPE"
-
- // $ANTLR start "POINT"
- public final void mPOINT() throws RecognitionException {
- try {
- int _type = POINT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:396:3: ( '.' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:396:5: '.'
- {
- match('.'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "POINT"
-
- // $ANTLR start "RANGE"
- public final void mRANGE() throws RecognitionException {
- try {
- int _type = RANGE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:400:3: ( '..' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:400:5: '..'
- {
- match(".."); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RANGE"
-
- // $ANTLR start "COMMA"
- public final void mCOMMA() throws RecognitionException {
- try {
- int _type = COMMA;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:404:3: ( ',' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:404:5: ','
- {
- match(','); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COMMA"
-
- // $ANTLR start "SEMI"
- public final void mSEMI() throws RecognitionException {
- try {
- int _type = SEMI;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:408:3: ( ';' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:408:5: ';'
- {
- match(';'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SEMI"
-
- // $ANTLR start "SHARP"
- public final void mSHARP() throws RecognitionException {
- try {
- int _type = SHARP;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:412:3: ( '#' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:412:5: '#'
- {
- match('#'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SHARP"
-
- // $ANTLR start "TILDE"
- public final void mTILDE() throws RecognitionException {
- try {
- int _type = TILDE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:416:3: ( '~' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:416:5: '~'
- {
- match('~'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "TILDE"
-
- // $ANTLR start "COLON"
- public final void mCOLON() throws RecognitionException {
- try {
- int _type = COLON;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:420:3: ( ':' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:420:5: ':'
- {
- match(':'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COLON"
-
- // $ANTLR start "FOUR_POINTS"
- public final void mFOUR_POINTS() throws RecognitionException {
- try {
- int _type = FOUR_POINTS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:424:3: ( '::' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:424:5: '::'
- {
- match("::"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "FOUR_POINTS"
-
- // $ANTLR start "RULE_ASSIGN"
- public final void mRULE_ASSIGN() throws RecognitionException {
- try {
- int _type = RULE_ASSIGN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:428:3: ( '::=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:428:5: '::='
- {
- match("::="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RULE_ASSIGN"
-
- // $ANTLR start "ARROW"
- public final void mARROW() throws RecognitionException {
- try {
- int _type = ARROW;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:431:3: ( '->' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:431:5: '->'
- {
- match("->"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ARROW"
-
- // $ANTLR start "STAR"
- public final void mSTAR() throws RecognitionException {
- try {
- int _type = STAR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:435:3: ( '*' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:435:5: '*'
- {
- match('*'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "STAR"
-
- // $ANTLR start "DIV"
- public final void mDIV() throws RecognitionException {
- try {
- int _type = DIV;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:439:3: ( '/' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:439:5: '/'
- {
- match('/'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DIV"
-
- // $ANTLR start "PLUS"
- public final void mPLUS() throws RecognitionException {
- try {
- int _type = PLUS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:443:3: ( '+' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:443:5: '+'
- {
- match('+'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "PLUS"
-
- // $ANTLR start "MINUS"
- public final void mMINUS() throws RecognitionException {
- try {
- int _type = MINUS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:447:3: ( '-' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:447:5: '-'
- {
- match('-'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "MINUS"
-
- // $ANTLR start "EQ"
- public final void mEQ() throws RecognitionException {
- try {
- int _type = EQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:451:3: ( '=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:451:5: '='
- {
- match('='); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "EQ"
-
- // $ANTLR start "ISEQ"
- public final void mISEQ() throws RecognitionException {
- try {
- int _type = ISEQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:456:3: ( '==' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:456:5: '=='
- {
- match("=="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ISEQ"
-
- // $ANTLR start "ISNE"
- public final void mISNE() throws RecognitionException {
- try {
- int _type = ISNE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:460:3: ( '!=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:460:5: '!='
- {
- match("!="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ISNE"
-
- // $ANTLR start "LT"
- public final void mLT() throws RecognitionException {
- try {
- int _type = LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:463:4: ( '<' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:463:6: '<'
- {
- match('<'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LT"
-
- // $ANTLR start "DOUBLE_LT"
- public final void mDOUBLE_LT() throws RecognitionException {
- try {
- int _type = DOUBLE_LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:466:3: ( '<<' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:466:5: '<<'
- {
- match("<<"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LT"
-
- // $ANTLR start "LE"
- public final void mLE() throws RecognitionException {
- try {
- int _type = LE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:470:3: ( '<=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:470:5: '<='
- {
- match("<="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LE"
-
- // $ANTLR start "GT"
- public final void mGT() throws RecognitionException {
- try {
- int _type = GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:474:3: ( '>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:474:5: '>'
- {
- match('>'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "GT"
-
- // $ANTLR start "DOUBLE_GT"
- public final void mDOUBLE_GT() throws RecognitionException {
- try {
- int _type = DOUBLE_GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:478:3: ( '>>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:478:5: '>>'
- {
- match(">>"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_GT"
-
- // $ANTLR start "GE"
- public final void mGE() throws RecognitionException {
- try {
- int _type = GE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:482:3: ( '>=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:482:5: '>='
- {
- match(">="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "GE"
-
- // $ANTLR start "INCR"
- public final void mINCR() throws RecognitionException {
- try {
- int _type = INCR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:487:3: ( '++' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:487:5: '++'
- {
- match("++"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INCR"
-
- // $ANTLR start "DECR"
- public final void mDECR() throws RecognitionException {
- try {
- int _type = DECR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:491:3: ( '--' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:491:5: '--'
- {
- match("--"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DECR"
-
- // $ANTLR start "CALLOPERATION"
- public final void mCALLOPERATION() throws RecognitionException {
- try {
- int _type = CALLOPERATION;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:495:3: ( ':=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:495:5: ':='
- {
- match(":="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "CALLOPERATION"
-
- // $ANTLR start "ALPHA"
- public final void mALPHA() throws RecognitionException {
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:500:3: ( 'a' .. 'z' | 'A' .. 'Z' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:
- {
- if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
-
- }
- finally {
- }
- }
- // $ANTLR end "ALPHA"
-
- // $ANTLR start "UNDERSCORE"
- public final void mUNDERSCORE() throws RecognitionException {
- try {
- int _type = UNDERSCORE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:506:3: ( '_' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:506:5: '_'
- {
- match('_'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "UNDERSCORE"
-
- // $ANTLR start "RANGE_VALUE"
- public final void mRANGE_VALUE() throws RecognitionException {
- try {
- int _type = RANGE_VALUE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- CommonToken c1=null;
- CommonToken c2=null;
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:510:3: (c1= INTEGER '..' (c2= INTEGER | c2= STAR ) )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:510:5: c1= INTEGER '..' (c2= INTEGER | c2= STAR )
- {
- int c1Start771 = getCharIndex();
- mINTEGER(); if (state.failed) return ;
- c1 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c1Start771, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText("");
- }
- match(".."); if (state.failed) return ;
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:511:3: (c2= INTEGER | c2= STAR )
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( ((LA3_0>='0' && LA3_0<='9')) ) {
- alt3=1;
- }
- else if ( (LA3_0=='*') ) {
- alt3=2;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 3, 0, input);
-
- throw nvae;
- }
- switch (alt3) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:511:5: c2= INTEGER
- {
- int c2Start783 = getCharIndex();
- mINTEGER(); if (state.failed) return ;
- c2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c2Start783, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText((c2!=null?c2.getText():null));
- }
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:512:7: c2= STAR
- {
- int c2Start796 = getCharIndex();
- mSTAR(); if (state.failed) return ;
- c2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c2Start796, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText("-1");
- }
-
- }
- break;
-
- }
-
- if ( state.backtracking==0 ) {
-
- setText(getText() + ","+ (c1!=null?c1.getText():null));
-
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RANGE_VALUE"
-
- // $ANTLR start "REAL"
- public final void mREAL() throws RecognitionException {
- try {
- int _type = REAL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:519:3: ( INTEGER '.' INTEGER )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:519:5: INTEGER '.' INTEGER
- {
- mINTEGER(); if (state.failed) return ;
- match('.'); if (state.failed) return ;
- mINTEGER(); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "REAL"
-
- // $ANTLR start "INTEGER_OR_REAL_OR_RANGE"
- public final void mINTEGER_OR_REAL_OR_RANGE() throws RecognitionException {
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:524:3: ( ( INTEGER RANGE )=> RANGE_VALUE | ( INTEGER POINT )=> REAL | ( INTEGER )=> INTEGER )
- int alt4=3;
- alt4 = dfa4.predict(input);
- switch (alt4) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:525:4: ( INTEGER RANGE )=> RANGE_VALUE
- {
- mRANGE_VALUE(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:526:6: ( INTEGER POINT )=> REAL
- {
- mREAL(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:527:6: ( INTEGER )=> INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- break;
-
- }
- }
- finally {
- }
- }
- // $ANTLR end "INTEGER_OR_REAL_OR_RANGE"
-
- // $ANTLR start "INTEGER"
- public final void mINTEGER() throws RecognitionException {
- try {
- int _type = INTEGER;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:531:3: ( ( '0' .. '9' )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:531:5: ( '0' .. '9' )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:531:5: ( '0' .. '9' )+
- int cnt5=0;
- loop5:
- do {
- int alt5=2;
- int LA5_0 = input.LA(1);
-
- if ( ((LA5_0>='0' && LA5_0<='9')) ) {
- alt5=1;
- }
-
-
- switch (alt5) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:531:5: '0' .. '9'
- {
- matchRange('0','9'); if (state.failed) return ;
-
- }
- break;
-
- default :
- if ( cnt5 >= 1 ) break loop5;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(5, input);
- throw eee;
- }
- cnt5++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INTEGER"
-
- // $ANTLR start "IDENTIFIER"
- public final void mIDENTIFIER() throws RecognitionException {
- try {
- int _type = IDENTIFIER;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:534:3: ( ( ALPHA | '0' .. '9' | UNDERSCORE )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:534:5: ( ALPHA | '0' .. '9' | UNDERSCORE )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:534:5: ( ALPHA | '0' .. '9' | UNDERSCORE )+
- int cnt6=0;
- loop6:
- do {
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( ((LA6_0>='0' && LA6_0<='9')||(LA6_0>='A' && LA6_0<='Z')||LA6_0=='_'||(LA6_0>='a' && LA6_0<='z')) ) {
- alt6=1;
- }
-
-
- switch (alt6) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:
- {
- if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt6 >= 1 ) break loop6;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(6, input);
- throw eee;
- }
- cnt6++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "IDENTIFIER"
-
- public void mTokens() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:8: ( T__55 | NL | WS | QUESTION_MARK | LNOT | DOUBLE_QUOTE | SINGLE_QUOTE | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | DOUBLE_LCURLY | RCURLY | DOUBLE_RCURLY | LOGICAL_AND | DOUBLE_LOGICAL_AND | PIPE | DOUBLE_PIPE | POINT | RANGE | COMMA | SEMI | SHARP | TILDE | COLON | FOUR_POINTS | RULE_ASSIGN | ARROW | STAR | DIV | PLUS | MINUS | EQ | ISEQ | ISNE | LT | DOUBLE_LT | LE | GT | DOUBLE_GT | GE | INCR | DECR | CALLOPERATION | UNDERSCORE | RANGE_VALUE | REAL | INTEGER | IDENTIFIER )
- int alt7=50;
- alt7 = dfa7.predict(input);
- switch (alt7) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:10: T__55
- {
- mT__55(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:16: NL
- {
- mNL(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:19: WS
- {
- mWS(); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:22: QUESTION_MARK
- {
- mQUESTION_MARK(); if (state.failed) return ;
-
- }
- break;
- case 5 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:36: LNOT
- {
- mLNOT(); if (state.failed) return ;
-
- }
- break;
- case 6 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:41: DOUBLE_QUOTE
- {
- mDOUBLE_QUOTE(); if (state.failed) return ;
-
- }
- break;
- case 7 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:54: SINGLE_QUOTE
- {
- mSINGLE_QUOTE(); if (state.failed) return ;
-
- }
- break;
- case 8 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:67: LPAREN
- {
- mLPAREN(); if (state.failed) return ;
-
- }
- break;
- case 9 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:74: RPAREN
- {
- mRPAREN(); if (state.failed) return ;
-
- }
- break;
- case 10 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:81: LSQUARE
- {
- mLSQUARE(); if (state.failed) return ;
-
- }
- break;
- case 11 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:89: RSQUARE
- {
- mRSQUARE(); if (state.failed) return ;
-
- }
- break;
- case 12 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:97: LCURLY
- {
- mLCURLY(); if (state.failed) return ;
-
- }
- break;
- case 13 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:104: DOUBLE_LCURLY
- {
- mDOUBLE_LCURLY(); if (state.failed) return ;
-
- }
- break;
- case 14 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:118: RCURLY
- {
- mRCURLY(); if (state.failed) return ;
-
- }
- break;
- case 15 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:125: DOUBLE_RCURLY
- {
- mDOUBLE_RCURLY(); if (state.failed) return ;
-
- }
- break;
- case 16 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:139: LOGICAL_AND
- {
- mLOGICAL_AND(); if (state.failed) return ;
-
- }
- break;
- case 17 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:151: DOUBLE_LOGICAL_AND
- {
- mDOUBLE_LOGICAL_AND(); if (state.failed) return ;
-
- }
- break;
- case 18 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:170: PIPE
- {
- mPIPE(); if (state.failed) return ;
-
- }
- break;
- case 19 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:175: DOUBLE_PIPE
- {
- mDOUBLE_PIPE(); if (state.failed) return ;
-
- }
- break;
- case 20 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:187: POINT
- {
- mPOINT(); if (state.failed) return ;
-
- }
- break;
- case 21 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:193: RANGE
- {
- mRANGE(); if (state.failed) return ;
-
- }
- break;
- case 22 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:199: COMMA
- {
- mCOMMA(); if (state.failed) return ;
-
- }
- break;
- case 23 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:205: SEMI
- {
- mSEMI(); if (state.failed) return ;
-
- }
- break;
- case 24 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:210: SHARP
- {
- mSHARP(); if (state.failed) return ;
-
- }
- break;
- case 25 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:216: TILDE
- {
- mTILDE(); if (state.failed) return ;
-
- }
- break;
- case 26 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:222: COLON
- {
- mCOLON(); if (state.failed) return ;
-
- }
- break;
- case 27 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:228: FOUR_POINTS
- {
- mFOUR_POINTS(); if (state.failed) return ;
-
- }
- break;
- case 28 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:240: RULE_ASSIGN
- {
- mRULE_ASSIGN(); if (state.failed) return ;
-
- }
- break;
- case 29 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:252: ARROW
- {
- mARROW(); if (state.failed) return ;
-
- }
- break;
- case 30 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:258: STAR
- {
- mSTAR(); if (state.failed) return ;
-
- }
- break;
- case 31 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:263: DIV
- {
- mDIV(); if (state.failed) return ;
-
- }
- break;
- case 32 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:267: PLUS
- {
- mPLUS(); if (state.failed) return ;
-
- }
- break;
- case 33 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:272: MINUS
- {
- mMINUS(); if (state.failed) return ;
-
- }
- break;
- case 34 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:278: EQ
- {
- mEQ(); if (state.failed) return ;
-
- }
- break;
- case 35 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:281: ISEQ
- {
- mISEQ(); if (state.failed) return ;
-
- }
- break;
- case 36 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:286: ISNE
- {
- mISNE(); if (state.failed) return ;
-
- }
- break;
- case 37 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:291: LT
- {
- mLT(); if (state.failed) return ;
-
- }
- break;
- case 38 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:294: DOUBLE_LT
- {
- mDOUBLE_LT(); if (state.failed) return ;
-
- }
- break;
- case 39 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:304: LE
- {
- mLE(); if (state.failed) return ;
-
- }
- break;
- case 40 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:307: GT
- {
- mGT(); if (state.failed) return ;
-
- }
- break;
- case 41 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:310: DOUBLE_GT
- {
- mDOUBLE_GT(); if (state.failed) return ;
-
- }
- break;
- case 42 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:320: GE
- {
- mGE(); if (state.failed) return ;
-
- }
- break;
- case 43 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:323: INCR
- {
- mINCR(); if (state.failed) return ;
-
- }
- break;
- case 44 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:328: DECR
- {
- mDECR(); if (state.failed) return ;
-
- }
- break;
- case 45 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:333: CALLOPERATION
- {
- mCALLOPERATION(); if (state.failed) return ;
-
- }
- break;
- case 46 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:347: UNDERSCORE
- {
- mUNDERSCORE(); if (state.failed) return ;
-
- }
- break;
- case 47 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:358: RANGE_VALUE
- {
- mRANGE_VALUE(); if (state.failed) return ;
-
- }
- break;
- case 48 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:370: REAL
- {
- mREAL(); if (state.failed) return ;
-
- }
- break;
- case 49 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:375: INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- break;
- case 50 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:1:383: IDENTIFIER
- {
- mIDENTIFIER(); if (state.failed) return ;
-
- }
- break;
-
- }
-
- }
-
- // $ANTLR start synpred1_CollaborationUseLabel
- public final void synpred1_CollaborationUseLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:525:4: ( INTEGER RANGE )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:525:5: INTEGER RANGE
- {
- mINTEGER(); if (state.failed) return ;
- mRANGE(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred1_CollaborationUseLabel
-
- // $ANTLR start synpred2_CollaborationUseLabel
- public final void synpred2_CollaborationUseLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:526:6: ( INTEGER POINT )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:526:7: INTEGER POINT
- {
- mINTEGER(); if (state.failed) return ;
- mPOINT(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred2_CollaborationUseLabel
-
- // $ANTLR start synpred3_CollaborationUseLabel
- public final void synpred3_CollaborationUseLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:527:6: ( INTEGER )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:527:7: INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred3_CollaborationUseLabel
-
- public final boolean synpred2_CollaborationUseLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred2_CollaborationUseLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred3_CollaborationUseLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred3_CollaborationUseLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred1_CollaborationUseLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred1_CollaborationUseLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
-
-
- protected DFA4 dfa4 = new DFA4(this);
- protected DFA7 dfa7 = new DFA7(this);
- static final String DFA4_eotS =
- "\1\uffff\1\2\4\uffff";
- static final String DFA4_eofS =
- "\6\uffff";
- static final String DFA4_minS =
- "\1\60\1\56\1\uffff\1\56\2\uffff";
- static final String DFA4_maxS =
- "\2\71\1\uffff\1\71\2\uffff";
- static final String DFA4_acceptS =
- "\2\uffff\1\3\1\uffff\1\1\1\2";
- static final String DFA4_specialS =
- "\1\uffff\1\0\1\uffff\1\1\2\uffff}>";
- static final String[] DFA4_transitionS = {
- "\12\1",
- "\1\3\1\uffff\12\1",
- "",
- "\1\4\1\uffff\12\5",
- "",
- ""
- };
-
- static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
- static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
- static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
- static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
- static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
- static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
- static final short[][] DFA4_transition;
-
- static {
- int numStates = DFA4_transitionS.length;
- DFA4_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
- }
- }
-
- class DFA4 extends DFA {
-
- public DFA4(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 4;
- this.eot = DFA4_eot;
- this.eof = DFA4_eof;
- this.min = DFA4_min;
- this.max = DFA4_max;
- this.accept = DFA4_accept;
- this.special = DFA4_special;
- this.transition = DFA4_transition;
- }
- public String getDescription() {
- return "522:1: fragment INTEGER_OR_REAL_OR_RANGE : ( ( INTEGER RANGE )=> RANGE_VALUE | ( INTEGER POINT )=> REAL | ( INTEGER )=> INTEGER );";
- }
- public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
- IntStream input = _input;
- int _s = s;
- switch ( s ) {
- case 0 :
- int LA4_1 = input.LA(1);
-
-
- int index4_1 = input.index();
- input.rewind();
- s = -1;
- if ( ((LA4_1>='0' && LA4_1<='9')) ) {s = 1;}
-
- else if ( (LA4_1=='.') ) {s = 3;}
-
- else s = 2;
-
-
- input.seek(index4_1);
- if ( s>=0 ) return s;
- break;
- case 1 :
- int LA4_3 = input.LA(1);
-
-
- int index4_3 = input.index();
- input.rewind();
- s = -1;
- if ( (LA4_3=='.') && (synpred1_CollaborationUseLabel())) {s = 4;}
-
- else if ( ((LA4_3>='0' && LA4_3<='9')) && (synpred2_CollaborationUseLabel())) {s = 5;}
-
-
- input.seek(index4_3);
- if ( s>=0 ) return s;
- break;
- }
- if (state.backtracking>0) {state.failed=true; return -1;}
- NoViableAltException nvae =
- new NoViableAltException(getDescription(), 4, _s, input);
- error(nvae);
- throw nvae;
- }
- }
- static final String DFA7_eotS =
- "\1\uffff\1\42\3\uffff\1\44\6\uffff\1\46\1\50\1\52\1\54\1\56\4\uffff"+
- "\1\61\1\64\2\uffff\1\66\1\70\1\73\1\74\1\75\21\uffff\1\100\23\uffff";
- static final String DFA7_eofS =
- "\103\uffff";
- static final String DFA7_minS =
- "\1\11\1\74\3\uffff\1\75\6\uffff\1\173\1\175\1\46\1\174\1\56\4\uffff"+
- "\1\72\1\55\2\uffff\1\53\2\75\1\60\1\56\21\uffff\1\75\16\uffff\1"+
- "\56\4\uffff";
- static final String DFA7_maxS =
- "\1\176\1\125\3\uffff\1\75\6\uffff\1\173\1\175\1\46\1\174\1\56\4"+
- "\uffff\1\75\1\76\2\uffff\1\53\1\75\1\76\2\172\21\uffff\1\75\16\uffff"+
- "\1\71\4\uffff";
- static final String DFA7_acceptS =
- "\2\uffff\1\2\1\3\1\4\1\uffff\1\6\1\7\1\10\1\11\1\12\1\13\5\uffff"+
- "\1\26\1\27\1\30\1\31\2\uffff\1\36\1\37\5\uffff\1\62\1\1\1\46\1\47"+
- "\1\45\1\44\1\5\1\15\1\14\1\17\1\16\1\21\1\20\1\23\1\22\1\25\1\24"+
- "\1\uffff\1\55\1\32\1\35\1\54\1\41\1\53\1\40\1\43\1\42\1\51\1\52"+
- "\1\50\1\56\1\61\1\uffff\1\34\1\33\1\57\1\60";
- static final String DFA7_specialS =
- "\103\uffff}>";
- static final String[] DFA7_transitionS = {
- "\1\3\1\2\1\uffff\1\3\1\2\22\uffff\1\3\1\5\1\6\1\23\2\uffff"+
- "\1\16\1\7\1\10\1\11\1\27\1\31\1\21\1\26\1\20\1\30\12\35\1\25"+
- "\1\22\1\1\1\32\1\33\1\4\1\uffff\32\36\1\12\1\uffff\1\13\1\uffff"+
- "\1\34\1\uffff\32\36\1\14\1\17\1\15\1\24",
- "\1\40\1\41\27\uffff\1\37",
- "",
- "",
- "",
- "\1\43",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\45",
- "\1\47",
- "\1\51",
- "\1\53",
- "\1\55",
- "",
- "",
- "",
- "",
- "\1\57\2\uffff\1\60",
- "\1\63\20\uffff\1\62",
- "",
- "",
- "\1\65",
- "\1\67",
- "\1\72\1\71",
- "\12\36\7\uffff\32\36\4\uffff\1\36\1\uffff\32\36",
- "\1\76\1\uffff\12\35\7\uffff\32\36\4\uffff\1\36\1\uffff\32"+
- "\36",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\77",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\101\1\uffff\12\102",
- "",
- "",
- "",
- ""
- };
-
- static final short[] DFA7_eot = DFA.unpackEncodedString(DFA7_eotS);
- static final short[] DFA7_eof = DFA.unpackEncodedString(DFA7_eofS);
- static final char[] DFA7_min = DFA.unpackEncodedStringToUnsignedChars(DFA7_minS);
- static final char[] DFA7_max = DFA.unpackEncodedStringToUnsignedChars(DFA7_maxS);
- static final short[] DFA7_accept = DFA.unpackEncodedString(DFA7_acceptS);
- static final short[] DFA7_special = DFA.unpackEncodedString(DFA7_specialS);
- static final short[][] DFA7_transition;
-
- static {
- int numStates = DFA7_transitionS.length;
- DFA7_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA7_transition[i] = DFA.unpackEncodedString(DFA7_transitionS[i]);
- }
- }
-
- class DFA7 extends DFA {
-
- public DFA7(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 7;
- this.eot = DFA7_eot;
- this.eof = DFA7_eof;
- this.min = DFA7_min;
- this.max = DFA7_max;
- this.accept = DFA7_accept;
- this.special = DFA7_special;
- this.transition = DFA7_transition;
- }
- public String getDescription() {
- return "1:1: Tokens : ( T__55 | NL | WS | QUESTION_MARK | LNOT | DOUBLE_QUOTE | SINGLE_QUOTE | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | DOUBLE_LCURLY | RCURLY | DOUBLE_RCURLY | LOGICAL_AND | DOUBLE_LOGICAL_AND | PIPE | DOUBLE_PIPE | POINT | RANGE | COMMA | SEMI | SHARP | TILDE | COLON | FOUR_POINTS | RULE_ASSIGN | ARROW | STAR | DIV | PLUS | MINUS | EQ | ISEQ | ISNE | LT | DOUBLE_LT | LE | GT | DOUBLE_GT | GE | INCR | DECR | CALLOPERATION | UNDERSCORE | RANGE_VALUE | REAL | INTEGER | IDENTIFIER );";
- }
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelParser.java b/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelParser.java
deleted file mode 100644
index c6e62ab0764..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/CollaborationUseLabelParser.java
+++ /dev/null
@@ -1,1014 +0,0 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g 2011-03-15 17:01:07
-
-package org.eclipse.papyrus.parsers.antlr;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.papyrus.parsers.texteditor.collaborationuselabel.IContext;
-import org.eclipse.papyrus.parsers.util.IErrorReporter;
-import org.eclipse.papyrus.parsers.util.NameException;
-import org.eclipse.papyrus.parsers.util.MultiplicityException;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.papyrus.parsers.util.Messages;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.CollaborationUse;
-import org.eclipse.uml2.uml.VisibilityKind;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.antlr.runtime.debug.*;
-import java.io.IOException;
-
-import org.antlr.runtime.tree.*;
-
-public class CollaborationUseLabelParser extends DebugParser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "COLON", "PLUS", "MINUS", "SHARP", "TILDE", "IDENTIFIER", "WS", "NL", "QUESTION_MARK", "LNOT", "DOUBLE_QUOTE", "SINGLE_QUOTE", "LPAREN", "RPAREN", "LSQUARE", "RSQUARE", "LCURLY", "DOUBLE_LCURLY", "RCURLY", "DOUBLE_RCURLY", "LOGICAL_AND", "DOUBLE_LOGICAL_AND", "PIPE", "DOUBLE_PIPE", "POINT", "RANGE", "COMMA", "SEMI", "FOUR_POINTS", "RULE_ASSIGN", "ARROW", "STAR", "DIV", "EQ", "ISEQ", "ISNE", "LT", "DOUBLE_LT", "LE", "GT", "DOUBLE_GT", "GE", "INCR", "DECR", "CALLOPERATION", "ALPHA", "UNDERSCORE", "INTEGER", "RANGE_VALUE", "REAL", "INTEGER_OR_REAL_OR_RANGE", "'<Undefined>'"
- };
- public static final int COMMA=30;
- public static final int DOUBLE_LT=41;
- public static final int ISEQ=38;
- public static final int MINUS=6;
- public static final int INCR=46;
- public static final int SHARP=7;
- public static final int DOUBLE_RCURLY=23;
- public static final int DECR=47;
- public static final int ARROW=34;
- public static final int DOUBLE_GT=44;
- public static final int RULE_ASSIGN=33;
- public static final int TILDE=8;
- public static final int PIPE=26;
- public static final int DOUBLE_PIPE=27;
- public static final int INTEGER=51;
- public static final int QUESTION_MARK=12;
- public static final int RCURLY=22;
- public static final int NL=11;
- public static final int LCURLY=20;
- public static final int LE=42;
- public static final int RPAREN=17;
- public static final int LPAREN=16;
- public static final int SINGLE_QUOTE=15;
- public static final int PLUS=5;
- public static final int REAL=53;
- public static final int LSQUARE=18;
- public static final int RANGE=29;
- public static final int FOUR_POINTS=32;
- public static final int DOUBLE_LCURLY=21;
- public static final int POINT=28;
- public static final int WS=10;
- public static final int ALPHA=49;
- public static final int EQ=37;
- public static final int LT=40;
- public static final int GT=43;
- public static final int DOUBLE_QUOTE=14;
- public static final int RSQUARE=19;
- public static final int DOUBLE_LOGICAL_AND=25;
- public static final int RANGE_VALUE=52;
- public static final int T__55=55;
- public static final int SEMI=31;
- public static final int GE=45;
- public static final int LNOT=13;
- public static final int LOGICAL_AND=24;
- public static final int ISNE=39;
- public static final int EOF=-1;
- public static final int COLON=4;
- public static final int INTEGER_OR_REAL_OR_RANGE=54;
- public static final int DIV=36;
- public static final int IDENTIFIER=9;
- public static final int STAR=35;
- public static final int UNDERSCORE=50;
- public static final int CALLOPERATION=48;
-
- // delegates
- // delegators
-
- public static final String[] ruleNames = new String[] {
- "invalidRule", "visibility", "label", "type", "name", "collaboration_use_type"
- };
-
- public int ruleLevel = 0;
- public int getRuleLevel() { return ruleLevel; }
- public void incRuleLevel() { ruleLevel++; }
- public void decRuleLevel() { ruleLevel--; }
- public CollaborationUseLabelParser(TokenStream input) {
- this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
- }
- public CollaborationUseLabelParser(TokenStream input, int port, RecognizerSharedState state) {
- super(input, state);
- DebugEventSocketProxy proxy =
- new DebugEventSocketProxy(this,port,adaptor);
- setDebugListener(proxy);
- setTokenStream(new DebugTokenStream(input,proxy));
- try {
- proxy.handshake();
- }
- catch (IOException ioe) {
- reportError(ioe);
- }
- TreeAdaptor adap = new CommonTreeAdaptor();
- setTreeAdaptor(adap);
- proxy.setTreeAdaptor(adap);
- }
- public CollaborationUseLabelParser(TokenStream input, DebugEventListener dbg) {
- super(input, dbg);
-
-
- TreeAdaptor adap = new CommonTreeAdaptor();
- setTreeAdaptor(adap);
-
- }
- protected boolean evalPredicate(boolean result, String predicate) {
- dbg.semanticPredicate(result, predicate);
- return result;
- }
-
- protected DebugTreeAdaptor adaptor;
- public void setTreeAdaptor(TreeAdaptor adaptor) {
- this.adaptor = new DebugTreeAdaptor(dbg,adaptor);
-
- }
- public TreeAdaptor getTreeAdaptor() {
- return adaptor;
- }
-
-
- public String[] getTokenNames() { return CollaborationUseLabelParser.tokenNames; }
- public String getGrammarFileName() { return "D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g"; }
-
-
- public CollaborationUseLabelParser(TokenStream lexer, CollaborationUse element, IErrorReporter reporter) {
- this(lexer);
- setCollaborationUse(element);
- setErrorReporter(reporter);
- }
-
- /**
- * Validation state (true = validation : does not modify the CollaborationUse)
- */
- private boolean isValidation = false;
-
-
- private static final boolean DEBUG = false;
- /**
- * @return the isValidation boolean
- */
- public boolean isValidation() {
- return isValidation;
- }
-
- /**
- * @param isValidation the isValidation to set (true -> do not modify the CollaborationUse)
- */
- public void setValidation(boolean isValidation) {
- this.isValidation = isValidation;
- }
-
- private Package nearestPackage;
-
- /**
- * Modified CollaborationUse
- */
- private CollaborationUse element;
-
- /**
- * @return the CollaborationUse
- */
- public CollaborationUse getCollaborationUse() {
- return element;
- }
-
- /**
- * @param element the CollaborationUse to set
- */
- public void setCollaborationUse(CollaborationUse element) {
- this.element = element;
- this.nearestPackage = element.getNearestPackage();
- }
-
- /** debug mode */
- protected final boolean debugMode = false;
-
- /**
- * Debug method (~System.out.println)
- */
- private void debug(Object debug) {
- if(debugMode) {
- System.out.println(debug);
- }
- }
-
- /**
- * Error method (~System.err.println)
- */
- private void error(Object debug) {
- if(debugMode) {
- System.err.println(debug);
- }
- }
-
- /**
- * Context (for completion processor)
- */
- private int context = IContext.DEFAULT;
-
- /**
- * @return the context
- */
- public int getContext() {
- return context;
- }
-
- /**
- * @param context the context to set
- */
- public void setContext(int context) {
- this.context = context;
- }
-
- // all possible modified elements on CollaborationUse
- String name;
- VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
- Collaboration type=null;
-
-
- /**
- * Apply values to the CollaborationUse. <BR>
- * Modifications can not be applied directly. The parser must wait the end,
- * until it reaches the end of the label. If the end is reached without any error,
- * new values can be applied to the target CollaborationUse.
- */
- private void applyValues() {
- if(!isValidation){
- debug("\nvalues applied :");
- debug("+ name: "+name);
- debug("+ visibility: "+visibility);
- debug("+ type: "+type);
-
- element.setName(name);
- element.setVisibility(visibility);
- element.setType(type);
- }
- }
-
-
- /** reporting errors */
- private IErrorReporter errorReporter = null;
-
- public void setErrorReporter(IErrorReporter errorReporter) {
- this.errorReporter = errorReporter;
- }
-
- public IErrorReporter getErrorReporter() {
- return errorReporter;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getErrorMessage(RecognitionException exception, String[] arg1) {
- if (exception instanceof NameException) {
- return "Please enter a correct name for the property";
- }
- return super.getErrorMessage(exception, arg1);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void emitErrorMessage(String msg) {
- errorReporter.reportError(msg);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void recover(IntStream arg0, RecognitionException arg1) {
- // do nothing
- }
-
-
- public static class label_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "label"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:201:1: label : ( visibility )? name COLON collaboration_use_type ;
- public final CollaborationUseLabelParser.label_return label() throws RecognitionException {
- CollaborationUseLabelParser.label_return retval = new CollaborationUseLabelParser.label_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token COLON3=null;
- CollaborationUseLabelParser.visibility_return visibility1 = null;
-
- CollaborationUseLabelParser.name_return name2 = null;
-
- CollaborationUseLabelParser.collaboration_use_type_return collaboration_use_type4 = null;
-
-
- Object COLON3_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "label");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(201, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:201:7: ( ( visibility )? name COLON collaboration_use_type )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:202:3: ( visibility )? name COLON collaboration_use_type
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(202,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:202:3: ( visibility )?
- int alt1=2;
- try { dbg.enterSubRule(1);
- try { dbg.enterDecision(1);
-
- int LA1_0 = input.LA(1);
-
- if ( ((LA1_0>=PLUS && LA1_0<=TILDE)) ) {
- alt1=1;
- }
- } finally {dbg.exitDecision(1);}
-
- switch (alt1) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:202:4: visibility
- {
- dbg.location(202,4);
- pushFollow(FOLLOW_visibility_in_label46);
- visibility1=visibility();
-
- state._fsp--;
-
- adaptor.addChild(root_0, visibility1.getTree());
- dbg.location(202,15);
- context = IContext.VISIBILITY;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(1);}
-
- dbg.location(203,3);
- pushFollow(FOLLOW_name_in_label55);
- name2=name();
-
- state._fsp--;
-
- adaptor.addChild(root_0, name2.getTree());
- dbg.location(204,3);
- COLON3=(Token)match(input,COLON,FOLLOW_COLON_in_label60);
- COLON3_tree = (Object)adaptor.create(COLON3);
- adaptor.addChild(root_0, COLON3_tree);
-
- dbg.location(205,3);
-
- context = IContext.AFTER_COLON;
-
- dbg.location(208,3);
- pushFollow(FOLLOW_collaboration_use_type_in_label69);
- collaboration_use_type4=collaboration_use_type();
-
- state._fsp--;
-
- adaptor.addChild(root_0, collaboration_use_type4.getTree());
- dbg.location(208,27);
- context = IContext.COLLABORATION_USE_TYPE;
- dbg.location(209,3);
-
- applyValues();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- String index = Integer.toString(mte.index);
- String description = mte.getLocalizedMessage().substring(mte.getLocalizedMessage().indexOf('('),
- mte.getLocalizedMessage().length());
- String tokenText = mte.token.getText();
- String text = Messages.bind(Messages.MismatchedToken, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
-
- }
- catch (RecognitionException re) {
-
-
- reportError(re);
- throw (re);
-
-
- }
- finally {
- }
- dbg.location(212, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "label");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "label"
-
- public static class visibility_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "visibility"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:239:1: visibility : ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) ) ;
- public final CollaborationUseLabelParser.visibility_return visibility() throws RecognitionException {
- CollaborationUseLabelParser.visibility_return retval = new CollaborationUseLabelParser.visibility_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token PLUS5=null;
- Token MINUS6=null;
- Token SHARP7=null;
- Token TILDE8=null;
-
- Object PLUS5_tree=null;
- Object MINUS6_tree=null;
- Object SHARP7_tree=null;
- Object TILDE8_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "visibility");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(239, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:240:3: ( ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:241:3: ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(241,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:241:3: ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) )
- int alt2=4;
- try { dbg.enterSubRule(2);
- try { dbg.enterDecision(2);
-
- switch ( input.LA(1) ) {
- case PLUS:
- {
- alt2=1;
- }
- break;
- case MINUS:
- {
- alt2=2;
- }
- break;
- case SHARP:
- {
- alt2=3;
- }
- break;
- case TILDE:
- {
- alt2=4;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 2, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
-
- } finally {dbg.exitDecision(2);}
-
- switch (alt2) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:242:5: ( PLUS )
- {
- dbg.location(242,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:242:5: ( PLUS )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:242:9: PLUS
- {
- dbg.location(242,9);
- PLUS5=(Token)match(input,PLUS,FOLLOW_PLUS_in_visibility127);
- PLUS5_tree = (Object)adaptor.create(PLUS5);
- adaptor.addChild(root_0, PLUS5_tree);
-
- dbg.location(242,15);
- visibility = VisibilityKind.PUBLIC_LITERAL;
-
- }
-
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:243:5: ( MINUS )
- {
- dbg.location(243,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:243:5: ( MINUS )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:243:9: MINUS
- {
- dbg.location(243,9);
- MINUS6=(Token)match(input,MINUS,FOLLOW_MINUS_in_visibility142);
- MINUS6_tree = (Object)adaptor.create(MINUS6);
- adaptor.addChild(root_0, MINUS6_tree);
-
- dbg.location(243,15);
- visibility = VisibilityKind.PRIVATE_LITERAL;
-
- }
-
-
- }
- break;
- case 3 :
- dbg.enterAlt(3);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:244:5: ( SHARP )
- {
- dbg.location(244,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:244:5: ( SHARP )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:244:9: SHARP
- {
- dbg.location(244,9);
- SHARP7=(Token)match(input,SHARP,FOLLOW_SHARP_in_visibility156);
- SHARP7_tree = (Object)adaptor.create(SHARP7);
- adaptor.addChild(root_0, SHARP7_tree);
-
- dbg.location(244,15);
- visibility = VisibilityKind.PROTECTED_LITERAL;
-
- }
-
-
- }
- break;
- case 4 :
- dbg.enterAlt(4);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:245:5: ( TILDE )
- {
- dbg.location(245,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:245:5: ( TILDE )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:245:9: TILDE
- {
- dbg.location(245,9);
- TILDE8=(Token)match(input,TILDE,FOLLOW_TILDE_in_visibility170);
- TILDE8_tree = (Object)adaptor.create(TILDE8);
- adaptor.addChild(root_0, TILDE8_tree);
-
- dbg.location(245,15);
- visibility = VisibilityKind.PACKAGE_LITERAL;
-
- }
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(2);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("VisibilityRule"));
-
- }
- finally {
- }
- dbg.location(247, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "visibility");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "visibility"
-
- public static class name_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "name"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:254:1: name : id= IDENTIFIER ;
- public final CollaborationUseLabelParser.name_return name() throws RecognitionException {
- CollaborationUseLabelParser.name_return retval = new CollaborationUseLabelParser.name_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "name");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(254, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:255:3: (id= IDENTIFIER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:256:3: id= IDENTIFIER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(256,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_name204);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(257,3);
-
- name = id.getText();
- context = IContext.NAME;
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException(Messages.NameMissing));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(261, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "name");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "name"
-
- public static class collaboration_use_type_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "collaboration_use_type"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:272:1: collaboration_use_type : ( WS )* ( type | '<Undefined>' ) ;
- public final CollaborationUseLabelParser.collaboration_use_type_return collaboration_use_type() throws RecognitionException {
- CollaborationUseLabelParser.collaboration_use_type_return retval = new CollaborationUseLabelParser.collaboration_use_type_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token WS9=null;
- Token string_literal11=null;
- CollaborationUseLabelParser.type_return type10 = null;
-
-
- Object WS9_tree=null;
- Object string_literal11_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "collaboration_use_type");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(272, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:273:3: ( ( WS )* ( type | '<Undefined>' ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:274:3: ( WS )* ( type | '<Undefined>' )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(274,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:274:3: ( WS )*
- try { dbg.enterSubRule(3);
-
- loop3:
- do {
- int alt3=2;
- try { dbg.enterDecision(3);
-
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0==WS) ) {
- alt3=1;
- }
-
-
- } finally {dbg.exitDecision(3);}
-
- switch (alt3) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:274:4: WS
- {
- dbg.location(274,4);
- WS9=(Token)match(input,WS,FOLLOW_WS_in_collaboration_use_type248);
- WS9_tree = (Object)adaptor.create(WS9);
- adaptor.addChild(root_0, WS9_tree);
-
-
- }
- break;
-
- default :
- break loop3;
- }
- } while (true);
- } finally {dbg.exitSubRule(3);}
-
- dbg.location(275,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:275:3: ( type | '<Undefined>' )
- int alt4=2;
- try { dbg.enterSubRule(4);
- try { dbg.enterDecision(4);
-
- int LA4_0 = input.LA(1);
-
- if ( (LA4_0==IDENTIFIER) ) {
- alt4=1;
- }
- else if ( (LA4_0==55) ) {
- alt4=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 4, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(4);}
-
- switch (alt4) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:275:5: type
- {
- dbg.location(275,5);
- pushFollow(FOLLOW_type_in_collaboration_use_type256);
- type10=type();
-
- state._fsp--;
-
- adaptor.addChild(root_0, type10.getTree());
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:276:5: '<Undefined>'
- {
- dbg.location(276,5);
- string_literal11=(Token)match(input,55,FOLLOW_55_in_collaboration_use_type264);
- string_literal11_tree = (Object)adaptor.create(string_literal11);
- adaptor.addChild(root_0, string_literal11_tree);
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(4);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("CollaborationUseTypeRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- throw new RuntimeException("Waiting for a valid type (Collaboration) or <Undefined>");
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(278, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "collaboration_use_type");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "collaboration_use_type"
-
- public static class type_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "type"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:293:1: type : id= IDENTIFIER ;
- public final CollaborationUseLabelParser.type_return type() throws RecognitionException {
- CollaborationUseLabelParser.type_return retval = new CollaborationUseLabelParser.type_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "type");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(293, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:294:3: (id= IDENTIFIER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\CollaborationUseLabel.g:295:3: id= IDENTIFIER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(295,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_type318);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(296,3);
-
- String typeName = id.getText() ;
- Collaboration utilType = PackageUtil.findCollaborationByName(nearestPackage, typeName);
-
- if (utilType != null) {
- type = utilType;
- } else {
- // the type actually does not exist
- throw new TypeRecognitionException("Collaboration "+typeName+" not found for CollaborationUse "+element.getName(),typeName);
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("TypeRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(307, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "type");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "type"
-
- // Delegated rules
-
-
-
-
- public static final BitSet FOLLOW_visibility_in_label46 = new BitSet(new long[]{0x0000000000000200L});
- public static final BitSet FOLLOW_name_in_label55 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_COLON_in_label60 = new BitSet(new long[]{0x0080000000000600L});
- public static final BitSet FOLLOW_collaboration_use_type_in_label69 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_PLUS_in_visibility127 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_MINUS_in_visibility142 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SHARP_in_visibility156 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_TILDE_in_visibility170 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_name204 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_WS_in_collaboration_use_type248 = new BitSet(new long[]{0x0080000000000600L});
- public static final BitSet FOLLOW_type_in_collaboration_use_type256 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_55_in_collaboration_use_type264 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_type318 = new BitSet(new long[]{0x0000000000000002L});
-
-} \ No newline at end of file
diff --git a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelLexer.java b/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelLexer.java
deleted file mode 100644
index 05aa65a16c4..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelLexer.java
+++ /dev/null
@@ -1,2410 +0,0 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g 2011-03-15 16:59:54
-
-package org.eclipse.papyrus.parsers.antlr;
-
-import org.eclipse.uml2.uml.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-
-import org.eclipse.papyrus.parsers.texteditor.parameterlabel.IContext;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-public class ParameterLabelLexer extends Lexer {
- public static final int DOUBLE_LT=47;
- public static final int COMMA=22;
- public static final int ISEQ=44;
- public static final int MINUS=7;
- public static final int INCR=52;
- public static final int SHARP=8;
- public static final int DOUBLE_RCURLY=32;
- public static final int DECR=53;
- public static final int ARROW=42;
- public static final int DOUBLE_GT=50;
- public static final int OUT=11;
- public static final int RULE_ASSIGN=41;
- public static final int TILDE=9;
- public static final int PIPE=35;
- public static final int DOUBLE_PIPE=36;
- public static final int INTEGER=17;
- public static final int RCURLY=23;
- public static final int QUESTION_MARK=25;
- public static final int NL=24;
- public static final int LCURLY=21;
- public static final int T__62=62;
- public static final int LE=48;
- public static final int RPAREN=30;
- public static final int T__61=61;
- public static final int LPAREN=29;
- public static final int T__59=59;
- public static final int PLUS=6;
- public static final int SINGLE_QUOTE=28;
- public static final int REAL=57;
- public static final int RANGE=38;
- public static final int LSQUARE=15;
- public static final int FOUR_POINTS=40;
- public static final int DOUBLE_LCURLY=31;
- public static final int POINT=37;
- public static final int WS=4;
- public static final int ALPHA=55;
- public static final int EQ=20;
- public static final int T__64=64;
- public static final int LT=46;
- public static final int DOUBLE_QUOTE=27;
- public static final int GT=49;
- public static final int DOUBLE_LOGICAL_AND=34;
- public static final int RSQUARE=18;
- public static final int RANGE_VALUE=16;
- public static final int IN=10;
- public static final int SEMI=39;
- public static final int GE=51;
- public static final int LNOT=26;
- public static final int T__63=63;
- public static final int LOGICAL_AND=33;
- public static final int RETURN=13;
- public static final int ISNE=45;
- public static final int EOF=-1;
- public static final int COLON=5;
- public static final int INOUT=12;
- public static final int DIV=43;
- public static final int INTEGER_OR_REAL_OR_RANGE=58;
- public static final int STAR=19;
- public static final int IDENTIFIER=14;
- public static final int T__60=60;
- public static final int UNDERSCORE=56;
- public static final int CALLOPERATION=54;
-
- // delegates
- // delegators
-
- public ParameterLabelLexer() {;}
- public ParameterLabelLexer(CharStream input) {
- this(input, new RecognizerSharedState());
- }
- public ParameterLabelLexer(CharStream input, RecognizerSharedState state) {
- super(input,state);
-
- }
- public String getGrammarFileName() { return "D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g"; }
-
- // $ANTLR start "T__59"
- public final void mT__59() throws RecognitionException {
- try {
- int _type = T__59;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:22:7: ( '<Undefined>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:22:9: '<Undefined>'
- {
- match("<Undefined>"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__59"
-
- // $ANTLR start "T__60"
- public final void mT__60() throws RecognitionException {
- try {
- int _type = T__60;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:23:7: ( 'ordered' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:23:9: 'ordered'
- {
- match("ordered"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__60"
-
- // $ANTLR start "T__61"
- public final void mT__61() throws RecognitionException {
- try {
- int _type = T__61;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:24:7: ( 'unique' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:24:9: 'unique'
- {
- match("unique"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__61"
-
- // $ANTLR start "T__62"
- public final void mT__62() throws RecognitionException {
- try {
- int _type = T__62;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:25:7: ( 'nonunique' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:25:9: 'nonunique'
- {
- match("nonunique"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__62"
-
- // $ANTLR start "T__63"
- public final void mT__63() throws RecognitionException {
- try {
- int _type = T__63;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:26:7: ( 'exception' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:26:9: 'exception'
- {
- match("exception"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__63"
-
- // $ANTLR start "T__64"
- public final void mT__64() throws RecognitionException {
- try {
- int _type = T__64;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:27:7: ( 'stream' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:27:9: 'stream'
- {
- match("stream"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__64"
-
- // $ANTLR start "NL"
- public final void mNL() throws RecognitionException {
- try {
- int _type = NL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:621:3: ( ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' ) )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:621:5: ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' )
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:621:5: ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' )
- int alt1=4;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0=='\r') ) {
- int LA1_1 = input.LA(2);
-
- if ( (LA1_1=='\n') ) {
- alt1=1;
- }
- else {
- alt1=3;}
- }
- else if ( (LA1_0=='\n') ) {
- int LA1_2 = input.LA(2);
-
- if ( (LA1_2=='\r') ) {
- alt1=2;
- }
- else {
- alt1=4;}
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 1, 0, input);
-
- throw nvae;
- }
- switch (alt1) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:621:7: '\\r' '\\n'
- {
- match('\r'); if (state.failed) return ;
- match('\n'); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:622:7: '\\n' '\\r'
- {
- match('\n'); if (state.failed) return ;
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:623:7: '\\r'
- {
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:624:7: '\\n'
- {
- match('\n'); if (state.failed) return ;
-
- }
- break;
-
- }
-
- if ( state.backtracking==0 ) {
- _channel=HIDDEN;
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "NL"
-
- // $ANTLR start "WS"
- public final void mWS() throws RecognitionException {
- try {
- int _type = WS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:631:3: ( ( ' ' | '\\t' | '\\f' )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:631:6: ( ' ' | '\\t' | '\\f' )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:631:6: ( ' ' | '\\t' | '\\f' )+
- int cnt2=0;
- loop2:
- do {
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0=='\t'||LA2_0=='\f'||LA2_0==' ') ) {
- alt2=1;
- }
-
-
- switch (alt2) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:
- {
- if ( input.LA(1)=='\t'||input.LA(1)=='\f'||input.LA(1)==' ' ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt2 >= 1 ) break loop2;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(2, input);
- throw eee;
- }
- cnt2++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "WS"
-
- // $ANTLR start "QUESTION_MARK"
- public final void mQUESTION_MARK() throws RecognitionException {
- try {
- int _type = QUESTION_MARK;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:635:3: ( '?' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:635:5: '?'
- {
- match('?'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "QUESTION_MARK"
-
- // $ANTLR start "LNOT"
- public final void mLNOT() throws RecognitionException {
- try {
- int _type = LNOT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:639:3: ( '!' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:639:5: '!'
- {
- match('!'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LNOT"
-
- // $ANTLR start "DOUBLE_QUOTE"
- public final void mDOUBLE_QUOTE() throws RecognitionException {
- try {
- int _type = DOUBLE_QUOTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:643:3: ( '\\\"' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:643:5: '\\\"'
- {
- match('\"'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_QUOTE"
-
- // $ANTLR start "SINGLE_QUOTE"
- public final void mSINGLE_QUOTE() throws RecognitionException {
- try {
- int _type = SINGLE_QUOTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:647:3: ( '\\'' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:647:5: '\\''
- {
- match('\''); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SINGLE_QUOTE"
-
- // $ANTLR start "LPAREN"
- public final void mLPAREN() throws RecognitionException {
- try {
- int _type = LPAREN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:651:3: ( '(' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:651:5: '('
- {
- match('('); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LPAREN"
-
- // $ANTLR start "RPAREN"
- public final void mRPAREN() throws RecognitionException {
- try {
- int _type = RPAREN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:655:3: ( ')' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:655:5: ')'
- {
- match(')'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RPAREN"
-
- // $ANTLR start "LSQUARE"
- public final void mLSQUARE() throws RecognitionException {
- try {
- int _type = LSQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:659:3: ( '[' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:659:5: '['
- {
- match('['); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LSQUARE"
-
- // $ANTLR start "RSQUARE"
- public final void mRSQUARE() throws RecognitionException {
- try {
- int _type = RSQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:663:3: ( ']' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:663:5: ']'
- {
- match(']'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RSQUARE"
-
- // $ANTLR start "LCURLY"
- public final void mLCURLY() throws RecognitionException {
- try {
- int _type = LCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:667:3: ( '{' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:667:5: '{'
- {
- match('{'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LCURLY"
-
- // $ANTLR start "DOUBLE_LCURLY"
- public final void mDOUBLE_LCURLY() throws RecognitionException {
- try {
- int _type = DOUBLE_LCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:671:3: ( '{{' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:671:5: '{{'
- {
- match("{{"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LCURLY"
-
- // $ANTLR start "RCURLY"
- public final void mRCURLY() throws RecognitionException {
- try {
- int _type = RCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:674:3: ( '}' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:674:5: '}'
- {
- match('}'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RCURLY"
-
- // $ANTLR start "DOUBLE_RCURLY"
- public final void mDOUBLE_RCURLY() throws RecognitionException {
- try {
- int _type = DOUBLE_RCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:678:3: ( '}}' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:678:5: '}}'
- {
- match("}}"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_RCURLY"
-
- // $ANTLR start "LOGICAL_AND"
- public final void mLOGICAL_AND() throws RecognitionException {
- try {
- int _type = LOGICAL_AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:682:3: ( '&' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:682:5: '&'
- {
- match('&'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LOGICAL_AND"
-
- // $ANTLR start "DOUBLE_LOGICAL_AND"
- public final void mDOUBLE_LOGICAL_AND() throws RecognitionException {
- try {
- int _type = DOUBLE_LOGICAL_AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:686:3: ( '&&' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:686:5: '&&'
- {
- match("&&"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LOGICAL_AND"
-
- // $ANTLR start "PIPE"
- public final void mPIPE() throws RecognitionException {
- try {
- int _type = PIPE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:690:3: ( '|' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:690:5: '|'
- {
- match('|'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "PIPE"
-
- // $ANTLR start "DOUBLE_PIPE"
- public final void mDOUBLE_PIPE() throws RecognitionException {
- try {
- int _type = DOUBLE_PIPE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:694:3: ( '||' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:694:5: '||'
- {
- match("||"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_PIPE"
-
- // $ANTLR start "POINT"
- public final void mPOINT() throws RecognitionException {
- try {
- int _type = POINT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:698:3: ( '.' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:698:5: '.'
- {
- match('.'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "POINT"
-
- // $ANTLR start "RANGE"
- public final void mRANGE() throws RecognitionException {
- try {
- int _type = RANGE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:702:3: ( '..' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:702:5: '..'
- {
- match(".."); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RANGE"
-
- // $ANTLR start "COMMA"
- public final void mCOMMA() throws RecognitionException {
- try {
- int _type = COMMA;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:706:3: ( ',' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:706:5: ','
- {
- match(','); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COMMA"
-
- // $ANTLR start "SEMI"
- public final void mSEMI() throws RecognitionException {
- try {
- int _type = SEMI;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:710:3: ( ';' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:710:5: ';'
- {
- match(';'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SEMI"
-
- // $ANTLR start "SHARP"
- public final void mSHARP() throws RecognitionException {
- try {
- int _type = SHARP;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:714:3: ( '#' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:714:5: '#'
- {
- match('#'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SHARP"
-
- // $ANTLR start "TILDE"
- public final void mTILDE() throws RecognitionException {
- try {
- int _type = TILDE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:718:3: ( '~' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:718:5: '~'
- {
- match('~'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "TILDE"
-
- // $ANTLR start "COLON"
- public final void mCOLON() throws RecognitionException {
- try {
- int _type = COLON;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:722:3: ( ':' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:722:5: ':'
- {
- match(':'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COLON"
-
- // $ANTLR start "FOUR_POINTS"
- public final void mFOUR_POINTS() throws RecognitionException {
- try {
- int _type = FOUR_POINTS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:726:3: ( '::' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:726:5: '::'
- {
- match("::"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "FOUR_POINTS"
-
- // $ANTLR start "RULE_ASSIGN"
- public final void mRULE_ASSIGN() throws RecognitionException {
- try {
- int _type = RULE_ASSIGN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:730:3: ( '::=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:730:5: '::='
- {
- match("::="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RULE_ASSIGN"
-
- // $ANTLR start "ARROW"
- public final void mARROW() throws RecognitionException {
- try {
- int _type = ARROW;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:733:3: ( '->' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:733:5: '->'
- {
- match("->"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ARROW"
-
- // $ANTLR start "STAR"
- public final void mSTAR() throws RecognitionException {
- try {
- int _type = STAR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:737:3: ( '*' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:737:5: '*'
- {
- match('*'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "STAR"
-
- // $ANTLR start "DIV"
- public final void mDIV() throws RecognitionException {
- try {
- int _type = DIV;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:741:3: ( '/' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:741:5: '/'
- {
- match('/'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DIV"
-
- // $ANTLR start "PLUS"
- public final void mPLUS() throws RecognitionException {
- try {
- int _type = PLUS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:745:3: ( '+' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:745:5: '+'
- {
- match('+'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "PLUS"
-
- // $ANTLR start "MINUS"
- public final void mMINUS() throws RecognitionException {
- try {
- int _type = MINUS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:749:3: ( '-' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:749:5: '-'
- {
- match('-'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "MINUS"
-
- // $ANTLR start "EQ"
- public final void mEQ() throws RecognitionException {
- try {
- int _type = EQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:753:3: ( '=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:753:5: '='
- {
- match('='); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "EQ"
-
- // $ANTLR start "ISEQ"
- public final void mISEQ() throws RecognitionException {
- try {
- int _type = ISEQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:758:3: ( '==' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:758:5: '=='
- {
- match("=="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ISEQ"
-
- // $ANTLR start "ISNE"
- public final void mISNE() throws RecognitionException {
- try {
- int _type = ISNE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:762:3: ( '!=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:762:5: '!='
- {
- match("!="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ISNE"
-
- // $ANTLR start "LT"
- public final void mLT() throws RecognitionException {
- try {
- int _type = LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:765:4: ( '<' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:765:6: '<'
- {
- match('<'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LT"
-
- // $ANTLR start "DOUBLE_LT"
- public final void mDOUBLE_LT() throws RecognitionException {
- try {
- int _type = DOUBLE_LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:768:3: ( '<<' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:768:5: '<<'
- {
- match("<<"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LT"
-
- // $ANTLR start "LE"
- public final void mLE() throws RecognitionException {
- try {
- int _type = LE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:772:3: ( '<=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:772:5: '<='
- {
- match("<="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LE"
-
- // $ANTLR start "GT"
- public final void mGT() throws RecognitionException {
- try {
- int _type = GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:776:3: ( '>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:776:5: '>'
- {
- match('>'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "GT"
-
- // $ANTLR start "DOUBLE_GT"
- public final void mDOUBLE_GT() throws RecognitionException {
- try {
- int _type = DOUBLE_GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:780:3: ( '>>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:780:5: '>>'
- {
- match(">>"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_GT"
-
- // $ANTLR start "GE"
- public final void mGE() throws RecognitionException {
- try {
- int _type = GE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:784:3: ( '>=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:784:5: '>='
- {
- match(">="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "GE"
-
- // $ANTLR start "INCR"
- public final void mINCR() throws RecognitionException {
- try {
- int _type = INCR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:789:3: ( '++' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:789:5: '++'
- {
- match("++"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INCR"
-
- // $ANTLR start "DECR"
- public final void mDECR() throws RecognitionException {
- try {
- int _type = DECR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:793:3: ( '--' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:793:5: '--'
- {
- match("--"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DECR"
-
- // $ANTLR start "CALLOPERATION"
- public final void mCALLOPERATION() throws RecognitionException {
- try {
- int _type = CALLOPERATION;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:797:3: ( ':=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:797:5: ':='
- {
- match(":="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "CALLOPERATION"
-
- // $ANTLR start "IN"
- public final void mIN() throws RecognitionException {
- try {
- int _type = IN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:801:3: ( 'in' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:801:5: 'in'
- {
- match("in"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "IN"
-
- // $ANTLR start "OUT"
- public final void mOUT() throws RecognitionException {
- try {
- int _type = OUT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:805:3: ( 'out' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:805:5: 'out'
- {
- match("out"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "OUT"
-
- // $ANTLR start "INOUT"
- public final void mINOUT() throws RecognitionException {
- try {
- int _type = INOUT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:809:3: ( 'inout' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:809:5: 'inout'
- {
- match("inout"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INOUT"
-
- // $ANTLR start "RETURN"
- public final void mRETURN() throws RecognitionException {
- try {
- int _type = RETURN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:813:3: ( 'return' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:813:5: 'return'
- {
- match("return"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RETURN"
-
- // $ANTLR start "ALPHA"
- public final void mALPHA() throws RecognitionException {
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:818:3: ( 'a' .. 'z' | 'A' .. 'Z' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:
- {
- if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
-
- }
- finally {
- }
- }
- // $ANTLR end "ALPHA"
-
- // $ANTLR start "UNDERSCORE"
- public final void mUNDERSCORE() throws RecognitionException {
- try {
- int _type = UNDERSCORE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:824:3: ( '_' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:824:5: '_'
- {
- match('_'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "UNDERSCORE"
-
- // $ANTLR start "RANGE_VALUE"
- public final void mRANGE_VALUE() throws RecognitionException {
- try {
- int _type = RANGE_VALUE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- CommonToken c1=null;
- CommonToken c2=null;
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:828:3: (c1= INTEGER '..' (c2= INTEGER | c2= STAR ) )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:828:5: c1= INTEGER '..' (c2= INTEGER | c2= STAR )
- {
- int c1Start870 = getCharIndex();
- mINTEGER(); if (state.failed) return ;
- c1 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c1Start870, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText("");
- }
- match(".."); if (state.failed) return ;
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:829:3: (c2= INTEGER | c2= STAR )
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( ((LA3_0>='0' && LA3_0<='9')) ) {
- alt3=1;
- }
- else if ( (LA3_0=='*') ) {
- alt3=2;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 3, 0, input);
-
- throw nvae;
- }
- switch (alt3) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:829:5: c2= INTEGER
- {
- int c2Start882 = getCharIndex();
- mINTEGER(); if (state.failed) return ;
- c2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c2Start882, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText((c2!=null?c2.getText():null));
- }
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:830:7: c2= STAR
- {
- int c2Start895 = getCharIndex();
- mSTAR(); if (state.failed) return ;
- c2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c2Start895, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText("-1");
- }
-
- }
- break;
-
- }
-
- if ( state.backtracking==0 ) {
-
- setText(getText() + ","+ (c1!=null?c1.getText():null));
-
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RANGE_VALUE"
-
- // $ANTLR start "REAL"
- public final void mREAL() throws RecognitionException {
- try {
- int _type = REAL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:837:3: ( INTEGER '.' INTEGER )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:837:5: INTEGER '.' INTEGER
- {
- mINTEGER(); if (state.failed) return ;
- match('.'); if (state.failed) return ;
- mINTEGER(); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "REAL"
-
- // $ANTLR start "INTEGER_OR_REAL_OR_RANGE"
- public final void mINTEGER_OR_REAL_OR_RANGE() throws RecognitionException {
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:842:3: ( ( INTEGER RANGE )=> RANGE_VALUE | ( INTEGER POINT )=> REAL | ( INTEGER )=> INTEGER )
- int alt4=3;
- alt4 = dfa4.predict(input);
- switch (alt4) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:843:4: ( INTEGER RANGE )=> RANGE_VALUE
- {
- mRANGE_VALUE(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:844:6: ( INTEGER POINT )=> REAL
- {
- mREAL(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:845:6: ( INTEGER )=> INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- break;
-
- }
- }
- finally {
- }
- }
- // $ANTLR end "INTEGER_OR_REAL_OR_RANGE"
-
- // $ANTLR start "INTEGER"
- public final void mINTEGER() throws RecognitionException {
- try {
- int _type = INTEGER;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:849:3: ( ( '0' .. '9' )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:849:5: ( '0' .. '9' )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:849:5: ( '0' .. '9' )+
- int cnt5=0;
- loop5:
- do {
- int alt5=2;
- int LA5_0 = input.LA(1);
-
- if ( ((LA5_0>='0' && LA5_0<='9')) ) {
- alt5=1;
- }
-
-
- switch (alt5) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:849:5: '0' .. '9'
- {
- matchRange('0','9'); if (state.failed) return ;
-
- }
- break;
-
- default :
- if ( cnt5 >= 1 ) break loop5;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(5, input);
- throw eee;
- }
- cnt5++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INTEGER"
-
- // $ANTLR start "IDENTIFIER"
- public final void mIDENTIFIER() throws RecognitionException {
- try {
- int _type = IDENTIFIER;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:852:3: ( ( ALPHA | '0' .. '9' | UNDERSCORE )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:852:5: ( ALPHA | '0' .. '9' | UNDERSCORE )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:852:5: ( ALPHA | '0' .. '9' | UNDERSCORE )+
- int cnt6=0;
- loop6:
- do {
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( ((LA6_0>='0' && LA6_0<='9')||(LA6_0>='A' && LA6_0<='Z')||LA6_0=='_'||(LA6_0>='a' && LA6_0<='z')) ) {
- alt6=1;
- }
-
-
- switch (alt6) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:
- {
- if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt6 >= 1 ) break loop6;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(6, input);
- throw eee;
- }
- cnt6++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "IDENTIFIER"
-
- public void mTokens() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:8: ( T__59 | T__60 | T__61 | T__62 | T__63 | T__64 | NL | WS | QUESTION_MARK | LNOT | DOUBLE_QUOTE | SINGLE_QUOTE | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | DOUBLE_LCURLY | RCURLY | DOUBLE_RCURLY | LOGICAL_AND | DOUBLE_LOGICAL_AND | PIPE | DOUBLE_PIPE | POINT | RANGE | COMMA | SEMI | SHARP | TILDE | COLON | FOUR_POINTS | RULE_ASSIGN | ARROW | STAR | DIV | PLUS | MINUS | EQ | ISEQ | ISNE | LT | DOUBLE_LT | LE | GT | DOUBLE_GT | GE | INCR | DECR | CALLOPERATION | IN | OUT | INOUT | RETURN | UNDERSCORE | RANGE_VALUE | REAL | INTEGER | IDENTIFIER )
- int alt7=59;
- alt7 = dfa7.predict(input);
- switch (alt7) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:10: T__59
- {
- mT__59(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:16: T__60
- {
- mT__60(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:22: T__61
- {
- mT__61(); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:28: T__62
- {
- mT__62(); if (state.failed) return ;
-
- }
- break;
- case 5 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:34: T__63
- {
- mT__63(); if (state.failed) return ;
-
- }
- break;
- case 6 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:40: T__64
- {
- mT__64(); if (state.failed) return ;
-
- }
- break;
- case 7 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:46: NL
- {
- mNL(); if (state.failed) return ;
-
- }
- break;
- case 8 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:49: WS
- {
- mWS(); if (state.failed) return ;
-
- }
- break;
- case 9 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:52: QUESTION_MARK
- {
- mQUESTION_MARK(); if (state.failed) return ;
-
- }
- break;
- case 10 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:66: LNOT
- {
- mLNOT(); if (state.failed) return ;
-
- }
- break;
- case 11 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:71: DOUBLE_QUOTE
- {
- mDOUBLE_QUOTE(); if (state.failed) return ;
-
- }
- break;
- case 12 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:84: SINGLE_QUOTE
- {
- mSINGLE_QUOTE(); if (state.failed) return ;
-
- }
- break;
- case 13 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:97: LPAREN
- {
- mLPAREN(); if (state.failed) return ;
-
- }
- break;
- case 14 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:104: RPAREN
- {
- mRPAREN(); if (state.failed) return ;
-
- }
- break;
- case 15 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:111: LSQUARE
- {
- mLSQUARE(); if (state.failed) return ;
-
- }
- break;
- case 16 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:119: RSQUARE
- {
- mRSQUARE(); if (state.failed) return ;
-
- }
- break;
- case 17 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:127: LCURLY
- {
- mLCURLY(); if (state.failed) return ;
-
- }
- break;
- case 18 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:134: DOUBLE_LCURLY
- {
- mDOUBLE_LCURLY(); if (state.failed) return ;
-
- }
- break;
- case 19 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:148: RCURLY
- {
- mRCURLY(); if (state.failed) return ;
-
- }
- break;
- case 20 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:155: DOUBLE_RCURLY
- {
- mDOUBLE_RCURLY(); if (state.failed) return ;
-
- }
- break;
- case 21 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:169: LOGICAL_AND
- {
- mLOGICAL_AND(); if (state.failed) return ;
-
- }
- break;
- case 22 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:181: DOUBLE_LOGICAL_AND
- {
- mDOUBLE_LOGICAL_AND(); if (state.failed) return ;
-
- }
- break;
- case 23 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:200: PIPE
- {
- mPIPE(); if (state.failed) return ;
-
- }
- break;
- case 24 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:205: DOUBLE_PIPE
- {
- mDOUBLE_PIPE(); if (state.failed) return ;
-
- }
- break;
- case 25 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:217: POINT
- {
- mPOINT(); if (state.failed) return ;
-
- }
- break;
- case 26 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:223: RANGE
- {
- mRANGE(); if (state.failed) return ;
-
- }
- break;
- case 27 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:229: COMMA
- {
- mCOMMA(); if (state.failed) return ;
-
- }
- break;
- case 28 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:235: SEMI
- {
- mSEMI(); if (state.failed) return ;
-
- }
- break;
- case 29 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:240: SHARP
- {
- mSHARP(); if (state.failed) return ;
-
- }
- break;
- case 30 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:246: TILDE
- {
- mTILDE(); if (state.failed) return ;
-
- }
- break;
- case 31 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:252: COLON
- {
- mCOLON(); if (state.failed) return ;
-
- }
- break;
- case 32 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:258: FOUR_POINTS
- {
- mFOUR_POINTS(); if (state.failed) return ;
-
- }
- break;
- case 33 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:270: RULE_ASSIGN
- {
- mRULE_ASSIGN(); if (state.failed) return ;
-
- }
- break;
- case 34 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:282: ARROW
- {
- mARROW(); if (state.failed) return ;
-
- }
- break;
- case 35 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:288: STAR
- {
- mSTAR(); if (state.failed) return ;
-
- }
- break;
- case 36 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:293: DIV
- {
- mDIV(); if (state.failed) return ;
-
- }
- break;
- case 37 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:297: PLUS
- {
- mPLUS(); if (state.failed) return ;
-
- }
- break;
- case 38 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:302: MINUS
- {
- mMINUS(); if (state.failed) return ;
-
- }
- break;
- case 39 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:308: EQ
- {
- mEQ(); if (state.failed) return ;
-
- }
- break;
- case 40 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:311: ISEQ
- {
- mISEQ(); if (state.failed) return ;
-
- }
- break;
- case 41 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:316: ISNE
- {
- mISNE(); if (state.failed) return ;
-
- }
- break;
- case 42 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:321: LT
- {
- mLT(); if (state.failed) return ;
-
- }
- break;
- case 43 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:324: DOUBLE_LT
- {
- mDOUBLE_LT(); if (state.failed) return ;
-
- }
- break;
- case 44 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:334: LE
- {
- mLE(); if (state.failed) return ;
-
- }
- break;
- case 45 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:337: GT
- {
- mGT(); if (state.failed) return ;
-
- }
- break;
- case 46 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:340: DOUBLE_GT
- {
- mDOUBLE_GT(); if (state.failed) return ;
-
- }
- break;
- case 47 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:350: GE
- {
- mGE(); if (state.failed) return ;
-
- }
- break;
- case 48 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:353: INCR
- {
- mINCR(); if (state.failed) return ;
-
- }
- break;
- case 49 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:358: DECR
- {
- mDECR(); if (state.failed) return ;
-
- }
- break;
- case 50 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:363: CALLOPERATION
- {
- mCALLOPERATION(); if (state.failed) return ;
-
- }
- break;
- case 51 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:377: IN
- {
- mIN(); if (state.failed) return ;
-
- }
- break;
- case 52 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:380: OUT
- {
- mOUT(); if (state.failed) return ;
-
- }
- break;
- case 53 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:384: INOUT
- {
- mINOUT(); if (state.failed) return ;
-
- }
- break;
- case 54 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:390: RETURN
- {
- mRETURN(); if (state.failed) return ;
-
- }
- break;
- case 55 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:397: UNDERSCORE
- {
- mUNDERSCORE(); if (state.failed) return ;
-
- }
- break;
- case 56 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:408: RANGE_VALUE
- {
- mRANGE_VALUE(); if (state.failed) return ;
-
- }
- break;
- case 57 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:420: REAL
- {
- mREAL(); if (state.failed) return ;
-
- }
- break;
- case 58 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:425: INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- break;
- case 59 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:1:433: IDENTIFIER
- {
- mIDENTIFIER(); if (state.failed) return ;
-
- }
- break;
-
- }
-
- }
-
- // $ANTLR start synpred1_ParameterLabel
- public final void synpred1_ParameterLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:843:4: ( INTEGER RANGE )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:843:5: INTEGER RANGE
- {
- mINTEGER(); if (state.failed) return ;
- mRANGE(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred1_ParameterLabel
-
- // $ANTLR start synpred2_ParameterLabel
- public final void synpred2_ParameterLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:844:6: ( INTEGER POINT )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:844:7: INTEGER POINT
- {
- mINTEGER(); if (state.failed) return ;
- mPOINT(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred2_ParameterLabel
-
- // $ANTLR start synpred3_ParameterLabel
- public final void synpred3_ParameterLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:845:6: ( INTEGER )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:845:7: INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred3_ParameterLabel
-
- public final boolean synpred3_ParameterLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred3_ParameterLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred1_ParameterLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred1_ParameterLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred2_ParameterLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred2_ParameterLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
-
-
- protected DFA4 dfa4 = new DFA4(this);
- protected DFA7 dfa7 = new DFA7(this);
- static final String DFA4_eotS =
- "\1\uffff\1\2\4\uffff";
- static final String DFA4_eofS =
- "\6\uffff";
- static final String DFA4_minS =
- "\1\60\1\56\1\uffff\1\56\2\uffff";
- static final String DFA4_maxS =
- "\2\71\1\uffff\1\71\2\uffff";
- static final String DFA4_acceptS =
- "\2\uffff\1\3\1\uffff\1\1\1\2";
- static final String DFA4_specialS =
- "\1\uffff\1\0\1\uffff\1\1\2\uffff}>";
- static final String[] DFA4_transitionS = {
- "\12\1",
- "\1\3\1\uffff\12\1",
- "",
- "\1\4\1\uffff\12\5",
- "",
- ""
- };
-
- static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
- static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
- static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
- static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
- static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
- static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
- static final short[][] DFA4_transition;
-
- static {
- int numStates = DFA4_transitionS.length;
- DFA4_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
- }
- }
-
- class DFA4 extends DFA {
-
- public DFA4(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 4;
- this.eot = DFA4_eot;
- this.eof = DFA4_eof;
- this.min = DFA4_min;
- this.max = DFA4_max;
- this.accept = DFA4_accept;
- this.special = DFA4_special;
- this.transition = DFA4_transition;
- }
- public String getDescription() {
- return "840:1: fragment INTEGER_OR_REAL_OR_RANGE : ( ( INTEGER RANGE )=> RANGE_VALUE | ( INTEGER POINT )=> REAL | ( INTEGER )=> INTEGER );";
- }
- public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
- IntStream input = _input;
- int _s = s;
- switch ( s ) {
- case 0 :
- int LA4_1 = input.LA(1);
-
-
- int index4_1 = input.index();
- input.rewind();
- s = -1;
- if ( ((LA4_1>='0' && LA4_1<='9')) ) {s = 1;}
-
- else if ( (LA4_1=='.') ) {s = 3;}
-
- else s = 2;
-
-
- input.seek(index4_1);
- if ( s>=0 ) return s;
- break;
- case 1 :
- int LA4_3 = input.LA(1);
-
-
- int index4_3 = input.index();
- input.rewind();
- s = -1;
- if ( (LA4_3=='.') && (synpred1_ParameterLabel())) {s = 4;}
-
- else if ( ((LA4_3>='0' && LA4_3<='9')) && (synpred2_ParameterLabel())) {s = 5;}
-
-
- input.seek(index4_3);
- if ( s>=0 ) return s;
- break;
- }
- if (state.backtracking>0) {state.failed=true; return -1;}
- NoViableAltException nvae =
- new NoViableAltException(getDescription(), 4, _s, input);
- error(nvae);
- throw nvae;
- }
- }
- static final String DFA7_eotS =
- "\1\uffff\1\51\5\45\3\uffff\1\61\6\uffff\1\63\1\65\1\67\1\71\1\73"+
- "\4\uffff\1\76\1\101\2\uffff\1\103\1\105\1\110\2\45\1\113\1\114\5"+
- "\uffff\6\45\14\uffff\1\125\14\uffff\1\127\1\45\3\uffff\1\45\1\134"+
- "\4\45\2\uffff\1\45\1\uffff\1\45\2\uffff\1\45\1\uffff\13\45\1\157"+
- "\2\45\1\162\2\45\1\165\1\uffff\1\166\1\167\1\uffff\2\45\3\uffff"+
- "\2\45\1\174\1\175\2\uffff";
- static final String DFA7_eofS =
- "\176\uffff";
- static final String DFA7_minS =
- "\1\11\1\74\1\162\1\156\1\157\1\170\1\164\3\uffff\1\75\6\uffff\1"+
- "\173\1\175\1\46\1\174\1\56\4\uffff\1\72\1\55\2\uffff\1\53\2\75\1"+
- "\156\1\145\1\60\1\56\5\uffff\1\144\1\164\1\151\1\156\1\143\1\162"+
- "\14\uffff\1\75\14\uffff\1\60\1\164\2\uffff\1\56\1\145\1\60\1\161"+
- "\1\165\2\145\2\uffff\1\165\1\uffff\1\165\2\uffff\1\162\1\uffff\1"+
- "\165\1\156\1\160\1\141\1\164\1\162\2\145\1\151\1\164\1\155\1\60"+
- "\1\156\1\144\1\60\1\161\1\151\1\60\1\uffff\2\60\1\uffff\1\165\1"+
- "\157\3\uffff\1\145\1\156\2\60\2\uffff";
- static final String DFA7_maxS =
- "\1\176\1\125\1\165\1\156\1\157\1\170\1\164\3\uffff\1\75\6\uffff"+
- "\1\173\1\175\1\46\1\174\1\56\4\uffff\1\75\1\76\2\uffff\1\53\1\75"+
- "\1\76\1\156\1\145\2\172\5\uffff\1\144\1\164\1\151\1\156\1\143\1"+
- "\162\14\uffff\1\75\14\uffff\1\172\1\164\2\uffff\1\71\1\145\1\172"+
- "\1\161\1\165\2\145\2\uffff\1\165\1\uffff\1\165\2\uffff\1\162\1\uffff"+
- "\1\165\1\156\1\160\1\141\1\164\1\162\2\145\1\151\1\164\1\155\1\172"+
- "\1\156\1\144\1\172\1\161\1\151\1\172\1\uffff\2\172\1\uffff\1\165"+
- "\1\157\3\uffff\1\145\1\156\2\172\2\uffff";
- static final String DFA7_acceptS =
- "\7\uffff\1\7\1\10\1\11\1\uffff\1\13\1\14\1\15\1\16\1\17\1\20\5"+
- "\uffff\1\33\1\34\1\35\1\36\2\uffff\1\43\1\44\7\uffff\1\73\1\1\1"+
- "\53\1\54\1\52\6\uffff\1\51\1\12\1\22\1\21\1\24\1\23\1\26\1\25\1"+
- "\30\1\27\1\32\1\31\1\uffff\1\62\1\37\1\42\1\61\1\46\1\60\1\45\1"+
- "\50\1\47\1\56\1\57\1\55\2\uffff\1\67\1\72\7\uffff\1\41\1\40\1\uffff"+
- "\1\63\1\uffff\1\70\1\71\1\uffff\1\64\22\uffff\1\65\2\uffff\1\3\2"+
- "\uffff\1\6\1\66\1\2\4\uffff\1\4\1\5";
- static final String DFA7_specialS =
- "\176\uffff}>";
- static final String[] DFA7_transitionS = {
- "\1\10\1\7\1\uffff\1\10\1\7\22\uffff\1\10\1\12\1\13\1\30\2\uffff"+
- "\1\23\1\14\1\15\1\16\1\34\1\36\1\26\1\33\1\25\1\35\12\44\1\32"+
- "\1\27\1\1\1\37\1\40\1\11\1\uffff\32\45\1\17\1\uffff\1\20\1\uffff"+
- "\1\43\1\uffff\4\45\1\5\3\45\1\41\4\45\1\4\1\2\2\45\1\42\1\6"+
- "\1\45\1\3\5\45\1\21\1\24\1\22\1\31",
- "\1\47\1\50\27\uffff\1\46",
- "\1\52\2\uffff\1\53",
- "\1\54",
- "\1\55",
- "\1\56",
- "\1\57",
- "",
- "",
- "",
- "\1\60",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\62",
- "\1\64",
- "\1\66",
- "\1\70",
- "\1\72",
- "",
- "",
- "",
- "",
- "\1\74\2\uffff\1\75",
- "\1\100\20\uffff\1\77",
- "",
- "",
- "\1\102",
- "\1\104",
- "\1\107\1\106",
- "\1\111",
- "\1\112",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "\1\115\1\uffff\12\44\7\uffff\32\45\4\uffff\1\45\1\uffff\32"+
- "\45",
- "",
- "",
- "",
- "",
- "",
- "\1\116",
- "\1\117",
- "\1\120",
- "\1\121",
- "\1\122",
- "\1\123",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\124",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\16\45\1\126\13\45",
- "\1\130",
- "",
- "",
- "\1\131\1\uffff\12\132",
- "\1\133",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "\1\135",
- "\1\136",
- "\1\137",
- "\1\140",
- "",
- "",
- "\1\141",
- "",
- "\1\142",
- "",
- "",
- "\1\143",
- "",
- "\1\144",
- "\1\145",
- "\1\146",
- "\1\147",
- "\1\150",
- "\1\151",
- "\1\152",
- "\1\153",
- "\1\154",
- "\1\155",
- "\1\156",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "\1\160",
- "\1\161",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "\1\163",
- "\1\164",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "",
- "\1\170",
- "\1\171",
- "",
- "",
- "",
- "\1\172",
- "\1\173",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "\12\45\7\uffff\32\45\4\uffff\1\45\1\uffff\32\45",
- "",
- ""
- };
-
- static final short[] DFA7_eot = DFA.unpackEncodedString(DFA7_eotS);
- static final short[] DFA7_eof = DFA.unpackEncodedString(DFA7_eofS);
- static final char[] DFA7_min = DFA.unpackEncodedStringToUnsignedChars(DFA7_minS);
- static final char[] DFA7_max = DFA.unpackEncodedStringToUnsignedChars(DFA7_maxS);
- static final short[] DFA7_accept = DFA.unpackEncodedString(DFA7_acceptS);
- static final short[] DFA7_special = DFA.unpackEncodedString(DFA7_specialS);
- static final short[][] DFA7_transition;
-
- static {
- int numStates = DFA7_transitionS.length;
- DFA7_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA7_transition[i] = DFA.unpackEncodedString(DFA7_transitionS[i]);
- }
- }
-
- class DFA7 extends DFA {
-
- public DFA7(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 7;
- this.eot = DFA7_eot;
- this.eof = DFA7_eof;
- this.min = DFA7_min;
- this.max = DFA7_max;
- this.accept = DFA7_accept;
- this.special = DFA7_special;
- this.transition = DFA7_transition;
- }
- public String getDescription() {
- return "1:1: Tokens : ( T__59 | T__60 | T__61 | T__62 | T__63 | T__64 | NL | WS | QUESTION_MARK | LNOT | DOUBLE_QUOTE | SINGLE_QUOTE | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | DOUBLE_LCURLY | RCURLY | DOUBLE_RCURLY | LOGICAL_AND | DOUBLE_LOGICAL_AND | PIPE | DOUBLE_PIPE | POINT | RANGE | COMMA | SEMI | SHARP | TILDE | COLON | FOUR_POINTS | RULE_ASSIGN | ARROW | STAR | DIV | PLUS | MINUS | EQ | ISEQ | ISNE | LT | DOUBLE_LT | LE | GT | DOUBLE_GT | GE | INCR | DECR | CALLOPERATION | IN | OUT | INOUT | RETURN | UNDERSCORE | RANGE_VALUE | REAL | INTEGER | IDENTIFIER );";
- }
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelParser.java b/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelParser.java
deleted file mode 100644
index d0f99aaef50..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/ParameterLabelParser.java
+++ /dev/null
@@ -1,3062 +0,0 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g 2011-03-15 16:59:54
-
-package org.eclipse.papyrus.parsers.antlr;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.papyrus.parsers.texteditor.parameterlabel.IContext;
-import org.eclipse.papyrus.parsers.util.IErrorReporter;
-import org.eclipse.papyrus.parsers.util.NameException;
-import org.eclipse.papyrus.parsers.util.MultiplicityException;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.papyrus.parsers.util.Messages;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.papyrus.uml.tools.utils.TemplateSignatureUtil;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.TemplateableElement;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.VisibilityKind;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.antlr.runtime.debug.*;
-import java.io.IOException;
-
-import org.antlr.runtime.tree.*;
-
-public class ParameterLabelParser extends DebugParser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "WS", "COLON", "PLUS", "MINUS", "SHARP", "TILDE", "IN", "OUT", "INOUT", "RETURN", "IDENTIFIER", "LSQUARE", "RANGE_VALUE", "INTEGER", "RSQUARE", "STAR", "EQ", "LCURLY", "COMMA", "RCURLY", "NL", "QUESTION_MARK", "LNOT", "DOUBLE_QUOTE", "SINGLE_QUOTE", "LPAREN", "RPAREN", "DOUBLE_LCURLY", "DOUBLE_RCURLY", "LOGICAL_AND", "DOUBLE_LOGICAL_AND", "PIPE", "DOUBLE_PIPE", "POINT", "RANGE", "SEMI", "FOUR_POINTS", "RULE_ASSIGN", "ARROW", "DIV", "ISEQ", "ISNE", "LT", "DOUBLE_LT", "LE", "GT", "DOUBLE_GT", "GE", "INCR", "DECR", "CALLOPERATION", "ALPHA", "UNDERSCORE", "REAL", "INTEGER_OR_REAL_OR_RANGE", "'<Undefined>'", "'ordered'", "'unique'", "'nonunique'", "'exception'", "'stream'"
- };
- public static final int DOUBLE_LT=47;
- public static final int COMMA=22;
- public static final int ISEQ=44;
- public static final int MINUS=7;
- public static final int INCR=52;
- public static final int SHARP=8;
- public static final int DOUBLE_RCURLY=32;
- public static final int DECR=53;
- public static final int ARROW=42;
- public static final int DOUBLE_GT=50;
- public static final int OUT=11;
- public static final int RULE_ASSIGN=41;
- public static final int TILDE=9;
- public static final int PIPE=35;
- public static final int DOUBLE_PIPE=36;
- public static final int INTEGER=17;
- public static final int RCURLY=23;
- public static final int QUESTION_MARK=25;
- public static final int NL=24;
- public static final int LCURLY=21;
- public static final int T__62=62;
- public static final int LE=48;
- public static final int RPAREN=30;
- public static final int T__61=61;
- public static final int LPAREN=29;
- public static final int T__59=59;
- public static final int PLUS=6;
- public static final int SINGLE_QUOTE=28;
- public static final int REAL=57;
- public static final int RANGE=38;
- public static final int LSQUARE=15;
- public static final int FOUR_POINTS=40;
- public static final int DOUBLE_LCURLY=31;
- public static final int POINT=37;
- public static final int WS=4;
- public static final int ALPHA=55;
- public static final int EQ=20;
- public static final int T__64=64;
- public static final int LT=46;
- public static final int GT=49;
- public static final int DOUBLE_QUOTE=27;
- public static final int RSQUARE=18;
- public static final int DOUBLE_LOGICAL_AND=34;
- public static final int RANGE_VALUE=16;
- public static final int IN=10;
- public static final int SEMI=39;
- public static final int GE=51;
- public static final int LNOT=26;
- public static final int T__63=63;
- public static final int ISNE=45;
- public static final int RETURN=13;
- public static final int LOGICAL_AND=33;
- public static final int EOF=-1;
- public static final int INOUT=12;
- public static final int COLON=5;
- public static final int INTEGER_OR_REAL_OR_RANGE=58;
- public static final int DIV=43;
- public static final int IDENTIFIER=14;
- public static final int STAR=19;
- public static final int T__60=60;
- public static final int UNDERSCORE=56;
- public static final int CALLOPERATION=54;
-
- // delegates
- // delegators
-
- public static final String[] ruleNames = new String[] {
- "invalidRule", "visibility", "parameterModifiers", "expression",
- "fullMultiplicity", "upperMultiplicity", "lowerMultiplicity", "unlimitedNatural",
- "parameterModifier", "type", "label", "direction", "defaultValue",
- "name", "parameter_type"
- };
-
- public int ruleLevel = 0;
- public int getRuleLevel() { return ruleLevel; }
- public void incRuleLevel() { ruleLevel++; }
- public void decRuleLevel() { ruleLevel--; }
- public ParameterLabelParser(TokenStream input) {
- this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
- }
- public ParameterLabelParser(TokenStream input, int port, RecognizerSharedState state) {
- super(input, state);
- DebugEventSocketProxy proxy =
- new DebugEventSocketProxy(this,port,adaptor);
- setDebugListener(proxy);
- setTokenStream(new DebugTokenStream(input,proxy));
- try {
- proxy.handshake();
- }
- catch (IOException ioe) {
- reportError(ioe);
- }
- TreeAdaptor adap = new CommonTreeAdaptor();
- setTreeAdaptor(adap);
- proxy.setTreeAdaptor(adap);
- }
- public ParameterLabelParser(TokenStream input, DebugEventListener dbg) {
- super(input, dbg);
-
-
- TreeAdaptor adap = new CommonTreeAdaptor();
- setTreeAdaptor(adap);
-
- }
- protected boolean evalPredicate(boolean result, String predicate) {
- dbg.semanticPredicate(result, predicate);
- return result;
- }
-
- protected DebugTreeAdaptor adaptor;
- public void setTreeAdaptor(TreeAdaptor adaptor) {
- this.adaptor = new DebugTreeAdaptor(dbg,adaptor);
-
- }
- public TreeAdaptor getTreeAdaptor() {
- return adaptor;
- }
-
-
- public String[] getTokenNames() { return ParameterLabelParser.tokenNames; }
- public String getGrammarFileName() { return "D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g"; }
-
-
- public ParameterLabelParser(TokenStream lexer, Parameter parameter, IErrorReporter reporter) {
- this(lexer);
- setParameter(parameter);
- setErrorReporter(reporter);
- this.modifiersUsed = new HashMap<String, Boolean>();
- modifiersUsed.put("ordered", false);
- modifiersUsed.put("unique", false);
- modifiersUsed.put("nonunique", false);
- modifiersUsed.put("stream", false);
- modifiersUsed.put("exception", false);
-
- }
-
- /**
- * Validation state (true = validation : does not modify the parameter
- */
- private boolean isValidation = false;
-
-
- private static final boolean DEBUG = false;
- /**
- * @return the isValidation boolean
- */
- public boolean isValidation() {
- return isValidation;
- }
-
- /**
- * @param isValidation the isValidation to set (true -> do not modify the parameter)
- */
- public void setValidation(boolean isValidation) {
- this.isValidation = isValidation;
- }
-
- private Package nearestPackage;
-
- /**
- * Modified Parameter
- */
- private Parameter parameter;
-
- /**
- * @return the parameter
- */
- public Parameter getParameter() {
- return parameter;
- }
-
- /**
- * @param parameter the parameter to set
- */
- public void setParameter(Parameter parameter) {
- this.parameter = parameter;
- this.nearestPackage = parameter.getNearestPackage();
- }
-
- /** debug mode */
- protected final boolean debugMode = false;
-
- /**
- * Debug method (~System.out.println)
- */
- private void debug(Object debug) {
- if(debugMode) {
- System.out.println(debug);
- }
- }
-
- /**
- * Error method (~System.err.println)
- */
- private void error(Object debug) {
- if(debugMode) {
- System.err.println(debug);
- }
- }
-
- /**
- * Context (for completion processor)
- */
- private int context = IContext.DEFAULT;
-
- /**
- * @return the context
- */
- public int getContext() {
- return context;
- }
-
- /**
- * @param context the context to set
- */
- public void setContext(int context) {
- this.context = context;
- }
-
- // all possible modified elements on parameter (with default values : necessary ?!)
- String name;
- VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
- ParameterDirectionKind direction = ParameterDirectionKind.IN_LITERAL;
- Type type=null;
- int lowerMultiplicity = 1; // default multiplicity = [1..1]
- int upperMultiplicity = 1; // default multiplicity = [1..1]
- String defaultValue=null;
- // parameter modifiers
- boolean isUnique = false; // default value = true but easier to use default = nonunique
- boolean isOrdered = false; // default value = false
- boolean isException = false; // default value = false
- boolean isStream = false; // default value = false
-
-
- /**
- * Apply values to the parameter. <BR>
- * Modifications can not be applied directly. The parser must wait the end,
- * until it reaches the end of the label. If the end is reached without any error,
- * new values can be applied to the target parameter.
- */
- private void applyValues() {
- if(!isValidation){
- debug("\nvalues applied :");
- debug("+ name: "+name);
- debug("+ visibility: "+visibility);
- debug("+ direction: "+direction);
- debug("+ type: "+type);
- debug("+ lower Multiplicity: "+lowerMultiplicity);
- debug("+ upper Multiplicity: "+upperMultiplicity);
- debug("+ default Value: "+defaultValue);
- debug("+ Parameter modifiers");
- debug("+ isUnique: "+isUnique);
- debug("+ isOrdered: "+isOrdered);
- debug("+ isException: "+isException);
- debug("+ isStream: "+isStream);
-
- parameter.setName(name);
- parameter.setVisibility(visibility);
- parameter.setDirection(direction);
- parameter.setType(type);
- parameter.setLower(lowerMultiplicity);
- parameter.setUpper(upperMultiplicity);
- parameter.setDefault(defaultValue);
- parameter.setIsUnique(isUnique);
- parameter.setIsOrdered(isOrdered);
- parameter.setIsException(isException);
- parameter.setIsStream(isStream);
- }
- }
-
- // vector that keeps modifiers already used (used for completion)
- public Map<String, Boolean> modifiersUsed;
-
- /**
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- * @param modifiersUsed the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /** reporting errors */
- private IErrorReporter errorReporter = null;
-
- public void setErrorReporter(IErrorReporter errorReporter) {
- this.errorReporter = errorReporter;
- }
-
- public IErrorReporter getErrorReporter() {
- return errorReporter;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getErrorMessage(RecognitionException exception, String[] arg1) {
- if (exception instanceof NameException) {
- return "Please enter a correct name for the parameter";
- }
- return super.getErrorMessage(exception, arg1);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void emitErrorMessage(String msg) {
- errorReporter.reportError(msg);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void recover(IntStream arg0, RecognitionException arg1) {
- throw new RuntimeException("no recover", arg1);
- // do nothing
- }
-
-
-
- public static class label_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "label"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:256:1: label : ( WS )* ( visibility ( WS )* )? ( direction ( WS )* )? name ( WS )* COLON parameter_type ( fullMultiplicity ( WS )* )? ( defaultValue )? ( parameterModifiers ( WS )* )? ;
- public final ParameterLabelParser.label_return label() throws RecognitionException {
- ParameterLabelParser.label_return retval = new ParameterLabelParser.label_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token WS1=null;
- Token WS3=null;
- Token WS5=null;
- Token WS7=null;
- Token COLON8=null;
- Token WS11=null;
- Token WS14=null;
- ParameterLabelParser.visibility_return visibility2 = null;
-
- ParameterLabelParser.direction_return direction4 = null;
-
- ParameterLabelParser.name_return name6 = null;
-
- ParameterLabelParser.parameter_type_return parameter_type9 = null;
-
- ParameterLabelParser.fullMultiplicity_return fullMultiplicity10 = null;
-
- ParameterLabelParser.defaultValue_return defaultValue12 = null;
-
- ParameterLabelParser.parameterModifiers_return parameterModifiers13 = null;
-
-
- Object WS1_tree=null;
- Object WS3_tree=null;
- Object WS5_tree=null;
- Object WS7_tree=null;
- Object COLON8_tree=null;
- Object WS11_tree=null;
- Object WS14_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "label");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(256, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:256:7: ( ( WS )* ( visibility ( WS )* )? ( direction ( WS )* )? name ( WS )* COLON parameter_type ( fullMultiplicity ( WS )* )? ( defaultValue )? ( parameterModifiers ( WS )* )? )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:257:3: ( WS )* ( visibility ( WS )* )? ( direction ( WS )* )? name ( WS )* COLON parameter_type ( fullMultiplicity ( WS )* )? ( defaultValue )? ( parameterModifiers ( WS )* )?
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(257,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:257:3: ( WS )*
- try { dbg.enterSubRule(1);
-
- loop1:
- do {
- int alt1=2;
- try { dbg.enterDecision(1);
-
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0==WS) ) {
- alt1=1;
- }
-
-
- } finally {dbg.exitDecision(1);}
-
- switch (alt1) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:257:4: WS
- {
- dbg.location(257,4);
- WS1=(Token)match(input,WS,FOLLOW_WS_in_label46);
- WS1_tree = (Object)adaptor.create(WS1);
- adaptor.addChild(root_0, WS1_tree);
-
-
- }
- break;
-
- default :
- break loop1;
- }
- } while (true);
- } finally {dbg.exitSubRule(1);}
-
- dbg.location(258,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:258:3: ( visibility ( WS )* )?
- int alt3=2;
- try { dbg.enterSubRule(3);
- try { dbg.enterDecision(3);
-
- int LA3_0 = input.LA(1);
-
- if ( ((LA3_0>=PLUS && LA3_0<=TILDE)) ) {
- alt3=1;
- }
- } finally {dbg.exitDecision(3);}
-
- switch (alt3) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:258:4: visibility ( WS )*
- {
- dbg.location(258,4);
- pushFollow(FOLLOW_visibility_in_label53);
- visibility2=visibility();
-
- state._fsp--;
-
- adaptor.addChild(root_0, visibility2.getTree());
- dbg.location(258,15);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:258:15: ( WS )*
- try { dbg.enterSubRule(2);
-
- loop2:
- do {
- int alt2=2;
- try { dbg.enterDecision(2);
-
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0==WS) ) {
- alt2=1;
- }
-
-
- } finally {dbg.exitDecision(2);}
-
- switch (alt2) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:258:16: WS
- {
- dbg.location(258,16);
- WS3=(Token)match(input,WS,FOLLOW_WS_in_label56);
- WS3_tree = (Object)adaptor.create(WS3);
- adaptor.addChild(root_0, WS3_tree);
-
-
- }
- break;
-
- default :
- break loop2;
- }
- } while (true);
- } finally {dbg.exitSubRule(2);}
-
- dbg.location(258,21);
- context = IContext.VISIBILITY;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(3);}
-
- dbg.location(259,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:259:3: ( direction ( WS )* )?
- int alt5=2;
- try { dbg.enterSubRule(5);
- try { dbg.enterDecision(5);
-
- int LA5_0 = input.LA(1);
-
- if ( ((LA5_0>=IN && LA5_0<=RETURN)) ) {
- alt5=1;
- }
- } finally {dbg.exitDecision(5);}
-
- switch (alt5) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:259:4: direction ( WS )*
- {
- dbg.location(259,4);
- pushFollow(FOLLOW_direction_in_label69);
- direction4=direction();
-
- state._fsp--;
-
- adaptor.addChild(root_0, direction4.getTree());
- dbg.location(259,14);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:259:14: ( WS )*
- try { dbg.enterSubRule(4);
-
- loop4:
- do {
- int alt4=2;
- try { dbg.enterDecision(4);
-
- int LA4_0 = input.LA(1);
-
- if ( (LA4_0==WS) ) {
- alt4=1;
- }
-
-
- } finally {dbg.exitDecision(4);}
-
- switch (alt4) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:259:15: WS
- {
- dbg.location(259,15);
- WS5=(Token)match(input,WS,FOLLOW_WS_in_label72);
- WS5_tree = (Object)adaptor.create(WS5);
- adaptor.addChild(root_0, WS5_tree);
-
-
- }
- break;
-
- default :
- break loop4;
- }
- } while (true);
- } finally {dbg.exitSubRule(4);}
-
- dbg.location(259,20);
- context = IContext.DIRECTION;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(5);}
-
- dbg.location(260,3);
- pushFollow(FOLLOW_name_in_label84);
- name6=name();
-
- state._fsp--;
-
- adaptor.addChild(root_0, name6.getTree());
- dbg.location(260,8);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:260:8: ( WS )*
- try { dbg.enterSubRule(6);
-
- loop6:
- do {
- int alt6=2;
- try { dbg.enterDecision(6);
-
- int LA6_0 = input.LA(1);
-
- if ( (LA6_0==WS) ) {
- alt6=1;
- }
-
-
- } finally {dbg.exitDecision(6);}
-
- switch (alt6) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:260:9: WS
- {
- dbg.location(260,9);
- WS7=(Token)match(input,WS,FOLLOW_WS_in_label87);
- WS7_tree = (Object)adaptor.create(WS7);
- adaptor.addChild(root_0, WS7_tree);
-
-
- }
- break;
-
- default :
- break loop6;
- }
- } while (true);
- } finally {dbg.exitSubRule(6);}
-
- dbg.location(261,3);
- COLON8=(Token)match(input,COLON,FOLLOW_COLON_in_label93);
- COLON8_tree = (Object)adaptor.create(COLON8);
- adaptor.addChild(root_0, COLON8_tree);
-
- dbg.location(261,9);
- context = IContext.AFTER_COLON;
- dbg.location(262,3);
- pushFollow(FOLLOW_parameter_type_in_label100);
- parameter_type9=parameter_type();
-
- state._fsp--;
-
- adaptor.addChild(root_0, parameter_type9.getTree());
- dbg.location(262,19);
- context = IContext.MULTIPLICITY;
- dbg.location(263,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:263:3: ( fullMultiplicity ( WS )* )?
- int alt8=2;
- try { dbg.enterSubRule(8);
- try { dbg.enterDecision(8);
-
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0==LSQUARE) ) {
- alt8=1;
- }
- } finally {dbg.exitDecision(8);}
-
- switch (alt8) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:263:4: fullMultiplicity ( WS )*
- {
- dbg.location(263,4);
- pushFollow(FOLLOW_fullMultiplicity_in_label108);
- fullMultiplicity10=fullMultiplicity();
-
- state._fsp--;
-
- adaptor.addChild(root_0, fullMultiplicity10.getTree());
- dbg.location(263,21);
- context = IContext.AFTER_MULTIPLICITY;
- dbg.location(263,64);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:263:64: ( WS )*
- try { dbg.enterSubRule(7);
-
- loop7:
- do {
- int alt7=2;
- try { dbg.enterDecision(7);
-
- int LA7_0 = input.LA(1);
-
- if ( (LA7_0==WS) ) {
- alt7=1;
- }
-
-
- } finally {dbg.exitDecision(7);}
-
- switch (alt7) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:263:65: WS
- {
- dbg.location(263,65);
- WS11=(Token)match(input,WS,FOLLOW_WS_in_label113);
- WS11_tree = (Object)adaptor.create(WS11);
- adaptor.addChild(root_0, WS11_tree);
-
-
- }
- break;
-
- default :
- break loop7;
- }
- } while (true);
- } finally {dbg.exitSubRule(7);}
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(8);}
-
- dbg.location(264,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:264:3: ( defaultValue )?
- int alt9=2;
- try { dbg.enterSubRule(9);
- try { dbg.enterDecision(9);
-
- int LA9_0 = input.LA(1);
-
- if ( (LA9_0==EQ) ) {
- alt9=1;
- }
- } finally {dbg.exitDecision(9);}
-
- switch (alt9) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:264:4: defaultValue
- {
- dbg.location(264,4);
- pushFollow(FOLLOW_defaultValue_in_label122);
- defaultValue12=defaultValue();
-
- state._fsp--;
-
- adaptor.addChild(root_0, defaultValue12.getTree());
- dbg.location(264,17);
- context = IContext.DEFAULT_VALUE;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(9);}
-
- dbg.location(265,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:265:3: ( parameterModifiers ( WS )* )?
- int alt11=2;
- try { dbg.enterSubRule(11);
- try { dbg.enterDecision(11);
-
- int LA11_0 = input.LA(1);
-
- if ( (LA11_0==LCURLY) ) {
- alt11=1;
- }
- } finally {dbg.exitDecision(11);}
-
- switch (alt11) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:265:4: parameterModifiers ( WS )*
- {
- dbg.location(265,4);
- pushFollow(FOLLOW_parameterModifiers_in_label132);
- parameterModifiers13=parameterModifiers();
-
- state._fsp--;
-
- adaptor.addChild(root_0, parameterModifiers13.getTree());
- dbg.location(265,23);
- context = IContext.PARAMETER_MODIFIERS;
- dbg.location(265,67);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:265:67: ( WS )*
- try { dbg.enterSubRule(10);
-
- loop10:
- do {
- int alt10=2;
- try { dbg.enterDecision(10);
-
- int LA10_0 = input.LA(1);
-
- if ( (LA10_0==WS) ) {
- alt10=1;
- }
-
-
- } finally {dbg.exitDecision(10);}
-
- switch (alt10) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:265:68: WS
- {
- dbg.location(265,68);
- WS14=(Token)match(input,WS,FOLLOW_WS_in_label137);
- WS14_tree = (Object)adaptor.create(WS14);
- adaptor.addChild(root_0, WS14_tree);
-
-
- }
- break;
-
- default :
- break loop10;
- }
- } while (true);
- } finally {dbg.exitSubRule(10);}
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(11);}
-
- dbg.location(266,3);
-
- applyValues();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- String index = Integer.toString(mte.index);
- String description = mte.getLocalizedMessage().substring(mte.getLocalizedMessage().indexOf('('),
- mte.getLocalizedMessage().length());
- String tokenText = mte.token.getText();
- String text = Messages.bind(Messages.MismatchedToken, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw (re);
-
-
- }
- finally {
- }
- dbg.location(269, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "label");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "label"
-
- public static class visibility_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "visibility"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:295:1: visibility : ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) ) ;
- public final ParameterLabelParser.visibility_return visibility() throws RecognitionException {
- ParameterLabelParser.visibility_return retval = new ParameterLabelParser.visibility_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token PLUS15=null;
- Token MINUS16=null;
- Token SHARP17=null;
- Token TILDE18=null;
-
- Object PLUS15_tree=null;
- Object MINUS16_tree=null;
- Object SHARP17_tree=null;
- Object TILDE18_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "visibility");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(295, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:296:3: ( ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:297:3: ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(297,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:297:3: ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) )
- int alt12=4;
- try { dbg.enterSubRule(12);
- try { dbg.enterDecision(12);
-
- switch ( input.LA(1) ) {
- case PLUS:
- {
- alt12=1;
- }
- break;
- case MINUS:
- {
- alt12=2;
- }
- break;
- case SHARP:
- {
- alt12=3;
- }
- break;
- case TILDE:
- {
- alt12=4;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 12, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
-
- } finally {dbg.exitDecision(12);}
-
- switch (alt12) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:298:5: ( PLUS )
- {
- dbg.location(298,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:298:5: ( PLUS )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:298:9: PLUS
- {
- dbg.location(298,9);
- PLUS15=(Token)match(input,PLUS,FOLLOW_PLUS_in_visibility202);
- PLUS15_tree = (Object)adaptor.create(PLUS15);
- adaptor.addChild(root_0, PLUS15_tree);
-
- dbg.location(298,15);
- visibility = VisibilityKind.PUBLIC_LITERAL;
-
- }
-
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:299:5: ( MINUS )
- {
- dbg.location(299,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:299:5: ( MINUS )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:299:9: MINUS
- {
- dbg.location(299,9);
- MINUS16=(Token)match(input,MINUS,FOLLOW_MINUS_in_visibility217);
- MINUS16_tree = (Object)adaptor.create(MINUS16);
- adaptor.addChild(root_0, MINUS16_tree);
-
- dbg.location(299,15);
- visibility = VisibilityKind.PRIVATE_LITERAL;
-
- }
-
-
- }
- break;
- case 3 :
- dbg.enterAlt(3);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:300:5: ( SHARP )
- {
- dbg.location(300,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:300:5: ( SHARP )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:300:9: SHARP
- {
- dbg.location(300,9);
- SHARP17=(Token)match(input,SHARP,FOLLOW_SHARP_in_visibility231);
- SHARP17_tree = (Object)adaptor.create(SHARP17);
- adaptor.addChild(root_0, SHARP17_tree);
-
- dbg.location(300,15);
- visibility = VisibilityKind.PROTECTED_LITERAL;
-
- }
-
-
- }
- break;
- case 4 :
- dbg.enterAlt(4);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:301:5: ( TILDE )
- {
- dbg.location(301,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:301:5: ( TILDE )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:301:9: TILDE
- {
- dbg.location(301,9);
- TILDE18=(Token)match(input,TILDE,FOLLOW_TILDE_in_visibility245);
- TILDE18_tree = (Object)adaptor.create(TILDE18);
- adaptor.addChild(root_0, TILDE18_tree);
-
- dbg.location(301,15);
- visibility = VisibilityKind.PACKAGE_LITERAL;
-
- }
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(12);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("VisibilityRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
-
- }
- finally {
- }
- dbg.location(303, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "visibility");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "visibility"
-
- public static class direction_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "direction"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:321:1: direction : ( ( IN ) | ( OUT ) | ( INOUT ) | ( RETURN ) ) ;
- public final ParameterLabelParser.direction_return direction() throws RecognitionException {
- ParameterLabelParser.direction_return retval = new ParameterLabelParser.direction_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token IN19=null;
- Token OUT20=null;
- Token INOUT21=null;
- Token RETURN22=null;
-
- Object IN19_tree=null;
- Object OUT20_tree=null;
- Object INOUT21_tree=null;
- Object RETURN22_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "direction");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(321, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:322:3: ( ( ( IN ) | ( OUT ) | ( INOUT ) | ( RETURN ) ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:323:3: ( ( IN ) | ( OUT ) | ( INOUT ) | ( RETURN ) )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(323,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:323:3: ( ( IN ) | ( OUT ) | ( INOUT ) | ( RETURN ) )
- int alt13=4;
- try { dbg.enterSubRule(13);
- try { dbg.enterDecision(13);
-
- switch ( input.LA(1) ) {
- case IN:
- {
- alt13=1;
- }
- break;
- case OUT:
- {
- alt13=2;
- }
- break;
- case INOUT:
- {
- alt13=3;
- }
- break;
- case RETURN:
- {
- alt13=4;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 13, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
-
- } finally {dbg.exitDecision(13);}
-
- switch (alt13) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:324:5: ( IN )
- {
- dbg.location(324,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:324:5: ( IN )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:324:9: IN
- {
- dbg.location(324,9);
- IN19=(Token)match(input,IN,FOLLOW_IN_in_direction297);
- IN19_tree = (Object)adaptor.create(IN19);
- adaptor.addChild(root_0, IN19_tree);
-
- dbg.location(324,16);
- direction = ParameterDirectionKind.IN_LITERAL;
-
- }
-
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:325:5: ( OUT )
- {
- dbg.location(325,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:325:5: ( OUT )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:325:9: OUT
- {
- dbg.location(325,9);
- OUT20=(Token)match(input,OUT,FOLLOW_OUT_in_direction315);
- OUT20_tree = (Object)adaptor.create(OUT20);
- adaptor.addChild(root_0, OUT20_tree);
-
- dbg.location(325,16);
- direction = ParameterDirectionKind.OUT_LITERAL;
-
- }
-
-
- }
- break;
- case 3 :
- dbg.enterAlt(3);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:326:5: ( INOUT )
- {
- dbg.location(326,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:326:5: ( INOUT )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:326:9: INOUT
- {
- dbg.location(326,9);
- INOUT21=(Token)match(input,INOUT,FOLLOW_INOUT_in_direction332);
- INOUT21_tree = (Object)adaptor.create(INOUT21);
- adaptor.addChild(root_0, INOUT21_tree);
-
- dbg.location(326,16);
- direction = ParameterDirectionKind.INOUT_LITERAL;
-
- }
-
-
- }
- break;
- case 4 :
- dbg.enterAlt(4);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:327:5: ( RETURN )
- {
- dbg.location(327,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:327:5: ( RETURN )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:327:9: RETURN
- {
- dbg.location(327,9);
- RETURN22=(Token)match(input,RETURN,FOLLOW_RETURN_in_direction347);
- RETURN22_tree = (Object)adaptor.create(RETURN22);
- adaptor.addChild(root_0, RETURN22_tree);
-
- dbg.location(327,16);
- direction = ParameterDirectionKind.RETURN_LITERAL;
-
- }
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(13);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("Direction"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
-
- }
- finally {
- }
- dbg.location(329, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "direction");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "direction"
-
- public static class name_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "name"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:346:1: name : id= IDENTIFIER ;
- public final ParameterLabelParser.name_return name() throws RecognitionException {
- ParameterLabelParser.name_return retval = new ParameterLabelParser.name_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "name");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(346, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:347:3: (id= IDENTIFIER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:348:3: id= IDENTIFIER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(348,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_name389);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(349,3);
-
- name = id.getText();
- context = IContext.NAME;
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException(Messages.NameMissing));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(353, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "name");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "name"
-
- public static class parameter_type_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "parameter_type"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:373:1: parameter_type : ( WS )* ( type | '<Undefined>' ) ;
- public final ParameterLabelParser.parameter_type_return parameter_type() throws RecognitionException {
- ParameterLabelParser.parameter_type_return retval = new ParameterLabelParser.parameter_type_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token WS23=null;
- Token string_literal25=null;
- ParameterLabelParser.type_return type24 = null;
-
-
- Object WS23_tree=null;
- Object string_literal25_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "parameter_type");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(373, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:374:3: ( ( WS )* ( type | '<Undefined>' ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:375:3: ( WS )* ( type | '<Undefined>' )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(375,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:375:3: ( WS )*
- try { dbg.enterSubRule(14);
-
- loop14:
- do {
- int alt14=2;
- try { dbg.enterDecision(14);
-
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0==WS) ) {
- alt14=1;
- }
-
-
- } finally {dbg.exitDecision(14);}
-
- switch (alt14) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:375:4: WS
- {
- dbg.location(375,4);
- WS23=(Token)match(input,WS,FOLLOW_WS_in_parameter_type438);
- WS23_tree = (Object)adaptor.create(WS23);
- adaptor.addChild(root_0, WS23_tree);
-
-
- }
- break;
-
- default :
- break loop14;
- }
- } while (true);
- } finally {dbg.exitSubRule(14);}
-
- dbg.location(376,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:376:3: ( type | '<Undefined>' )
- int alt15=2;
- try { dbg.enterSubRule(15);
- try { dbg.enterDecision(15);
-
- int LA15_0 = input.LA(1);
-
- if ( (LA15_0==IDENTIFIER) ) {
- alt15=1;
- }
- else if ( (LA15_0==59) ) {
- alt15=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 15, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(15);}
-
- switch (alt15) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:376:5: type
- {
- dbg.location(376,5);
- pushFollow(FOLLOW_type_in_parameter_type446);
- type24=type();
-
- state._fsp--;
-
- adaptor.addChild(root_0, type24.getTree());
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:377:5: '<Undefined>'
- {
- dbg.location(377,5);
- string_literal25=(Token)match(input,59,FOLLOW_59_in_parameter_type454);
- string_literal25_tree = (Object)adaptor.create(string_literal25);
- adaptor.addChild(root_0, string_literal25_tree);
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(15);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("ParameterTypeRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- throw new RuntimeException("Waiting for a valid type or <Undefined>");
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(379, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "parameter_type");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "parameter_type"
-
- public static class type_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "type"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:394:1: type : id= IDENTIFIER ( WS )* (id1= IDENTIFIER ( WS )* )* ;
- public final ParameterLabelParser.type_return type() throws RecognitionException {
- ParameterLabelParser.type_return retval = new ParameterLabelParser.type_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
- Token id1=null;
- Token WS26=null;
- Token WS27=null;
-
- Object id_tree=null;
- Object id1_tree=null;
- Object WS26_tree=null;
- Object WS27_tree=null;
-
-
- StringBuffer buffer = new StringBuffer();
-
- try { dbg.enterRule(getGrammarFileName(), "type");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(394, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:398:3: (id= IDENTIFIER ( WS )* (id1= IDENTIFIER ( WS )* )* )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:399:3: id= IDENTIFIER ( WS )* (id1= IDENTIFIER ( WS )* )*
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(399,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_type514);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(399,17);
- buffer.append(id.getText());
- dbg.location(400,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:400:3: ( WS )*
- try { dbg.enterSubRule(16);
-
- loop16:
- do {
- int alt16=2;
- try { dbg.enterDecision(16);
-
- int LA16_0 = input.LA(1);
-
- if ( (LA16_0==WS) ) {
- alt16=1;
- }
-
-
- } finally {dbg.exitDecision(16);}
-
- switch (alt16) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:400:4: WS
- {
- dbg.location(400,4);
- WS26=(Token)match(input,WS,FOLLOW_WS_in_type521);
- WS26_tree = (Object)adaptor.create(WS26);
- adaptor.addChild(root_0, WS26_tree);
-
- dbg.location(400,7);
- //System.err.println("space added");
- buffer.append(" ");
-
- }
- break;
-
- default :
- break loop16;
- }
- } while (true);
- } finally {dbg.exitSubRule(16);}
-
- dbg.location(402,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:402:3: (id1= IDENTIFIER ( WS )* )*
- try { dbg.enterSubRule(18);
-
- loop18:
- do {
- int alt18=2;
- try { dbg.enterDecision(18);
-
- int LA18_0 = input.LA(1);
-
- if ( (LA18_0==IDENTIFIER) ) {
- alt18=1;
- }
-
-
- } finally {dbg.exitDecision(18);}
-
- switch (alt18) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:403:5: id1= IDENTIFIER ( WS )*
- {
- dbg.location(403,8);
- id1=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_type538);
- id1_tree = (Object)adaptor.create(id1);
- adaptor.addChild(root_0, id1_tree);
-
- dbg.location(403,20);
- buffer.append(id1.getText());
- dbg.location(404,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:404:5: ( WS )*
- try { dbg.enterSubRule(17);
-
- loop17:
- do {
- int alt17=2;
- try { dbg.enterDecision(17);
-
- int LA17_0 = input.LA(1);
-
- if ( (LA17_0==WS) ) {
- alt17=1;
- }
-
-
- } finally {dbg.exitDecision(17);}
-
- switch (alt17) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:404:6: WS
- {
- dbg.location(404,6);
- WS27=(Token)match(input,WS,FOLLOW_WS_in_type547);
- WS27_tree = (Object)adaptor.create(WS27);
- adaptor.addChild(root_0, WS27_tree);
-
- dbg.location(404,9);
- //System.err.println("space added");
- buffer.append(" ");
-
- }
- break;
-
- default :
- break loop17;
- }
- } while (true);
- } finally {dbg.exitSubRule(17);}
-
-
- }
- break;
-
- default :
- break loop18;
- }
- } while (true);
- } finally {dbg.exitSubRule(18);}
-
- dbg.location(407,3);
-
- String typeName = buffer.toString().trim() ;
- //System.err.println("typeName: "+typeName);
- Type utilType = PackageUtil.findTypeByName(nearestPackage, typeName);
- // type = findTypeByName(typeName, parameter);
- // The type has not been found, but it may have been declared in the context of a template.
- if(utilType != null) {
- if (utilType instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)utilType;
- if (template.isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- template) ;
- } else {
- type = utilType;
- }
- }
- else {
- type = utilType;
- }
- } else {
- // The type has not been found, but it may have been declared in the context of a template.
- if (parameter.getOwner() instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)parameter.getOwner() ;
- if (template.isTemplate()) {
- utilType = TemplateSignatureUtil.findTypeByName(template.getOwnedTemplateSignature(), typeName) ;
- }
- }
- if (utilType == null) // the type actually does not exist
- throw new TypeRecognitionException("Type "+typeName+" not found for parameter "+parameter.getName(),typeName);
- else if (utilType instanceof TemplateableElement && ((TemplateableElement)utilType).isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- (TemplateableElement)utilType) ;
- }
- else {
- type = utilType;
- }
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("TypeRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(445, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "type");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "type"
-
- public static class fullMultiplicity_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "fullMultiplicity"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:456:1: fullMultiplicity : LSQUARE (ra= RANGE_VALUE | up= INTEGER ) RSQUARE ;
- public final ParameterLabelParser.fullMultiplicity_return fullMultiplicity() throws RecognitionException {
- ParameterLabelParser.fullMultiplicity_return retval = new ParameterLabelParser.fullMultiplicity_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token ra=null;
- Token up=null;
- Token LSQUARE28=null;
- Token RSQUARE29=null;
-
- Object ra_tree=null;
- Object up_tree=null;
- Object LSQUARE28_tree=null;
- Object RSQUARE29_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "fullMultiplicity");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(456, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:457:3: ( LSQUARE (ra= RANGE_VALUE | up= INTEGER ) RSQUARE )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:458:3: LSQUARE (ra= RANGE_VALUE | up= INTEGER ) RSQUARE
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(458,3);
- LSQUARE28=(Token)match(input,LSQUARE,FOLLOW_LSQUARE_in_fullMultiplicity600);
- LSQUARE28_tree = (Object)adaptor.create(LSQUARE28);
- adaptor.addChild(root_0, LSQUARE28_tree);
-
- dbg.location(459,3);
- context = IContext.IN_MULTIPLICITY;
- dbg.location(475,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:475:3: (ra= RANGE_VALUE | up= INTEGER )
- int alt19=2;
- try { dbg.enterSubRule(19);
- try { dbg.enterDecision(19);
-
- int LA19_0 = input.LA(1);
-
- if ( (LA19_0==RANGE_VALUE) ) {
- alt19=1;
- }
- else if ( (LA19_0==INTEGER) ) {
- alt19=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 19, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(19);}
-
- switch (alt19) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:476:5: ra= RANGE_VALUE
- {
- dbg.location(476,7);
- ra=(Token)match(input,RANGE_VALUE,FOLLOW_RANGE_VALUE_in_fullMultiplicity620);
- ra_tree = (Object)adaptor.create(ra);
- adaptor.addChild(root_0, ra_tree);
-
- dbg.location(476,20);
-
- // retrieving values. text = upper ',' lower
- String value = (ra!=null?ra.getText():null);
- upperMultiplicity = Integer.parseInt(value.substring(0, value.lastIndexOf(',')));
- lowerMultiplicity = Integer.parseInt(value.substring(value.lastIndexOf(',') + 1, value.length()));
-
- if (lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
- throw new MultiplicityException("Lower bound (" + lowerMultiplicity
- + ") is greater than upper bound (" + upperMultiplicity + ")");
- }
-
-
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:488:5: up= INTEGER
- {
- dbg.location(488,7);
- up=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_fullMultiplicity630);
- up_tree = (Object)adaptor.create(up);
- adaptor.addChild(root_0, up_tree);
-
- dbg.location(488,16);
-
- upperMultiplicity = Integer.parseInt((up!=null?up.getText():null));
- lowerMultiplicity = upperMultiplicity;
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(19);}
-
- dbg.location(493,3);
- RSQUARE29=(Token)match(input,RSQUARE,FOLLOW_RSQUARE_in_fullMultiplicity640);
- RSQUARE29_tree = (Object)adaptor.create(RSQUARE29);
- adaptor.addChild(root_0, RSQUARE29_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("FullMultiplicityRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(494, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "fullMultiplicity");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "fullMultiplicity"
-
- public static class lowerMultiplicity_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "lowerMultiplicity"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:516:1: lowerMultiplicity : in= INTEGER ;
- public final ParameterLabelParser.lowerMultiplicity_return lowerMultiplicity() throws RecognitionException {
- ParameterLabelParser.lowerMultiplicity_return retval = new ParameterLabelParser.lowerMultiplicity_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token in=null;
-
- Object in_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "lowerMultiplicity");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(516, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:517:3: (in= INTEGER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:518:3: in= INTEGER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(518,5);
- in=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_lowerMultiplicity692);
- in_tree = (Object)adaptor.create(in);
- adaptor.addChild(root_0, in_tree);
-
- dbg.location(519,3);
-
- lowerMultiplicity = Integer.parseInt(in.getText());
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- dbg.location(522, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "lowerMultiplicity");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "lowerMultiplicity"
-
- public static class upperMultiplicity_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "upperMultiplicity"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:524:1: upperMultiplicity : um= unlimitedNatural ;
- public final ParameterLabelParser.upperMultiplicity_return upperMultiplicity() throws RecognitionException {
- ParameterLabelParser.upperMultiplicity_return retval = new ParameterLabelParser.upperMultiplicity_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- ParameterLabelParser.unlimitedNatural_return um = null;
-
-
-
- try { dbg.enterRule(getGrammarFileName(), "upperMultiplicity");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(524, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:525:3: (um= unlimitedNatural )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:526:3: um= unlimitedNatural
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(526,5);
- pushFollow(FOLLOW_unlimitedNatural_in_upperMultiplicity713);
- um=unlimitedNatural();
-
- state._fsp--;
-
- adaptor.addChild(root_0, um.getTree());
- dbg.location(527,3);
-
- upperMultiplicity = um.value;
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- dbg.location(530, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "upperMultiplicity");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "upperMultiplicity"
-
- public static class unlimitedNatural_return extends ParserRuleReturnScope {
- public int value = 0;
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "unlimitedNatural"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:532:1: unlimitedNatural returns [int value = 0 ] : ( STAR | in= INTEGER ) ;
- public final ParameterLabelParser.unlimitedNatural_return unlimitedNatural() throws RecognitionException {
- ParameterLabelParser.unlimitedNatural_return retval = new ParameterLabelParser.unlimitedNatural_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token in=null;
- Token STAR30=null;
-
- Object in_tree=null;
- Object STAR30_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "unlimitedNatural");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(532, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:533:3: ( ( STAR | in= INTEGER ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:534:3: ( STAR | in= INTEGER )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(534,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:534:3: ( STAR | in= INTEGER )
- int alt20=2;
- try { dbg.enterSubRule(20);
- try { dbg.enterDecision(20);
-
- int LA20_0 = input.LA(1);
-
- if ( (LA20_0==STAR) ) {
- alt20=1;
- }
- else if ( (LA20_0==INTEGER) ) {
- alt20=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 20, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(20);}
-
- switch (alt20) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:534:5: STAR
- {
- dbg.location(534,5);
- STAR30=(Token)match(input,STAR,FOLLOW_STAR_in_unlimitedNatural741);
- STAR30_tree = (Object)adaptor.create(STAR30);
- adaptor.addChild(root_0, STAR30_tree);
-
- dbg.location(534,15);
- retval.value = -1;
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:535:5: in= INTEGER
- {
- dbg.location(535,7);
- in=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_unlimitedNatural756);
- in_tree = (Object)adaptor.create(in);
- adaptor.addChild(root_0, in_tree);
-
- dbg.location(535,19);
- retval.value = Integer.parseInt(in.getText());
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(20);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- dbg.location(537, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "unlimitedNatural");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "unlimitedNatural"
-
- public static class defaultValue_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "defaultValue"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:539:1: defaultValue : EQ dv= expression ;
- public final ParameterLabelParser.defaultValue_return defaultValue() throws RecognitionException {
- ParameterLabelParser.defaultValue_return retval = new ParameterLabelParser.defaultValue_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token EQ31=null;
- ParameterLabelParser.expression_return dv = null;
-
-
- Object EQ31_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "defaultValue");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(539, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:540:3: ( EQ dv= expression )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:541:3: EQ dv= expression
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(541,3);
- EQ31=(Token)match(input,EQ,FOLLOW_EQ_in_defaultValue782);
- EQ31_tree = (Object)adaptor.create(EQ31);
- adaptor.addChild(root_0, EQ31_tree);
-
- dbg.location(541,9);
- pushFollow(FOLLOW_expression_in_defaultValue788);
- dv=expression();
-
- state._fsp--;
-
- adaptor.addChild(root_0, dv.getTree());
- dbg.location(542,3);
-
- // remove spaces at the begining
- defaultValue = dv.value.trim();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(546, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "defaultValue");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "defaultValue"
-
- public static class expression_return extends ParserRuleReturnScope {
- public String value = "";
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "expression"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:557:1: expression returns [String value = \"\"] : ( options {greedy=false; } : id=~ ( LCURLY ) )+ ;
- public final ParameterLabelParser.expression_return expression() throws RecognitionException {
- ParameterLabelParser.expression_return retval = new ParameterLabelParser.expression_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
-
- StringBuffer buffer = new StringBuffer();
-
- try { dbg.enterRule(getGrammarFileName(), "expression");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(557, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:561:3: ( ( options {greedy=false; } : id=~ ( LCURLY ) )+ )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:562:4: ( options {greedy=false; } : id=~ ( LCURLY ) )+
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(562,4);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:562:4: ( options {greedy=false; } : id=~ ( LCURLY ) )+
- int cnt21=0;
- try { dbg.enterSubRule(21);
-
- loop21:
- do {
- int alt21=2;
- try { dbg.enterDecision(21);
-
- int LA21_0 = input.LA(1);
-
- if ( ((LA21_0>=WS && LA21_0<=EQ)||(LA21_0>=COMMA && LA21_0<=64)) ) {
- alt21=1;
- }
- else if ( (LA21_0==EOF||LA21_0==LCURLY) ) {
- alt21=2;
- }
-
-
- } finally {dbg.exitDecision(21);}
-
- switch (alt21) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:566:8: id=~ ( LCURLY )
- {
- dbg.location(566,10);
- id=(Token)input.LT(1);
- if ( (input.LA(1)>=WS && input.LA(1)<=EQ)||(input.LA(1)>=COMMA && input.LA(1)<=64) ) {
- input.consume();
- adaptor.addChild(root_0, (Object)adaptor.create(id));
- state.errorRecovery=false;
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- dbg.recognitionException(mse);
- throw mse;
- }
-
- dbg.location(567,5);
-
- buffer.append(id.getText());
-
-
- }
- break;
-
- default :
- if ( cnt21 >= 1 ) break loop21;
- EarlyExitException eee =
- new EarlyExitException(21, input);
- dbg.recognitionException(eee);
-
- throw eee;
- }
- cnt21++;
- } while (true);
- } finally {dbg.exitSubRule(21);}
-
- dbg.location(571,3);
-
- retval.value = buffer.toString();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(574, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "expression");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "expression"
-
- public static class parameterModifiers_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "parameterModifiers"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:581:1: parameterModifiers : LCURLY ( WS )* parameterModifier ( WS )* ( COMMA ( WS )* parameterModifier ( WS )* )* RCURLY ;
- public final ParameterLabelParser.parameterModifiers_return parameterModifiers() throws RecognitionException {
- ParameterLabelParser.parameterModifiers_return retval = new ParameterLabelParser.parameterModifiers_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token LCURLY32=null;
- Token WS33=null;
- Token WS35=null;
- Token COMMA36=null;
- Token WS37=null;
- Token WS39=null;
- Token RCURLY40=null;
- ParameterLabelParser.parameterModifier_return parameterModifier34 = null;
-
- ParameterLabelParser.parameterModifier_return parameterModifier38 = null;
-
-
- Object LCURLY32_tree=null;
- Object WS33_tree=null;
- Object WS35_tree=null;
- Object COMMA36_tree=null;
- Object WS37_tree=null;
- Object WS39_tree=null;
- Object RCURLY40_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "parameterModifiers");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(581, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:582:3: ( LCURLY ( WS )* parameterModifier ( WS )* ( COMMA ( WS )* parameterModifier ( WS )* )* RCURLY )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:583:3: LCURLY ( WS )* parameterModifier ( WS )* ( COMMA ( WS )* parameterModifier ( WS )* )* RCURLY
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(583,3);
- LCURLY32=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_parameterModifiers931);
- LCURLY32_tree = (Object)adaptor.create(LCURLY32);
- adaptor.addChild(root_0, LCURLY32_tree);
-
- dbg.location(583,10);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:583:10: ( WS )*
- try { dbg.enterSubRule(22);
-
- loop22:
- do {
- int alt22=2;
- try { dbg.enterDecision(22);
-
- int LA22_0 = input.LA(1);
-
- if ( (LA22_0==WS) ) {
- alt22=1;
- }
-
-
- } finally {dbg.exitDecision(22);}
-
- switch (alt22) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:583:11: WS
- {
- dbg.location(583,11);
- WS33=(Token)match(input,WS,FOLLOW_WS_in_parameterModifiers934);
- WS33_tree = (Object)adaptor.create(WS33);
- adaptor.addChild(root_0, WS33_tree);
-
-
- }
- break;
-
- default :
- break loop22;
- }
- } while (true);
- } finally {dbg.exitSubRule(22);}
-
- dbg.location(584,3);
- context = IContext.PARAMETER_MODIFIER;
- dbg.location(585,3);
- pushFollow(FOLLOW_parameterModifier_in_parameterModifiers944);
- parameterModifier34=parameterModifier();
-
- state._fsp--;
-
- adaptor.addChild(root_0, parameterModifier34.getTree());
- dbg.location(585,21);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:585:21: ( WS )*
- try { dbg.enterSubRule(23);
-
- loop23:
- do {
- int alt23=2;
- try { dbg.enterDecision(23);
-
- int LA23_0 = input.LA(1);
-
- if ( (LA23_0==WS) ) {
- alt23=1;
- }
-
-
- } finally {dbg.exitDecision(23);}
-
- switch (alt23) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:585:22: WS
- {
- dbg.location(585,22);
- WS35=(Token)match(input,WS,FOLLOW_WS_in_parameterModifiers947);
- WS35_tree = (Object)adaptor.create(WS35);
- adaptor.addChild(root_0, WS35_tree);
-
-
- }
- break;
-
- default :
- break loop23;
- }
- } while (true);
- } finally {dbg.exitSubRule(23);}
-
- dbg.location(586,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:586:3: ( COMMA ( WS )* parameterModifier ( WS )* )*
- try { dbg.enterSubRule(26);
-
- loop26:
- do {
- int alt26=2;
- try { dbg.enterDecision(26);
-
- int LA26_0 = input.LA(1);
-
- if ( (LA26_0==COMMA) ) {
- alt26=1;
- }
-
-
- } finally {dbg.exitDecision(26);}
-
- switch (alt26) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:587:5: COMMA ( WS )* parameterModifier ( WS )*
- {
- dbg.location(587,5);
- context = IContext.PARAMETER_MODIFIER;
- dbg.location(588,5);
- COMMA36=(Token)match(input,COMMA,FOLLOW_COMMA_in_parameterModifiers966);
- COMMA36_tree = (Object)adaptor.create(COMMA36);
- adaptor.addChild(root_0, COMMA36_tree);
-
- dbg.location(588,11);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:588:11: ( WS )*
- try { dbg.enterSubRule(24);
-
- loop24:
- do {
- int alt24=2;
- try { dbg.enterDecision(24);
-
- int LA24_0 = input.LA(1);
-
- if ( (LA24_0==WS) ) {
- alt24=1;
- }
-
-
- } finally {dbg.exitDecision(24);}
-
- switch (alt24) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:588:12: WS
- {
- dbg.location(588,12);
- WS37=(Token)match(input,WS,FOLLOW_WS_in_parameterModifiers969);
- WS37_tree = (Object)adaptor.create(WS37);
- adaptor.addChild(root_0, WS37_tree);
-
-
- }
- break;
-
- default :
- break loop24;
- }
- } while (true);
- } finally {dbg.exitSubRule(24);}
-
- dbg.location(588,17);
- pushFollow(FOLLOW_parameterModifier_in_parameterModifiers973);
- parameterModifier38=parameterModifier();
-
- state._fsp--;
-
- adaptor.addChild(root_0, parameterModifier38.getTree());
- dbg.location(588,35);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:588:35: ( WS )*
- try { dbg.enterSubRule(25);
-
- loop25:
- do {
- int alt25=2;
- try { dbg.enterDecision(25);
-
- int LA25_0 = input.LA(1);
-
- if ( (LA25_0==WS) ) {
- alt25=1;
- }
-
-
- } finally {dbg.exitDecision(25);}
-
- switch (alt25) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:588:36: WS
- {
- dbg.location(588,36);
- WS39=(Token)match(input,WS,FOLLOW_WS_in_parameterModifiers976);
- WS39_tree = (Object)adaptor.create(WS39);
- adaptor.addChild(root_0, WS39_tree);
-
-
- }
- break;
-
- default :
- break loop25;
- }
- } while (true);
- } finally {dbg.exitSubRule(25);}
-
-
- }
- break;
-
- default :
- break loop26;
- }
- } while (true);
- } finally {dbg.exitSubRule(26);}
-
- dbg.location(590,3);
- RCURLY40=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_parameterModifiers988);
- RCURLY40_tree = (Object)adaptor.create(RCURLY40);
- adaptor.addChild(root_0, RCURLY40_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(591, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "parameterModifiers");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "parameterModifiers"
-
- public static class parameterModifier_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "parameterModifier"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:601:1: parameterModifier : ( 'ordered' | 'unique' | 'nonunique' | 'exception' | 'stream' ) ;
- public final ParameterLabelParser.parameterModifier_return parameterModifier() throws RecognitionException {
- ParameterLabelParser.parameterModifier_return retval = new ParameterLabelParser.parameterModifier_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token string_literal41=null;
- Token string_literal42=null;
- Token string_literal43=null;
- Token string_literal44=null;
- Token string_literal45=null;
-
- Object string_literal41_tree=null;
- Object string_literal42_tree=null;
- Object string_literal43_tree=null;
- Object string_literal44_tree=null;
- Object string_literal45_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "parameterModifier");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(601, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:602:3: ( ( 'ordered' | 'unique' | 'nonunique' | 'exception' | 'stream' ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:603:3: ( 'ordered' | 'unique' | 'nonunique' | 'exception' | 'stream' )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(603,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:603:3: ( 'ordered' | 'unique' | 'nonunique' | 'exception' | 'stream' )
- int alt27=5;
- try { dbg.enterSubRule(27);
- try { dbg.enterDecision(27);
-
- switch ( input.LA(1) ) {
- case 60:
- {
- alt27=1;
- }
- break;
- case 61:
- {
- alt27=2;
- }
- break;
- case 62:
- {
- alt27=3;
- }
- break;
- case 63:
- {
- alt27=4;
- }
- break;
- case 64:
- {
- alt27=5;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 27, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
-
- } finally {dbg.exitDecision(27);}
-
- switch (alt27) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:604:5: 'ordered'
- {
- dbg.location(604,5);
- string_literal41=(Token)match(input,60,FOLLOW_60_in_parameterModifier1028);
- string_literal41_tree = (Object)adaptor.create(string_literal41);
- adaptor.addChild(root_0, string_literal41_tree);
-
- dbg.location(604,17);
- isOrdered = true; modifiersUsed.put("ordered", true);
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:605:5: 'unique'
- {
- dbg.location(605,5);
- string_literal42=(Token)match(input,61,FOLLOW_61_in_parameterModifier1038);
- string_literal42_tree = (Object)adaptor.create(string_literal42);
- adaptor.addChild(root_0, string_literal42_tree);
-
- dbg.location(605,17);
- isUnique = true; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);
-
- }
- break;
- case 3 :
- dbg.enterAlt(3);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:606:5: 'nonunique'
- {
- dbg.location(606,5);
- string_literal43=(Token)match(input,62,FOLLOW_62_in_parameterModifier1049);
- string_literal43_tree = (Object)adaptor.create(string_literal43);
- adaptor.addChild(root_0, string_literal43_tree);
-
- dbg.location(606,17);
- isUnique = false; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);
-
- }
- break;
- case 4 :
- dbg.enterAlt(4);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:607:5: 'exception'
- {
- dbg.location(607,5);
- string_literal44=(Token)match(input,63,FOLLOW_63_in_parameterModifier1057);
- string_literal44_tree = (Object)adaptor.create(string_literal44);
- adaptor.addChild(root_0, string_literal44_tree);
-
- dbg.location(607,17);
- isException = true; modifiersUsed.put("exception", true);
-
- }
- break;
- case 5 :
- dbg.enterAlt(5);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\ParameterLabel.g:608:5: 'stream'
- {
- dbg.location(608,5);
- string_literal45=(Token)match(input,64,FOLLOW_64_in_parameterModifier1065);
- string_literal45_tree = (Object)adaptor.create(string_literal45);
- adaptor.addChild(root_0, string_literal45_tree);
-
- dbg.location(608,17);
- isStream = true; modifiersUsed.put("stream", true);
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(27);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("ParameterModifierRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(610, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "parameterModifier");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "parameterModifier"
-
- // Delegated rules
-
-
-
-
- public static final BitSet FOLLOW_WS_in_label46 = new BitSet(new long[]{0x0000000000007FD0L});
- public static final BitSet FOLLOW_visibility_in_label53 = new BitSet(new long[]{0x0000000000007FD0L});
- public static final BitSet FOLLOW_WS_in_label56 = new BitSet(new long[]{0x0000000000007FD0L});
- public static final BitSet FOLLOW_direction_in_label69 = new BitSet(new long[]{0x0000000000007FD0L});
- public static final BitSet FOLLOW_WS_in_label72 = new BitSet(new long[]{0x0000000000007FD0L});
- public static final BitSet FOLLOW_name_in_label84 = new BitSet(new long[]{0x0000000000000030L});
- public static final BitSet FOLLOW_WS_in_label87 = new BitSet(new long[]{0x0000000000000030L});
- public static final BitSet FOLLOW_COLON_in_label93 = new BitSet(new long[]{0x0800000000004010L});
- public static final BitSet FOLLOW_parameter_type_in_label100 = new BitSet(new long[]{0x0000000000308002L});
- public static final BitSet FOLLOW_fullMultiplicity_in_label108 = new BitSet(new long[]{0x0000000000300012L});
- public static final BitSet FOLLOW_WS_in_label113 = new BitSet(new long[]{0x0000000000300012L});
- public static final BitSet FOLLOW_defaultValue_in_label122 = new BitSet(new long[]{0x0000000000200002L});
- public static final BitSet FOLLOW_parameterModifiers_in_label132 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_WS_in_label137 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_PLUS_in_visibility202 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_MINUS_in_visibility217 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SHARP_in_visibility231 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_TILDE_in_visibility245 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IN_in_direction297 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_OUT_in_direction315 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INOUT_in_direction332 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RETURN_in_direction347 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_name389 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_WS_in_parameter_type438 = new BitSet(new long[]{0x0800000000004010L});
- public static final BitSet FOLLOW_type_in_parameter_type446 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_59_in_parameter_type454 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_type514 = new BitSet(new long[]{0x0000000000004012L});
- public static final BitSet FOLLOW_WS_in_type521 = new BitSet(new long[]{0x0000000000004012L});
- public static final BitSet FOLLOW_IDENTIFIER_in_type538 = new BitSet(new long[]{0x0000000000004012L});
- public static final BitSet FOLLOW_WS_in_type547 = new BitSet(new long[]{0x0000000000004012L});
- public static final BitSet FOLLOW_LSQUARE_in_fullMultiplicity600 = new BitSet(new long[]{0x0000000000030000L});
- public static final BitSet FOLLOW_RANGE_VALUE_in_fullMultiplicity620 = new BitSet(new long[]{0x0000000000040000L});
- public static final BitSet FOLLOW_INTEGER_in_fullMultiplicity630 = new BitSet(new long[]{0x0000000000040000L});
- public static final BitSet FOLLOW_RSQUARE_in_fullMultiplicity640 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INTEGER_in_lowerMultiplicity692 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_unlimitedNatural_in_upperMultiplicity713 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STAR_in_unlimitedNatural741 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INTEGER_in_unlimitedNatural756 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EQ_in_defaultValue782 = new BitSet(new long[]{0xFFFFFFFFFFDFFFF0L,0x0000000000000001L});
- public static final BitSet FOLLOW_expression_in_defaultValue788 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_set_in_expression882 = new BitSet(new long[]{0xFFFFFFFFFFDFFFF2L,0x0000000000000001L});
- public static final BitSet FOLLOW_LCURLY_in_parameterModifiers931 = new BitSet(new long[]{0xF000000000000010L,0x0000000000000001L});
- public static final BitSet FOLLOW_WS_in_parameterModifiers934 = new BitSet(new long[]{0xF000000000000010L,0x0000000000000001L});
- public static final BitSet FOLLOW_parameterModifier_in_parameterModifiers944 = new BitSet(new long[]{0x0000000000C00010L});
- public static final BitSet FOLLOW_WS_in_parameterModifiers947 = new BitSet(new long[]{0x0000000000C00010L});
- public static final BitSet FOLLOW_COMMA_in_parameterModifiers966 = new BitSet(new long[]{0xF000000000000010L,0x0000000000000001L});
- public static final BitSet FOLLOW_WS_in_parameterModifiers969 = new BitSet(new long[]{0xF000000000000010L,0x0000000000000001L});
- public static final BitSet FOLLOW_parameterModifier_in_parameterModifiers973 = new BitSet(new long[]{0x0000000000C00010L});
- public static final BitSet FOLLOW_WS_in_parameterModifiers976 = new BitSet(new long[]{0x0000000000C00010L});
- public static final BitSet FOLLOW_RCURLY_in_parameterModifiers988 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_60_in_parameterModifier1028 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_61_in_parameterModifier1038 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_62_in_parameterModifier1049 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_63_in_parameterModifier1057 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_64_in_parameterModifier1065 = new BitSet(new long[]{0x0000000000000002L});
-
-} \ No newline at end of file
diff --git a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelLexer.java b/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelLexer.java
deleted file mode 100644
index 133a4cd1197..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelLexer.java
+++ /dev/null
@@ -1,2343 +0,0 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g 2011-03-15 16:41:29
-
-package org.eclipse.papyrus.parsers.antlr;
-
-import org.eclipse.uml2.uml.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.IContext;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.HashMap;
-public class PropertyLabelLexer extends Lexer {
- public static final int DOUBLE_LT=43;
- public static final int COMMA=19;
- public static final int ISEQ=40;
- public static final int MINUS=7;
- public static final int INCR=48;
- public static final int T__57=57;
- public static final int SHARP=8;
- public static final int DOUBLE_RCURLY=29;
- public static final int DECR=49;
- public static final int ARROW=39;
- public static final int DOUBLE_GT=46;
- public static final int RULE_ASSIGN=38;
- public static final int TILDE=9;
- public static final int PIPE=32;
- public static final int DOUBLE_PIPE=33;
- public static final int INTEGER=14;
- public static final int RCURLY=20;
- public static final int QUESTION_MARK=22;
- public static final int NL=21;
- public static final int LCURLY=18;
- public static final int T__62=62;
- public static final int LE=44;
- public static final int RPAREN=27;
- public static final int T__61=61;
- public static final int LPAREN=26;
- public static final int T__59=59;
- public static final int PLUS=6;
- public static final int SINGLE_QUOTE=25;
- public static final int REAL=53;
- public static final int T__56=56;
- public static final int LSQUARE=12;
- public static final int RANGE=35;
- public static final int FOUR_POINTS=37;
- public static final int DOUBLE_LCURLY=28;
- public static final int POINT=34;
- public static final int WS=4;
- public static final int ALPHA=51;
- public static final int T__58=58;
- public static final int EQ=17;
- public static final int LT=42;
- public static final int DOUBLE_QUOTE=24;
- public static final int GT=45;
- public static final int DOUBLE_LOGICAL_AND=31;
- public static final int RSQUARE=15;
- public static final int RANGE_VALUE=13;
- public static final int T__55=55;
- public static final int SEMI=36;
- public static final int GE=47;
- public static final int LNOT=23;
- public static final int LOGICAL_AND=30;
- public static final int ISNE=41;
- public static final int EOF=-1;
- public static final int COLON=5;
- public static final int DIV=10;
- public static final int INTEGER_OR_REAL_OR_RANGE=54;
- public static final int STAR=16;
- public static final int IDENTIFIER=11;
- public static final int T__60=60;
- public static final int UNDERSCORE=52;
- public static final int CALLOPERATION=50;
-
- // delegates
- // delegators
-
- public PropertyLabelLexer() {;}
- public PropertyLabelLexer(CharStream input) {
- this(input, new RecognizerSharedState());
- }
- public PropertyLabelLexer(CharStream input, RecognizerSharedState state) {
- super(input,state);
-
- }
- public String getGrammarFileName() { return "D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g"; }
-
- // $ANTLR start "T__55"
- public final void mT__55() throws RecognitionException {
- try {
- int _type = T__55;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:22:7: ( '<Undefined>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:22:9: '<Undefined>'
- {
- match("<Undefined>"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__55"
-
- // $ANTLR start "T__56"
- public final void mT__56() throws RecognitionException {
- try {
- int _type = T__56;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:23:7: ( 'readOnly' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:23:9: 'readOnly'
- {
- match("readOnly"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__56"
-
- // $ANTLR start "T__57"
- public final void mT__57() throws RecognitionException {
- try {
- int _type = T__57;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:24:7: ( 'union' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:24:9: 'union'
- {
- match("union"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__57"
-
- // $ANTLR start "T__58"
- public final void mT__58() throws RecognitionException {
- try {
- int _type = T__58;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:25:7: ( 'ordered' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:25:9: 'ordered'
- {
- match("ordered"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__58"
-
- // $ANTLR start "T__59"
- public final void mT__59() throws RecognitionException {
- try {
- int _type = T__59;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:26:7: ( 'unique' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:26:9: 'unique'
- {
- match("unique"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__59"
-
- // $ANTLR start "T__60"
- public final void mT__60() throws RecognitionException {
- try {
- int _type = T__60;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:27:7: ( 'nonunique' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:27:9: 'nonunique'
- {
- match("nonunique"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__60"
-
- // $ANTLR start "T__61"
- public final void mT__61() throws RecognitionException {
- try {
- int _type = T__61;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:28:7: ( 'subsets' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:28:9: 'subsets'
- {
- match("subsets"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__61"
-
- // $ANTLR start "T__62"
- public final void mT__62() throws RecognitionException {
- try {
- int _type = T__62;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:29:7: ( 'redefines' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:29:9: 'redefines'
- {
- match("redefines"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "T__62"
-
- // $ANTLR start "NL"
- public final void mNL() throws RecognitionException {
- try {
- int _type = NL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:781:3: ( ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' ) )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:781:5: ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' )
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:781:5: ( '\\r' '\\n' | '\\n' '\\r' | '\\r' | '\\n' )
- int alt1=4;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0=='\r') ) {
- int LA1_1 = input.LA(2);
-
- if ( (LA1_1=='\n') ) {
- alt1=1;
- }
- else {
- alt1=3;}
- }
- else if ( (LA1_0=='\n') ) {
- int LA1_2 = input.LA(2);
-
- if ( (LA1_2=='\r') ) {
- alt1=2;
- }
- else {
- alt1=4;}
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 1, 0, input);
-
- throw nvae;
- }
- switch (alt1) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:781:7: '\\r' '\\n'
- {
- match('\r'); if (state.failed) return ;
- match('\n'); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:782:7: '\\n' '\\r'
- {
- match('\n'); if (state.failed) return ;
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:783:7: '\\r'
- {
- match('\r'); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:784:7: '\\n'
- {
- match('\n'); if (state.failed) return ;
-
- }
- break;
-
- }
-
- if ( state.backtracking==0 ) {
- _channel=HIDDEN;
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "NL"
-
- // $ANTLR start "WS"
- public final void mWS() throws RecognitionException {
- try {
- int _type = WS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:791:3: ( ( ' ' | '\\t' | '\\f' )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:791:6: ( ' ' | '\\t' | '\\f' )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:791:6: ( ' ' | '\\t' | '\\f' )+
- int cnt2=0;
- loop2:
- do {
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0=='\t'||LA2_0=='\f'||LA2_0==' ') ) {
- alt2=1;
- }
-
-
- switch (alt2) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:
- {
- if ( input.LA(1)=='\t'||input.LA(1)=='\f'||input.LA(1)==' ' ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt2 >= 1 ) break loop2;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(2, input);
- throw eee;
- }
- cnt2++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "WS"
-
- // $ANTLR start "QUESTION_MARK"
- public final void mQUESTION_MARK() throws RecognitionException {
- try {
- int _type = QUESTION_MARK;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:795:3: ( '?' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:795:5: '?'
- {
- match('?'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "QUESTION_MARK"
-
- // $ANTLR start "LNOT"
- public final void mLNOT() throws RecognitionException {
- try {
- int _type = LNOT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:799:3: ( '!' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:799:5: '!'
- {
- match('!'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LNOT"
-
- // $ANTLR start "DOUBLE_QUOTE"
- public final void mDOUBLE_QUOTE() throws RecognitionException {
- try {
- int _type = DOUBLE_QUOTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:803:3: ( '\\\"' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:803:5: '\\\"'
- {
- match('\"'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_QUOTE"
-
- // $ANTLR start "SINGLE_QUOTE"
- public final void mSINGLE_QUOTE() throws RecognitionException {
- try {
- int _type = SINGLE_QUOTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:807:3: ( '\\'' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:807:5: '\\''
- {
- match('\''); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SINGLE_QUOTE"
-
- // $ANTLR start "LPAREN"
- public final void mLPAREN() throws RecognitionException {
- try {
- int _type = LPAREN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:811:3: ( '(' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:811:5: '('
- {
- match('('); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LPAREN"
-
- // $ANTLR start "RPAREN"
- public final void mRPAREN() throws RecognitionException {
- try {
- int _type = RPAREN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:815:3: ( ')' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:815:5: ')'
- {
- match(')'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RPAREN"
-
- // $ANTLR start "LSQUARE"
- public final void mLSQUARE() throws RecognitionException {
- try {
- int _type = LSQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:819:3: ( '[' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:819:5: '['
- {
- match('['); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LSQUARE"
-
- // $ANTLR start "RSQUARE"
- public final void mRSQUARE() throws RecognitionException {
- try {
- int _type = RSQUARE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:823:3: ( ']' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:823:5: ']'
- {
- match(']'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RSQUARE"
-
- // $ANTLR start "LCURLY"
- public final void mLCURLY() throws RecognitionException {
- try {
- int _type = LCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:827:3: ( '{' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:827:5: '{'
- {
- match('{'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LCURLY"
-
- // $ANTLR start "DOUBLE_LCURLY"
- public final void mDOUBLE_LCURLY() throws RecognitionException {
- try {
- int _type = DOUBLE_LCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:831:3: ( '{{' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:831:5: '{{'
- {
- match("{{"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LCURLY"
-
- // $ANTLR start "RCURLY"
- public final void mRCURLY() throws RecognitionException {
- try {
- int _type = RCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:834:3: ( '}' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:834:5: '}'
- {
- match('}'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RCURLY"
-
- // $ANTLR start "DOUBLE_RCURLY"
- public final void mDOUBLE_RCURLY() throws RecognitionException {
- try {
- int _type = DOUBLE_RCURLY;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:838:3: ( '}}' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:838:5: '}}'
- {
- match("}}"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_RCURLY"
-
- // $ANTLR start "LOGICAL_AND"
- public final void mLOGICAL_AND() throws RecognitionException {
- try {
- int _type = LOGICAL_AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:842:3: ( '&' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:842:5: '&'
- {
- match('&'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LOGICAL_AND"
-
- // $ANTLR start "DOUBLE_LOGICAL_AND"
- public final void mDOUBLE_LOGICAL_AND() throws RecognitionException {
- try {
- int _type = DOUBLE_LOGICAL_AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:846:3: ( '&&' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:846:5: '&&'
- {
- match("&&"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LOGICAL_AND"
-
- // $ANTLR start "PIPE"
- public final void mPIPE() throws RecognitionException {
- try {
- int _type = PIPE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:850:3: ( '|' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:850:5: '|'
- {
- match('|'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "PIPE"
-
- // $ANTLR start "DOUBLE_PIPE"
- public final void mDOUBLE_PIPE() throws RecognitionException {
- try {
- int _type = DOUBLE_PIPE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:854:3: ( '||' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:854:5: '||'
- {
- match("||"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_PIPE"
-
- // $ANTLR start "POINT"
- public final void mPOINT() throws RecognitionException {
- try {
- int _type = POINT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:858:3: ( '.' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:858:5: '.'
- {
- match('.'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "POINT"
-
- // $ANTLR start "RANGE"
- public final void mRANGE() throws RecognitionException {
- try {
- int _type = RANGE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:862:3: ( '..' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:862:5: '..'
- {
- match(".."); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RANGE"
-
- // $ANTLR start "COMMA"
- public final void mCOMMA() throws RecognitionException {
- try {
- int _type = COMMA;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:866:3: ( ',' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:866:5: ','
- {
- match(','); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COMMA"
-
- // $ANTLR start "SEMI"
- public final void mSEMI() throws RecognitionException {
- try {
- int _type = SEMI;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:870:3: ( ';' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:870:5: ';'
- {
- match(';'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SEMI"
-
- // $ANTLR start "SHARP"
- public final void mSHARP() throws RecognitionException {
- try {
- int _type = SHARP;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:874:3: ( '#' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:874:5: '#'
- {
- match('#'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "SHARP"
-
- // $ANTLR start "TILDE"
- public final void mTILDE() throws RecognitionException {
- try {
- int _type = TILDE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:878:3: ( '~' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:878:5: '~'
- {
- match('~'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "TILDE"
-
- // $ANTLR start "COLON"
- public final void mCOLON() throws RecognitionException {
- try {
- int _type = COLON;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:882:3: ( ':' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:882:5: ':'
- {
- match(':'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "COLON"
-
- // $ANTLR start "FOUR_POINTS"
- public final void mFOUR_POINTS() throws RecognitionException {
- try {
- int _type = FOUR_POINTS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:886:3: ( '::' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:886:5: '::'
- {
- match("::"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "FOUR_POINTS"
-
- // $ANTLR start "RULE_ASSIGN"
- public final void mRULE_ASSIGN() throws RecognitionException {
- try {
- int _type = RULE_ASSIGN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:890:3: ( '::=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:890:5: '::='
- {
- match("::="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RULE_ASSIGN"
-
- // $ANTLR start "ARROW"
- public final void mARROW() throws RecognitionException {
- try {
- int _type = ARROW;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:893:3: ( '->' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:893:5: '->'
- {
- match("->"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ARROW"
-
- // $ANTLR start "STAR"
- public final void mSTAR() throws RecognitionException {
- try {
- int _type = STAR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:897:3: ( '*' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:897:5: '*'
- {
- match('*'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "STAR"
-
- // $ANTLR start "DIV"
- public final void mDIV() throws RecognitionException {
- try {
- int _type = DIV;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:901:3: ( '/' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:901:5: '/'
- {
- match('/'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DIV"
-
- // $ANTLR start "PLUS"
- public final void mPLUS() throws RecognitionException {
- try {
- int _type = PLUS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:905:3: ( '+' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:905:5: '+'
- {
- match('+'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "PLUS"
-
- // $ANTLR start "MINUS"
- public final void mMINUS() throws RecognitionException {
- try {
- int _type = MINUS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:909:3: ( '-' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:909:5: '-'
- {
- match('-'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "MINUS"
-
- // $ANTLR start "EQ"
- public final void mEQ() throws RecognitionException {
- try {
- int _type = EQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:913:3: ( '=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:913:5: '='
- {
- match('='); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "EQ"
-
- // $ANTLR start "ISEQ"
- public final void mISEQ() throws RecognitionException {
- try {
- int _type = ISEQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:918:3: ( '==' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:918:5: '=='
- {
- match("=="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ISEQ"
-
- // $ANTLR start "ISNE"
- public final void mISNE() throws RecognitionException {
- try {
- int _type = ISNE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:922:3: ( '!=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:922:5: '!='
- {
- match("!="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "ISNE"
-
- // $ANTLR start "LT"
- public final void mLT() throws RecognitionException {
- try {
- int _type = LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:925:4: ( '<' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:925:6: '<'
- {
- match('<'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LT"
-
- // $ANTLR start "DOUBLE_LT"
- public final void mDOUBLE_LT() throws RecognitionException {
- try {
- int _type = DOUBLE_LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:928:3: ( '<<' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:928:5: '<<'
- {
- match("<<"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_LT"
-
- // $ANTLR start "LE"
- public final void mLE() throws RecognitionException {
- try {
- int _type = LE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:932:3: ( '<=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:932:5: '<='
- {
- match("<="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "LE"
-
- // $ANTLR start "GT"
- public final void mGT() throws RecognitionException {
- try {
- int _type = GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:936:3: ( '>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:936:5: '>'
- {
- match('>'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "GT"
-
- // $ANTLR start "DOUBLE_GT"
- public final void mDOUBLE_GT() throws RecognitionException {
- try {
- int _type = DOUBLE_GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:940:3: ( '>>' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:940:5: '>>'
- {
- match(">>"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DOUBLE_GT"
-
- // $ANTLR start "GE"
- public final void mGE() throws RecognitionException {
- try {
- int _type = GE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:944:3: ( '>=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:944:5: '>='
- {
- match(">="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "GE"
-
- // $ANTLR start "INCR"
- public final void mINCR() throws RecognitionException {
- try {
- int _type = INCR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:949:3: ( '++' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:949:5: '++'
- {
- match("++"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INCR"
-
- // $ANTLR start "DECR"
- public final void mDECR() throws RecognitionException {
- try {
- int _type = DECR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:953:3: ( '--' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:953:5: '--'
- {
- match("--"); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "DECR"
-
- // $ANTLR start "CALLOPERATION"
- public final void mCALLOPERATION() throws RecognitionException {
- try {
- int _type = CALLOPERATION;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:957:3: ( ':=' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:957:5: ':='
- {
- match(":="); if (state.failed) return ;
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "CALLOPERATION"
-
- // $ANTLR start "ALPHA"
- public final void mALPHA() throws RecognitionException {
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:962:3: ( 'a' .. 'z' | 'A' .. 'Z' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:
- {
- if ( (input.LA(1)>='A' && input.LA(1)<='Z')||(input.LA(1)>='a' && input.LA(1)<='z') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
-
- }
- finally {
- }
- }
- // $ANTLR end "ALPHA"
-
- // $ANTLR start "UNDERSCORE"
- public final void mUNDERSCORE() throws RecognitionException {
- try {
- int _type = UNDERSCORE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:968:3: ( '_' )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:968:5: '_'
- {
- match('_'); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "UNDERSCORE"
-
- // $ANTLR start "RANGE_VALUE"
- public final void mRANGE_VALUE() throws RecognitionException {
- try {
- int _type = RANGE_VALUE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- CommonToken c1=null;
- CommonToken c2=null;
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:972:3: (c1= INTEGER '..' (c2= INTEGER | c2= STAR ) )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:972:5: c1= INTEGER '..' (c2= INTEGER | c2= STAR )
- {
- int c1Start826 = getCharIndex();
- mINTEGER(); if (state.failed) return ;
- c1 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c1Start826, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText("");
- }
- match(".."); if (state.failed) return ;
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:973:3: (c2= INTEGER | c2= STAR )
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( ((LA3_0>='0' && LA3_0<='9')) ) {
- alt3=1;
- }
- else if ( (LA3_0=='*') ) {
- alt3=2;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- NoViableAltException nvae =
- new NoViableAltException("", 3, 0, input);
-
- throw nvae;
- }
- switch (alt3) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:973:5: c2= INTEGER
- {
- int c2Start838 = getCharIndex();
- mINTEGER(); if (state.failed) return ;
- c2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c2Start838, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText((c2!=null?c2.getText():null));
- }
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:974:7: c2= STAR
- {
- int c2Start851 = getCharIndex();
- mSTAR(); if (state.failed) return ;
- c2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, c2Start851, getCharIndex()-1);
- if ( state.backtracking==0 ) {
- setText("-1");
- }
-
- }
- break;
-
- }
-
- if ( state.backtracking==0 ) {
-
- setText(getText() + ","+ (c1!=null?c1.getText():null));
-
- }
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "RANGE_VALUE"
-
- // $ANTLR start "REAL"
- public final void mREAL() throws RecognitionException {
- try {
- int _type = REAL;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:981:3: ( INTEGER '.' INTEGER )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:981:5: INTEGER '.' INTEGER
- {
- mINTEGER(); if (state.failed) return ;
- match('.'); if (state.failed) return ;
- mINTEGER(); if (state.failed) return ;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "REAL"
-
- // $ANTLR start "INTEGER_OR_REAL_OR_RANGE"
- public final void mINTEGER_OR_REAL_OR_RANGE() throws RecognitionException {
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:986:3: ( ( INTEGER RANGE )=> RANGE_VALUE | ( INTEGER POINT )=> REAL | ( INTEGER )=> INTEGER )
- int alt4=3;
- alt4 = dfa4.predict(input);
- switch (alt4) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:987:4: ( INTEGER RANGE )=> RANGE_VALUE
- {
- mRANGE_VALUE(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:988:6: ( INTEGER POINT )=> REAL
- {
- mREAL(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:989:6: ( INTEGER )=> INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- break;
-
- }
- }
- finally {
- }
- }
- // $ANTLR end "INTEGER_OR_REAL_OR_RANGE"
-
- // $ANTLR start "INTEGER"
- public final void mINTEGER() throws RecognitionException {
- try {
- int _type = INTEGER;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:993:3: ( ( '0' .. '9' )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:993:5: ( '0' .. '9' )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:993:5: ( '0' .. '9' )+
- int cnt5=0;
- loop5:
- do {
- int alt5=2;
- int LA5_0 = input.LA(1);
-
- if ( ((LA5_0>='0' && LA5_0<='9')) ) {
- alt5=1;
- }
-
-
- switch (alt5) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:993:5: '0' .. '9'
- {
- matchRange('0','9'); if (state.failed) return ;
-
- }
- break;
-
- default :
- if ( cnt5 >= 1 ) break loop5;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(5, input);
- throw eee;
- }
- cnt5++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "INTEGER"
-
- // $ANTLR start "IDENTIFIER"
- public final void mIDENTIFIER() throws RecognitionException {
- try {
- int _type = IDENTIFIER;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:996:3: ( ( ALPHA | '0' .. '9' | UNDERSCORE )+ )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:996:5: ( ALPHA | '0' .. '9' | UNDERSCORE )+
- {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:996:5: ( ALPHA | '0' .. '9' | UNDERSCORE )+
- int cnt6=0;
- loop6:
- do {
- int alt6=2;
- int LA6_0 = input.LA(1);
-
- if ( ((LA6_0>='0' && LA6_0<='9')||(LA6_0>='A' && LA6_0<='Z')||LA6_0=='_'||(LA6_0>='a' && LA6_0<='z')) ) {
- alt6=1;
- }
-
-
- switch (alt6) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:
- {
- if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z') ) {
- input.consume();
- state.failed=false;
- }
- else {
- if (state.backtracking>0) {state.failed=true; return ;}
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;}
-
-
- }
- break;
-
- default :
- if ( cnt6 >= 1 ) break loop6;
- if (state.backtracking>0) {state.failed=true; return ;}
- EarlyExitException eee =
- new EarlyExitException(6, input);
- throw eee;
- }
- cnt6++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- }
- }
- // $ANTLR end "IDENTIFIER"
-
- public void mTokens() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:8: ( T__55 | T__56 | T__57 | T__58 | T__59 | T__60 | T__61 | T__62 | NL | WS | QUESTION_MARK | LNOT | DOUBLE_QUOTE | SINGLE_QUOTE | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | DOUBLE_LCURLY | RCURLY | DOUBLE_RCURLY | LOGICAL_AND | DOUBLE_LOGICAL_AND | PIPE | DOUBLE_PIPE | POINT | RANGE | COMMA | SEMI | SHARP | TILDE | COLON | FOUR_POINTS | RULE_ASSIGN | ARROW | STAR | DIV | PLUS | MINUS | EQ | ISEQ | ISNE | LT | DOUBLE_LT | LE | GT | DOUBLE_GT | GE | INCR | DECR | CALLOPERATION | UNDERSCORE | RANGE_VALUE | REAL | INTEGER | IDENTIFIER )
- int alt7=57;
- alt7 = dfa7.predict(input);
- switch (alt7) {
- case 1 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:10: T__55
- {
- mT__55(); if (state.failed) return ;
-
- }
- break;
- case 2 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:16: T__56
- {
- mT__56(); if (state.failed) return ;
-
- }
- break;
- case 3 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:22: T__57
- {
- mT__57(); if (state.failed) return ;
-
- }
- break;
- case 4 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:28: T__58
- {
- mT__58(); if (state.failed) return ;
-
- }
- break;
- case 5 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:34: T__59
- {
- mT__59(); if (state.failed) return ;
-
- }
- break;
- case 6 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:40: T__60
- {
- mT__60(); if (state.failed) return ;
-
- }
- break;
- case 7 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:46: T__61
- {
- mT__61(); if (state.failed) return ;
-
- }
- break;
- case 8 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:52: T__62
- {
- mT__62(); if (state.failed) return ;
-
- }
- break;
- case 9 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:58: NL
- {
- mNL(); if (state.failed) return ;
-
- }
- break;
- case 10 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:61: WS
- {
- mWS(); if (state.failed) return ;
-
- }
- break;
- case 11 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:64: QUESTION_MARK
- {
- mQUESTION_MARK(); if (state.failed) return ;
-
- }
- break;
- case 12 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:78: LNOT
- {
- mLNOT(); if (state.failed) return ;
-
- }
- break;
- case 13 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:83: DOUBLE_QUOTE
- {
- mDOUBLE_QUOTE(); if (state.failed) return ;
-
- }
- break;
- case 14 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:96: SINGLE_QUOTE
- {
- mSINGLE_QUOTE(); if (state.failed) return ;
-
- }
- break;
- case 15 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:109: LPAREN
- {
- mLPAREN(); if (state.failed) return ;
-
- }
- break;
- case 16 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:116: RPAREN
- {
- mRPAREN(); if (state.failed) return ;
-
- }
- break;
- case 17 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:123: LSQUARE
- {
- mLSQUARE(); if (state.failed) return ;
-
- }
- break;
- case 18 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:131: RSQUARE
- {
- mRSQUARE(); if (state.failed) return ;
-
- }
- break;
- case 19 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:139: LCURLY
- {
- mLCURLY(); if (state.failed) return ;
-
- }
- break;
- case 20 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:146: DOUBLE_LCURLY
- {
- mDOUBLE_LCURLY(); if (state.failed) return ;
-
- }
- break;
- case 21 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:160: RCURLY
- {
- mRCURLY(); if (state.failed) return ;
-
- }
- break;
- case 22 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:167: DOUBLE_RCURLY
- {
- mDOUBLE_RCURLY(); if (state.failed) return ;
-
- }
- break;
- case 23 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:181: LOGICAL_AND
- {
- mLOGICAL_AND(); if (state.failed) return ;
-
- }
- break;
- case 24 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:193: DOUBLE_LOGICAL_AND
- {
- mDOUBLE_LOGICAL_AND(); if (state.failed) return ;
-
- }
- break;
- case 25 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:212: PIPE
- {
- mPIPE(); if (state.failed) return ;
-
- }
- break;
- case 26 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:217: DOUBLE_PIPE
- {
- mDOUBLE_PIPE(); if (state.failed) return ;
-
- }
- break;
- case 27 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:229: POINT
- {
- mPOINT(); if (state.failed) return ;
-
- }
- break;
- case 28 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:235: RANGE
- {
- mRANGE(); if (state.failed) return ;
-
- }
- break;
- case 29 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:241: COMMA
- {
- mCOMMA(); if (state.failed) return ;
-
- }
- break;
- case 30 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:247: SEMI
- {
- mSEMI(); if (state.failed) return ;
-
- }
- break;
- case 31 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:252: SHARP
- {
- mSHARP(); if (state.failed) return ;
-
- }
- break;
- case 32 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:258: TILDE
- {
- mTILDE(); if (state.failed) return ;
-
- }
- break;
- case 33 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:264: COLON
- {
- mCOLON(); if (state.failed) return ;
-
- }
- break;
- case 34 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:270: FOUR_POINTS
- {
- mFOUR_POINTS(); if (state.failed) return ;
-
- }
- break;
- case 35 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:282: RULE_ASSIGN
- {
- mRULE_ASSIGN(); if (state.failed) return ;
-
- }
- break;
- case 36 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:294: ARROW
- {
- mARROW(); if (state.failed) return ;
-
- }
- break;
- case 37 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:300: STAR
- {
- mSTAR(); if (state.failed) return ;
-
- }
- break;
- case 38 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:305: DIV
- {
- mDIV(); if (state.failed) return ;
-
- }
- break;
- case 39 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:309: PLUS
- {
- mPLUS(); if (state.failed) return ;
-
- }
- break;
- case 40 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:314: MINUS
- {
- mMINUS(); if (state.failed) return ;
-
- }
- break;
- case 41 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:320: EQ
- {
- mEQ(); if (state.failed) return ;
-
- }
- break;
- case 42 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:323: ISEQ
- {
- mISEQ(); if (state.failed) return ;
-
- }
- break;
- case 43 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:328: ISNE
- {
- mISNE(); if (state.failed) return ;
-
- }
- break;
- case 44 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:333: LT
- {
- mLT(); if (state.failed) return ;
-
- }
- break;
- case 45 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:336: DOUBLE_LT
- {
- mDOUBLE_LT(); if (state.failed) return ;
-
- }
- break;
- case 46 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:346: LE
- {
- mLE(); if (state.failed) return ;
-
- }
- break;
- case 47 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:349: GT
- {
- mGT(); if (state.failed) return ;
-
- }
- break;
- case 48 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:352: DOUBLE_GT
- {
- mDOUBLE_GT(); if (state.failed) return ;
-
- }
- break;
- case 49 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:362: GE
- {
- mGE(); if (state.failed) return ;
-
- }
- break;
- case 50 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:365: INCR
- {
- mINCR(); if (state.failed) return ;
-
- }
- break;
- case 51 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:370: DECR
- {
- mDECR(); if (state.failed) return ;
-
- }
- break;
- case 52 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:375: CALLOPERATION
- {
- mCALLOPERATION(); if (state.failed) return ;
-
- }
- break;
- case 53 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:389: UNDERSCORE
- {
- mUNDERSCORE(); if (state.failed) return ;
-
- }
- break;
- case 54 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:400: RANGE_VALUE
- {
- mRANGE_VALUE(); if (state.failed) return ;
-
- }
- break;
- case 55 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:412: REAL
- {
- mREAL(); if (state.failed) return ;
-
- }
- break;
- case 56 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:417: INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- break;
- case 57 :
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:1:425: IDENTIFIER
- {
- mIDENTIFIER(); if (state.failed) return ;
-
- }
- break;
-
- }
-
- }
-
- // $ANTLR start synpred1_PropertyLabel
- public final void synpred1_PropertyLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:987:4: ( INTEGER RANGE )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:987:5: INTEGER RANGE
- {
- mINTEGER(); if (state.failed) return ;
- mRANGE(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred1_PropertyLabel
-
- // $ANTLR start synpred2_PropertyLabel
- public final void synpred2_PropertyLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:988:6: ( INTEGER POINT )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:988:7: INTEGER POINT
- {
- mINTEGER(); if (state.failed) return ;
- mPOINT(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred2_PropertyLabel
-
- // $ANTLR start synpred3_PropertyLabel
- public final void synpred3_PropertyLabel_fragment() throws RecognitionException {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:989:6: ( INTEGER )
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:989:7: INTEGER
- {
- mINTEGER(); if (state.failed) return ;
-
- }
- }
- // $ANTLR end synpred3_PropertyLabel
-
- public final boolean synpred1_PropertyLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred1_PropertyLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred2_PropertyLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred2_PropertyLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
- public final boolean synpred3_PropertyLabel() {
- state.backtracking++;
- int start = input.mark();
- try {
- synpred3_PropertyLabel_fragment(); // can never throw exception
- } catch (RecognitionException re) {
- System.err.println("impossible: "+re);
- }
- boolean success = !state.failed;
- input.rewind(start);
- state.backtracking--;
- state.failed=false;
- return success;
- }
-
-
- protected DFA4 dfa4 = new DFA4(this);
- protected DFA7 dfa7 = new DFA7(this);
- static final String DFA4_eotS =
- "\1\uffff\1\2\4\uffff";
- static final String DFA4_eofS =
- "\6\uffff";
- static final String DFA4_minS =
- "\1\60\1\56\1\uffff\1\56\2\uffff";
- static final String DFA4_maxS =
- "\2\71\1\uffff\1\71\2\uffff";
- static final String DFA4_acceptS =
- "\2\uffff\1\3\1\uffff\1\1\1\2";
- static final String DFA4_specialS =
- "\1\uffff\1\0\1\uffff\1\1\2\uffff}>";
- static final String[] DFA4_transitionS = {
- "\12\1",
- "\1\3\1\uffff\12\1",
- "",
- "\1\4\1\uffff\12\5",
- "",
- ""
- };
-
- static final short[] DFA4_eot = DFA.unpackEncodedString(DFA4_eotS);
- static final short[] DFA4_eof = DFA.unpackEncodedString(DFA4_eofS);
- static final char[] DFA4_min = DFA.unpackEncodedStringToUnsignedChars(DFA4_minS);
- static final char[] DFA4_max = DFA.unpackEncodedStringToUnsignedChars(DFA4_maxS);
- static final short[] DFA4_accept = DFA.unpackEncodedString(DFA4_acceptS);
- static final short[] DFA4_special = DFA.unpackEncodedString(DFA4_specialS);
- static final short[][] DFA4_transition;
-
- static {
- int numStates = DFA4_transitionS.length;
- DFA4_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA4_transition[i] = DFA.unpackEncodedString(DFA4_transitionS[i]);
- }
- }
-
- class DFA4 extends DFA {
-
- public DFA4(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 4;
- this.eot = DFA4_eot;
- this.eof = DFA4_eof;
- this.min = DFA4_min;
- this.max = DFA4_max;
- this.accept = DFA4_accept;
- this.special = DFA4_special;
- this.transition = DFA4_transition;
- }
- public String getDescription() {
- return "984:1: fragment INTEGER_OR_REAL_OR_RANGE : ( ( INTEGER RANGE )=> RANGE_VALUE | ( INTEGER POINT )=> REAL | ( INTEGER )=> INTEGER );";
- }
- public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
- IntStream input = _input;
- int _s = s;
- switch ( s ) {
- case 0 :
- int LA4_1 = input.LA(1);
-
-
- int index4_1 = input.index();
- input.rewind();
- s = -1;
- if ( (LA4_1=='.') ) {s = 3;}
-
- else if ( ((LA4_1>='0' && LA4_1<='9')) ) {s = 1;}
-
- else s = 2;
-
-
- input.seek(index4_1);
- if ( s>=0 ) return s;
- break;
- case 1 :
- int LA4_3 = input.LA(1);
-
-
- int index4_3 = input.index();
- input.rewind();
- s = -1;
- if ( (LA4_3=='.') && (synpred1_PropertyLabel())) {s = 4;}
-
- else if ( ((LA4_3>='0' && LA4_3<='9')) && (synpred2_PropertyLabel())) {s = 5;}
-
-
- input.seek(index4_3);
- if ( s>=0 ) return s;
- break;
- }
- if (state.backtracking>0) {state.failed=true; return -1;}
- NoViableAltException nvae =
- new NoViableAltException(getDescription(), 4, _s, input);
- error(nvae);
- throw nvae;
- }
- }
- static final String DFA7_eotS =
- "\1\uffff\1\47\5\43\3\uffff\1\56\6\uffff\1\60\1\62\1\64\1\66\1\70"+
- "\4\uffff\1\73\1\76\2\uffff\1\100\1\102\1\105\1\106\1\107\5\uffff"+
- "\5\43\14\uffff\1\120\17\uffff\6\43\4\uffff\11\43\1\143\6\43\1\uffff"+
- "\1\152\5\43\1\uffff\1\160\1\43\1\162\1\163\1\43\1\uffff\1\43\2\uffff"+
- "\1\166\1\167\2\uffff";
- static final String DFA7_eofS =
- "\170\uffff";
- static final String DFA7_minS =
- "\1\11\1\74\1\145\1\156\1\162\1\157\1\165\3\uffff\1\75\6\uffff\1"+
- "\173\1\175\1\46\1\174\1\56\4\uffff\1\72\1\55\2\uffff\1\53\2\75\1"+
- "\60\1\56\5\uffff\1\141\1\151\1\144\1\156\1\142\14\uffff\1\75\16"+
- "\uffff\1\56\1\144\1\145\1\157\1\145\1\165\1\163\4\uffff\1\117\1"+
- "\146\1\156\1\165\1\162\1\156\1\145\1\156\1\151\1\60\2\145\1\151"+
- "\1\164\1\154\1\156\1\uffff\1\60\1\144\1\161\1\163\1\171\1\145\1"+
- "\uffff\1\60\1\165\2\60\1\163\1\uffff\1\145\2\uffff\2\60\2\uffff";
- static final String DFA7_maxS =
- "\1\176\1\125\1\145\1\156\1\162\1\157\1\165\3\uffff\1\75\6\uffff"+
- "\1\173\1\175\1\46\1\174\1\56\4\uffff\1\75\1\76\2\uffff\1\53\1\75"+
- "\1\76\2\172\5\uffff\1\144\1\151\1\144\1\156\1\142\14\uffff\1\75"+
- "\16\uffff\1\71\1\144\1\145\1\161\1\145\1\165\1\163\4\uffff\1\117"+
- "\1\146\1\156\1\165\1\162\1\156\1\145\1\156\1\151\1\172\2\145\1\151"+
- "\1\164\1\154\1\156\1\uffff\1\172\1\144\1\161\1\163\1\171\1\145\1"+
- "\uffff\1\172\1\165\2\172\1\163\1\uffff\1\145\2\uffff\2\172\2\uffff";
- static final String DFA7_acceptS =
- "\7\uffff\1\11\1\12\1\13\1\uffff\1\15\1\16\1\17\1\20\1\21\1\22\5"+
- "\uffff\1\35\1\36\1\37\1\40\2\uffff\1\45\1\46\5\uffff\1\71\1\1\1"+
- "\55\1\56\1\54\5\uffff\1\53\1\14\1\24\1\23\1\26\1\25\1\30\1\27\1"+
- "\32\1\31\1\34\1\33\1\uffff\1\64\1\41\1\44\1\63\1\50\1\62\1\47\1"+
- "\52\1\51\1\60\1\61\1\57\1\65\1\70\7\uffff\1\43\1\42\1\66\1\67\20"+
- "\uffff\1\3\6\uffff\1\5\5\uffff\1\4\1\uffff\1\7\1\2\2\uffff\1\10"+
- "\1\6";
- static final String DFA7_specialS =
- "\170\uffff}>";
- static final String[] DFA7_transitionS = {
- "\1\10\1\7\1\uffff\1\10\1\7\22\uffff\1\10\1\12\1\13\1\30\2\uffff"+
- "\1\23\1\14\1\15\1\16\1\34\1\36\1\26\1\33\1\25\1\35\12\42\1\32"+
- "\1\27\1\1\1\37\1\40\1\11\1\uffff\32\43\1\17\1\uffff\1\20\1\uffff"+
- "\1\41\1\uffff\15\43\1\5\1\4\2\43\1\2\1\6\1\43\1\3\5\43\1\21"+
- "\1\24\1\22\1\31",
- "\1\45\1\46\27\uffff\1\44",
- "\1\50",
- "\1\51",
- "\1\52",
- "\1\53",
- "\1\54",
- "",
- "",
- "",
- "\1\55",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\57",
- "\1\61",
- "\1\63",
- "\1\65",
- "\1\67",
- "",
- "",
- "",
- "",
- "\1\71\2\uffff\1\72",
- "\1\75\20\uffff\1\74",
- "",
- "",
- "\1\77",
- "\1\101",
- "\1\104\1\103",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\1\110\1\uffff\12\42\7\uffff\32\43\4\uffff\1\43\1\uffff\32"+
- "\43",
- "",
- "",
- "",
- "",
- "",
- "\1\111\2\uffff\1\112",
- "\1\113",
- "\1\114",
- "\1\115",
- "\1\116",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\117",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "\1\121\1\uffff\12\122",
- "\1\123",
- "\1\124",
- "\1\125\1\uffff\1\126",
- "\1\127",
- "\1\130",
- "\1\131",
- "",
- "",
- "",
- "",
- "\1\132",
- "\1\133",
- "\1\134",
- "\1\135",
- "\1\136",
- "\1\137",
- "\1\140",
- "\1\141",
- "\1\142",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\1\144",
- "\1\145",
- "\1\146",
- "\1\147",
- "\1\150",
- "\1\151",
- "",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\1\153",
- "\1\154",
- "\1\155",
- "\1\156",
- "\1\157",
- "",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\1\161",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\1\164",
- "",
- "\1\165",
- "",
- "",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "\12\43\7\uffff\32\43\4\uffff\1\43\1\uffff\32\43",
- "",
- ""
- };
-
- static final short[] DFA7_eot = DFA.unpackEncodedString(DFA7_eotS);
- static final short[] DFA7_eof = DFA.unpackEncodedString(DFA7_eofS);
- static final char[] DFA7_min = DFA.unpackEncodedStringToUnsignedChars(DFA7_minS);
- static final char[] DFA7_max = DFA.unpackEncodedStringToUnsignedChars(DFA7_maxS);
- static final short[] DFA7_accept = DFA.unpackEncodedString(DFA7_acceptS);
- static final short[] DFA7_special = DFA.unpackEncodedString(DFA7_specialS);
- static final short[][] DFA7_transition;
-
- static {
- int numStates = DFA7_transitionS.length;
- DFA7_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA7_transition[i] = DFA.unpackEncodedString(DFA7_transitionS[i]);
- }
- }
-
- class DFA7 extends DFA {
-
- public DFA7(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 7;
- this.eot = DFA7_eot;
- this.eof = DFA7_eof;
- this.min = DFA7_min;
- this.max = DFA7_max;
- this.accept = DFA7_accept;
- this.special = DFA7_special;
- this.transition = DFA7_transition;
- }
- public String getDescription() {
- return "1:1: Tokens : ( T__55 | T__56 | T__57 | T__58 | T__59 | T__60 | T__61 | T__62 | NL | WS | QUESTION_MARK | LNOT | DOUBLE_QUOTE | SINGLE_QUOTE | LPAREN | RPAREN | LSQUARE | RSQUARE | LCURLY | DOUBLE_LCURLY | RCURLY | DOUBLE_RCURLY | LOGICAL_AND | DOUBLE_LOGICAL_AND | PIPE | DOUBLE_PIPE | POINT | RANGE | COMMA | SEMI | SHARP | TILDE | COLON | FOUR_POINTS | RULE_ASSIGN | ARROW | STAR | DIV | PLUS | MINUS | EQ | ISEQ | ISNE | LT | DOUBLE_LT | LE | GT | DOUBLE_GT | GE | INCR | DECR | CALLOPERATION | UNDERSCORE | RANGE_VALUE | REAL | INTEGER | IDENTIFIER );";
- }
- }
-
-
-} \ No newline at end of file
diff --git a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelParser.java b/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelParser.java
deleted file mode 100644
index d61b31c2a48..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/antlrsrc/org/eclipse/papyrus/parsers/antlr/PropertyLabelParser.java
+++ /dev/null
@@ -1,3269 +0,0 @@
-// $ANTLR 3.2 Sep 23, 2009 12:02:23 D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g 2011-03-15 16:41:29
-
-package org.eclipse.papyrus.parsers.antlr;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.IContext;
-import org.eclipse.papyrus.parsers.util.IErrorReporter;
-import org.eclipse.papyrus.parsers.util.NameException;
-import org.eclipse.papyrus.parsers.util.MultiplicityException;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.papyrus.parsers.util.Messages;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.papyrus.uml.tools.utils.TemplateSignatureUtil;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.TemplateableElement;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.VisibilityKind;
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.antlr.runtime.debug.*;
-import java.io.IOException;
-
-import org.antlr.runtime.tree.*;
-
-public class PropertyLabelParser extends DebugParser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "WS", "COLON", "PLUS", "MINUS", "SHARP", "TILDE", "DIV", "IDENTIFIER", "LSQUARE", "RANGE_VALUE", "INTEGER", "RSQUARE", "STAR", "EQ", "LCURLY", "COMMA", "RCURLY", "NL", "QUESTION_MARK", "LNOT", "DOUBLE_QUOTE", "SINGLE_QUOTE", "LPAREN", "RPAREN", "DOUBLE_LCURLY", "DOUBLE_RCURLY", "LOGICAL_AND", "DOUBLE_LOGICAL_AND", "PIPE", "DOUBLE_PIPE", "POINT", "RANGE", "SEMI", "FOUR_POINTS", "RULE_ASSIGN", "ARROW", "ISEQ", "ISNE", "LT", "DOUBLE_LT", "LE", "GT", "DOUBLE_GT", "GE", "INCR", "DECR", "CALLOPERATION", "ALPHA", "UNDERSCORE", "REAL", "INTEGER_OR_REAL_OR_RANGE", "'<Undefined>'", "'readOnly'", "'union'", "'ordered'", "'unique'", "'nonunique'", "'subsets'", "'redefines'"
- };
- public static final int DOUBLE_LT=43;
- public static final int COMMA=19;
- public static final int ISEQ=40;
- public static final int MINUS=7;
- public static final int INCR=48;
- public static final int SHARP=8;
- public static final int T__57=57;
- public static final int DOUBLE_RCURLY=29;
- public static final int DECR=49;
- public static final int ARROW=39;
- public static final int DOUBLE_GT=46;
- public static final int RULE_ASSIGN=38;
- public static final int TILDE=9;
- public static final int PIPE=32;
- public static final int DOUBLE_PIPE=33;
- public static final int INTEGER=14;
- public static final int RCURLY=20;
- public static final int QUESTION_MARK=22;
- public static final int NL=21;
- public static final int LCURLY=18;
- public static final int T__62=62;
- public static final int LE=44;
- public static final int RPAREN=27;
- public static final int T__61=61;
- public static final int LPAREN=26;
- public static final int T__59=59;
- public static final int PLUS=6;
- public static final int SINGLE_QUOTE=25;
- public static final int REAL=53;
- public static final int T__56=56;
- public static final int LSQUARE=12;
- public static final int RANGE=35;
- public static final int FOUR_POINTS=37;
- public static final int DOUBLE_LCURLY=28;
- public static final int POINT=34;
- public static final int WS=4;
- public static final int ALPHA=51;
- public static final int T__58=58;
- public static final int EQ=17;
- public static final int LT=42;
- public static final int GT=45;
- public static final int DOUBLE_QUOTE=24;
- public static final int RSQUARE=15;
- public static final int DOUBLE_LOGICAL_AND=31;
- public static final int RANGE_VALUE=13;
- public static final int T__55=55;
- public static final int SEMI=36;
- public static final int GE=47;
- public static final int LNOT=23;
- public static final int ISNE=41;
- public static final int LOGICAL_AND=30;
- public static final int EOF=-1;
- public static final int COLON=5;
- public static final int INTEGER_OR_REAL_OR_RANGE=54;
- public static final int DIV=10;
- public static final int IDENTIFIER=11;
- public static final int STAR=16;
- public static final int T__60=60;
- public static final int UNDERSCORE=52;
- public static final int CALLOPERATION=50;
-
- // delegates
- // delegators
-
- public static final String[] ruleNames = new String[] {
- "invalidRule", "property_type", "type", "expression", "subsetsProperty",
- "isDerived", "defaultValue", "upperMultiplicity", "unlimitedNatural",
- "fullMultiplicity", "redefinesProperty", "lowerMultiplicity", "label",
- "propertyModifiers", "visibility", "propertyModifier", "name"
- };
-
- public int ruleLevel = 0;
- public int getRuleLevel() { return ruleLevel; }
- public void incRuleLevel() { ruleLevel++; }
- public void decRuleLevel() { ruleLevel--; }
- public PropertyLabelParser(TokenStream input) {
- this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
- }
- public PropertyLabelParser(TokenStream input, int port, RecognizerSharedState state) {
- super(input, state);
- DebugEventSocketProxy proxy =
- new DebugEventSocketProxy(this,port,adaptor);
- setDebugListener(proxy);
- setTokenStream(new DebugTokenStream(input,proxy));
- try {
- proxy.handshake();
- }
- catch (IOException ioe) {
- reportError(ioe);
- }
- TreeAdaptor adap = new CommonTreeAdaptor();
- setTreeAdaptor(adap);
- proxy.setTreeAdaptor(adap);
- }
- public PropertyLabelParser(TokenStream input, DebugEventListener dbg) {
- super(input, dbg);
-
-
- TreeAdaptor adap = new CommonTreeAdaptor();
- setTreeAdaptor(adap);
-
- }
- protected boolean evalPredicate(boolean result, String predicate) {
- dbg.semanticPredicate(result, predicate);
- return result;
- }
-
- protected DebugTreeAdaptor adaptor;
- public void setTreeAdaptor(TreeAdaptor adaptor) {
- this.adaptor = new DebugTreeAdaptor(dbg,adaptor);
-
- }
- public TreeAdaptor getTreeAdaptor() {
- return adaptor;
- }
-
-
- public String[] getTokenNames() { return PropertyLabelParser.tokenNames; }
- public String getGrammarFileName() { return "D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g"; }
-
-
- public PropertyLabelParser(TokenStream lexer, Property property, IErrorReporter reporter) {
- this(lexer);
- setProperty(property);
- setErrorReporter(reporter);
- this.modifiersUsed = new HashMap<String, Boolean>();
- modifiersUsed.put("readOnly", false);
- modifiersUsed.put("union", false);
- modifiersUsed.put("ordered", false);
- modifiersUsed.put("unique", false);
- modifiersUsed.put("nonunique", false);
- modifiersUsed.put("subsets ", false);
- modifiersUsed.put("redefines ", false);
-
- }
-
- /**
- * Validation state (true = validation : does not modify the property
- */
- private boolean isValidation = false;
-
-
- private static final boolean DEBUG = false;
- /**
- * @return the isValidation boolean
- */
- public boolean isValidation() {
- return isValidation;
- }
-
- /**
- * @param isValidation the isValidation to set (true -> do not modify the property)
- */
- public void setValidation(boolean isValidation) {
- this.isValidation = isValidation;
- }
-
- private Package nearestPackage;
-
- /**
- * Modified Property
- */
- private Property property;
-
- /**
- * @return the property
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- * @param property the property to set
- */
- public void setProperty(Property property) {
- this.property = property;
- this.nearestPackage = property.getNearestPackage();
- }
-
- /** debug mode */
- protected final boolean debugMode = false;
-
- /**
- * Debug method (~System.out.println)
- */
- private void debug(Object debug) {
- if(debugMode) {
- System.out.println(debug);
- }
- }
-
- /**
- * Error method (~System.err.println)
- */
- private void error(Object debug) {
- if(debugMode) {
- System.err.println(debug);
- }
- }
-
- /**
- * Context (for completion processor)
- */
- private int context = IContext.DEFAULT;
-
- /**
- * @return the context
- */
- public int getContext() {
- return context;
- }
-
- /**
- * @param context the context to set
- */
- public void setContext(int context) {
- this.context = context;
- }
-
- // all possible modified elements on property (with default values : necessary ?!)
- String name;
- VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
- boolean isDerived = false;
- Type type=null;
- int lowerMultiplicity = 1; // default multiplicity = [1..1]
- int upperMultiplicity = 1; // default multiplicity = [1..1]
- String defaultValue=null;
- // property modifiers
- boolean isReadOnly = false; // default value = false
- boolean isUnique = false; // default value = true but easier to use default = nonunique
- boolean isOrdered = false; // default value = false
- boolean isDerivedUnion = false; // default value = false
- Collection subsettedProperties = new Vector();
- Collection redefinedProperties = new Vector();
-
-
- /**
- * Apply values to the property. <BR>
- * Modifications can not be applied directly. The parser must wait the end,
- * until it reaches the end of the label. If the end is reached without any error,
- * new values can be applied to the target property.
- */
- private void applyValues() {
- if(!isValidation){
- debug("\nvalues applied :");
- debug("+ name: "+name);
- debug("+ visibility: "+visibility);
- debug("+ isDerived: "+isDerived);
- debug("+ type: "+type);
- debug("+ lower Multiplicity: "+lowerMultiplicity);
- debug("+ upper Multiplicity: "+upperMultiplicity);
- debug("+ default Value: "+defaultValue);
- debug("+ Property modifiers");
- debug("+ isReadOnly: "+isReadOnly);
- debug("+ isUnique: "+isUnique);
- debug("+ isOrdered: "+isOrdered);
- debug("+ isDerivedUnion: "+isDerivedUnion);
- debug("+ SubsettedProperties: "+subsettedProperties);
- debug("+ RedefinedProperties: "+redefinedProperties);
-
- property.setName(name);
- property.setVisibility(visibility);
- property.setIsDerived(isDerived);
- property.setType(type);
- property.setLower(lowerMultiplicity);
- property.setUpper(upperMultiplicity);
- property.setDefault(defaultValue);
- property.setIsReadOnly(isReadOnly);
- property.setIsUnique(isUnique);
- property.setIsOrdered(isOrdered);
- property.setIsDerivedUnion(isDerivedUnion);
- property.getSubsettedProperties().clear();
- property.getSubsettedProperties().addAll(subsettedProperties);
- property.getRedefinedProperties().clear();
- property.getRedefinedProperties().addAll(redefinedProperties);
- }
- }
-
- /**
- * Find a type given its name and a context to find it.
- * @param name the name of the type
- * @return the type found or <code>null</code> if the element was not found.
- */
- /*
- private Type findTypeByName(String name, org.eclipse.uml2.uml.Element context) throws RecognitionException {
- Type type = null;
- int numTypes = 0;
- org.eclipse.uml2.uml.Package contextPackage = context.getNearestPackage();
-
- // seek the package in which the element should be found...
- Iterator it = contextPackage.getMembers().iterator();
- while( it.hasNext() ) {
- Object tmp = it.next();
- if( tmp instanceof Type ) {
- Type element = ( Type )tmp;
- if( element.getName().equals(name) ) {
- numTypes++;
- type = element;
- }
- }
- }
- if(type == null) {// type not found in default package. search in imports.
- it = contextPackage.getImportedMembers().iterator();
- while( it.hasNext() ) {
- Object tmp = it.next();
- if( tmp instanceof Type ) {
- Type element = ( Type )tmp;
- if( element.getName().equals(name) ) {
- type = element;
- numTypes++;
- }
- }
- }
- }
-
- if(numTypes == 0) {
- throw new RecognitionException("Type "+name+" not found for property "+property.getName());
- } else if(numTypes > 1) {
- debug("There are "+numTypes+" types with the same name....");
- }
-
- return type;
- }
- */
-
- /**
- * Find a subsetted property given its name and a context to find it.
- * @param name the name of the property
- * @return the property found or <code>null</code> if the element was not found.
- */
- private Property findSubsettedPropertyByName(String propertyName, Property property) throws TypeRecognitionException {
- Property subsettedProperty = null;
- Iterator<Property> it = PropertyUtil.getSubsettablesProperties(property, true).iterator();
- while (it.hasNext()) {
- Property tmpProperty = it.next();
- if(propertyName.equals(tmpProperty.getName())) {
- subsettedProperty = tmpProperty;
- }
- }
-
- if(subsettedProperty == null) {
- throw new TypeRecognitionException("Property "+propertyName+" has not been found or can not be subset", property.getName());
- } else {
- // a property has been found. check multiplicity
- checkProperty(property, subsettedProperty);
- }
- return subsettedProperty;
- }
-
- private void checkProperty(Property property, Property subsettedProperty) throws RuntimeException {
- int propertyLowerBound = lowerMultiplicity; // check the new one!!
- int subsettedPropertyLowerBound = subsettedProperty.getLower();
- int propertyUpperBound = upperMultiplicity; // check the new one!!
- int subsettedPropertyUpperBound = subsettedProperty.getUpper();
-
- Type propertyType = property.getType();
- Type subsettedPropertyType = subsettedProperty.getType();
-
- String propertyName = property.getName();
-
- /*
- * rule : property multiplicity is a subset of subsetted property multiplicity
- * 1. property Lower Bound must be greater (or equal) than subsetted property Lower Bound
- * 2. property Upper Bound must be lower (or equal) than subsetted property Upper Bound (if subsetted property Upper Bound is not '*')
- */
- if( propertyLowerBound < subsettedPropertyLowerBound) {
- throw new MultiplicityException(propertyName+" Lower Bound ("+lowerMultiplicity+") can not be lower than subsetted property Lower Bound ("+subsettedPropertyLowerBound+")");
- } else if(subsettedPropertyUpperBound != -1 && propertyUpperBound > subsettedPropertyUpperBound) {
- throw new MultiplicityException(propertyName+" Upper Bound ("+upperMultiplicity+") can not be greater than subsetted property Upper Bound ("+subsettedPropertyUpperBound+")");
- }
- if(!propertyType.conformsTo(subsettedPropertyType)) {
- throw new TypeRecognitionException(propertyName+" Type ("+propertyType.getName()+") does not conform to subsetted property type", subsettedPropertyType.getName());
- }
- }
-
- /**
- * Find a redefined property given its name and a context to find it.
- * @param name the name of the property
- * @return the property found or <code>null</code> if the element was not found.
- */
- private Property findRedefinedPropertyByName(String propertyName, Property property) throws TypeRecognitionException {
- Property redefinedProperty = PropertyUtil.findRedefinedPropertyByName(propertyName, property);
- if(redefinedProperty == null) {
- throw new TypeRecognitionException("Property "+propertyName+" has not been found or can not be redefined", property.getName());
- }
- return redefinedProperty;
- }
-
- // vector that keeps modifiers already used (used for completion)
- public Map<String, Boolean> modifiersUsed;
-
- /**
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- * @param modifiersUsed the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /** reporting errors */
- private IErrorReporter errorReporter = null;
-
- public void setErrorReporter(IErrorReporter errorReporter) {
- this.errorReporter = errorReporter;
- }
-
- public IErrorReporter getErrorReporter() {
- return errorReporter;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getErrorMessage(RecognitionException exception, String[] arg1) {
- if (exception instanceof NameException) {
- return "Please enter a correct name for the property";
- }
- return super.getErrorMessage(exception, arg1);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void emitErrorMessage(String msg) {
- errorReporter.reportError(msg);
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void recover(IntStream arg0, RecognitionException arg1) {
- throw new RuntimeException("no recover", arg1);
- // do nothing
- }
-
-
-
-
- public static class label_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "label"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:377:1: label : ( WS )* ( visibility ( WS )* )? ( isDerived ( WS )* )? name ( WS )* COLON property_type ( fullMultiplicity ( WS )* )? ( defaultValue )? ( propertyModifiers ( WS )* )? ;
- public final PropertyLabelParser.label_return label() throws RecognitionException {
- PropertyLabelParser.label_return retval = new PropertyLabelParser.label_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token WS1=null;
- Token WS3=null;
- Token WS5=null;
- Token WS7=null;
- Token COLON8=null;
- Token WS11=null;
- Token WS14=null;
- PropertyLabelParser.visibility_return visibility2 = null;
-
- PropertyLabelParser.isDerived_return isDerived4 = null;
-
- PropertyLabelParser.name_return name6 = null;
-
- PropertyLabelParser.property_type_return property_type9 = null;
-
- PropertyLabelParser.fullMultiplicity_return fullMultiplicity10 = null;
-
- PropertyLabelParser.defaultValue_return defaultValue12 = null;
-
- PropertyLabelParser.propertyModifiers_return propertyModifiers13 = null;
-
-
- Object WS1_tree=null;
- Object WS3_tree=null;
- Object WS5_tree=null;
- Object WS7_tree=null;
- Object COLON8_tree=null;
- Object WS11_tree=null;
- Object WS14_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "label");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(377, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:377:7: ( ( WS )* ( visibility ( WS )* )? ( isDerived ( WS )* )? name ( WS )* COLON property_type ( fullMultiplicity ( WS )* )? ( defaultValue )? ( propertyModifiers ( WS )* )? )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:378:3: ( WS )* ( visibility ( WS )* )? ( isDerived ( WS )* )? name ( WS )* COLON property_type ( fullMultiplicity ( WS )* )? ( defaultValue )? ( propertyModifiers ( WS )* )?
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(378,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:378:3: ( WS )*
- try { dbg.enterSubRule(1);
-
- loop1:
- do {
- int alt1=2;
- try { dbg.enterDecision(1);
-
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0==WS) ) {
- alt1=1;
- }
-
-
- } finally {dbg.exitDecision(1);}
-
- switch (alt1) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:378:4: WS
- {
- dbg.location(378,4);
- WS1=(Token)match(input,WS,FOLLOW_WS_in_label46);
- WS1_tree = (Object)adaptor.create(WS1);
- adaptor.addChild(root_0, WS1_tree);
-
-
- }
- break;
-
- default :
- break loop1;
- }
- } while (true);
- } finally {dbg.exitSubRule(1);}
-
- dbg.location(379,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:379:3: ( visibility ( WS )* )?
- int alt3=2;
- try { dbg.enterSubRule(3);
- try { dbg.enterDecision(3);
-
- int LA3_0 = input.LA(1);
-
- if ( ((LA3_0>=PLUS && LA3_0<=TILDE)) ) {
- alt3=1;
- }
- } finally {dbg.exitDecision(3);}
-
- switch (alt3) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:379:4: visibility ( WS )*
- {
- dbg.location(379,4);
- pushFollow(FOLLOW_visibility_in_label53);
- visibility2=visibility();
-
- state._fsp--;
-
- adaptor.addChild(root_0, visibility2.getTree());
- dbg.location(379,15);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:379:15: ( WS )*
- try { dbg.enterSubRule(2);
-
- loop2:
- do {
- int alt2=2;
- try { dbg.enterDecision(2);
-
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0==WS) ) {
- alt2=1;
- }
-
-
- } finally {dbg.exitDecision(2);}
-
- switch (alt2) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:379:16: WS
- {
- dbg.location(379,16);
- WS3=(Token)match(input,WS,FOLLOW_WS_in_label56);
- WS3_tree = (Object)adaptor.create(WS3);
- adaptor.addChild(root_0, WS3_tree);
-
-
- }
- break;
-
- default :
- break loop2;
- }
- } while (true);
- } finally {dbg.exitSubRule(2);}
-
- dbg.location(379,20);
- context = IContext.VISIBILITY;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(3);}
-
- dbg.location(380,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:380:3: ( isDerived ( WS )* )?
- int alt5=2;
- try { dbg.enterSubRule(5);
- try { dbg.enterDecision(5);
-
- int LA5_0 = input.LA(1);
-
- if ( (LA5_0==DIV) ) {
- alt5=1;
- }
- } finally {dbg.exitDecision(5);}
-
- switch (alt5) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:380:4: isDerived ( WS )*
- {
- dbg.location(380,4);
- pushFollow(FOLLOW_isDerived_in_label68);
- isDerived4=isDerived();
-
- state._fsp--;
-
- adaptor.addChild(root_0, isDerived4.getTree());
- dbg.location(380,14);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:380:14: ( WS )*
- try { dbg.enterSubRule(4);
-
- loop4:
- do {
- int alt4=2;
- try { dbg.enterDecision(4);
-
- int LA4_0 = input.LA(1);
-
- if ( (LA4_0==WS) ) {
- alt4=1;
- }
-
-
- } finally {dbg.exitDecision(4);}
-
- switch (alt4) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:380:15: WS
- {
- dbg.location(380,15);
- WS5=(Token)match(input,WS,FOLLOW_WS_in_label71);
- WS5_tree = (Object)adaptor.create(WS5);
- adaptor.addChild(root_0, WS5_tree);
-
-
- }
- break;
-
- default :
- break loop4;
- }
- } while (true);
- } finally {dbg.exitSubRule(4);}
-
- dbg.location(380,20);
- context = IContext.IS_DERIVED;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(5);}
-
- dbg.location(381,3);
- pushFollow(FOLLOW_name_in_label83);
- name6=name();
-
- state._fsp--;
-
- adaptor.addChild(root_0, name6.getTree());
- dbg.location(381,8);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:381:8: ( WS )*
- try { dbg.enterSubRule(6);
-
- loop6:
- do {
- int alt6=2;
- try { dbg.enterDecision(6);
-
- int LA6_0 = input.LA(1);
-
- if ( (LA6_0==WS) ) {
- alt6=1;
- }
-
-
- } finally {dbg.exitDecision(6);}
-
- switch (alt6) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:381:9: WS
- {
- dbg.location(381,9);
- WS7=(Token)match(input,WS,FOLLOW_WS_in_label86);
- WS7_tree = (Object)adaptor.create(WS7);
- adaptor.addChild(root_0, WS7_tree);
-
-
- }
- break;
-
- default :
- break loop6;
- }
- } while (true);
- } finally {dbg.exitSubRule(6);}
-
- dbg.location(382,3);
- COLON8=(Token)match(input,COLON,FOLLOW_COLON_in_label92);
- COLON8_tree = (Object)adaptor.create(COLON8);
- adaptor.addChild(root_0, COLON8_tree);
-
- dbg.location(383,3);
-
- context = IContext.AFTER_COLON;
-
- dbg.location(386,3);
- pushFollow(FOLLOW_property_type_in_label102);
- property_type9=property_type();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property_type9.getTree());
- dbg.location(386,18);
- context = IContext.MULTIPLICITY;
- dbg.location(387,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:387:3: ( fullMultiplicity ( WS )* )?
- int alt8=2;
- try { dbg.enterSubRule(8);
- try { dbg.enterDecision(8);
-
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0==LSQUARE) ) {
- alt8=1;
- }
- } finally {dbg.exitDecision(8);}
-
- switch (alt8) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:387:4: fullMultiplicity ( WS )*
- {
- dbg.location(387,4);
- pushFollow(FOLLOW_fullMultiplicity_in_label110);
- fullMultiplicity10=fullMultiplicity();
-
- state._fsp--;
-
- adaptor.addChild(root_0, fullMultiplicity10.getTree());
- dbg.location(387,21);
- context = IContext.AFTER_MULTIPLICITY;
- dbg.location(387,64);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:387:64: ( WS )*
- try { dbg.enterSubRule(7);
-
- loop7:
- do {
- int alt7=2;
- try { dbg.enterDecision(7);
-
- int LA7_0 = input.LA(1);
-
- if ( (LA7_0==WS) ) {
- alt7=1;
- }
-
-
- } finally {dbg.exitDecision(7);}
-
- switch (alt7) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:387:65: WS
- {
- dbg.location(387,65);
- WS11=(Token)match(input,WS,FOLLOW_WS_in_label115);
- WS11_tree = (Object)adaptor.create(WS11);
- adaptor.addChild(root_0, WS11_tree);
-
-
- }
- break;
-
- default :
- break loop7;
- }
- } while (true);
- } finally {dbg.exitSubRule(7);}
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(8);}
-
- dbg.location(388,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:388:3: ( defaultValue )?
- int alt9=2;
- try { dbg.enterSubRule(9);
- try { dbg.enterDecision(9);
-
- int LA9_0 = input.LA(1);
-
- if ( (LA9_0==EQ) ) {
- alt9=1;
- }
- } finally {dbg.exitDecision(9);}
-
- switch (alt9) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:388:4: defaultValue
- {
- dbg.location(388,4);
- pushFollow(FOLLOW_defaultValue_in_label124);
- defaultValue12=defaultValue();
-
- state._fsp--;
-
- adaptor.addChild(root_0, defaultValue12.getTree());
- dbg.location(388,17);
- context = IContext.DEFAULT_VALUE;
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(9);}
-
- dbg.location(389,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:389:3: ( propertyModifiers ( WS )* )?
- int alt11=2;
- try { dbg.enterSubRule(11);
- try { dbg.enterDecision(11);
-
- int LA11_0 = input.LA(1);
-
- if ( (LA11_0==LCURLY) ) {
- alt11=1;
- }
- } finally {dbg.exitDecision(11);}
-
- switch (alt11) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:389:4: propertyModifiers ( WS )*
- {
- dbg.location(389,4);
- pushFollow(FOLLOW_propertyModifiers_in_label134);
- propertyModifiers13=propertyModifiers();
-
- state._fsp--;
-
- adaptor.addChild(root_0, propertyModifiers13.getTree());
- dbg.location(389,22);
- context = IContext.PROPERTY_MODIFIERS;
- dbg.location(389,65);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:389:65: ( WS )*
- try { dbg.enterSubRule(10);
-
- loop10:
- do {
- int alt10=2;
- try { dbg.enterDecision(10);
-
- int LA10_0 = input.LA(1);
-
- if ( (LA10_0==WS) ) {
- alt10=1;
- }
-
-
- } finally {dbg.exitDecision(10);}
-
- switch (alt10) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:389:66: WS
- {
- dbg.location(389,66);
- WS14=(Token)match(input,WS,FOLLOW_WS_in_label139);
- WS14_tree = (Object)adaptor.create(WS14);
- adaptor.addChild(root_0, WS14_tree);
-
-
- }
- break;
-
- default :
- break loop10;
- }
- } while (true);
- } finally {dbg.exitSubRule(10);}
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(11);}
-
- dbg.location(390,3);
-
- applyValues();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- String index = Integer.toString(mte.index);
- String description = mte.getLocalizedMessage().substring(mte.getLocalizedMessage().indexOf('('),
- mte.getLocalizedMessage().length());
- String tokenText = mte.token.getText();
- String text = Messages.bind(Messages.MismatchedToken, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw (re);
-
-
- }
- finally {
- }
- dbg.location(393, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "label");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "label"
-
- public static class visibility_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "visibility"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:419:1: visibility : ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) ) ;
- public final PropertyLabelParser.visibility_return visibility() throws RecognitionException {
- PropertyLabelParser.visibility_return retval = new PropertyLabelParser.visibility_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token PLUS15=null;
- Token MINUS16=null;
- Token SHARP17=null;
- Token TILDE18=null;
-
- Object PLUS15_tree=null;
- Object MINUS16_tree=null;
- Object SHARP17_tree=null;
- Object TILDE18_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "visibility");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(419, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:420:3: ( ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:421:3: ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(421,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:421:3: ( ( PLUS ) | ( MINUS ) | ( SHARP ) | ( TILDE ) )
- int alt12=4;
- try { dbg.enterSubRule(12);
- try { dbg.enterDecision(12);
-
- switch ( input.LA(1) ) {
- case PLUS:
- {
- alt12=1;
- }
- break;
- case MINUS:
- {
- alt12=2;
- }
- break;
- case SHARP:
- {
- alt12=3;
- }
- break;
- case TILDE:
- {
- alt12=4;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 12, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
-
- } finally {dbg.exitDecision(12);}
-
- switch (alt12) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:422:5: ( PLUS )
- {
- dbg.location(422,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:422:5: ( PLUS )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:422:9: PLUS
- {
- dbg.location(422,9);
- PLUS15=(Token)match(input,PLUS,FOLLOW_PLUS_in_visibility203);
- PLUS15_tree = (Object)adaptor.create(PLUS15);
- adaptor.addChild(root_0, PLUS15_tree);
-
- dbg.location(422,15);
- visibility = VisibilityKind.PUBLIC_LITERAL;
-
- }
-
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:423:5: ( MINUS )
- {
- dbg.location(423,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:423:5: ( MINUS )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:423:9: MINUS
- {
- dbg.location(423,9);
- MINUS16=(Token)match(input,MINUS,FOLLOW_MINUS_in_visibility218);
- MINUS16_tree = (Object)adaptor.create(MINUS16);
- adaptor.addChild(root_0, MINUS16_tree);
-
- dbg.location(423,15);
- visibility = VisibilityKind.PRIVATE_LITERAL;
-
- }
-
-
- }
- break;
- case 3 :
- dbg.enterAlt(3);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:424:5: ( SHARP )
- {
- dbg.location(424,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:424:5: ( SHARP )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:424:9: SHARP
- {
- dbg.location(424,9);
- SHARP17=(Token)match(input,SHARP,FOLLOW_SHARP_in_visibility232);
- SHARP17_tree = (Object)adaptor.create(SHARP17);
- adaptor.addChild(root_0, SHARP17_tree);
-
- dbg.location(424,15);
- visibility = VisibilityKind.PROTECTED_LITERAL;
-
- }
-
-
- }
- break;
- case 4 :
- dbg.enterAlt(4);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:425:5: ( TILDE )
- {
- dbg.location(425,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:425:5: ( TILDE )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:425:9: TILDE
- {
- dbg.location(425,9);
- TILDE18=(Token)match(input,TILDE,FOLLOW_TILDE_in_visibility246);
- TILDE18_tree = (Object)adaptor.create(TILDE18);
- adaptor.addChild(root_0, TILDE18_tree);
-
- dbg.location(425,15);
- visibility = VisibilityKind.PACKAGE_LITERAL;
-
- }
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(12);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("VisibilityRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
-
- }
- finally {
- }
- dbg.location(427, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "visibility");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "visibility"
-
- public static class isDerived_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "isDerived"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:445:1: isDerived : DIV ;
- public final PropertyLabelParser.isDerived_return isDerived() throws RecognitionException {
- PropertyLabelParser.isDerived_return retval = new PropertyLabelParser.isDerived_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token DIV19=null;
-
- Object DIV19_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "isDerived");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(445, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:446:3: ( DIV )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:447:3: DIV
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(447,3);
- DIV19=(Token)match(input,DIV,FOLLOW_DIV_in_isDerived287);
- DIV19_tree = (Object)adaptor.create(DIV19);
- adaptor.addChild(root_0, DIV19_tree);
-
- dbg.location(447,9);
- isDerived = true;
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("IsDerivedRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
-
- }
- finally {
- }
- dbg.location(448, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "isDerived");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "isDerived"
-
- public static class name_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "name"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:465:1: name : id= IDENTIFIER ;
- public final PropertyLabelParser.name_return name() throws RecognitionException {
- PropertyLabelParser.name_return retval = new PropertyLabelParser.name_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "name");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(465, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:466:3: (id= IDENTIFIER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:467:3: id= IDENTIFIER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(467,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_name326);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(468,3);
-
- name = id.getText();
- context = IContext.NAME;
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException(Messages.NameMissing));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(472, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "name");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "name"
-
- public static class property_type_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "property_type"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:492:1: property_type : ( WS )* ( type | '<Undefined>' ) ;
- public final PropertyLabelParser.property_type_return property_type() throws RecognitionException {
- PropertyLabelParser.property_type_return retval = new PropertyLabelParser.property_type_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token WS20=null;
- Token string_literal22=null;
- PropertyLabelParser.type_return type21 = null;
-
-
- Object WS20_tree=null;
- Object string_literal22_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "property_type");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(492, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:493:3: ( ( WS )* ( type | '<Undefined>' ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:494:3: ( WS )* ( type | '<Undefined>' )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(494,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:494:3: ( WS )*
- try { dbg.enterSubRule(13);
-
- loop13:
- do {
- int alt13=2;
- try { dbg.enterDecision(13);
-
- int LA13_0 = input.LA(1);
-
- if ( (LA13_0==WS) ) {
- alt13=1;
- }
-
-
- } finally {dbg.exitDecision(13);}
-
- switch (alt13) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:494:4: WS
- {
- dbg.location(494,4);
- WS20=(Token)match(input,WS,FOLLOW_WS_in_property_type375);
- WS20_tree = (Object)adaptor.create(WS20);
- adaptor.addChild(root_0, WS20_tree);
-
-
- }
- break;
-
- default :
- break loop13;
- }
- } while (true);
- } finally {dbg.exitSubRule(13);}
-
- dbg.location(495,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:495:3: ( type | '<Undefined>' )
- int alt14=2;
- try { dbg.enterSubRule(14);
- try { dbg.enterDecision(14);
-
- int LA14_0 = input.LA(1);
-
- if ( (LA14_0==IDENTIFIER) ) {
- alt14=1;
- }
- else if ( (LA14_0==55) ) {
- alt14=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 14, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(14);}
-
- switch (alt14) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:495:5: type
- {
- dbg.location(495,5);
- pushFollow(FOLLOW_type_in_property_type383);
- type21=type();
-
- state._fsp--;
-
- adaptor.addChild(root_0, type21.getTree());
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:496:5: '<Undefined>'
- {
- dbg.location(496,5);
- string_literal22=(Token)match(input,55,FOLLOW_55_in_property_type391);
- string_literal22_tree = (Object)adaptor.create(string_literal22);
- adaptor.addChild(root_0, string_literal22_tree);
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(14);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("PropertyTypeRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- throw new RuntimeException("Waiting for a valid type or <Undefined>");
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(498, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "property_type");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "property_type"
-
- public static class type_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "type"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:513:1: type : id= IDENTIFIER ( WS )* (id1= IDENTIFIER ( WS )* )* ;
- public final PropertyLabelParser.type_return type() throws RecognitionException {
- PropertyLabelParser.type_return retval = new PropertyLabelParser.type_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
- Token id1=null;
- Token WS23=null;
- Token WS24=null;
-
- Object id_tree=null;
- Object id1_tree=null;
- Object WS23_tree=null;
- Object WS24_tree=null;
-
-
- StringBuffer buffer = new StringBuffer();
-
- try { dbg.enterRule(getGrammarFileName(), "type");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(513, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:517:3: (id= IDENTIFIER ( WS )* (id1= IDENTIFIER ( WS )* )* )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:518:3: id= IDENTIFIER ( WS )* (id1= IDENTIFIER ( WS )* )*
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(518,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_type451);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(518,17);
- buffer.append(id.getText());
- dbg.location(519,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:519:3: ( WS )*
- try { dbg.enterSubRule(15);
-
- loop15:
- do {
- int alt15=2;
- try { dbg.enterDecision(15);
-
- int LA15_0 = input.LA(1);
-
- if ( (LA15_0==WS) ) {
- alt15=1;
- }
-
-
- } finally {dbg.exitDecision(15);}
-
- switch (alt15) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:519:4: WS
- {
- dbg.location(519,4);
- WS23=(Token)match(input,WS,FOLLOW_WS_in_type458);
- WS23_tree = (Object)adaptor.create(WS23);
- adaptor.addChild(root_0, WS23_tree);
-
- dbg.location(519,7);
- //System.err.println("space added");
- buffer.append(" ");
-
- }
- break;
-
- default :
- break loop15;
- }
- } while (true);
- } finally {dbg.exitSubRule(15);}
-
- dbg.location(521,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:521:3: (id1= IDENTIFIER ( WS )* )*
- try { dbg.enterSubRule(17);
-
- loop17:
- do {
- int alt17=2;
- try { dbg.enterDecision(17);
-
- int LA17_0 = input.LA(1);
-
- if ( (LA17_0==IDENTIFIER) ) {
- alt17=1;
- }
-
-
- } finally {dbg.exitDecision(17);}
-
- switch (alt17) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:522:5: id1= IDENTIFIER ( WS )*
- {
- dbg.location(522,8);
- id1=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_type475);
- id1_tree = (Object)adaptor.create(id1);
- adaptor.addChild(root_0, id1_tree);
-
- dbg.location(522,20);
- buffer.append(id1.getText());
- dbg.location(523,5);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:523:5: ( WS )*
- try { dbg.enterSubRule(16);
-
- loop16:
- do {
- int alt16=2;
- try { dbg.enterDecision(16);
-
- int LA16_0 = input.LA(1);
-
- if ( (LA16_0==WS) ) {
- alt16=1;
- }
-
-
- } finally {dbg.exitDecision(16);}
-
- switch (alt16) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:523:6: WS
- {
- dbg.location(523,6);
- WS24=(Token)match(input,WS,FOLLOW_WS_in_type484);
- WS24_tree = (Object)adaptor.create(WS24);
- adaptor.addChild(root_0, WS24_tree);
-
- dbg.location(523,9);
- //System.err.println("space added");
- buffer.append(" ");
-
- }
- break;
-
- default :
- break loop16;
- }
- } while (true);
- } finally {dbg.exitSubRule(16);}
-
-
- }
- break;
-
- default :
- break loop17;
- }
- } while (true);
- } finally {dbg.exitSubRule(17);}
-
- dbg.location(526,3);
-
- String typeName = buffer.toString().trim() ;
- //System.err.println("typeName: "+typeName);
- Type utilType = PackageUtil.findTypeByName(nearestPackage, typeName);
- // type = findTypeByName(typeName, property);
- // The type has not been found, but it may have been declared in the context of a template.
- if(utilType != null) {
- if (utilType instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)utilType;
- if (template.isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- template) ;
- } else {
- type = utilType;
- }
- }
- else {
- type = utilType;
- }
- } else {
- // The type has not been found, but it may have been declared in the context of a template.
- if (property.getOwner() instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)property.getOwner() ;
- if (template.isTemplate()) {
- utilType = TemplateSignatureUtil.findTypeByName(template.getOwnedTemplateSignature(), typeName) ;
- }
- }
- if (utilType == null) // the type actually does not exist
- throw new TypeRecognitionException("Type "+typeName+" not found for property "+property.getName(),typeName);
- else if (utilType instanceof TemplateableElement && ((TemplateableElement)utilType).isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- (TemplateableElement)utilType) ;
- }
- else {
- type = utilType;
- }
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("TypeRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(564, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "type");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "type"
-
- public static class fullMultiplicity_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "fullMultiplicity"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:575:1: fullMultiplicity : LSQUARE (ra= RANGE_VALUE | up= INTEGER ) RSQUARE ;
- public final PropertyLabelParser.fullMultiplicity_return fullMultiplicity() throws RecognitionException {
- PropertyLabelParser.fullMultiplicity_return retval = new PropertyLabelParser.fullMultiplicity_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token ra=null;
- Token up=null;
- Token LSQUARE25=null;
- Token RSQUARE26=null;
-
- Object ra_tree=null;
- Object up_tree=null;
- Object LSQUARE25_tree=null;
- Object RSQUARE26_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "fullMultiplicity");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(575, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:576:3: ( LSQUARE (ra= RANGE_VALUE | up= INTEGER ) RSQUARE )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:577:3: LSQUARE (ra= RANGE_VALUE | up= INTEGER ) RSQUARE
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(577,3);
- LSQUARE25=(Token)match(input,LSQUARE,FOLLOW_LSQUARE_in_fullMultiplicity537);
- LSQUARE25_tree = (Object)adaptor.create(LSQUARE25);
- adaptor.addChild(root_0, LSQUARE25_tree);
-
- dbg.location(578,3);
- context = IContext.IN_MULTIPLICITY;
- dbg.location(594,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:594:3: (ra= RANGE_VALUE | up= INTEGER )
- int alt18=2;
- try { dbg.enterSubRule(18);
- try { dbg.enterDecision(18);
-
- int LA18_0 = input.LA(1);
-
- if ( (LA18_0==RANGE_VALUE) ) {
- alt18=1;
- }
- else if ( (LA18_0==INTEGER) ) {
- alt18=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 18, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(18);}
-
- switch (alt18) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:595:5: ra= RANGE_VALUE
- {
- dbg.location(595,7);
- ra=(Token)match(input,RANGE_VALUE,FOLLOW_RANGE_VALUE_in_fullMultiplicity557);
- ra_tree = (Object)adaptor.create(ra);
- adaptor.addChild(root_0, ra_tree);
-
- dbg.location(595,20);
-
- // retrieving values. text = upper ',' lower
- String value = (ra!=null?ra.getText():null);
- upperMultiplicity = Integer.parseInt(value.substring(0, value.lastIndexOf(',')));
- lowerMultiplicity = Integer.parseInt(value.substring(value.lastIndexOf(',') + 1, value.length()));
-
- if (lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
- throw new MultiplicityException("Lower bound (" + lowerMultiplicity
- + ") is greater than upper bound (" + upperMultiplicity + ")");
- }
-
-
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:607:5: up= INTEGER
- {
- dbg.location(607,7);
- up=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_fullMultiplicity567);
- up_tree = (Object)adaptor.create(up);
- adaptor.addChild(root_0, up_tree);
-
- dbg.location(607,16);
-
- upperMultiplicity = Integer.parseInt((up!=null?up.getText():null));
- lowerMultiplicity = upperMultiplicity;
-
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(18);}
-
- dbg.location(612,3);
- RSQUARE26=(Token)match(input,RSQUARE,FOLLOW_RSQUARE_in_fullMultiplicity577);
- RSQUARE26_tree = (Object)adaptor.create(RSQUARE26);
- adaptor.addChild(root_0, RSQUARE26_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("FullMultiplicityRule"));
-
- }
- catch (NoViableAltException noViableAltException) {
-
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(613, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "fullMultiplicity");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "fullMultiplicity"
-
- public static class lowerMultiplicity_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "lowerMultiplicity"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:635:1: lowerMultiplicity : in= INTEGER ;
- public final PropertyLabelParser.lowerMultiplicity_return lowerMultiplicity() throws RecognitionException {
- PropertyLabelParser.lowerMultiplicity_return retval = new PropertyLabelParser.lowerMultiplicity_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token in=null;
-
- Object in_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "lowerMultiplicity");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(635, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:636:3: (in= INTEGER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:637:3: in= INTEGER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(637,5);
- in=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_lowerMultiplicity629);
- in_tree = (Object)adaptor.create(in);
- adaptor.addChild(root_0, in_tree);
-
- dbg.location(638,3);
-
- lowerMultiplicity = Integer.parseInt(in.getText());
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- dbg.location(641, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "lowerMultiplicity");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "lowerMultiplicity"
-
- public static class upperMultiplicity_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "upperMultiplicity"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:643:1: upperMultiplicity : um= unlimitedNatural ;
- public final PropertyLabelParser.upperMultiplicity_return upperMultiplicity() throws RecognitionException {
- PropertyLabelParser.upperMultiplicity_return retval = new PropertyLabelParser.upperMultiplicity_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- PropertyLabelParser.unlimitedNatural_return um = null;
-
-
-
- try { dbg.enterRule(getGrammarFileName(), "upperMultiplicity");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(643, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:644:3: (um= unlimitedNatural )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:645:3: um= unlimitedNatural
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(645,5);
- pushFollow(FOLLOW_unlimitedNatural_in_upperMultiplicity650);
- um=unlimitedNatural();
-
- state._fsp--;
-
- adaptor.addChild(root_0, um.getTree());
- dbg.location(646,3);
-
- upperMultiplicity = um.value;
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- dbg.location(649, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "upperMultiplicity");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "upperMultiplicity"
-
- public static class unlimitedNatural_return extends ParserRuleReturnScope {
- public int value = 0;
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "unlimitedNatural"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:651:1: unlimitedNatural returns [int value = 0 ] : ( STAR | in= INTEGER ) ;
- public final PropertyLabelParser.unlimitedNatural_return unlimitedNatural() throws RecognitionException {
- PropertyLabelParser.unlimitedNatural_return retval = new PropertyLabelParser.unlimitedNatural_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token in=null;
- Token STAR27=null;
-
- Object in_tree=null;
- Object STAR27_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "unlimitedNatural");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(651, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:652:3: ( ( STAR | in= INTEGER ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:653:3: ( STAR | in= INTEGER )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(653,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:653:3: ( STAR | in= INTEGER )
- int alt19=2;
- try { dbg.enterSubRule(19);
- try { dbg.enterDecision(19);
-
- int LA19_0 = input.LA(1);
-
- if ( (LA19_0==STAR) ) {
- alt19=1;
- }
- else if ( (LA19_0==INTEGER) ) {
- alt19=2;
- }
- else {
- NoViableAltException nvae =
- new NoViableAltException("", 19, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
- } finally {dbg.exitDecision(19);}
-
- switch (alt19) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:653:5: STAR
- {
- dbg.location(653,5);
- STAR27=(Token)match(input,STAR,FOLLOW_STAR_in_unlimitedNatural678);
- STAR27_tree = (Object)adaptor.create(STAR27);
- adaptor.addChild(root_0, STAR27_tree);
-
- dbg.location(653,15);
- retval.value = -1;
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:654:5: in= INTEGER
- {
- dbg.location(654,7);
- in=(Token)match(input,INTEGER,FOLLOW_INTEGER_in_unlimitedNatural693);
- in_tree = (Object)adaptor.create(in);
- adaptor.addChild(root_0, in_tree);
-
- dbg.location(654,19);
- retval.value = Integer.parseInt(in.getText());
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(19);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
-
- }
- finally {
- }
- dbg.location(656, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "unlimitedNatural");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "unlimitedNatural"
-
- public static class defaultValue_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "defaultValue"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:658:1: defaultValue : EQ dv= expression ;
- public final PropertyLabelParser.defaultValue_return defaultValue() throws RecognitionException {
- PropertyLabelParser.defaultValue_return retval = new PropertyLabelParser.defaultValue_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token EQ28=null;
- PropertyLabelParser.expression_return dv = null;
-
-
- Object EQ28_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "defaultValue");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(658, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:659:3: ( EQ dv= expression )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:660:3: EQ dv= expression
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(660,3);
- EQ28=(Token)match(input,EQ,FOLLOW_EQ_in_defaultValue719);
- EQ28_tree = (Object)adaptor.create(EQ28);
- adaptor.addChild(root_0, EQ28_tree);
-
- dbg.location(660,9);
- pushFollow(FOLLOW_expression_in_defaultValue725);
- dv=expression();
-
- state._fsp--;
-
- adaptor.addChild(root_0, dv.getTree());
- dbg.location(661,3);
-
- // remove spaces at the begining
- defaultValue = dv.value.trim();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(665, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "defaultValue");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "defaultValue"
-
- public static class expression_return extends ParserRuleReturnScope {
- public String value = "";
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "expression"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:676:1: expression returns [String value = \"\"] : ( options {greedy=false; } : id=~ ( LCURLY ) )+ ;
- public final PropertyLabelParser.expression_return expression() throws RecognitionException {
- PropertyLabelParser.expression_return retval = new PropertyLabelParser.expression_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
-
- StringBuffer buffer = new StringBuffer();
-
- try { dbg.enterRule(getGrammarFileName(), "expression");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(676, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:680:3: ( ( options {greedy=false; } : id=~ ( LCURLY ) )+ )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:681:4: ( options {greedy=false; } : id=~ ( LCURLY ) )+
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(681,4);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:681:4: ( options {greedy=false; } : id=~ ( LCURLY ) )+
- int cnt20=0;
- try { dbg.enterSubRule(20);
-
- loop20:
- do {
- int alt20=2;
- try { dbg.enterDecision(20);
-
- int LA20_0 = input.LA(1);
-
- if ( ((LA20_0>=WS && LA20_0<=EQ)||(LA20_0>=COMMA && LA20_0<=62)) ) {
- alt20=1;
- }
- else if ( (LA20_0==EOF||LA20_0==LCURLY) ) {
- alt20=2;
- }
-
-
- } finally {dbg.exitDecision(20);}
-
- switch (alt20) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:685:8: id=~ ( LCURLY )
- {
- dbg.location(685,10);
- id=(Token)input.LT(1);
- if ( (input.LA(1)>=WS && input.LA(1)<=EQ)||(input.LA(1)>=COMMA && input.LA(1)<=62) ) {
- input.consume();
- adaptor.addChild(root_0, (Object)adaptor.create(id));
- state.errorRecovery=false;
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- dbg.recognitionException(mse);
- throw mse;
- }
-
- dbg.location(686,5);
-
- buffer.append(id.getText());
-
-
- }
- break;
-
- default :
- if ( cnt20 >= 1 ) break loop20;
- EarlyExitException eee =
- new EarlyExitException(20, input);
- dbg.recognitionException(eee);
-
- throw eee;
- }
- cnt20++;
- } while (true);
- } finally {dbg.exitSubRule(20);}
-
- dbg.location(690,3);
-
- retval.value = buffer.toString();
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(693, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "expression");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "expression"
-
- public static class propertyModifiers_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "propertyModifiers"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:700:1: propertyModifiers : LCURLY ( WS )* propertyModifier ( WS )* ( COMMA ( WS )* propertyModifier ( WS )* )* RCURLY ;
- public final PropertyLabelParser.propertyModifiers_return propertyModifiers() throws RecognitionException {
- PropertyLabelParser.propertyModifiers_return retval = new PropertyLabelParser.propertyModifiers_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token LCURLY29=null;
- Token WS30=null;
- Token WS32=null;
- Token COMMA33=null;
- Token WS34=null;
- Token WS36=null;
- Token RCURLY37=null;
- PropertyLabelParser.propertyModifier_return propertyModifier31 = null;
-
- PropertyLabelParser.propertyModifier_return propertyModifier35 = null;
-
-
- Object LCURLY29_tree=null;
- Object WS30_tree=null;
- Object WS32_tree=null;
- Object COMMA33_tree=null;
- Object WS34_tree=null;
- Object WS36_tree=null;
- Object RCURLY37_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "propertyModifiers");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(700, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:701:3: ( LCURLY ( WS )* propertyModifier ( WS )* ( COMMA ( WS )* propertyModifier ( WS )* )* RCURLY )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:702:3: LCURLY ( WS )* propertyModifier ( WS )* ( COMMA ( WS )* propertyModifier ( WS )* )* RCURLY
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(702,3);
- LCURLY29=(Token)match(input,LCURLY,FOLLOW_LCURLY_in_propertyModifiers868);
- LCURLY29_tree = (Object)adaptor.create(LCURLY29);
- adaptor.addChild(root_0, LCURLY29_tree);
-
- dbg.location(702,10);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:702:10: ( WS )*
- try { dbg.enterSubRule(21);
-
- loop21:
- do {
- int alt21=2;
- try { dbg.enterDecision(21);
-
- int LA21_0 = input.LA(1);
-
- if ( (LA21_0==WS) ) {
- alt21=1;
- }
-
-
- } finally {dbg.exitDecision(21);}
-
- switch (alt21) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:702:11: WS
- {
- dbg.location(702,11);
- WS30=(Token)match(input,WS,FOLLOW_WS_in_propertyModifiers871);
- WS30_tree = (Object)adaptor.create(WS30);
- adaptor.addChild(root_0, WS30_tree);
-
-
- }
- break;
-
- default :
- break loop21;
- }
- } while (true);
- } finally {dbg.exitSubRule(21);}
-
- dbg.location(703,3);
- context = IContext.PROPERTY_MODIFIER;
- dbg.location(704,3);
- pushFollow(FOLLOW_propertyModifier_in_propertyModifiers881);
- propertyModifier31=propertyModifier();
-
- state._fsp--;
-
- adaptor.addChild(root_0, propertyModifier31.getTree());
- dbg.location(704,20);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:704:20: ( WS )*
- try { dbg.enterSubRule(22);
-
- loop22:
- do {
- int alt22=2;
- try { dbg.enterDecision(22);
-
- int LA22_0 = input.LA(1);
-
- if ( (LA22_0==WS) ) {
- alt22=1;
- }
-
-
- } finally {dbg.exitDecision(22);}
-
- switch (alt22) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:704:21: WS
- {
- dbg.location(704,21);
- WS32=(Token)match(input,WS,FOLLOW_WS_in_propertyModifiers884);
- WS32_tree = (Object)adaptor.create(WS32);
- adaptor.addChild(root_0, WS32_tree);
-
-
- }
- break;
-
- default :
- break loop22;
- }
- } while (true);
- } finally {dbg.exitSubRule(22);}
-
- dbg.location(705,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:705:3: ( COMMA ( WS )* propertyModifier ( WS )* )*
- try { dbg.enterSubRule(25);
-
- loop25:
- do {
- int alt25=2;
- try { dbg.enterDecision(25);
-
- int LA25_0 = input.LA(1);
-
- if ( (LA25_0==COMMA) ) {
- alt25=1;
- }
-
-
- } finally {dbg.exitDecision(25);}
-
- switch (alt25) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:706:5: COMMA ( WS )* propertyModifier ( WS )*
- {
- dbg.location(706,5);
- context = IContext.PROPERTY_MODIFIER;
- dbg.location(707,5);
- COMMA33=(Token)match(input,COMMA,FOLLOW_COMMA_in_propertyModifiers903);
- COMMA33_tree = (Object)adaptor.create(COMMA33);
- adaptor.addChild(root_0, COMMA33_tree);
-
- dbg.location(707,11);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:707:11: ( WS )*
- try { dbg.enterSubRule(23);
-
- loop23:
- do {
- int alt23=2;
- try { dbg.enterDecision(23);
-
- int LA23_0 = input.LA(1);
-
- if ( (LA23_0==WS) ) {
- alt23=1;
- }
-
-
- } finally {dbg.exitDecision(23);}
-
- switch (alt23) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:707:12: WS
- {
- dbg.location(707,12);
- WS34=(Token)match(input,WS,FOLLOW_WS_in_propertyModifiers906);
- WS34_tree = (Object)adaptor.create(WS34);
- adaptor.addChild(root_0, WS34_tree);
-
-
- }
- break;
-
- default :
- break loop23;
- }
- } while (true);
- } finally {dbg.exitSubRule(23);}
-
- dbg.location(707,17);
- pushFollow(FOLLOW_propertyModifier_in_propertyModifiers910);
- propertyModifier35=propertyModifier();
-
- state._fsp--;
-
- adaptor.addChild(root_0, propertyModifier35.getTree());
- dbg.location(707,34);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:707:34: ( WS )*
- try { dbg.enterSubRule(24);
-
- loop24:
- do {
- int alt24=2;
- try { dbg.enterDecision(24);
-
- int LA24_0 = input.LA(1);
-
- if ( (LA24_0==WS) ) {
- alt24=1;
- }
-
-
- } finally {dbg.exitDecision(24);}
-
- switch (alt24) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:707:35: WS
- {
- dbg.location(707,35);
- WS36=(Token)match(input,WS,FOLLOW_WS_in_propertyModifiers913);
- WS36_tree = (Object)adaptor.create(WS36);
- adaptor.addChild(root_0, WS36_tree);
-
-
- }
- break;
-
- default :
- break loop24;
- }
- } while (true);
- } finally {dbg.exitSubRule(24);}
-
-
- }
- break;
-
- default :
- break loop25;
- }
- } while (true);
- } finally {dbg.exitSubRule(25);}
-
- dbg.location(709,3);
- RCURLY37=(Token)match(input,RCURLY,FOLLOW_RCURLY_in_propertyModifiers925);
- RCURLY37_tree = (Object)adaptor.create(RCURLY37);
- adaptor.addChild(root_0, RCURLY37_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(710, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "propertyModifiers");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "propertyModifiers"
-
- public static class propertyModifier_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "propertyModifier"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:720:1: propertyModifier : ( 'readOnly' | 'union' | 'ordered' | 'unique' | 'nonunique' | 'subsets' subsetsProperty | redefinesProperty ) ;
- public final PropertyLabelParser.propertyModifier_return propertyModifier() throws RecognitionException {
- PropertyLabelParser.propertyModifier_return retval = new PropertyLabelParser.propertyModifier_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token string_literal38=null;
- Token string_literal39=null;
- Token string_literal40=null;
- Token string_literal41=null;
- Token string_literal42=null;
- Token string_literal43=null;
- PropertyLabelParser.subsetsProperty_return subsetsProperty44 = null;
-
- PropertyLabelParser.redefinesProperty_return redefinesProperty45 = null;
-
-
- Object string_literal38_tree=null;
- Object string_literal39_tree=null;
- Object string_literal40_tree=null;
- Object string_literal41_tree=null;
- Object string_literal42_tree=null;
- Object string_literal43_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "propertyModifier");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(720, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:721:3: ( ( 'readOnly' | 'union' | 'ordered' | 'unique' | 'nonunique' | 'subsets' subsetsProperty | redefinesProperty ) )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:722:3: ( 'readOnly' | 'union' | 'ordered' | 'unique' | 'nonunique' | 'subsets' subsetsProperty | redefinesProperty )
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(722,3);
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:722:3: ( 'readOnly' | 'union' | 'ordered' | 'unique' | 'nonunique' | 'subsets' subsetsProperty | redefinesProperty )
- int alt26=7;
- try { dbg.enterSubRule(26);
- try { dbg.enterDecision(26);
-
- switch ( input.LA(1) ) {
- case 56:
- {
- alt26=1;
- }
- break;
- case 57:
- {
- alt26=2;
- }
- break;
- case 58:
- {
- alt26=3;
- }
- break;
- case 59:
- {
- alt26=4;
- }
- break;
- case 60:
- {
- alt26=5;
- }
- break;
- case 61:
- {
- alt26=6;
- }
- break;
- case 62:
- {
- alt26=7;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 26, 0, input);
-
- dbg.recognitionException(nvae);
- throw nvae;
- }
-
- } finally {dbg.exitDecision(26);}
-
- switch (alt26) {
- case 1 :
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:723:5: 'readOnly'
- {
- dbg.location(723,5);
- string_literal38=(Token)match(input,56,FOLLOW_56_in_propertyModifier965);
- string_literal38_tree = (Object)adaptor.create(string_literal38);
- adaptor.addChild(root_0, string_literal38_tree);
-
- dbg.location(723,17);
- isReadOnly = true; modifiersUsed.put("readOnly", true);
-
- }
- break;
- case 2 :
- dbg.enterAlt(2);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:724:5: 'union'
- {
- dbg.location(724,5);
- string_literal39=(Token)match(input,57,FOLLOW_57_in_propertyModifier974);
- string_literal39_tree = (Object)adaptor.create(string_literal39);
- adaptor.addChild(root_0, string_literal39_tree);
-
- dbg.location(724,15);
- isDerivedUnion = true; modifiersUsed.put("union", true);
-
- }
- break;
- case 3 :
- dbg.enterAlt(3);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:725:5: 'ordered'
- {
- dbg.location(725,5);
- string_literal40=(Token)match(input,58,FOLLOW_58_in_propertyModifier984);
- string_literal40_tree = (Object)adaptor.create(string_literal40);
- adaptor.addChild(root_0, string_literal40_tree);
-
- dbg.location(725,15);
- isOrdered = true; modifiersUsed.put("ordered", true);
-
- }
- break;
- case 4 :
- dbg.enterAlt(4);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:726:5: 'unique'
- {
- dbg.location(726,5);
- string_literal41=(Token)match(input,59,FOLLOW_59_in_propertyModifier992);
- string_literal41_tree = (Object)adaptor.create(string_literal41);
- adaptor.addChild(root_0, string_literal41_tree);
-
- dbg.location(726,15);
- isUnique = true; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);
-
- }
- break;
- case 5 :
- dbg.enterAlt(5);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:727:5: 'nonunique'
- {
- dbg.location(727,5);
- string_literal42=(Token)match(input,60,FOLLOW_60_in_propertyModifier1001);
- string_literal42_tree = (Object)adaptor.create(string_literal42);
- adaptor.addChild(root_0, string_literal42_tree);
-
- dbg.location(727,17);
- isUnique = false; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);
-
- }
- break;
- case 6 :
- dbg.enterAlt(6);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:728:5: 'subsets' subsetsProperty
- {
- dbg.location(728,5);
- string_literal43=(Token)match(input,61,FOLLOW_61_in_propertyModifier1009);
- string_literal43_tree = (Object)adaptor.create(string_literal43);
- adaptor.addChild(root_0, string_literal43_tree);
-
- dbg.location(728,15);
- context = IContext.SUBSET_PROPERTY ;
- dbg.location(728,56);
- pushFollow(FOLLOW_subsetsProperty_in_propertyModifier1013);
- subsetsProperty44=subsetsProperty();
-
- state._fsp--;
-
- adaptor.addChild(root_0, subsetsProperty44.getTree());
-
- }
- break;
- case 7 :
- dbg.enterAlt(7);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:729:5: redefinesProperty
- {
- dbg.location(729,5);
- pushFollow(FOLLOW_redefinesProperty_in_propertyModifier1021);
- redefinesProperty45=redefinesProperty();
-
- state._fsp--;
-
- adaptor.addChild(root_0, redefinesProperty45.getTree());
-
- }
- break;
-
- }
- } finally {dbg.exitSubRule(26);}
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("PropertyModifierRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(731, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "propertyModifier");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "propertyModifier"
-
- public static class subsetsProperty_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "subsetsProperty"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:742:1: subsetsProperty : id= IDENTIFIER ;
- public final PropertyLabelParser.subsetsProperty_return subsetsProperty() throws RecognitionException {
- PropertyLabelParser.subsetsProperty_return retval = new PropertyLabelParser.subsetsProperty_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
-
- Object id_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "subsetsProperty");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(742, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:743:3: (id= IDENTIFIER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:744:3: id= IDENTIFIER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(744,5);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_subsetsProperty1173);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(745,3);
-
- // find property by name
- String propertyName = id.getText();
- Property tmpProperty = findSubsettedPropertyByName(propertyName, property);
- subsettedProperties.add(tmpProperty);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("subsetsPropertyRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(751, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "subsetsProperty");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "subsetsProperty"
-
- public static class redefinesProperty_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
- // $ANTLR start "redefinesProperty"
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:761:1: redefinesProperty : 'redefines' id= IDENTIFIER ;
- public final PropertyLabelParser.redefinesProperty_return redefinesProperty() throws RecognitionException {
- PropertyLabelParser.redefinesProperty_return retval = new PropertyLabelParser.redefinesProperty_return();
- retval.start = input.LT(1);
-
- Object root_0 = null;
-
- Token id=null;
- Token string_literal46=null;
-
- Object id_tree=null;
- Object string_literal46_tree=null;
-
- try { dbg.enterRule(getGrammarFileName(), "redefinesProperty");
- if ( getRuleLevel()==0 ) {dbg.commence();}
- incRuleLevel();
- dbg.location(761, 1);
-
- try {
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:762:3: ( 'redefines' id= IDENTIFIER )
- dbg.enterAlt(1);
-
- // D:\\Workspaces\\Papyrus_Branch_0.7\\org.eclipse.papyrus.parsers_TRUNK\\resources\\grammars\\PropertyLabel.g:763:3: 'redefines' id= IDENTIFIER
- {
- root_0 = (Object)adaptor.nil();
-
- dbg.location(763,3);
- context = IContext.REDEFINE_PROPERTY ;
- dbg.location(763,46);
- string_literal46=(Token)match(input,62,FOLLOW_62_in_redefinesProperty1212);
- string_literal46_tree = (Object)adaptor.create(string_literal46);
- adaptor.addChild(root_0, string_literal46_tree);
-
- dbg.location(763,58);
- context = IContext.REDEFINE_PROPERTY ;
- dbg.location(763,103);
- id=(Token)match(input,IDENTIFIER,FOLLOW_IDENTIFIER_in_redefinesProperty1218);
- id_tree = (Object)adaptor.create(id);
- adaptor.addChild(root_0, id_tree);
-
- dbg.location(764,3);
-
- // find property by name
- String propertyName = id.getText();
- Property tmpProperty = findRedefinedPropertyByName(propertyName, property);
- redefinedProperties.add(tmpProperty);
-
-
- }
-
- retval.stop = input.LT(-1);
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
- catch (MismatchedTokenException mte) {
-
- reportError(mte);
- throw (new RuntimeException("redefinesPropertyRule"));
-
- }
- catch (RecognitionException re) {
-
- reportError(re);
- throw(re);
-
- }
- finally {
- }
- dbg.location(770, 3);
-
- }
- finally {
- dbg.exitRule(getGrammarFileName(), "redefinesProperty");
- decRuleLevel();
- if ( getRuleLevel()==0 ) {dbg.terminate();}
- }
-
- return retval;
- }
- // $ANTLR end "redefinesProperty"
-
- // Delegated rules
-
-
-
-
- public static final BitSet FOLLOW_WS_in_label46 = new BitSet(new long[]{0x0000000000000FD0L});
- public static final BitSet FOLLOW_visibility_in_label53 = new BitSet(new long[]{0x0000000000000FD0L});
- public static final BitSet FOLLOW_WS_in_label56 = new BitSet(new long[]{0x0000000000000FD0L});
- public static final BitSet FOLLOW_isDerived_in_label68 = new BitSet(new long[]{0x0000000000000FD0L});
- public static final BitSet FOLLOW_WS_in_label71 = new BitSet(new long[]{0x0000000000000FD0L});
- public static final BitSet FOLLOW_name_in_label83 = new BitSet(new long[]{0x0000000000000030L});
- public static final BitSet FOLLOW_WS_in_label86 = new BitSet(new long[]{0x0000000000000030L});
- public static final BitSet FOLLOW_COLON_in_label92 = new BitSet(new long[]{0x0080000000000810L});
- public static final BitSet FOLLOW_property_type_in_label102 = new BitSet(new long[]{0x0000000000061002L});
- public static final BitSet FOLLOW_fullMultiplicity_in_label110 = new BitSet(new long[]{0x0000000000060012L});
- public static final BitSet FOLLOW_WS_in_label115 = new BitSet(new long[]{0x0000000000060012L});
- public static final BitSet FOLLOW_defaultValue_in_label124 = new BitSet(new long[]{0x0000000000040002L});
- public static final BitSet FOLLOW_propertyModifiers_in_label134 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_WS_in_label139 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_PLUS_in_visibility203 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_MINUS_in_visibility218 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SHARP_in_visibility232 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_TILDE_in_visibility246 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_DIV_in_isDerived287 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_name326 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_WS_in_property_type375 = new BitSet(new long[]{0x0080000000000810L});
- public static final BitSet FOLLOW_type_in_property_type383 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_55_in_property_type391 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_type451 = new BitSet(new long[]{0x0000000000000812L});
- public static final BitSet FOLLOW_WS_in_type458 = new BitSet(new long[]{0x0000000000000812L});
- public static final BitSet FOLLOW_IDENTIFIER_in_type475 = new BitSet(new long[]{0x0000000000000812L});
- public static final BitSet FOLLOW_WS_in_type484 = new BitSet(new long[]{0x0000000000000812L});
- public static final BitSet FOLLOW_LSQUARE_in_fullMultiplicity537 = new BitSet(new long[]{0x0000000000006000L});
- public static final BitSet FOLLOW_RANGE_VALUE_in_fullMultiplicity557 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_INTEGER_in_fullMultiplicity567 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_RSQUARE_in_fullMultiplicity577 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INTEGER_in_lowerMultiplicity629 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_unlimitedNatural_in_upperMultiplicity650 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STAR_in_unlimitedNatural678 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INTEGER_in_unlimitedNatural693 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EQ_in_defaultValue719 = new BitSet(new long[]{0x7FFFFFFFFFFBFFF0L});
- public static final BitSet FOLLOW_expression_in_defaultValue725 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_set_in_expression819 = new BitSet(new long[]{0x7FFFFFFFFFFBFFF2L});
- public static final BitSet FOLLOW_LCURLY_in_propertyModifiers868 = new BitSet(new long[]{0x7F00000000000010L});
- public static final BitSet FOLLOW_WS_in_propertyModifiers871 = new BitSet(new long[]{0x7F00000000000010L});
- public static final BitSet FOLLOW_propertyModifier_in_propertyModifiers881 = new BitSet(new long[]{0x0000000000180010L});
- public static final BitSet FOLLOW_WS_in_propertyModifiers884 = new BitSet(new long[]{0x0000000000180010L});
- public static final BitSet FOLLOW_COMMA_in_propertyModifiers903 = new BitSet(new long[]{0x7F00000000000010L});
- public static final BitSet FOLLOW_WS_in_propertyModifiers906 = new BitSet(new long[]{0x7F00000000000010L});
- public static final BitSet FOLLOW_propertyModifier_in_propertyModifiers910 = new BitSet(new long[]{0x0000000000180010L});
- public static final BitSet FOLLOW_WS_in_propertyModifiers913 = new BitSet(new long[]{0x0000000000180010L});
- public static final BitSet FOLLOW_RCURLY_in_propertyModifiers925 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_56_in_propertyModifier965 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_57_in_propertyModifier974 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_58_in_propertyModifier984 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_59_in_propertyModifier992 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_60_in_propertyModifier1001 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_61_in_propertyModifier1009 = new BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_subsetsProperty_in_propertyModifier1013 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_redefinesProperty_in_propertyModifier1021 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_IDENTIFIER_in_subsetsProperty1173 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_62_in_redefinesProperty1212 = new BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_IDENTIFIER_in_redefinesProperty1218 = new BitSet(new long[]{0x0000000000000002L});
-
-} \ No newline at end of file
diff --git a/plugins/others/org.eclipse.papyrus.parsers/build.properties b/plugins/others/org.eclipse.papyrus.parsers/build.properties
deleted file mode 100644
index 96db02147a9..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/build.properties
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-#Mon Sep 12 09:30:02 CEST 2011
-bin.includes=plugin.xml,META-INF/,.,resources/icons/,plugin.properties,about.html
-output..=bin/
-src.includes=resources/,.antlr-eclipse,about.html,plugin.xml,META-INF/,.,resources/icons/,plugin.properties
-source..=src/,antlrsrc/
-bin..=bin/
diff --git a/plugins/others/org.eclipse.papyrus.parsers/plugin.properties b/plugins/others/org.eclipse.papyrus.parsers/plugin.properties
deleted file mode 100644
index f57dee3ce79..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/plugin.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# * Copyright (c) 2008 CEA LIST.
-# * All rights reserved. This program and the accompanying materials
-# * are made available under the terms of the Eclipse Public License v1.0
-# * which accompanies this distribution, and is available at
-# * http://www.eclipse.org/legal/epl-v10.html
-# *
-# * Contributors:
-# * CEA LIST - initial API and implementation
-###############################################################################
-pluginName=Papyrus UML Parsers (Incubation)
-providerName=Eclipse Modeling Project
diff --git a/plugins/others/org.eclipse.papyrus.parsers/plugin.xml b/plugins/others/org.eclipse.papyrus.parsers/plugin.xml
deleted file mode 100644
index 9d83d4bdcd7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/plugin.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.2"?>
-<plugin>
- <!--
- <extension
- point="org.eclipse.papyrus.extensionpoints.editors.DirectEditor">
- <DirectEditor
- contributor="CEA LIST"
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyConfigurationForUML"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Property.gif"
- language="Papyrus UML"
- objectToEdit="org.eclipse.uml2.uml.Property">
- <simpleeditor
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyConfigurationForUML">
- </simpleeditor>
- </DirectEditor>
- <DirectEditor
- contributor="CEA LIST"
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyConfigurationForUML"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Port.gif"
- language="Papyrus UML"
- objectToEdit="org.eclipse.uml2.uml.Port">
- <simpleeditor
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyConfigurationForUML">
- </simpleeditor>
- </DirectEditor>
- <DirectEditor
- contributor="CEA LIST"
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.collaborationuselabel.CollaborationUseConfigurationForUML"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/CollaborationUse.gif"
- language="Papyrus UML"
- objectToEdit="org.eclipse.uml2.uml.CollaborationUse">
- <simpleeditor
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.collaborationuselabel.CollaborationUseConfigurationForUML">
- </simpleeditor>
- </DirectEditor>
- <DirectEditor
- contributor="CEA LIST"
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.parameterlabel.ParameterConfigurationForUML"
- icon="platform:/plugin/org.eclipse.uml2.uml.edit/icons/full/obj16/Parameter.gif"
- language="Papyrus UML"
- objectToEdit="org.eclipse.uml2.uml.Parameter">
- <simpleeditor
- editorConfiguration="org.eclipse.papyrus.parsers.texteditor.parameterlabel.ParameterConfigurationForUML">
- </simpleeditor>
- </DirectEditor>
- </extension>
-
- <extension
- point="org.eclipse.papyrus.extensionpoints.editors.DirectEditor">
- <DirectEditor
- editorConfiguration="com.cea.papyrus.classdiagram.parsers.texteditor.propertylabel.PropertyConfigurationForUML"
- language="UML"
- objectToEdit="org.eclipse.uml2.uml.Property">
- </DirectEditor>
- </extension>
- -->
-
-</plugin>
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/build.xml b/plugins/others/org.eclipse.papyrus.parsers/resources/build.xml
deleted file mode 100644
index 5f7e3b5af58..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/build.xml
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0"?>
-
-<project name="VisualProfileDesignToolParsers" default="All" basedir=".">
-
- <property name="Name" value="VisualProfileDesignToolParsers"/>
- <property name="version" value="0.1"/>
- <property name="year" value="2006"/>
- <property name="build.compiler" value="modern"/>
-
- <!-- directories -->
- <property name="base.dir" value="${basedir}"/>
- <property name="grammar.dir" value="${base.dir}/grammars"/>
- <property name="result.dir" value="${base.dir}/.."/>
- <property name="src.dir" value="${result.dir}/antlrsrc"/>
- <!--<property name="bin.dir" value="${result.dir}/bin"/>
- <property name="jar.dir" value="${result.dir}/jar"/>-->
-
- <!-- grammars -->
- <property name="PropertyLabel" value="${grammar.dir}/PropertyLabel.g"/>
- <property name="OperationLabelParser" value="${grammar.dir}/OperationLabelParser.g"/>
- <property name="ParameterLabelParser" value="${grammar.dir}/ParameterLabelParser.g"/>
- <property name="PortLabelParser" value="${grammar.dir}/PortLabelParser.g"/>
- <property name="CommonLexer" value="${grammar.dir}/CommonLexer.g"/>
-
- <property name="VSLparser" value="${grammar.dir}/VSL_Parser.g"/>
- <property name="VSLlexer" value="${grammar.dir}/VSL_Lexer.g"/>
-
-
- <!-- names -->
- <property name="jartool.name" value="configuration"/>
-
- <property name="build.dir" value="${base.dir}/build"/>
- <property name="bin.dir" value="${base.dir}/bin"/>
- <property name="resource.dir" value="${base.dir}/resources"/>
- <property name="templates.dir" value="${resource.dir}/templates"/>
- <property name="build.jar" value="${build.dir}/dist"/>
- <property name="test.dir" value="${resource.dir}/test"/>
- <property name="examples.dir" value="${base.dir}/examples"/>
- <property name="tool.dir" value="${base.dir}/../ThirdParty"/>
- <property name="generation.dir" value="org/eclipse/papyrus/parsers/antlr"/>
-
- <property name="eclipse.dir" value="D:/Outils/Dev/Papyrus-2.x-Dev/Target/eclipse-modeling-ganymede-SR1-incubation-win32/eclipse"/>
- <property name="antlr.jar" value="D:/Outils/Dev/antlr-2.7.7/antlr-2.7.7.jar:D:/Outils/Dev/antlr-2.7.7/stringtemplate.jar:D:/Outils/Dev/antlr-3.0/antlr-3.0.jar"/>
- <property name="emf_common.jar" value="${eclipse.dir}/plugins/org.eclipse.emf.codegen_2.4.0.v200808251517.jar"/>
- <property name="emf_core.jar" value="${eclipse.dir}/plugins/org.eclipse.emf.ecore_2.4.1.v200808251517.jar"/>
- <property name="uml2.jar" value="${eclipse.dir}/plugins/org.eclipse.uml2.uml_2.2.0.v200805141133.jar"/>
- <property name="swt.jar" value="${eclipse.dir}/plugins/org.eclipse.swt.win32.win32.x86_3.4.1.v3449c.jar"/>
-
-
- <property name="classpath" value=".:${bin.dir}:${antlr.jar}:${emf_common.jar}:${emf_core.jar}:${uml2.jar}:${swt.jar}"/>
-
- <property name="debug" value="on"/>
- <property name="optimize" value="off"/>
- <property name="deprecation" value="off"/>
-
-
- <!-- Special properties to run -->
- <property name="jartool.name" value="AL_parser"/>
- <property name="jarfile.name" value="configuration"/>
-
- <!-- ================================================================ -->
- <!-- generate code, compile, run (default task) -->
- <!-- ================================================================ -->
- <target name="All" description="Make all : Clean, Generate Grammar, Compile, Jar_tool, Launch_tool, and copy">
- <echo message="Making all"/>
- <!--<ant target="Clean"/>-->
- <ant antfile="build.xml" target="GenerateGrammar"/>
- <!--<ant antfile="build.xml" target="CopyFiles"/>
- <ant antfile="build.xml" target="Compile"/>
- <ant antfile="build.xml" target="JarTool"/>
- <ant target="Run"/>
- <ant target="Copy sources"/>-->
- <!--<ant target="Jar_tool"/>
- <ant target="Launch_tool"/>
- <ant target="Copy jar into plugin project"/>-->
- </target>
-
- <!-- ================================================================ -->
- <!-- Compile the source directory -->
- <!-- ================================================================ -->
- <target name="Clean" description="Remove tool jars">
- <delete verbose="true">
- <fileset dir="${src.dir}/${generation.dir}" includes="**"/>
- </delete>
- </target>
-
- <!-- ================================================================ -->
- <!-- Generate Grammar -->
- <!-- ================================================================ -->
- <target name="GenerateGrammar" description="Generates Java Files from ANTLR Grammar">
- <echo message="Generates Template grammar ..."/>
- <echo message="${classpath}"/>
-
- <echo message="Grammar : PropertyLabel"/>
- <java dir="${src.dir}/${generation.dir}" classname="org.antlr.Tool" fork='yes'>
- <classpath path="${classpath}"/>
- <arg value="${PropertyLabel}"/>
- </java>
- <!--<java dir="${src.dir}/${generation.dir}" classname="antlr.Tool" fork='yes'>
- <classpath path="${classpath}"/>
- <arg value="${OperationLabelParser}"/>
- </java>
- <java dir="${src.dir}/${generation.dir}" classname="antlr.Tool" fork='yes'>
- <classpath path="${classpath}"/>
- <arg value="${ParameterLabelParser}"/>
- </java>
- <java dir="${src.dir}/${generation.dir}" classname="antlr.Tool" fork='yes'>
- <classpath path="${classpath}"/>
- <arg value="${PortLabelParser}"/>
- </java>
-
- <java dir="${src.dir}/${generation.dir}" classname="antlr.Tool" fork='yes'>
- <classpath path="${classpath}"/>
- <arg value="${VSLparser}"/>
- </java>
- <java dir="${src.dir}/${generation.dir}" classname="antlr.Tool" fork='yes'>
- <classpath path="${classpath}"/>
- <arg value="${VSLlexer}"/>
- </java>
- -->
-
- </target>
-
- <!-- ================================================================ -->
- <!-- Copy Files -->
- <!-- ================================================================ -->
- <target name="CopyFiles" description="Copy generated files">
- <copy todir="${src.dir}/com/cea/actionlanguage/sharedresources/texteditor/configuration" verbose="true">
- <fileset dir="${grammar.dir}">
- <include name="**.java"/>
- </fileset>
- </copy>
- </target>
-
-
-
- <!-- ================================================================ -->
- <!-- Compile the source directory srcdir="${src.dir}" -->
- <!-- ================================================================ -->
- <target name="Compile" description="Compile the configuration tool">
- <echo message="Compiling java files"/>
- <javac srcdir="${src.dir}" destdir="${bin.dir}"
- debug="${debug}"
- deprecation="${deprecation}">
- <classpath path="${classpath}"/>
- </javac>
- </target>
-
- <!-- ================================================================ -->
- <!-- Run -->
- <!-- ================================================================ -->
- <target name="Run" description="Run the test">
- <java dir="${bin.dir}" classname="com.cea.a2cmapping.test.Test" fork="true" >
- <classpath path="${classpath}"/>
- <arg value="/A2CMapping.parser/resources/grammars/a2c.acm"/>
- </java>
- </target>
-
-
- <!-- =================================================================== -->
- <!-- Copy generated files to the global project -->
- <!-- =================================================================== -->
- <target name="Copy sources">
- <echo message="Copy sources to plugin"/>
- <copy todir="${targetPlugin.dir}/src/" verbose="true">
- <fileset dir="${pluginsrc.dir}" includes="**"/>
- </copy>
- </target>
-
-
-
- <!-- =================================================================== -->
- <!-- Jar the tool -->
- <!-- =================================================================== -->
- <target name="JarTool">
- <jar jarfile="${jar.dir}/${jartool.name}.jar"
- basedir="${bin.dir}"
- includes="com/cea/**"/>
- <jar jarfile="${jar.dir}/${jartool.name}src.jar"
- basedir="${src.dir}"
- includes="com/cea/**"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- launch the tool -->
- <!-- =================================================================== -->
- <target name="Launch_tool">
- <echo message="copy jar files to tool dir"/>
- <copy overwrite="true" todir="${tool.dir}">
- <fileset dir="${build.jar}" includes="*.jar"/>
- </copy>
- <echo message="launch the tool"/>
- <ant target="All" antfile="${tool.dir}/build.xml" inheritall="false"/>
- </target>
-
- <!-- =================================================================== -->
- <!-- Copy generated files to the global project -->
- <!-- =================================================================== -->
- <target name="Copy jar into plugin project">
- <echo message="Copy jar into plugin project"/>
- <copy todir="${targetPlugin.dir}/" verbose="true">
- <fileset dir="${jar.dir}" includes="*.jar"></fileset>
- </copy>
- </target>
-
-</project>
-
-<!-- End of file -->
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.g b/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.g
deleted file mode 100644
index ff681e74e42..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.g
+++ /dev/null
@@ -1,535 +0,0 @@
-grammar CollaborationUseLabel;
-
-options {
- language = Java;
-}
-
-@header {
-package org.eclipse.papyrus.parsers.antlr;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.papyrus.parsers.texteditor.collaborationuselabel.IContext;
-import org.eclipse.papyrus.parsers.util.IErrorReporter;
-import org.eclipse.papyrus.parsers.util.NameException;
-import org.eclipse.papyrus.parsers.util.MultiplicityException;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.papyrus.parsers.util.Messages;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.CollaborationUse;
-import org.eclipse.uml2.uml.VisibilityKind;
-}
-
-@lexer::header {
-package org.eclipse.papyrus.parsers.antlr;
-
-import org.eclipse.uml2.uml.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-
-import org.eclipse.papyrus.parsers.texteditor.collaborationuselabel.IContext;
-}
-
-@members{
- public CollaborationUseLabelParser(TokenStream lexer, CollaborationUse element, IErrorReporter reporter) {
- this(lexer);
- setCollaborationUse(element);
- setErrorReporter(reporter);
- }
-
- /**
- * Validation state (true = validation : does not modify the CollaborationUse)
- */
- private boolean isValidation = false;
-
-
- private static final boolean DEBUG = false;
- /**
- * @return the isValidation boolean
- */
- public boolean isValidation() {
- return isValidation;
- }
-
- /**
- * @param isValidation the isValidation to set (true -> do not modify the CollaborationUse)
- */
- public void setValidation(boolean isValidation) {
- this.isValidation = isValidation;
- }
-
- private Package nearestPackage;
-
- /**
- * Modified CollaborationUse
- */
- private CollaborationUse element;
-
- /**
- * @return the CollaborationUse
- */
- public CollaborationUse getCollaborationUse() {
- return element;
- }
-
- /**
- * @param element the CollaborationUse to set
- */
- public void setCollaborationUse(CollaborationUse element) {
- this.element = element;
- this.nearestPackage = element.getNearestPackage();
- }
-
- /** debug mode */
- protected final boolean debugMode = false;
-
- /**
- * Debug method (~System.out.println)
- */
- private void debug(Object debug) {
- if(debugMode) {
- System.out.println(debug);
- }
- }
-
- /**
- * Error method (~System.err.println)
- */
- private void error(Object debug) {
- if(debugMode) {
- System.err.println(debug);
- }
- }
-
- /**
- * Context (for completion processor)
- */
- private int context = IContext.DEFAULT;
-
- /**
- * @return the context
- */
- public int getContext() {
- return context;
- }
-
- /**
- * @param context the context to set
- */
- public void setContext(int context) {
- this.context = context;
- }
-
- // all possible modified elements on CollaborationUse
- String name;
- VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
- Collaboration type=null;
-
-
- /**
- * Apply values to the CollaborationUse. <BR>
- * Modifications can not be applied directly. The parser must wait the end,
- * until it reaches the end of the label. If the end is reached without any error,
- * new values can be applied to the target CollaborationUse.
- */
- private void applyValues() {
- if(!isValidation){
- debug("\nvalues applied :");
- debug("+ name: "+name);
- debug("+ visibility: "+visibility);
- debug("+ type: "+type);
-
- element.setName(name);
- element.setVisibility(visibility);
- element.setType(type);
- }
- }
-
-
- /** reporting errors */
- private IErrorReporter errorReporter = null;
-
- public void setErrorReporter(IErrorReporter errorReporter) {
- this.errorReporter = errorReporter;
- }
-
- public IErrorReporter getErrorReporter() {
- return errorReporter;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getErrorMessage(RecognitionException exception, String[] arg1) {
- if (exception instanceof NameException) {
- return "Please enter a correct name for the property";
- }
- return super.getErrorMessage(exception, arg1);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void emitErrorMessage(String msg) {
- errorReporter.reportError(msg);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void recover(IntStream arg0, RecognitionException arg1) {
- // do nothing
- }
-}
-
-label :
- (visibility {context = IContext.VISIBILITY; })?
- name
- COLON
- {
- context = IContext.AFTER_COLON;
- }
- collaboration_use_type { context = IContext.COLLABORATION_USE_TYPE; }
- {
- applyValues();
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- String index = Integer.toString(mte.index);
- String description = mte.getLocalizedMessage().substring(mte.getLocalizedMessage().indexOf('('),
- mte.getLocalizedMessage().length());
- String tokenText = mte.token.getText();
- String text = Messages.bind(Messages.MismatchedToken, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- } catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- } catch [RecognitionException re] {
-
- reportError(re);
- throw (re);
-
- }
-
-
-visibility
- :
- (
- ( PLUS { visibility = VisibilityKind.PUBLIC_LITERAL; } )
- | ( MINUS { visibility = VisibilityKind.PRIVATE_LITERAL;} )
- | ( SHARP { visibility = VisibilityKind.PROTECTED_LITERAL;} )
- | ( TILDE { visibility = VisibilityKind.PACKAGE_LITERAL;} )
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("VisibilityRule"));
- }
-
-
-name
- :
- id=IDENTIFIER
- {
- name = id.getText();
- context = IContext.NAME;
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException(Messages.NameMissing));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-collaboration_use_type
- :
- (WS)*
- ( type |
- '<Undefined>'
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("CollaborationUseTypeRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- throw new RuntimeException("Waiting for a valid type (Collaboration) or <Undefined>");
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-type
- :
- id=IDENTIFIER
- {
- String typeName = id.getText() ;
- Collaboration utilType = PackageUtil.findCollaborationByName(nearestPackage, typeName);
-
- if (utilType != null) {
- type = utilType;
- } else {
- // the type actually does not exist
- throw new TypeRecognitionException("Collaboration "+typeName+" not found for CollaborationUse "+element.getName(),typeName);
- }
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("TypeRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-NL
- : ( '\r' '\n'
- | '\n' '\r' //Improbable
- | '\r'
- | '\n'
- )
- { $channel=HIDDEN;}
- ;
-
-
-WS
- : (' ' | '\t' | '\f')+ {$channel=HIDDEN;}
- ;
-
-QUESTION_MARK
- : '?'
- ;
-
-LNOT
- : '!'
- ;
-
-DOUBLE_QUOTE
- : '\"'
- ;
-
-SINGLE_QUOTE
- : '\''
- ;
-
-LPAREN
- : '('
- ;
-
-RPAREN
- : ')'
- ;
-
-LSQUARE
- : '['
- ;
-
-RSQUARE
- : ']'
- ;
-
-LCURLY
- : '{'
- ;
-
-DOUBLE_LCURLY
- : '{{' ;
-
-RCURLY
- : '}'
- ;
-
-DOUBLE_RCURLY
- : '}}'
- ;
-
-LOGICAL_AND
- : '&'
- ;
-
-DOUBLE_LOGICAL_AND
- : '&&'
- ;
-
-PIPE
- : '|'
- ;
-
-DOUBLE_PIPE
- : '||'
- ;
-
-POINT
- : '.'
- ;
-
-RANGE
- : '..'
- ;
-
-COMMA
- : ','
- ;
-
-SEMI
- : ';'
- ;
-
-SHARP
- : '#'
- ;
-
-TILDE
- : '~'
- ;
-
-COLON
- : ':'
- ;
-
-FOUR_POINTS
- : '::'
- ;
-
-RULE_ASSIGN
- : '::=' ;
-
-ARROW
- : '->'
- ;
-
-STAR
- : '*'
- ;
-
-DIV
- : '/'
- ;
-
-PLUS
- : '+'
- ;
-
-MINUS
- : '-'
- ;
-
-EQ
- : '='
- ;
-
-
-ISEQ
- : '=='
- ;
-
-ISNE
- : '!='
- ;
-
-LT : '<';
-
-DOUBLE_LT
- : '<<'
- ;
-
-LE
- : '<='
- ;
-
-GT
- : '>'
- ;
-
-DOUBLE_GT
- : '>>'
- ;
-
-GE
- : '>='
- ;
-
-
-INCR
- : '++'
- ;
-
-DECR
- : '--'
- ;
-
-CALLOPERATION
- : ':='
- ;
-
-fragment
-ALPHA
- : 'a'..'z'
- | 'A'..'Z'
- ;
-
-
-UNDERSCORE
- : '_'
- ;
-
-RANGE_VALUE
- : c1=INTEGER {setText("");} '..'
- ( c2=INTEGER { setText($c2.text);}
- | c2=STAR { setText("-1");})
- {
- setText($text + ","+ $c1.text);
- }
- ;
-
-REAL
- : INTEGER '.' INTEGER
- ;
-
-fragment
-INTEGER_OR_REAL_OR_RANGE !
- :
- (INTEGER RANGE) => RANGE_VALUE
- | (INTEGER POINT) => REAL
- | (INTEGER) => INTEGER
- ;
-
-INTEGER
- : '0'..'9'+;
-
-IDENTIFIER
- : (ALPHA|'0'..'9'|UNDERSCORE)+
- ;
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.tokens b/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.tokens
deleted file mode 100644
index 68002a66641..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/CollaborationUseLabel.tokens
+++ /dev/null
@@ -1,53 +0,0 @@
-COMMA=30
-DOUBLE_LT=41
-ISEQ=38
-MINUS=6
-INCR=46
-SHARP=7
-DOUBLE_RCURLY=23
-DECR=47
-ARROW=34
-DOUBLE_GT=44
-RULE_ASSIGN=33
-TILDE=8
-PIPE=26
-DOUBLE_PIPE=27
-INTEGER=51
-QUESTION_MARK=12
-RCURLY=22
-NL=11
-LCURLY=20
-LE=42
-RPAREN=17
-LPAREN=16
-SINGLE_QUOTE=15
-PLUS=5
-REAL=53
-LSQUARE=18
-RANGE=29
-FOUR_POINTS=32
-DOUBLE_LCURLY=21
-POINT=28
-WS=10
-ALPHA=49
-EQ=37
-LT=40
-GT=43
-DOUBLE_QUOTE=14
-RSQUARE=19
-DOUBLE_LOGICAL_AND=25
-RANGE_VALUE=52
-T__55=55
-SEMI=31
-GE=45
-LNOT=13
-LOGICAL_AND=24
-ISNE=39
-COLON=4
-INTEGER_OR_REAL_OR_RANGE=54
-DIV=36
-IDENTIFIER=9
-STAR=35
-UNDERSCORE=50
-CALLOPERATION=48
-'<Undefined>'=55
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.g b/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.g
deleted file mode 100644
index 96559bb2235..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.g
+++ /dev/null
@@ -1,854 +0,0 @@
-grammar ParameterLabel;
-
-options {
- language = Java;
-}
-
-@header {
-package org.eclipse.papyrus.parsers.antlr;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.papyrus.parsers.texteditor.parameterlabel.IContext;
-import org.eclipse.papyrus.parsers.util.IErrorReporter;
-import org.eclipse.papyrus.parsers.util.NameException;
-import org.eclipse.papyrus.parsers.util.MultiplicityException;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.papyrus.parsers.util.Messages;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.papyrus.uml.tools.utils.TemplateSignatureUtil;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Parameter;
-import org.eclipse.uml2.uml.ParameterDirectionKind;
-import org.eclipse.uml2.uml.TemplateableElement;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.VisibilityKind;
-}
-
-@lexer::header {
-package org.eclipse.papyrus.parsers.antlr;
-
-import org.eclipse.uml2.uml.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-
-import org.eclipse.papyrus.parsers.texteditor.parameterlabel.IContext;
-}
-
-@members{
- public ParameterLabelParser(TokenStream lexer, Parameter parameter, IErrorReporter reporter) {
- this(lexer);
- setParameter(parameter);
- setErrorReporter(reporter);
- this.modifiersUsed = new HashMap<String, Boolean>();
- modifiersUsed.put("ordered", false);
- modifiersUsed.put("unique", false);
- modifiersUsed.put("nonunique", false);
- modifiersUsed.put("stream", false);
- modifiersUsed.put("exception", false);
-
- }
-
- /**
- * Validation state (true = validation : does not modify the parameter
- */
- private boolean isValidation = false;
-
-
- private static final boolean DEBUG = false;
- /**
- * @return the isValidation boolean
- */
- public boolean isValidation() {
- return isValidation;
- }
-
- /**
- * @param isValidation the isValidation to set (true -> do not modify the parameter)
- */
- public void setValidation(boolean isValidation) {
- this.isValidation = isValidation;
- }
-
- private Package nearestPackage;
-
- /**
- * Modified Parameter
- */
- private Parameter parameter;
-
- /**
- * @return the parameter
- */
- public Parameter getParameter() {
- return parameter;
- }
-
- /**
- * @param parameter the parameter to set
- */
- public void setParameter(Parameter parameter) {
- this.parameter = parameter;
- this.nearestPackage = parameter.getNearestPackage();
- }
-
- /** debug mode */
- protected final boolean debugMode = false;
-
- /**
- * Debug method (~System.out.println)
- */
- private void debug(Object debug) {
- if(debugMode) {
- System.out.println(debug);
- }
- }
-
- /**
- * Error method (~System.err.println)
- */
- private void error(Object debug) {
- if(debugMode) {
- System.err.println(debug);
- }
- }
-
- /**
- * Context (for completion processor)
- */
- private int context = IContext.DEFAULT;
-
- /**
- * @return the context
- */
- public int getContext() {
- return context;
- }
-
- /**
- * @param context the context to set
- */
- public void setContext(int context) {
- this.context = context;
- }
-
- // all possible modified elements on parameter (with default values : necessary ?!)
- String name;
- VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
- ParameterDirectionKind direction = ParameterDirectionKind.IN_LITERAL;
- Type type=null;
- int lowerMultiplicity = 1; // default multiplicity = [1..1]
- int upperMultiplicity = 1; // default multiplicity = [1..1]
- String defaultValue=null;
- // parameter modifiers
- boolean isUnique = false; // default value = true but easier to use default = nonunique
- boolean isOrdered = false; // default value = false
- boolean isException = false; // default value = false
- boolean isStream = false; // default value = false
-
-
- /**
- * Apply values to the parameter. <BR>
- * Modifications can not be applied directly. The parser must wait the end,
- * until it reaches the end of the label. If the end is reached without any error,
- * new values can be applied to the target parameter.
- */
- private void applyValues() {
- if(!isValidation){
- debug("\nvalues applied :");
- debug("+ name: "+name);
- debug("+ visibility: "+visibility);
- debug("+ direction: "+direction);
- debug("+ type: "+type);
- debug("+ lower Multiplicity: "+lowerMultiplicity);
- debug("+ upper Multiplicity: "+upperMultiplicity);
- debug("+ default Value: "+defaultValue);
- debug("+ Parameter modifiers");
- debug("+ isUnique: "+isUnique);
- debug("+ isOrdered: "+isOrdered);
- debug("+ isException: "+isException);
- debug("+ isStream: "+isStream);
-
- parameter.setName(name);
- parameter.setVisibility(visibility);
- parameter.setDirection(direction);
- parameter.setType(type);
- parameter.setLower(lowerMultiplicity);
- parameter.setUpper(upperMultiplicity);
- parameter.setDefault(defaultValue);
- parameter.setIsUnique(isUnique);
- parameter.setIsOrdered(isOrdered);
- parameter.setIsException(isException);
- parameter.setIsStream(isStream);
- }
- }
-
- // vector that keeps modifiers already used (used for completion)
- public Map<String, Boolean> modifiersUsed;
-
- /**
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- * @param modifiersUsed the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /** reporting errors */
- private IErrorReporter errorReporter = null;
-
- public void setErrorReporter(IErrorReporter errorReporter) {
- this.errorReporter = errorReporter;
- }
-
- public IErrorReporter getErrorReporter() {
- return errorReporter;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getErrorMessage(RecognitionException exception, String[] arg1) {
- if (exception instanceof NameException) {
- return "Please enter a correct name for the parameter";
- }
- return super.getErrorMessage(exception, arg1);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void emitErrorMessage(String msg) {
- errorReporter.reportError(msg);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void recover(IntStream arg0, RecognitionException arg1) {
- throw new RuntimeException("no recover", arg1);
- // do nothing
- }
-
-}
-
-label :
- (WS)*
- (visibility (WS)* {context = IContext.VISIBILITY; } )?
- (direction (WS)* {context = IContext.DIRECTION; } )?
- name (WS)*
- COLON {context = IContext.AFTER_COLON;}
- parameter_type { context = IContext.MULTIPLICITY; }
- (fullMultiplicity { context = IContext.AFTER_MULTIPLICITY; } (WS)*)?
- (defaultValue { context = IContext.DEFAULT_VALUE; })?
- (parameterModifiers { context = IContext.PARAMETER_MODIFIERS; } (WS)*)?
- {
- applyValues();
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- String index = Integer.toString(mte.index);
- String description = mte.getLocalizedMessage().substring(mte.getLocalizedMessage().indexOf('('),
- mte.getLocalizedMessage().length());
- String tokenText = mte.token.getText();
- String text = Messages.bind(Messages.MismatchedToken, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- } catch [RecognitionException re] {
- reportError(re);
- throw (re);
-
- }
-
-
-visibility
- :
- (
- ( PLUS { visibility = VisibilityKind.PUBLIC_LITERAL; } )
- | ( MINUS { visibility = VisibilityKind.PRIVATE_LITERAL;} )
- | ( SHARP { visibility = VisibilityKind.PROTECTED_LITERAL;} )
- | ( TILDE { visibility = VisibilityKind.PACKAGE_LITERAL;} )
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("VisibilityRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
-
-
-direction
- :
- (
- ( IN { direction = ParameterDirectionKind.IN_LITERAL; } )
- | ( OUT { direction = ParameterDirectionKind.OUT_LITERAL;} )
- | ( INOUT { direction = ParameterDirectionKind.INOUT_LITERAL;} )
- | ( RETURN { direction = ParameterDirectionKind.RETURN_LITERAL;} )
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("Direction"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
-
-name
- :
- id=IDENTIFIER
- {
- name = id.getText();
- context = IContext.NAME;
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException(Messages.NameMissing));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-parameter_type
- :
- (WS)*
- ( type |
- '<Undefined>'
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("ParameterTypeRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- throw new RuntimeException("Waiting for a valid type or <Undefined>");
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-type
- @init{
- StringBuffer buffer = new StringBuffer();
- }
- :
- id=IDENTIFIER {buffer.append(id.getText());}
- (WS {//System.err.println("space added");
- buffer.append(" ");})*
- (
- id1=IDENTIFIER {buffer.append(id1.getText());}
- (WS {//System.err.println("space added");
- buffer.append(" ");})*
- )*
- {
- String typeName = buffer.toString().trim() ;
- //System.err.println("typeName: "+typeName);
- Type utilType = PackageUtil.findTypeByName(nearestPackage, typeName);
- // type = findTypeByName(typeName, parameter);
- // The type has not been found, but it may have been declared in the context of a template.
- if(utilType != null) {
- if (utilType instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)utilType;
- if (template.isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- template) ;
- } else {
- type = utilType;
- }
- }
- else {
- type = utilType;
- }
- } else {
- // The type has not been found, but it may have been declared in the context of a template.
- if (parameter.getOwner() instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)parameter.getOwner() ;
- if (template.isTemplate()) {
- utilType = TemplateSignatureUtil.findTypeByName(template.getOwnedTemplateSignature(), typeName) ;
- }
- }
- if (utilType == null) // the type actually does not exist
- throw new TypeRecognitionException("Type "+typeName+" not found for parameter "+parameter.getName(),typeName);
- else if (utilType instanceof TemplateableElement && ((TemplateableElement)utilType).isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- (TemplateableElement)utilType) ;
- }
- else {
- type = utilType;
- }
- }
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("TypeRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-fullMultiplicity
- :
- LSQUARE
- { context = IContext.IN_MULTIPLICITY; }
- /*(
- ( lowerMultiplicity POINT_POINT upperMultiplicity {
- if(lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
- throw new MultiplicityException("Lower bound ("+lowerMultiplicity+") is greater than upper bound ("+upperMultiplicity+")");
- }
- }
- )
- | upperMultiplicity {
- if(upperMultiplicity == -1) {
- lowerMultiplicity = 0;
- } else {
- lowerMultiplicity = upperMultiplicity;
- }
- }
- )*/
- (
- ra=RANGE_VALUE {
- // retrieving values. text = upper ',' lower
- String value = $ra.text;
- upperMultiplicity = Integer.parseInt(value.substring(0, value.lastIndexOf(',')));
- lowerMultiplicity = Integer.parseInt(value.substring(value.lastIndexOf(',') + 1, value.length()));
-
- if (lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
- throw new MultiplicityException("Lower bound (" + lowerMultiplicity
- + ") is greater than upper bound (" + upperMultiplicity + ")");
- }
-
- }
- | up=INTEGER {
- upperMultiplicity = Integer.parseInt($up.text);
- lowerMultiplicity = upperMultiplicity;
- }
- )
- RSQUARE
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("FullMultiplicityRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-
-lowerMultiplicity
- :
- in=INTEGER
- {
- lowerMultiplicity = Integer.parseInt(in.getText());
- }
- ;
-
-upperMultiplicity
- :
- um=unlimitedNatural
- {
- upperMultiplicity = um.value;
- }
- ;
-
-unlimitedNatural returns [int value = 0 ]
- :
- ( STAR { retval.value = -1; }
- | in=INTEGER { retval.value = Integer.parseInt(in.getText()); }
- )
- ;
-
-defaultValue
- :
- EQ dv = expression
- {
- // remove spaces at the begining
- defaultValue = dv.value.trim();
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-expression returns [String value = ""]
- @init{
- StringBuffer buffer = new StringBuffer();
- }
- :
- (
- options { greedy=false; }
- :
-
- id=~(LCURLY)
- {
- buffer.append(id.getText());
- }
- )+
- {
- retval.value = buffer.toString();
- }
- ;
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-parameterModifiers
- :
- LCURLY (WS)*
- { context = IContext.PARAMETER_MODIFIER; }
- parameterModifier (WS)*
- (
- { context = IContext.PARAMETER_MODIFIER; }
- COMMA (WS)* parameterModifier (WS)*
- )*
- RCURLY
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-parameterModifier
- :
- (
- 'ordered' { isOrdered = true; modifiersUsed.put("ordered", true); }
- | 'unique' { isUnique = true; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);}
- | 'nonunique' { isUnique = false; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);}
- | 'exception' { isException = true; modifiersUsed.put("exception", true);}
- | 'stream' { isStream = true; modifiersUsed.put("stream", true);}
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("ParameterModifierRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-NL
- : ( '\r' '\n'
- | '\n' '\r' //Improbable
- | '\r'
- | '\n'
- )
- { $channel=HIDDEN;}
- ;
-
-
-WS
- : (' ' | '\t' | '\f')+ // {$channel=HIDDEN;}
- ;
-
-QUESTION_MARK
- : '?'
- ;
-
-LNOT
- : '!'
- ;
-
-DOUBLE_QUOTE
- : '\"'
- ;
-
-SINGLE_QUOTE
- : '\''
- ;
-
-LPAREN
- : '('
- ;
-
-RPAREN
- : ')'
- ;
-
-LSQUARE
- : '['
- ;
-
-RSQUARE
- : ']'
- ;
-
-LCURLY
- : '{'
- ;
-
-DOUBLE_LCURLY
- : '{{' ;
-
-RCURLY
- : '}'
- ;
-
-DOUBLE_RCURLY
- : '}}'
- ;
-
-LOGICAL_AND
- : '&'
- ;
-
-DOUBLE_LOGICAL_AND
- : '&&'
- ;
-
-PIPE
- : '|'
- ;
-
-DOUBLE_PIPE
- : '||'
- ;
-
-POINT
- : '.'
- ;
-
-RANGE
- : '..'
- ;
-
-COMMA
- : ','
- ;
-
-SEMI
- : ';'
- ;
-
-SHARP
- : '#'
- ;
-
-TILDE
- : '~'
- ;
-
-COLON
- : ':'
- ;
-
-FOUR_POINTS
- : '::'
- ;
-
-RULE_ASSIGN
- : '::=' ;
-
-ARROW
- : '->'
- ;
-
-STAR
- : '*'
- ;
-
-DIV
- : '/'
- ;
-
-PLUS
- : '+'
- ;
-
-MINUS
- : '-'
- ;
-
-EQ
- : '='
- ;
-
-
-ISEQ
- : '=='
- ;
-
-ISNE
- : '!='
- ;
-
-LT : '<';
-
-DOUBLE_LT
- : '<<'
- ;
-
-LE
- : '<='
- ;
-
-GT
- : '>'
- ;
-
-DOUBLE_GT
- : '>>'
- ;
-
-GE
- : '>='
- ;
-
-
-INCR
- : '++'
- ;
-
-DECR
- : '--'
- ;
-
-CALLOPERATION
- : ':='
- ;
-
-IN
- : 'in'
- ;
-
-OUT
- : 'out'
- ;
-
-INOUT
- : 'inout'
- ;
-
-RETURN
- : 'return'
- ;
-
-fragment
-ALPHA
- : 'a'..'z'
- | 'A'..'Z'
- ;
-
-
-UNDERSCORE
- : '_'
- ;
-
-RANGE_VALUE
- : c1=INTEGER {setText("");} '..'
- ( c2=INTEGER { setText($c2.text);}
- | c2=STAR { setText("-1");})
- {
- setText($text + ","+ $c1.text);
- }
- ;
-
-REAL
- : INTEGER '.' INTEGER
- ;
-
-fragment
-INTEGER_OR_REAL_OR_RANGE !
- :
- (INTEGER RANGE) => RANGE_VALUE
- | (INTEGER POINT) => REAL
- | (INTEGER) => INTEGER
- ;
-
-INTEGER
- : '0'..'9'+;
-
-IDENTIFIER
- : (ALPHA|'0'..'9'|UNDERSCORE)+
- ;
-
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.tokens b/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.tokens
deleted file mode 100644
index 07057d276b3..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/ParameterLabel.tokens
+++ /dev/null
@@ -1,67 +0,0 @@
-DOUBLE_LT=47
-COMMA=22
-ISEQ=44
-MINUS=7
-INCR=52
-SHARP=8
-DOUBLE_RCURLY=32
-DECR=53
-ARROW=42
-DOUBLE_GT=50
-OUT=11
-RULE_ASSIGN=41
-TILDE=9
-PIPE=35
-DOUBLE_PIPE=36
-INTEGER=17
-RCURLY=23
-QUESTION_MARK=25
-NL=24
-LCURLY=21
-T__62=62
-LE=48
-RPAREN=30
-T__61=61
-LPAREN=29
-T__59=59
-PLUS=6
-SINGLE_QUOTE=28
-REAL=57
-RANGE=38
-LSQUARE=15
-FOUR_POINTS=40
-DOUBLE_LCURLY=31
-POINT=37
-WS=4
-ALPHA=55
-EQ=20
-T__64=64
-LT=46
-GT=49
-DOUBLE_QUOTE=27
-RSQUARE=18
-DOUBLE_LOGICAL_AND=34
-RANGE_VALUE=16
-IN=10
-SEMI=39
-GE=51
-LNOT=26
-T__63=63
-ISNE=45
-RETURN=13
-LOGICAL_AND=33
-INOUT=12
-COLON=5
-INTEGER_OR_REAL_OR_RANGE=58
-DIV=43
-IDENTIFIER=14
-STAR=19
-T__60=60
-UNDERSCORE=56
-CALLOPERATION=54
-'unique'=61
-'nonunique'=62
-'ordered'=60
-'stream'=64
-'exception'=63
-'<Undefined>'=59
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.g b/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.g
deleted file mode 100644
index 79773d25b5b..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.g
+++ /dev/null
@@ -1,998 +0,0 @@
-grammar PropertyLabel;
-
-options {
- language = Java;
-}
-
-@header {
-package org.eclipse.papyrus.parsers.antlr;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.IContext;
-import org.eclipse.papyrus.parsers.util.IErrorReporter;
-import org.eclipse.papyrus.parsers.util.NameException;
-import org.eclipse.papyrus.parsers.util.MultiplicityException;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.papyrus.parsers.util.Messages;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.papyrus.uml.tools.utils.TemplateSignatureUtil;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.TemplateableElement;
-import org.eclipse.uml2.uml.Type;
-import org.eclipse.uml2.uml.VisibilityKind;
-}
-
-@lexer::header {
-package org.eclipse.papyrus.parsers.antlr;
-
-import org.eclipse.uml2.uml.*;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.IContext;
-}
-
-@members{
- public PropertyLabelParser(TokenStream lexer, Property property, IErrorReporter reporter) {
- this(lexer);
- setProperty(property);
- setErrorReporter(reporter);
- this.modifiersUsed = new HashMap<String, Boolean>();
- modifiersUsed.put("readOnly", false);
- modifiersUsed.put("union", false);
- modifiersUsed.put("ordered", false);
- modifiersUsed.put("unique", false);
- modifiersUsed.put("nonunique", false);
- modifiersUsed.put("subsets ", false);
- modifiersUsed.put("redefines ", false);
-
- }
-
- /**
- * Validation state (true = validation : does not modify the property
- */
- private boolean isValidation = false;
-
-
- private static final boolean DEBUG = false;
- /**
- * @return the isValidation boolean
- */
- public boolean isValidation() {
- return isValidation;
- }
-
- /**
- * @param isValidation the isValidation to set (true -> do not modify the property)
- */
- public void setValidation(boolean isValidation) {
- this.isValidation = isValidation;
- }
-
- private Package nearestPackage;
-
- /**
- * Modified Property
- */
- private Property property;
-
- /**
- * @return the property
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- * @param property the property to set
- */
- public void setProperty(Property property) {
- this.property = property;
- this.nearestPackage = property.getNearestPackage();
- }
-
- /** debug mode */
- protected final boolean debugMode = false;
-
- /**
- * Debug method (~System.out.println)
- */
- private void debug(Object debug) {
- if(debugMode) {
- System.out.println(debug);
- }
- }
-
- /**
- * Error method (~System.err.println)
- */
- private void error(Object debug) {
- if(debugMode) {
- System.err.println(debug);
- }
- }
-
- /**
- * Context (for completion processor)
- */
- private int context = IContext.DEFAULT;
-
- /**
- * @return the context
- */
- public int getContext() {
- return context;
- }
-
- /**
- * @param context the context to set
- */
- public void setContext(int context) {
- this.context = context;
- }
-
- // all possible modified elements on property (with default values : necessary ?!)
- String name;
- VisibilityKind visibility = VisibilityKind.PUBLIC_LITERAL;
- boolean isDerived = false;
- Type type=null;
- int lowerMultiplicity = 1; // default multiplicity = [1..1]
- int upperMultiplicity = 1; // default multiplicity = [1..1]
- String defaultValue=null;
- // property modifiers
- boolean isReadOnly = false; // default value = false
- boolean isUnique = false; // default value = true but easier to use default = nonunique
- boolean isOrdered = false; // default value = false
- boolean isDerivedUnion = false; // default value = false
- Collection subsettedProperties = new Vector();
- Collection redefinedProperties = new Vector();
-
-
- /**
- * Apply values to the property. <BR>
- * Modifications can not be applied directly. The parser must wait the end,
- * until it reaches the end of the label. If the end is reached without any error,
- * new values can be applied to the target property.
- */
- private void applyValues() {
- if(!isValidation){
- debug("\nvalues applied :");
- debug("+ name: "+name);
- debug("+ visibility: "+visibility);
- debug("+ isDerived: "+isDerived);
- debug("+ type: "+type);
- debug("+ lower Multiplicity: "+lowerMultiplicity);
- debug("+ upper Multiplicity: "+upperMultiplicity);
- debug("+ default Value: "+defaultValue);
- debug("+ Property modifiers");
- debug("+ isReadOnly: "+isReadOnly);
- debug("+ isUnique: "+isUnique);
- debug("+ isOrdered: "+isOrdered);
- debug("+ isDerivedUnion: "+isDerivedUnion);
- debug("+ SubsettedProperties: "+subsettedProperties);
- debug("+ RedefinedProperties: "+redefinedProperties);
-
- property.setName(name);
- property.setVisibility(visibility);
- property.setIsDerived(isDerived);
- property.setType(type);
- property.setLower(lowerMultiplicity);
- property.setUpper(upperMultiplicity);
- property.setDefault(defaultValue);
- property.setIsReadOnly(isReadOnly);
- property.setIsUnique(isUnique);
- property.setIsOrdered(isOrdered);
- property.setIsDerivedUnion(isDerivedUnion);
- property.getSubsettedProperties().clear();
- property.getSubsettedProperties().addAll(subsettedProperties);
- property.getRedefinedProperties().clear();
- property.getRedefinedProperties().addAll(redefinedProperties);
- }
- }
-
- /**
- * Find a type given its name and a context to find it.
- * @param name the name of the type
- * @return the type found or <code>null</code> if the element was not found.
- */
- /*
- private Type findTypeByName(String name, org.eclipse.uml2.uml.Element context) throws RecognitionException {
- Type type = null;
- int numTypes = 0;
- org.eclipse.uml2.uml.Package contextPackage = context.getNearestPackage();
-
- // seek the package in which the element should be found...
- Iterator it = contextPackage.getMembers().iterator();
- while( it.hasNext() ) {
- Object tmp = it.next();
- if( tmp instanceof Type ) {
- Type element = ( Type )tmp;
- if( element.getName().equals(name) ) {
- numTypes++;
- type = element;
- }
- }
- }
- if(type == null) {// type not found in default package. search in imports.
- it = contextPackage.getImportedMembers().iterator();
- while( it.hasNext() ) {
- Object tmp = it.next();
- if( tmp instanceof Type ) {
- Type element = ( Type )tmp;
- if( element.getName().equals(name) ) {
- type = element;
- numTypes++;
- }
- }
- }
- }
-
- if(numTypes == 0) {
- throw new RecognitionException("Type "+name+" not found for property "+property.getName());
- } else if(numTypes > 1) {
- debug("There are "+numTypes+" types with the same name....");
- }
-
- return type;
- }
- */
-
- /**
- * Find a subsetted property given its name and a context to find it.
- * @param name the name of the property
- * @return the property found or <code>null</code> if the element was not found.
- */
- private Property findSubsettedPropertyByName(String propertyName, Property property) throws TypeRecognitionException {
- Property subsettedProperty = null;
- Iterator<Property> it = PropertyUtil.getSubsettablesProperties(property, true).iterator();
- while (it.hasNext()) {
- Property tmpProperty = it.next();
- if(propertyName.equals(tmpProperty.getName())) {
- subsettedProperty = tmpProperty;
- }
- }
-
- if(subsettedProperty == null) {
- throw new TypeRecognitionException("Property "+propertyName+" has not been found or can not be subset", property.getName());
- } else {
- // a property has been found. check multiplicity
- checkProperty(property, subsettedProperty);
- }
- return subsettedProperty;
- }
-
- private void checkProperty(Property property, Property subsettedProperty) throws RuntimeException {
- int propertyLowerBound = lowerMultiplicity; // check the new one!!
- int subsettedPropertyLowerBound = subsettedProperty.getLower();
- int propertyUpperBound = upperMultiplicity; // check the new one!!
- int subsettedPropertyUpperBound = subsettedProperty.getUpper();
-
- Type propertyType = property.getType();
- Type subsettedPropertyType = subsettedProperty.getType();
-
- String propertyName = property.getName();
-
- /*
- * rule : property multiplicity is a subset of subsetted property multiplicity
- * 1. property Lower Bound must be greater (or equal) than subsetted property Lower Bound
- * 2. property Upper Bound must be lower (or equal) than subsetted property Upper Bound (if subsetted property Upper Bound is not '*')
- */
- if( propertyLowerBound < subsettedPropertyLowerBound) {
- throw new MultiplicityException(propertyName+" Lower Bound ("+lowerMultiplicity+") can not be lower than subsetted property Lower Bound ("+subsettedPropertyLowerBound+")");
- } else if(subsettedPropertyUpperBound != -1 && propertyUpperBound > subsettedPropertyUpperBound) {
- throw new MultiplicityException(propertyName+" Upper Bound ("+upperMultiplicity+") can not be greater than subsetted property Upper Bound ("+subsettedPropertyUpperBound+")");
- }
- if(!propertyType.conformsTo(subsettedPropertyType)) {
- throw new TypeRecognitionException(propertyName+" Type ("+propertyType.getName()+") does not conform to subsetted property type", subsettedPropertyType.getName());
- }
- }
-
- /**
- * Find a redefined property given its name and a context to find it.
- * @param name the name of the property
- * @return the property found or <code>null</code> if the element was not found.
- */
- private Property findRedefinedPropertyByName(String propertyName, Property property) throws TypeRecognitionException {
- Property redefinedProperty = PropertyUtil.findRedefinedPropertyByName(propertyName, property);
- if(redefinedProperty == null) {
- throw new TypeRecognitionException("Property "+propertyName+" has not been found or can not be redefined", property.getName());
- }
- return redefinedProperty;
- }
-
- // vector that keeps modifiers already used (used for completion)
- public Map<String, Boolean> modifiersUsed;
-
- /**
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- * @param modifiersUsed the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /** reporting errors */
- private IErrorReporter errorReporter = null;
-
- public void setErrorReporter(IErrorReporter errorReporter) {
- this.errorReporter = errorReporter;
- }
-
- public IErrorReporter getErrorReporter() {
- return errorReporter;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getErrorMessage(RecognitionException exception, String[] arg1) {
- if (exception instanceof NameException) {
- return "Please enter a correct name for the property";
- }
- return super.getErrorMessage(exception, arg1);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void emitErrorMessage(String msg) {
- errorReporter.reportError(msg);
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void recover(IntStream arg0, RecognitionException arg1) {
- throw new RuntimeException("no recover", arg1);
- // do nothing
- }
-
-
-}
-
-label :
- (WS)*
- (visibility (WS)*{context = IContext.VISIBILITY; } )?
- (isDerived (WS)* { context = IContext.IS_DERIVED; } )?
- name (WS)*
- COLON
- {
- context = IContext.AFTER_COLON;
- }
- property_type { context = IContext.MULTIPLICITY; }
- (fullMultiplicity { context = IContext.AFTER_MULTIPLICITY; } (WS)*)?
- (defaultValue { context = IContext.DEFAULT_VALUE; })?
- (propertyModifiers { context = IContext.PROPERTY_MODIFIERS; } (WS)*)?
- {
- applyValues();
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- String index = Integer.toString(mte.index);
- String description = mte.getLocalizedMessage().substring(mte.getLocalizedMessage().indexOf('('),
- mte.getLocalizedMessage().length());
- String tokenText = mte.token.getText();
- String text = Messages.bind(Messages.MismatchedToken, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- } catch [RecognitionException re] {
- reportError(re);
- throw (re);
-
- }
-
-
-visibility
- :
- (
- ( PLUS { visibility = VisibilityKind.PUBLIC_LITERAL; } )
- | ( MINUS { visibility = VisibilityKind.PRIVATE_LITERAL;} )
- | ( SHARP { visibility = VisibilityKind.PROTECTED_LITERAL;} )
- | ( TILDE { visibility = VisibilityKind.PACKAGE_LITERAL;} )
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("VisibilityRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
-
-
-isDerived
- :
- DIV { isDerived = true; }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("IsDerivedRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
-
- }
-
-name
- :
- id=IDENTIFIER
- {
- name = id.getText();
- context = IContext.NAME;
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException(Messages.NameMissing));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-property_type
- :
- (WS)*
- ( type |
- '<Undefined>'
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("PropertyTypeRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- throw new RuntimeException("Waiting for a valid type or <Undefined>");
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-type
- @init{
- StringBuffer buffer = new StringBuffer();
- }
- :
- id=IDENTIFIER {buffer.append(id.getText());}
- (WS {//System.err.println("space added");
- buffer.append(" ");})*
- (
- id1=IDENTIFIER {buffer.append(id1.getText());}
- (WS {//System.err.println("space added");
- buffer.append(" ");})*
- )*
- {
- String typeName = buffer.toString().trim() ;
- //System.err.println("typeName: "+typeName);
- Type utilType = PackageUtil.findTypeByName(nearestPackage, typeName);
- // type = findTypeByName(typeName, property);
- // The type has not been found, but it may have been declared in the context of a template.
- if(utilType != null) {
- if (utilType instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)utilType;
- if (template.isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- template) ;
- } else {
- type = utilType;
- }
- }
- else {
- type = utilType;
- }
- } else {
- // The type has not been found, but it may have been declared in the context of a template.
- if (property.getOwner() instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement)property.getOwner() ;
- if (template.isTemplate()) {
- utilType = TemplateSignatureUtil.findTypeByName(template.getOwnedTemplateSignature(), typeName) ;
- }
- }
- if (utilType == null) // the type actually does not exist
- throw new TypeRecognitionException("Type "+typeName+" not found for property "+property.getName(),typeName);
- else if (utilType instanceof TemplateableElement && ((TemplateableElement)utilType).isTemplate()) {
- throw new UnboundTemplateRecognitionException("Parameters of template " + typeName + " are not bound.",
- (TemplateableElement)utilType) ;
- }
- else {
- type = utilType;
- }
- }
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("TypeRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-fullMultiplicity
- :
- LSQUARE
- { context = IContext.IN_MULTIPLICITY; }
- /*(
- ( lowerMultiplicity POINT_POINT upperMultiplicity {
- if(lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
- throw new MultiplicityException("Lower bound ("+lowerMultiplicity+") is greater than upper bound ("+upperMultiplicity+")");
- }
- }
- )
- | upperMultiplicity {
- if(upperMultiplicity == -1) {
- lowerMultiplicity = 0;
- } else {
- lowerMultiplicity = upperMultiplicity;
- }
- }
- )*/
- (
- ra=RANGE_VALUE {
- // retrieving values. text = upper ',' lower
- String value = $ra.text;
- upperMultiplicity = Integer.parseInt(value.substring(0, value.lastIndexOf(',')));
- lowerMultiplicity = Integer.parseInt(value.substring(value.lastIndexOf(',') + 1, value.length()));
-
- if (lowerMultiplicity > upperMultiplicity && upperMultiplicity != -1) {
- throw new MultiplicityException("Lower bound (" + lowerMultiplicity
- + ") is greater than upper bound (" + upperMultiplicity + ")");
- }
-
- }
- | up=INTEGER {
- upperMultiplicity = Integer.parseInt($up.text);
- lowerMultiplicity = upperMultiplicity;
- }
- )
- RSQUARE
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("FullMultiplicityRule"));
- }
- catch [NoViableAltException noViableAltException] {
- reportError(noViableAltException);
- String index = Integer.toString(noViableAltException.index);
- String description = noViableAltException.grammarDecisionDescription.substring(
- noViableAltException.grammarDecisionDescription.indexOf('('),
- noViableAltException.grammarDecisionDescription.length());
- String tokenText = noViableAltException.token.getText();
- String text = Messages.bind(Messages.NoViableAltException, new String[] { index, description, tokenText });
- throw new RuntimeException(text);
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-
-lowerMultiplicity
- :
- in=INTEGER
- {
- lowerMultiplicity = Integer.parseInt(in.getText());
- }
- ;
-
-upperMultiplicity
- :
- um=unlimitedNatural
- {
- upperMultiplicity = um.value;
- }
- ;
-
-unlimitedNatural returns [int value = 0 ]
- :
- ( STAR { retval.value = -1; }
- | in=INTEGER { retval.value = Integer.parseInt(in.getText()); }
- )
- ;
-
-defaultValue
- :
- EQ dv = expression
- {
- // remove spaces at the begining
- defaultValue = dv.value.trim();
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-expression returns [String value = ""]
- @init{
- StringBuffer buffer = new StringBuffer();
- }
- :
- (
- options { greedy=false; }
- :
-
- id=~(LCURLY)
- {
- buffer.append(id.getText());
- }
- )+
- {
- retval.value = buffer.toString();
- }
- ;
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-propertyModifiers
- :
- LCURLY (WS)*
- { context = IContext.PROPERTY_MODIFIER; }
- propertyModifier (WS)*
- (
- { context = IContext.PROPERTY_MODIFIER; }
- COMMA (WS)* propertyModifier (WS)*
- )*
- RCURLY
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("DefaultValueRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-propertyModifier
- :
- (
- 'readOnly' { isReadOnly = true; modifiersUsed.put("readOnly", true);}
- | 'union' { isDerivedUnion = true; modifiersUsed.put("union", true); }
- | 'ordered' { isOrdered = true; modifiersUsed.put("ordered", true); }
- | 'unique' { isUnique = true; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);}
- | 'nonunique' { isUnique = false; modifiersUsed.put("unique", true); modifiersUsed.put("nonunique", true);}
- | 'subsets' { context = IContext.SUBSET_PROPERTY ; } subsetsProperty
- | redefinesProperty
- )
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("PropertyModifierRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-
-subsetsProperty
- :
- id=IDENTIFIER
- {
- // find property by name
- String propertyName = id.getText();
- Property tmpProperty = findSubsettedPropertyByName(propertyName, property);
- subsettedProperties.add(tmpProperty);
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("subsetsPropertyRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-redefinesProperty
- :
- { context = IContext.REDEFINE_PROPERTY ; } 'redefines' { context = IContext.REDEFINE_PROPERTY ; } id=IDENTIFIER
- {
- // find property by name
- String propertyName = id.getText();
- Property tmpProperty = findRedefinedPropertyByName(propertyName, property);
- redefinedProperties.add(tmpProperty);
- }
- ;
- catch [MismatchedTokenException mte] {
- reportError(mte);
- throw (new RuntimeException("redefinesPropertyRule"));
- }
- catch [RecognitionException re] {
- reportError(re);
- throw(re);
- }
-
-NL
- : ( '\r' '\n'
- | '\n' '\r' //Improbable
- | '\r'
- | '\n'
- )
- { $channel=HIDDEN;}
- ;
-
-
-WS
- : (' ' | '\t' | '\f')+ // {$channel=HIDDEN;}
- ;
-
-QUESTION_MARK
- : '?'
- ;
-
-LNOT
- : '!'
- ;
-
-DOUBLE_QUOTE
- : '\"'
- ;
-
-SINGLE_QUOTE
- : '\''
- ;
-
-LPAREN
- : '('
- ;
-
-RPAREN
- : ')'
- ;
-
-LSQUARE
- : '['
- ;
-
-RSQUARE
- : ']'
- ;
-
-LCURLY
- : '{'
- ;
-
-DOUBLE_LCURLY
- : '{{' ;
-
-RCURLY
- : '}'
- ;
-
-DOUBLE_RCURLY
- : '}}'
- ;
-
-LOGICAL_AND
- : '&'
- ;
-
-DOUBLE_LOGICAL_AND
- : '&&'
- ;
-
-PIPE
- : '|'
- ;
-
-DOUBLE_PIPE
- : '||'
- ;
-
-POINT
- : '.'
- ;
-
-RANGE
- : '..'
- ;
-
-COMMA
- : ','
- ;
-
-SEMI
- : ';'
- ;
-
-SHARP
- : '#'
- ;
-
-TILDE
- : '~'
- ;
-
-COLON
- : ':'
- ;
-
-FOUR_POINTS
- : '::'
- ;
-
-RULE_ASSIGN
- : '::=' ;
-
-ARROW
- : '->'
- ;
-
-STAR
- : '*'
- ;
-
-DIV
- : '/'
- ;
-
-PLUS
- : '+'
- ;
-
-MINUS
- : '-'
- ;
-
-EQ
- : '='
- ;
-
-
-ISEQ
- : '=='
- ;
-
-ISNE
- : '!='
- ;
-
-LT : '<';
-
-DOUBLE_LT
- : '<<'
- ;
-
-LE
- : '<='
- ;
-
-GT
- : '>'
- ;
-
-DOUBLE_GT
- : '>>'
- ;
-
-GE
- : '>='
- ;
-
-
-INCR
- : '++'
- ;
-
-DECR
- : '--'
- ;
-
-CALLOPERATION
- : ':='
- ;
-
-fragment
-ALPHA
- : 'a'..'z'
- | 'A'..'Z'
- ;
-
-
-UNDERSCORE
- : '_'
- ;
-
-RANGE_VALUE
- : c1=INTEGER {setText("");} '..'
- ( c2=INTEGER { setText($c2.text);}
- | c2=STAR { setText("-1");})
- {
- setText($text + ","+ $c1.text);
- }
- ;
-
-REAL
- : INTEGER '.' INTEGER
- ;
-
-fragment
-INTEGER_OR_REAL_OR_RANGE !
- :
- (INTEGER RANGE) => RANGE_VALUE
- | (INTEGER POINT) => REAL
- | (INTEGER) => INTEGER
- ;
-
-INTEGER
- : '0'..'9'+;
-
-IDENTIFIER
- : (ALPHA|'0'..'9'|UNDERSCORE)+
- ;
-
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.tokens b/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.tokens
deleted file mode 100644
index e34b4351239..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/grammars/PropertyLabel.tokens
+++ /dev/null
@@ -1,67 +0,0 @@
-T__55=55
-T__56=56
-T__57=57
-T__58=58
-T__59=59
-T__60=60
-T__61=61
-T__62=62
-WS=4
-COLON=5
-PLUS=6
-MINUS=7
-SHARP=8
-TILDE=9
-DIV=10
-IDENTIFIER=11
-LSQUARE=12
-RANGE_VALUE=13
-INTEGER=14
-RSQUARE=15
-STAR=16
-EQ=17
-LCURLY=18
-COMMA=19
-RCURLY=20
-NL=21
-QUESTION_MARK=22
-LNOT=23
-DOUBLE_QUOTE=24
-SINGLE_QUOTE=25
-LPAREN=26
-RPAREN=27
-DOUBLE_LCURLY=28
-DOUBLE_RCURLY=29
-LOGICAL_AND=30
-DOUBLE_LOGICAL_AND=31
-PIPE=32
-DOUBLE_PIPE=33
-POINT=34
-RANGE=35
-SEMI=36
-FOUR_POINTS=37
-RULE_ASSIGN=38
-ARROW=39
-ISEQ=40
-ISNE=41
-LT=42
-DOUBLE_LT=43
-LE=44
-GT=45
-DOUBLE_GT=46
-GE=47
-INCR=48
-DECR=49
-CALLOPERATION=50
-ALPHA=51
-UNDERSCORE=52
-REAL=53
-INTEGER_OR_REAL_OR_RANGE=54
-'<Undefined>'=55
-'readOnly'=56
-'union'=57
-'ordered'=58
-'unique'=59
-'nonunique'=60
-'subsets'=61
-'redefines'=62
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/Property.gif b/plugins/others/org.eclipse.papyrus.parsers/resources/icons/Property.gif
deleted file mode 100644
index 99b7fa68d96..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/Property.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/default.gif b/plugins/others/org.eclipse.papyrus.parsers/resources/icons/default.gif
deleted file mode 100644
index 9312d7e0fe0..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/default.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/error.gif b/plugins/others/org.eclipse.papyrus.parsers/resources/icons/error.gif
deleted file mode 100644
index a3b621b5709..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/error.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/exception.gif b/plugins/others/org.eclipse.papyrus.parsers/resources/icons/exception.gif
deleted file mode 100644
index 3b3028e20b9..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/exception.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/warning.gif b/plugins/others/org.eclipse.papyrus.parsers/resources/icons/warning.gif
deleted file mode 100644
index 2f1c5a8fa7b..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/resources/icons/warning.gif
+++ /dev/null
Binary files differ
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java
deleted file mode 100644
index c2f98130a1d..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/PapyrusParsersPlugin.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle.
- */
-public class PapyrusParsersPlugin extends AbstractUIPlugin {
-
- // The plug-in ID
- /**
- *
- */
- public static final String PLUGIN_ID = "org.eclipse.papyrus.classdiagram.parsers";
-
- // path to the default image
- /**
- *
- */
- public static final String DEFAULT_IMAGE = "resources/icons/default.gif";
-
- // The shared instance
- /**
- *
- */
- private static PapyrusParsersPlugin plugin;
-
- /**
- * The constructor.
- */
- public PapyrusParsersPlugin() {
- plugin = this;
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- /**
- *
- *
- * @param context
- *
- * @throws Exception
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- /**
- *
- *
- * @param context
- *
- * @throws Exception
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static PapyrusParsersPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given plug-in relative path.
- *
- * @param path
- * the path
- *
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * Returns an <code>org.eclipse.swt.graphics.Image</code> identified by its key.<BR>
- * By default, it returns a default image. This image is the image placed in the directory <em>resources/icons/default.gif</em>
- *
- * @param key
- * the key of the image
- *
- * @return the Image
- */
- public static Image getImage(String key) {
- ImageRegistry registry = PapyrusParsersPlugin.getDefault().getImageRegistry();
- Image image = registry.get(key);
- if(image == null) {
- ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin(PapyrusParsersPlugin.PLUGIN_ID, key);
- registry.put(key, desc);
- image = registry.get(key);
- }
- if((image == null) && !key.equals(DEFAULT_IMAGE)) {
- image = getImage(DEFAULT_IMAGE);
- }
- return image;
- }
-
- /**
- * Logs an error message in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logError(String message) {
- getDefault().getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a warning message in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logWarning(String message) {
- getDefault().getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs an information message in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logInfo(String message) {
- getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs an exception in the Plugin's Log
- *
- * @param message
- * the message to log
- */
- public static void logException(Exception e) {
- getDefault().getLog().log(new Status(IStatus.INFO, PLUGIN_ID, e.getLocalizedMessage(), e));
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java
deleted file mode 100644
index cce495a48d7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/NFPMessages.java
+++ /dev/null
@@ -1,209 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class NFPMessages extends NLS {
-
- public static String Integer_Decimal_StringsInfo;
-
- public static String Integer_Hexadecimal_StringsInfo;
-
- public static String Integer_Decimal_StringName;
-
- public static String Integer_Hexadecimal_StringName;
-
- public static String UnlimitedNatural_Decimal_StringsInfo;
-
- public static String UnlimitedNatural_Hexadecimal_StringsInfo;
-
- public static String UnlimitedNatural_Decimal_StringName;
-
- public static String UnlimitedNatural_Hexadecimal_StringName;
-
- public static String UnlimitedNatural_Star_StringsInfo;
-
- public static String UnlimitedNatural_Star_StringName;
-
- public static String Collection_StringsInfo;
-
- public static String Collection_StringName;
-
- public static String BooleanValue_True_StringName;
-
- public static String BooleanValue_False_StringName;
-
- public static String BooleanValue_True_StringsInfo;
-
- public static String BooleanValue_False_StringsInfo;
-
- public static String Interval_11_StringsInfo;
-
- public static String Interval_01_StringsInfo;
-
- public static String Interval_10_StringsInfo;
-
- public static String Interval_00_StringsInfo;
-
- public static String Interval_11_StringName;
-
- public static String Interval_01_StringName;
-
- public static String Interval_10_StringName;
-
- public static String Interval_00_StringName;
-
- public static String NFP_VS_Literal_StringsInfo;
-
- public static String NFP_VS_Interval_StringsInfo;
-
- public static String NFP_VS_Literal_StringName;
-
- public static String NFP_VS_Interval_StringName;
-
- public static String NullValue_StringsInfo;
-
- public static String NullValue_StringName;
-
- public static String DefaultValue_StringsInfo;
-
- public static String DefaultValue_StringName;
-
- public static String NumberLiteral_Integer_StringsInfo;
-
- public static String NumberLiteral_Integer_StringName;
-
- public static String NumberLiteral_Real_StringsInfo;
-
- public static String NumberLiteral_Real_StringName;
-
- public static String StringLiteral_StringsInfo;
-
- public static String StringLiteral_StringName;
-
- public static String Tuple_StringsInfo;
-
- public static String Tuple_StringName;
-
- public static String Choice_StringsInfo;
-
- public static String Choice_StringName;
-
- public static String Enumeration_StringsInfo;
-
- public static String Enumeration_StringName;
-
- public static String Variable_Scalar_StringsInfo;
-
- public static String Variable_Scalar_StringName;
-
- public static String Variable_Collection_StringsInfo;
-
- public static String Variable_Collection_StringName;
-
- public static String RealPoint_StringsInfo;
-
- public static String RealPoint_StringsName;
-
- public static String RealExpo_StringsInfo;
-
- public static String RealExpo_StringsName;
-
- public static String TimeStr_StringsInfo;
-
- public static String TimeStr_StringName;
-
- public static String DateStr_StringsInfo;
-
- public static String DateStr_StringName;
-
- public static String DateTime_StringsInfo;
-
- public static String DateTime_StringName;
-
- public static String DayStr_StringsInfo;
-
- public static String DayStr_Monday_StringName;
-
- public static String DayStr_Tuesday_StringName;
-
- public static String DayStr_Wednesday_StringName;
-
- public static String DayStr_Thursday_StringName;
-
- public static String DayStr_Friday_StringName;
-
- public static String DayStr_Saturday_StringName;
-
- public static String DayStr_Sunday_StringName;
-
- public static String VarCallExpr_StringName;
-
- public static String VarCallExpr_StringsInfo;
-
- public static String VarDeclExpr_StringName;
-
- public static String VarDeclExpr_StringsInfo;
-
- public static String PropCallExpr_StringName;
-
- public static String PropCallExpr_StringsInfo;
-
- public static String OpeCallExpr_StringName;
-
- public static String OpeCallExpr_StringsInfo;
-
- public static String CondExpr_StringName;
-
- public static String CondExpr_StringsInfo;
-
- public static String VariableName_StringsInfo;
-
- public static String VariableName_StringName;
-
- public static String TypeName_StringsInfo;
-
- public static String TypeName_StringName;
-
- public static String InstantExpr_StringsInfo;
-
- public static String DurationExpr_StringsInfo;
-
- public static String JitterExpr_StringsInfo;
-
- public static String InstantExpr_StringName;
-
- public static String DurationExpr_StringName;
-
- public static String JitterExpr_StringName;
-
- public static String SimpleObsExpr_StringsInfo;
-
- public static String SimpleObsExpr_StringName;
-
- public static String OccObsExpr_StringsInfo;
-
- public static String OccObsExpr_StringName;
-
- public static String WhenObsExpr_StringsInfo;
-
- public static String WhenObsExpr_StringName;
-
- static {
- NLS.initializeMessages("com.cea.papyrus.classdiagram.parsers.messages.messages_en", NFPMessages.class); //$NON-NLS-1$
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties
deleted file mode 100644
index cde7a47ad1f..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/messages/messages_en.properties
+++ /dev/null
@@ -1,120 +0,0 @@
-
-
-# Labels for completion proposals
-
-
-Integer_Decimal_StringsInfo=decimal integer (e.g. -2, 0, 256)\nor\ndecimal long (e.g. 1201452L)
-Integer_Decimal_StringName=<decimalInteger>
-Integer_Hexadecimal_StringsInfo=hexadecimal integer (e.g. 0xFFFF)\nor\nhexadecimal long (e.g. 0xAFFFFD9L)
-Integer_Hexadecimal_StringName=<hexadecimalInteger>
-
-UnlimitedNatural_Decimal_StringsInfo=unlimited natural(e.g. 1, 2, 3)\nor\ndecimal long (e.g. 120452L)
-UnlimitedNatural_Decimal_StringName=<decimalNatural>
-UnlimitedNatural_Hexadecimal_StringsInfo=hexadecimal unlimited natural (e.g. 0xFFFF)\nor\nhexadecimal long (e.g. 0xAFFFFD9L)
-UnlimitedNatural_Hexadecimal_StringName=<hexadecimalNatural>
-UnlimitedNatural_Star_StringsInfo=infinite symbol
-UnlimitedNatural_Star_StringName=*
-
-Collection_StringName=<collection>
-Collection_StringsInfo=collection: elements between\nbrackets separated \nby commas (e.g. {1, 2, 4})
-
-
-BooleanValue_True_StringName=true
-BooleanValue_False_StringName=false
-BooleanValue_True_StringsInfo=true
-BooleanValue_False_StringsInfo=false
-Interval_11_StringsInfo=Interval: [min..max]
-Interval_01_StringsInfo=Interval: ]min..max]
-Interval_10_StringsInfo=Interval: [min..max[
-Interval_00_StringsInfo=Interval: ]min..max[
-Interval_11_StringName=[min..max]
-Interval_01_StringName=]min..max]
-Interval_10_StringName=[min..max[
-Interval_00_StringName=]min..max[
-NFP_VS_Literal_StringsInfo=Literal
-NFP_VS_Interval_StringsInfo=Interval
-NFP_VS_Literal_StringName=<literal>
-NFP_VS_Interval_StringName=<interval>
-
-NullValue_StringsInfo=null value
-NullValue_StringName=null
-
-DefaultValue_StringsInfo=default value: "-"
-DefaultValue_StringName=default
-
-NumberLiteral_Integer_StringsInfo=Number literal: integer
-NumberLiteral_Integer_StringName=<integer>
-NumberLiteral_Real_StringsInfo=Number literal: real
-NumberLiteral_Real_StringName=<real>
-StringLiteral_StringsInfo=\'String literal\'
-StringLiteral_StringName=<stringLiteral>
-Tuple_StringsInfo=Tuple items separated with commas (e.g. (item1,item2,item3))
-Tuple_StringName=(<tupleitems>)
-Choice_StringsInfo=Choice alternative name (item1, item2, item3)
-Choice_StringName=(<choice alternative>)
-Enumeration_StringsInfo=Enumeration literal
-Enumeration_StringName=(<enumeration>)
-
-
-Variable_Scalar_StringsInfo=Scalar Variable
-Variable_Scalar_StringName=$<ident>
-Variable_Collection_StringsInfo=Collection Variable
-Variable_Collection_StringName=@<ident>
-
-RealPoint_StringsInfo=real: with decimal point (e.g. 12.6)
-RealPoint_StringsName=<real>
-RealExpo_StringsInfo=real: with exponent (e.g. 1.2E-9)
-RealExpo_StringsName=<scientific real>
-
-TimeStr_StringsInfo=time with second precision: #hr:min:sec# (e.g. #12:15:45#)\nor\ntime with centisecond precision: #hr:min:sec:csec# (e.g. #12:15:45:89#)\n\n00<=hr<=23\n00<=min<=59\n00<=sec<=59\n00<=csec<=99
-TimeStr_StringName=<time>
-DateStr_StringsInfo=date without time: #year/month/day# (e.g. #2006/12/01#)\nor\ndate with time (e.g. #2006/12/01 12:15:45#)\n\n0<month<13\n0<day<32
-DateStr_StringName=<date>
-DateTime_StringsInfo=date\nor\ntime\nor\day
-DateTime_StringName=<dateTime>
-DayStr_StringsInfo=day without time (e.g. #Mon#) \nor\nday with time (e.g. #Mon 12:15:56#)
-DayStr_Monday_StringName=Monday
-DayStr_Tuesday_StringName=Tuesday
-DayStr_Wednesday_StringName=Wednesday
-DayStr_Thursday_StringName=Thursday
-DayStr_Friday_StringName=Friday
-DayStr_Saturday_StringName=Saturday
-DayStr_Sunday_StringName=Sunday
-
-VarCallExpr_StringName=<variableCallExpr>
-VarCallExpr_StringsInfo=Variable call expression:\n\n<variable-name>
-VarDeclExpr_StringName=<variableDeclExpr>
-VarDeclExpr_StringsInfo=Variable declaration expression:\n\n<variable-direction>$<variable-name>:<type-name>\n\n<variable-direction>::= in | out | inout
-PropCallExpr_StringName=<propertyCallExpr>
-PropCallExpr_StringsInfo=Property call expression
-OpeCallExpr_StringName=<operationCallExpr>
-OpeCallExpr_StringsInfo=Operation call expression
-CondExpr_StringName=<conditionalExpr>
-CondExpr_StringsInfo=Conditional expression (e.g. (a>6)?true:false )
-
-VariableName_StringsInfo=Identifier
-VariableName_StringName=<variableName>
-
-TypeName_StringsInfo=variable type name
-TypeName_StringName=<TypeName>
-
-InstantExpr_StringsInfo=instant-expression:\n <instant-obs-expr>\n| (<instant-obs-expr> + <duration-obs-expr>)
-InstantExpr_StringName=<instant-expr>
-
-DurationExpr_StringsInfo=duration-epxression:\n <duration-obs-expr>\n| (<instant-obs-expr> - <instant-obs-expr>)
-DurationExpr_StringName=<duration-expr>
-
-JitterExpr_StringsInfo=jitter expression:\n jitter(<instant-obs-expr>)\n| jitter(<instant-obs-expr>,<instant-obs-expr>)
-JitterExpr_StringName=<jitter-expr>
-
-SimpleObsExpr_StringsInfo=<obs-name> (identifier)
-SimpleObsExpr_StringName=<obs-name>
-
-OccObsExpr_StringsInfo=<obs-name>[<index>] (e.g. myObs[10])
-OccObsExpr_StringName=<obs-name>[<index>]
-
-WhenObsExpr_StringsInfo=<obs-name> ([<index>])? when <condition-expr>
-WhenObsExpr_StringName=<obs-name> ([<index>])? when <condition-expr> (e.g. t1 when (x>6))
-
-
-
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java
deleted file mode 100644
index 7a94c728807..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/CollaborationUseGenerator.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.modelgenerator;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelParser;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-public class CollaborationUseGenerator {
-
- /** The CollaborationUse to modify */
- private CollaborationUse collaborationUse;
-
- /** Error reporter for lexer and parser generated by antlr */
- private SimpleStringErrorReporter reporter;
-
- /**
- * Default Constructor.
- *
- * @param collaborationUse
- * the CollaborationUse to modify
- */
- public CollaborationUseGenerator(CollaborationUse collaborationUse) {
- this.collaborationUse = collaborationUse;
- this.reporter = new SimpleStringErrorReporter();
- }
-
- /**
- * Parse the label of the CollaborationUse and modify CollaborationUse attributes.
- *
- * @param label
- * the label that defines the CollaborationUse
- */
- public void parseAndModifyCollaborationUse(String label) {
- try {
- CollaborationUseLabelLexer lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- CollaborationUseLabelParser parser = new CollaborationUseLabelParser(tokens, collaborationUse,
- new SimpleStringErrorReporter());
- parser.label();
- } catch (RecognitionException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- } catch (RuntimeException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- }
- }
-
- /**
- * Parse the label of the CollaborationUse and validate it.
- *
- * @param label
- * the label that defines the CollaborationUse
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseAndValidateCollaborationUse(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions : not ok.
- // Returns the exception message
- CollaborationUseLabelLexer lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- CollaborationUseLabelParser parser = new CollaborationUseLabelParser(tokens, collaborationUse, reporter);
- parser.setValidation(true);
- try {
- parser.label();
- } catch (MismatchedTokenException e) {
- PapyrusParsersPlugin.logError("context:" + parser.getContext());
- } catch (RecognitionException e) {
- reporter.setMessage(e.getLocalizedMessage());
- } catch (RuntimeException e) {
- reporter.setMessage(e.getLocalizedMessage());
- }
- return reporter.getMessage();
- }
-
- /**
- * Parse the label of the CollaborationUse, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the CollaborationUse
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseUndefinedCollaborationUseType(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions are detected : not ok.
- // Returns the exception message
- CollaborationUseLabelLexer lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- CollaborationUseLabelParser parser = new CollaborationUseLabelParser(tokens, collaborationUse,
- new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException tse) {
- if(tse instanceof TypeRecognitionException)
- return ((TypeRecognitionException)tse).getTypeName();
- }
- return null;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java
deleted file mode 100644
index 6d5f51c2bf7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/ParameterGenerator.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.modelgenerator;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelParser;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.uml2.uml.Parameter;
-
-public class ParameterGenerator {
-
- /** The Parameter to modify */
- private Parameter parameter;
-
- /** Error reporter for lexer and parser generated by antlr */
- private SimpleStringErrorReporter reporter;
-
- /**
- * Default Constructor.
- *
- * @param parameter
- * the Parameter to modify
- */
- public ParameterGenerator(Parameter parameter) {
- this.parameter = parameter;
- this.reporter = new SimpleStringErrorReporter();
- }
-
- /**
- * Parse the label of the Parameter and modify Parameter attributes.
- *
- * @param label
- * the label that defines the Parameter
- */
- public void parseAndModifyParameter(String label) {
- try {
- ParameterLabelLexer lexer = new ParameterLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- ParameterLabelParser parser = new ParameterLabelParser(tokens, parameter, new SimpleStringErrorReporter());
- parser.label();
- } catch (RecognitionException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK, "could not parse the parameter label: " + label, e));
- } catch (RuntimeException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK, "could not parse the parameter label: " + label, e));
- }
- }
-
- /**
- * Parse the label of the Parameter and validate it.
- *
- * @param label
- * the label that defines the Parameter
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseAndValidateParameter(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions : not ok.
- // Returns the exception message
- ParameterLabelLexer lexer = new ParameterLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- ParameterLabelParser parser = new ParameterLabelParser(tokens, parameter, reporter);
- parser.setValidation(true);
- try {
- parser.label();
- } catch (MismatchedTokenException e) {
- PapyrusParsersPlugin.logError("context:" + parser.getContext());
- } catch (RecognitionException e) {
- reporter.setMessage(e.getLocalizedMessage());
- } catch (RuntimeException e) {
- reporter.setMessage(e.getLocalizedMessage());
- }
- return reporter.getMessage();
- }
-
- /**
- * Parse the label of the Parameter, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the Parameter
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseUndefinedParameterType(String label) {
-
- // To validate the message : parse it.
- // If no errors are detected, it is ok. If exceptions are detected : not ok.
- // Returns the exception message
- ParameterLabelLexer lexer = new ParameterLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- ParameterLabelParser parser = new ParameterLabelParser(tokens, parameter, new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException tse) {
- if(tse instanceof TypeRecognitionException)
- return ((TypeRecognitionException)tse).getTypeName();
- }
- return null;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java
deleted file mode 100644
index a75353e2f80..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/modelgenerator/PropertyGenerator.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.modelgenerator;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelParser;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.papyrus.parsers.util.TypeRecognitionException;
-import org.eclipse.papyrus.parsers.util.UnboundTemplateRecognitionException;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.TemplateableElement;
-
-/**
- *
- *
- * @author Remi SCHNEKENBURGER CEA-List
- */
-public class PropertyGenerator {
-
- /**
- *
- */
- private Property property;
-
- /** Error reporter for lexer and parser generated by antlr */
- private SimpleStringErrorReporter reporter;
-
- /**
- * Default Constructor.
- *
- * @param property
- * the property to modify
- */
- public PropertyGenerator(Property property) {
- this.property = property;
- this.reporter = new SimpleStringErrorReporter();
- }
-
- /**
- * Parse the label of the property and modify property attributes.
- *
- * @param label
- * the label that defines the property
- */
- public void parseAndModifyProperty(String label) {
- try {
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.label();
- } catch (RecognitionException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- } catch (RuntimeException e) {
- PapyrusParsersPlugin.getDefault().getLog().log(
- new Status(IStatus.ERROR, PapyrusParsersPlugin.PLUGIN_ID, IStatus.OK,
- "could not parse the property label: " + label, e));
- }
- }
-
- /**
- * Parse the label of the property and validate it.
- *
- * @param label
- * the label that defines the property
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseAndValidateProperty(String label) {
- // to validate the message : parse it. If no errors, it is ok. If exceptions : not ok.
- // Returns the exception message
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, reporter);
- parser.setValidation(true);
- try {
- parser.label();
- } catch (MismatchedTokenException e) {
- //System.err.println("context:" + parser.getContext());
- } catch (RecognitionException e) {
- reporter.setMessage(e.getLocalizedMessage());
- } catch (RuntimeException e) {
- reporter.setMessage(e.getLocalizedMessage());
- }
- return reporter.getMessage();
- }
-
- /**
- * Parse the label of the property, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the property
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public String parseUndefinedPropertyType(String label) {
-
- // to validate the message : parse it. If no errors, it is ok. If exceptions : not ok.
- // Returns the exception message
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException tse) {
- if(tse instanceof TypeRecognitionException)
- return ((TypeRecognitionException)tse).getTypeName();
- }
- return null;
- }
-
- /**
- * Parse the label of the property, and generates an exception if does not validate.
- *
- * @param label
- * the label that defines the property
- *
- * @return null if label is valid, else return the message that describes the error.
- */
- public TemplateableElement parseUnboundPropertyType(String label) {
-
- // to validate the message : parse it. If no errors, it is ok. If exceptions : not ok.
- // Returns the exception message
- PropertyLabelLexer lexer = new PropertyLabelLexer(new ANTLRStringStream(label));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
- PropertyLabelParser parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.setValidation(true);
- try {
- parser.label();
- } catch (RecognitionException re) {
-
- } catch (RuntimeException re) {
- if(re instanceof UnboundTemplateRecognitionException)
- return ((UnboundTemplateRecognitionException)re).getTemplate();
- }
- return null;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java
deleted file mode 100644
index 6358eb27fbc..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/preferences/IPreferencesConstants.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.preferences;
-
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.IPropertyLabelColorConstants;
-
-/**
- * Defines constants which are used to refer to values in the plugin's preference bundle.
- */
-public interface IPreferencesConstants {
-
- /**
- * ui plugin id.
- */
- String PREFIX = PapyrusParsersPlugin.PLUGIN_ID + ".";
-
- /**
- * color prefix.
- */
- String PREFIX_COLOR = PREFIX + "color.";
-
- /**
- * color for basic grammar text.
- */
- String COLOR_DEFAULT = PREFIX_COLOR + IPropertyLabelColorConstants.DEFAULT;
-
- /**
- * color for grammar keyword text.
- */
- String COLOR_KEYWORD = PREFIX_COLOR + IPropertyLabelColorConstants.KEYWORD;
-
- /**
- * color for grammar string text.
- */
- String COLOR_STRING = PREFIX_COLOR + IPropertyLabelColorConstants.STRING;
-
- /**
- * color for grammar symbol text.
- */
- String COLOR_SYMBOL = PREFIX_COLOR + IPropertyLabelColorConstants.SYMBOL;
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java
deleted file mode 100644
index 0db243c4ca4..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/CompletionFilterSourceViewerConfiguration.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 Atos Origin.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Emilien Perico (Atos Origin) emilien.perico@atosorigin.com - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-
-/**
- * The Class CompletionFilterSourceViewerConfiguration.
- */
-public class CompletionFilterSourceViewerConfiguration extends SourceViewerConfiguration {
-
- ICompletionFilter filter = null;
-
- /**
- * Instantiates a new completion filter source viewer configuration without active filter
- */
- public CompletionFilterSourceViewerConfiguration() {
- filter = new NullCompletionFilter();
- }
-
- /**
- * Instantiates a new completion filter source viewer configuration with active filter
- *
- * @param filter the filter
- */
- public CompletionFilterSourceViewerConfiguration(ICompletionFilter filter) {
- this.filter = filter;
- }
-
- /**
- * The Interface ICompletionFilter to set up the filter
- */
- public interface ICompletionFilter {
-
- /**
- * Filter.
- *
- * @param context
- * @param e
- *
- * @return true if object is filtered, false if it is not
- */
- public boolean filter(int context, EObject e);
- }
-
- /**
- * NullCompletionFilter to disable filter as default behavior
- */
- public static class NullCompletionFilter implements ICompletionFilter {
-
- /**
- * @see org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter#filter(int, org.eclipse.emf.ecore.EObject)
- */
- public boolean filter(int context, EObject e) {
- return false;
- }
- }
-
- /**
- * Gets the filter.
- *
- * @return the filter
- */
- protected ICompletionFilter getFilter() {
- return filter;
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java
deleted file mode 100644
index fed5c080cf7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/ILabelColorConstants.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- *
- */
-public interface ILabelColorConstants {
-
- /**
- *
- */
- public final String DEFAULT = "default";
-
- /**
- *
- */
- public final String KEYWORD = "keyword";
-
- /**
- *
- */
- public final String STRING = "string";
-
- /**
- *
- */
- public final String SYMBOL = "symbol";
-
- /**
- *
- */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /**
- *
- */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /**
- *
- */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /**
- *
- */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /**
- *
- */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /**
- *
- */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java
deleted file mode 100644
index 12a54e286e0..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelColorProvider.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider for syntax highlight.
- */
-public class LabelColorProvider implements ILabelColorConstants {
-
- /**
- * singleton instance of this class.
- */
- private static LabelColorProvider instance;
-
- /**
- * Default constructor (private for singleton pattern).
- */
- private LabelColorProvider() {
- // private constructor for singleton pattern
- }
-
- /**
- * Returns the singleton instance.
- *
- * @return the singleton instance
- */
- public static LabelColorProvider getDefault() {
- if(instance == null) {
- instance = new LabelColorProvider();
- }
- return instance;
- }
-
- /**
- * Hashmap that stores a list of colors, given an identifier.
- */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the pref store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT, ILabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD, ILabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING, ILabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL, ILabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = this.fColorTable.get(aName);
- if(color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- // PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_KEYWORD,
- // ILabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL, ILabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if(rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'"); //$NON-NLS-1$//$NON-NLS-2$
- }
- this.fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator<Color> colors = this.fColorTable.values().iterator();
- while(colors.hasNext()) {
- colors.next().dispose();
- }
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java
deleted file mode 100644
index 941db426f3e..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelCompletionProcessor.java
+++ /dev/null
@@ -1,272 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContextInformation;
-import org.eclipse.jface.text.contentassist.IContextInformationValidator;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPortLabelKeywords
- */
-public class LabelCompletionProcessor implements IContentAssistProcessor {
-
- /**
- *
- */
- protected Map<String, Boolean> modifiersUsed;
-
- /**
- *
- */
- public LabelCompletionProcessor() {
- modifiersUsed = new HashMap<String, Boolean>();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeCompletionProposals(org
- * .eclipse.jface.text.ITextViewer, int)
- */
- /**
- *
- *
- * @param viewer
- * @param documentOffset
- *
- * @return
- */
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- return new ICompletionProposal[0];
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.jface.text.contentassist.IContentAssistProcessor#computeContextInformation(org
- * .eclipse.jface.text.ITextViewer, int)
- */
- /**
- *
- *
- * @param viewer
- * @param documentOffset
- *
- * @return
- */
- public IContextInformation[] computeContextInformation(ITextViewer viewer, int documentOffset) {
- return new IContextInformation[0];
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public char[] getCompletionProposalAutoActivationCharacters() {
- return new char[]{ ':' };
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public char[] getContextInformationAutoActivationCharacters() {
- return new char[]{ '#' };
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public IContextInformationValidator getContextInformationValidator() {
- return null;
- }
-
- /*
- * (non-Javadoc) Method declared on IContentAssistProcessor
- */
- /**
- *
- *
- * @return
- */
- public String getErrorMessage() {
- return null;
- }
-
- /**
- * when computing completion proposals, this method retrieves the string on which the user is
- * computing proposals it checks recursively if the character at the precedent offset is also a
- * part of the string (is a Java identifier).
- *
- * @param viewer
- * the text viewer where the current document is shown
- * @param documentOffset
- * the offset on which the end of the calculated string is
- *
- * @return the string that will be completed
- */
- public String getPrefix(ITextViewer viewer, int documentOffset) {
- try {
- if(documentOffset != 0) {
- char c = viewer.getDocument().getChar(documentOffset - 1);
- if(Character.isJavaIdentifierPart(c) || (c == '\'')) {
- return getPrefix(viewer, documentOffset - 1) + c;
- }
- }
- } catch (BadLocationException e) {
- return "";
- }
- return "";
- }
-
-/**
- * when computing completion proposals, this method retrieves the string on
- * which the user is computing proposals it checks recursively if the
- * character at the precedent offset is also a part of the string (is a Java
- * identifier or '<' for Undefined type).
- *
- * @param viewer the text viewer where the current document is shown
- * @param documentOffset the offset on which the end of the calculated string is
- *
- * @return the string that will be completed
- */
- public String getPrefixForType(ITextViewer viewer, int documentOffset) {
- try {
- if(documentOffset != 0) {
- char c = viewer.getDocument().getChar(documentOffset - 1);
- if(Character.isJavaIdentifierPart(c) || (c == '<')) {
- return getPrefixForType(viewer, documentOffset - 1) + c;
- }
- }
- } catch (BadLocationException e) {
- return "";
- }
- return "";
- }
-
- /**
- *
- *
- * @param viewer
- * @param documentOffset
- *
- * @return
- */
- public String getPrefixForMultiplicity(ITextViewer viewer, int documentOffset) {
- try {
- if(documentOffset != 0) {
- char c = viewer.getDocument().getChar(documentOffset - 1);
- if(Character.isJavaIdentifierPart(c) || (c == '[') || (c == '.')) {
- return getPrefixForMultiplicity(viewer, documentOffset - 1) + c;
- }
- }
- } catch (BadLocationException e) {
- return "";
- }
- return "";
- }
-
- /**
- *
- *
- * @param viewer
- * @param selectionRange
- * @param context
- * @param documentOffset
- *
- * @return
- */
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset,
- int selectionRange) {
- return new Vector<ICompletionProposal>();
- }
-
- /**
- *
- *
- * @param proposals
- * @param prefix
- * @param proposalsInfo
- * @param documentOffset
- *
- * @return
- */
- public Collection<ICompletionProposal> createCompletionProposals(String[] proposals, String[] proposalsInfo,
- String prefix, int documentOffset) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- for(int i = 0; i < proposals.length; i++) {
- // test if the proposal starts with the prefix given in parameter
- if(proposals[i].startsWith(prefix)) {
- v.add(new CompletionProposal(proposals[i], documentOffset - prefix.length(), prefix.length(),
- proposals[i].length(), null, proposals[i], null, proposalsInfo[i]));
- }
- }
- return v;
- }
-
- /**
- *
- *
- * @param proposals
- * @param proposalsName
- * @param prefix
- * @param proposalsInfo
- * @param documentOffset
- *
- * @return
- */
- public Collection<ICompletionProposal> createCompletionProposalsWithDifferentName(String[] proposals,
- String[] proposalsInfo, String[] proposalsName, String prefix, int documentOffset) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- for(int i = 0; i < proposals.length; i++) {
- // test if the proposal starts with the prefix given in parameter
- if(proposals[i].startsWith(prefix)) {
-
- v.add(new CompletionProposal(proposals[i], documentOffset - prefix.length(), prefix.length(),
- proposals[i].length(), null, proposalsName[i], null, proposalsInfo[i]));
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java
deleted file mode 100644
index 641732040e7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/LabelContextType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * A simple context type for PropertyUtil label.
- */
-public class LabelContextType extends TemplateContextType {
-
- /**
- * This context's id.
- */
- public static final String PROPERTYLABEL_CONTEXT_TYPE = "com.cea.papyrus.classdiagram.parsers.texteditor.propertylabel.type";
-
- /**
- * The constructor. Creates a new PROPERTY LABEL context type.
- */
- public LabelContextType() {
- addGlobalResolvers();
- }
-
- /**
- * adds a variable resolver to the context type.
- */
- private void addGlobalResolvers() {
- addResolver(new GlobalTemplateVariables.Cursor());
- addResolver(new GlobalTemplateVariables.WordSelection());
- addResolver(new GlobalTemplateVariables.LineSelection());
- addResolver(new GlobalTemplateVariables.Dollar());
- addResolver(new GlobalTemplateVariables.Date());
- addResolver(new GlobalTemplateVariables.Year());
- addResolver(new GlobalTemplateVariables.Time());
- addResolver(new GlobalTemplateVariables.User());
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java
deleted file mode 100644
index ccb5d6e5d91..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WhitespaceDetector.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.jface.text.rules.IWhitespaceDetector;
-
-/**
- * Basic whitespace detector for the scanner.<BR>
- * It defines the class by which WhitespaceRule determines whether a given character is to be
- * considered whitespace in the current context.
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWhitespaceDetector
- */
-public class WhitespaceDetector implements IWhitespaceDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWhitespaceDetector#isWhitespace(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWhitespace(char character) {
- return Character.isWhitespace(character);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java
deleted file mode 100644
index f9501d04f28..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/WordDetector.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-/**
- * Basic word detector for the scanner.<BR>
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWordDetector
- */
-public class WordDetector implements IWordDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordPart(char character) {
- return Character.isLetter(character);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordStart(char character) {
- return Character.isLetter(character);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java
deleted file mode 100644
index 6fea36c9b68..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseConfigurationForUML.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
-import org.eclipse.papyrus.parsers.modelgenerator.CollaborationUseGenerator;
-import org.eclipse.papyrus.uml.tools.utils.CollaborationUseUtil;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * Configuration Class for the direct edition of a UML property
- */
-public class CollaborationUseConfigurationForUML extends DefaultDirectEditorConfiguration {
-
- /** Configuration of the source viewer */
- final private CollaborationUseLabelSourceViewerConfiguration configuration;
-
- /**
- * Creates a new CollaborationUseConfigurationForUML.
- */
- public CollaborationUseConfigurationForUML() {
- configuration = new CollaborationUseLabelSourceViewerConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public SourceViewerConfiguration getSourceViewerConfiguration() {
- return configuration;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTextToEdit(Object editedObject) {
- if(editedObject instanceof CollaborationUse) {
- return CollaborationUseUtil.getLabel((CollaborationUse)editedObject);
- }
- return "not a CollaborationUse";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object preEditAction(Object objectToEdit) {
- if(objectToEdit instanceof CollaborationUse) {
- configuration.setCollaborationUse((CollaborationUse)objectToEdit);
- }
- return super.preEditAction(objectToEdit);
- }
-
- /**
- * {@inheritDoc}
- */
- public Object postEditAction(Object editedObject, String text) {
- // Should undo the various creations done in the property edition
- // (template binding, etc...)
- if(editedObject instanceof CollaborationUse) {
- CollaborationUseGenerator generator = new CollaborationUseGenerator(((CollaborationUse)editedObject));
- generator.parseAndModifyCollaborationUse(text);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IInputValidator getInputValidator() {
- return new IInputValidator() {
-
- public String isValid(String newText) {
- if(getObjectToEdit() instanceof CollaborationUse) {
- CollaborationUseGenerator generator = new CollaborationUseGenerator(
- ((CollaborationUse)getObjectToEdit()));
- return generator.parseAndValidateCollaborationUse(newText);
- }
- return null;
- }
- };
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java
deleted file mode 100644
index 8c737f9def9..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelColorProvider.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider to syntax highlight.
- */
-public class CollaborationUseLabelColorProvider implements ICollaborationUseLabelColorConstants {
-
- /** Default instance */
- private static CollaborationUseLabelColorProvider instance;
-
- /** Default constructor */
- private CollaborationUseLabelColorProvider() {
- }
-
- /**
- * Get singleton instance
- *
- * @return the default instance
- */
- public static CollaborationUseLabelColorProvider getDefault() {
- if(instance == null) {
- instance = new CollaborationUseLabelColorProvider();
- }
- return instance;
- }
-
- /** Used color table */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the preference store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT,
- ICollaborationUseLabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD,
- ICollaborationUseLabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING,
- ICollaborationUseLabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL,
- ICollaborationUseLabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = fColorTable.get(aName);
- if(color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL,
- ICollaborationUseLabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if(rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'");
- }
- fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator<Color> colors = fColorTable.values().iterator();
- while(colors.hasNext()) {
- colors.next().dispose();
- }
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java
deleted file mode 100644
index ed1218ac3c8..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelCompletionProcessor.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import java.util.Collection;
-import java.util.Vector;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.CollaborationUseLabelParser;
-import org.eclipse.papyrus.parsers.texteditor.LabelCompletionProcessor;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.CollaborationCompletionProposalComputer;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.NameCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPropertyLabelKeywords
- */
-public class CollaborationUseLabelCompletionProcessor extends LabelCompletionProcessor implements IContext {
-
- /** The {@link CollaborationUse} to modify */
- private CollaborationUse collaborationUse;
-
- /**
- * Constructor
- *
- * @param collaborationUse
- * the parsed {@link CollaborationUse}
- */
- public CollaborationUseLabelCompletionProcessor(CollaborationUse collaborationUse) {
- this.collaborationUse = collaborationUse;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- /**
- * This method computes completion proposal for currently edited CollaborationUse label.
- *
- * @param viewer
- * @param documentOffset
- *
- * @return completion proposals
- */
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- String text;
- CollaborationUseLabelLexer lexer = null;
- CollaborationUseLabelParser parser = null;
- Collection<ICompletionProposal> result = null;
- int selectionRange = 0;
-
- try {
- text = viewer.getDocument().get(0, documentOffset);
-
- lexer = new CollaborationUseLabelLexer(new ANTLRStringStream(text));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
-
- parser = new CollaborationUseLabelParser(tokens, collaborationUse, new SimpleStringErrorReporter());
- parser.setValidation(true);
- selectionRange = viewer.getSelectedRange().y;
- parser.label();
-
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (BadLocationException e) {
-
- } catch (RuntimeException e) {
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (RecognitionException e) {
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- }
-
- return result.toArray(new ICompletionProposal[]{});
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletions(org.eclipse.jface.text.ITextViewer, int, int, int)
- */
- /**
- * Compute completion possibilities depending on existing edited label (prefix, it may not be
- * complete).
- *
- * @param viewer
- * @param selectionRange
- * @param context
- * @param documentOffset
- *
- * @return
- */
- @Override
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset,
- int selectionRange) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- String prefix = getPrefix(viewer, documentOffset);
- switch(context) {
-
- // DEFAULT : visibility or name
- case IContext.DEFAULT:
- v.addAll(new VisibilityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange,
- prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // VISIBILITY : name
- case IContext.VISIBILITY:
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // NAME: either ':' or ":undefined"
- case IContext.NAME:
- v.addAll(createCompletionProposalsWithDifferentName(new String[]{ ": ", ": <Undefined>" }, new String[]{
- "CollaborationUse type", "Undefined CollaborationUse type" }, new String[]{
- ": <Collaboration Name>", ": <Undefined>" }, "", documentOffset));
- break;
-
- // PROPERTY TYPE (after ":") model types or undefined
- case IContext.AFTER_COLON:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- CollaborationCompletionProposalComputer computer = new CollaborationCompletionProposalComputer();
- computer.setElement(collaborationUse);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // MULTIPLICITY: multiplicity or default value or property modifiers
- case IContext.COLLABORATION_USE_TYPE:
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- computer = new CollaborationCompletionProposalComputer();
- computer.setElement(collaborationUse);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
- default:
- break;
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java
deleted file mode 100644
index 89686ce8ddb..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelScanner.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.papyrus.parsers.texteditor.WhitespaceDetector;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyWordDetector;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Scanner for the action language.<BR>
- * It implements the interface IALKeywords, which contains the different keywords available in the
- * action language
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedScanner
- * @see com.cea.actionlanguage.sharedresources.texteditor.IRTActionKeywords
- */
-public class CollaborationUseLabelScanner extends RuleBasedScanner implements ICollaborationUseLabelColorConstants {
-
- /** Color for the default token */
- private Color defaultColor;
-
- /** Color for keywords */
- // private Color keywordColor;
-
- /** Color for special chars */
- private Color symbolColor;
-
- /**
- * Creates a new rule based scanner.
- */
- public CollaborationUseLabelScanner() {
- defaultColor = CollaborationUseLabelColorProvider.getDefault().getColor(DEFAULT);
- // keywordColor = CollaborationUseLabelColorProvider.getDefault().getColor(KEYWORD);
- symbolColor = CollaborationUseLabelColorProvider.getDefault().getColor(SYMBOL);
-
- IToken other = new Token(new TextAttribute(defaultColor));
- // IToken keyword = new Token(new TextAttribute(keywordColor, null, SWT.BOLD));
- IToken symbol = new Token(new TextAttribute(symbolColor, null, SWT.BOLD));
-
- IRule[] rules = new IRule[2];
-
- WordRule wordRule = new WordRule(new PropertyWordDetector(), other);
- for(int i = 0; i < VisibilityCompletionProposal.visibilityStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(visibilityStrings[i]), keyword);
- }
-
- wordRule.addWord("+", symbol);
- wordRule.addWord("-", symbol);
- wordRule.addWord("#", symbol);
- wordRule.addWord("~", symbol);
- wordRule.addWord("/", symbol);
- wordRule.addWord("+/", symbol);
- wordRule.addWord("-/", symbol);
- wordRule.addWord("#/", symbol);
- wordRule.addWord(":", symbol);
-
- rules[0] = wordRule;
- rules[1] = new WhitespaceRule(new WhitespaceDetector());
-
- setRules(rules);
- }
-
- /**
- * returns the word for the scanner, without quotes.
- *
- * @param word
- *
- * @return
- */
- public static String getWordWithoutQuotes(String word) {
- String tmp = "";
- tmp = word.replaceAll("'", "");
- return tmp;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java
deleted file mode 100644
index b5937aaba87..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/CollaborationUseLabelSourceViewerConfiguration.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.propertylabel.PropertyLabelPartitionScanner;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.CollaborationUse;
-
-/**
- * This class bundles the configuration space of the action language source viewer. Instances of
- * this class are passed to the configure method of <code>SourceViewer</code>.
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration
- */
-public class CollaborationUseLabelSourceViewerConfiguration extends SourceViewerConfiguration {
-
- /** Edited {@link CollaborationUse} */
- private CollaborationUse collaborationUse;
-
- /**
- * Creates a new CollaborationUseLabelSourceViewerConfiguration
- *
- * @param collaborationUse
- * the {@link CollaborationUse} to edit
- */
- public CollaborationUseLabelSourceViewerConfiguration(CollaborationUse collaborationUse) {
- setCollaborationUse(collaborationUse);
- }
-
- /**
- * Creates a new CollaborationUseLabelSourceViewerConfiguration
- */
- public CollaborationUseLabelSourceViewerConfiguration() {
- this(null);
- }
-
- /**
- * Token scanner
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
-
- /**
- * Constructor
- *
- * @param attribute
- */
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- // creating damager/repairer for single line comments
- Color colorString = CollaborationUseLabelColorProvider.getDefault().getColor(
- ICollaborationUseLabelColorConstants.STRING);
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorString)));
-
- reconciler.setDamager(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
- reconciler.setRepairer(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
-
- // creating damager/repairer for other zones (action language zone)
- dr = new DefaultDamagerRepairer(new CollaborationUseLabelScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- IContentAssistProcessor processor = new CollaborationUseLabelCompletionProcessor(collaborationUse);
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- // IInformationControlCreator
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
-
- return assistant;
- }
-
- /**
- * Returns the edited {@link CollaborationUse}
- *
- * @return the {@link CollaborationUse} to edit
- */
- public CollaborationUse getCollaborationUse() {
- return collaborationUse;
- }
-
- /**
- * Sets the {@link CollaborationUse} to Edit
- *
- * @param collaborationUse
- * the {@link CollaborationUse} to edit
- */
- public void setCollaborationUse(CollaborationUse collaborationUse) {
- this.collaborationUse = collaborationUse;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java
deleted file mode 100644
index d5a8eecfba3..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/ICollaborationUseLabelColorConstants.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Used colors constants definitions.
- */
-public interface ICollaborationUseLabelColorConstants {
-
- /** DEFAULT definition */
- public final String DEFAULT = "default";
-
- /** KEYWORD definition */
- public final String KEYWORD = "keyword";
-
- /** STRING definition */
- public final String STRING = "string";
-
- /** SYMBOL definition */
- public final String SYMBOL = "symbol";
-
- /** DEFAULT color value definition */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /** CONSTANT color value definition */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /** BACKGROUND color value definition */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /** KEYWORD color value definition */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /** STRING color value definition */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /** SYMBOL color value definition */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java
deleted file mode 100644
index 935c1e3999d..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/collaborationuselabel/IContext.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for CollaborationUse
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.collaborationuselabel;
-
-/**
- * Definitions for the parsing context.
- */
-public abstract interface IContext {
-
- /** Default position */
- public static final int DEFAULT = 0;
-
- /** Parsing Visibility */
- public static final int VISIBILITY = 1;
-
- /** Parsing Name */
- public static final int NAME = 2;
-
- /** Parsing before CollaborationUse type */
- public static final int AFTER_COLON = 3;
-
- /** Parsing CollaborationUse type */
- public static final int COLLABORATION_USE_TYPE = 4;
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java
deleted file mode 100644
index 30d31305ebf..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/CollaborationCompletionProposalComputer.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
-import org.eclipse.uml2.uml.Collaboration;
-import org.eclipse.uml2.uml.Element;
-
-/**
- *
- */
-public class CollaborationCompletionProposalComputer implements ICompletionProposalComputer {
-
- /**
- *
- */
- private Element element;
-
- /**
- *
- */
- private static final String UNDEFINED_TYPE = "<Undefined>";
-
- /**
- *
- *
- * @return the element
- */
- public Element getElement() {
- return element;
- }
-
- /**
- *
- *
- * @param element
- * the element to set
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add <Undefined>
- if(UNDEFINED_TYPE.startsWith(prefix)) {
- proposal = new CompletionProposal(UNDEFINED_TYPE, documentOffset - prefix.length(), prefix.length()
- + selectionRange, UNDEFINED_TYPE.length(), null, UNDEFINED_TYPE, null, "Undefined Type");
- v.add(proposal);
- }
-
- if(element != null) {
- // then, all accessible types, by alphabetic order...
- Set<Collaboration> types = computeAccessibleCollaborationList(element);
- // generate the list of types, in alphabetical order
- Iterator<Collaboration> it = types.iterator();
- while(it.hasNext()) {
- Collaboration type = it.next();
- String name = type.getName();
- if(name.startsWith(prefix)) {
- // create a completion processor for the type if prefix
- // corresponds
- proposal = new CompletionProposal(name, documentOffset - prefix.length(), prefix.length()
- + selectionRange, name.length(), null, TypeUtil.getInfoString(type), null, "");
- v.add(proposal);
- }
- }
- }
- return v;
- }
-
- /**
- *
- *
- * @param element
- *
- * @return
- */
- public Set<Collaboration> computeAccessibleCollaborationList(Element element) {
- LinkedHashSet<Collaboration> list = new LinkedHashSet<Collaboration>();
- // adds directly accessible elements
- list.addAll(PackageUtil.getAccessibleCollaborations(element.getNearestPackage()));
-
- // adds all elements
- list.addAll(PackageUtil.getAllCollaborations(element.getNearestPackage()));
-
- return list;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java
deleted file mode 100644
index 1d604976979..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DefaultValueCompletionProposal.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for names.
- */
-public class DefaultValueCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static private String[] defaultValueStrings = { "= ", };
-
- /**
- * Text displayed in the information window.
- */
- final static private String[] defaultValueStringsInfo = { "Default value", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static private String[] defaultValueStringsName = { "= <Expression>", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < defaultValueStrings.length; i++) {
- if(defaultValueStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(defaultValueStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, defaultValueStrings[i].length(), null, defaultValueStringsName[i], null,
- defaultValueStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java
deleted file mode 100644
index 7adb855ecee..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DerivedPropertyCompletionProposal.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for visibilities.
- */
-public class DerivedPropertyCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] derivedPropertyStrings = { "/", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] derivedPropertyStringsInfo = { "Derived Property", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] derivedPropertyStringsName = { "/", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for(int i = 0; i < derivedPropertyStrings.length; i++) {
- if(derivedPropertyStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(derivedPropertyStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, derivedPropertyStrings[i].length(), null, derivedPropertyStringsName[i],
- null, derivedPropertyStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java
deleted file mode 100644
index 52ca4019974..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/DirectionCompletionProposal.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for direction.
- */
-public class DirectionCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] directionStrings = { "in", "out", "inout", "return", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] directionStringsInfo = { "in direction", "out direction", "inout direction",
- "return direction", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] directionStringsName = { "in", "out", "inout", "return", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- List<ICompletionProposal> list = new ArrayList<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for(int i = 0; i < directionStrings.length; i++) {
- if(directionStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(directionStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, directionStrings[i].length(), null, directionStringsName[i], null,
- directionStringsInfo[i]);
- list.add(proposal);
- }
- }
- return list;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java
deleted file mode 100644
index 953986ddc38..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ICompletionProposalComputer.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- *
- */
-public interface ICompletionProposalComputer {
-
- /** set of text completions */
- /** set of text completions information */
- /**
- * set of text completions text.
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
-
- // String[] proposals, String[] proposalsInfo, String prefix,
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix);
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java
deleted file mode 100644
index 5e87ebc2c0a..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/MultiplicityCompletionProposal.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for multiplicity strings.
- */
-public class MultiplicityCompletionProposal implements ICompletionProposalComputer {
-
- /**
- *
- */
- private static final String EMPTY_MULTIPLICITY = "[]";
-
- /**
- * Text inserted in the editor.
- */
- final static private String[] multiplicityStrings = { "[0..1] ", "[0..*] ", "[1] ", "[1..*] ", };
-
- /**
- * Text displayed in the information window.
- */
- final static private String[] multiplicityStringsInfo = { "Multiplicity: [0..1]", "Multiplicity: [0..*]",
- "Multiplicity: [1]", "Multiplicity: [1..*]", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static private String[] multiplicityStringName = { "[0..1]", "[0..*]", "[1]", "[1..*]", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add [] ans set the cursor after left curly
- if(EMPTY_MULTIPLICITY.startsWith(prefix)) {
- proposal = new CompletionProposal(EMPTY_MULTIPLICITY, documentOffset - prefix.length(), prefix.length()
- + selectionRange, 1, null, "[m..n]", null, "Multiplicity");
- v.add(proposal);
- }
-
- // adds all standard multiplicities (static strings...)
- for(int i = 0; i < multiplicityStrings.length; i++) {
- if(multiplicityStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(multiplicityStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, multiplicityStrings[i].length(), null, multiplicityStringName[i], null,
- multiplicityStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java
deleted file mode 100644
index d7ad9b30395..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/NameCompletionProposal.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for names.
- */
-public class NameCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static private String[] nameStrings = { "", };
-
- /**
- * Text displayed in the information window.
- */
- final static private String[] nameStringsInfo = { "Name of the element", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static private String[] nameStringsName = { "<Name>", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < nameStrings.length; i++) {
- if(nameStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(nameStrings[i], documentOffset - prefix.length(), prefix.length()
- + selectionRange, nameStrings[i].length(), null, nameStringsName[i], null, nameStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java
deleted file mode 100644
index 03296ed6ab3..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifierProposal.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for parameter modifiers strings.
- */
-public class ParameterModifierProposal implements ICompletionProposalComputer {
-
- // vector that keeps modifiers already used (used for completion)
- /**
- *
- */
- public Map<String, Boolean> modifiersUsed;
-
- /**
- *
- *
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- *
- *
- * @param modifiersUsed
- * the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] modifiersStrings = { "ordered", "unique", "nonunique", "exception", "stream", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] modifiersStringsInfo = { "Ordered collection property", "No duplicates allowed in the collection", "Duplicates allowed in the collection", "Exception parameter", "Stream parameter", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] modifiersStringsName = { "ordered", "unique", "nonunique", "exception", "stream", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for(int i = 0; i < modifiersStrings.length; i++) {
- // test if this modifier is valid (already used or othe contrary has alreday been used.
- if(!getModifiersUsed().get(modifiersStrings[i])) {
- if(modifiersStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(modifiersStrings[i], documentOffset - prefix.length(), prefix.length() + selectionRange, modifiersStrings[i].length(), null, modifiersStringsName[i], null, modifiersStringsInfo[i]);
- v.add(proposal);
- }
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java
deleted file mode 100644
index 2684f8af4f4..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/ParameterModifiersProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for parameter modifiers strings.
- */
-public class ParameterModifiersProposal implements ICompletionProposalComputer {
-
- /**
- *
- */
- private static final String EMPTY_MODIFIERS = "{}";
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add [] ans set the cursor after left curly
- if(EMPTY_MODIFIERS.startsWith(prefix)) {
- proposal = new CompletionProposal(EMPTY_MODIFIERS, documentOffset - prefix.length(), prefix.length()
- + selectionRange, 1, null, "{ <ParameterModifiers> }", null, "Parameter modifiers");
- v.add(proposal);
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java
deleted file mode 100644
index d75a2e6988e..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifierProposal.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Map;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for property modifiers strings.
- */
-public class PropertyModifierProposal implements ICompletionProposalComputer {
-
- // vector that keeps modifiers already used (used for completion)
- /**
- *
- */
- public Map<String, Boolean> modifiersUsed;
-
- /**
- *
- *
- * @return the modifiersUsed
- */
- public Map<String, Boolean> getModifiersUsed() {
- return modifiersUsed;
- }
-
- /**
- *
- *
- * @param modifiersUsed
- * the modifiersUsed to set
- */
- public void setModifiersUsed(Map<String, Boolean> modifiersUsed) {
- this.modifiersUsed = modifiersUsed;
- }
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] modifiersStrings = { "readOnly", "union", "ordered", "unique", "nonunique",
- "subsets ", "redefines ", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] modifiersStringsInfo = {
- "ReadOnly property",
- "Specifies whether the property is derived as\n " + "the union of all of the properties that are\n"
- + "constrained to subset it. ", "ordered collection property",
- "No duplicates allowed in the collection", "Duplicates allowed in the collection", "Property subset",
- "Property redefinition", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] modifiersStringsName = { "readOnly", "union", "ordered", "unique", "nonunique",
- "subsets <PropertyName>", "redefines <PropertyName>", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for(int i = 0; i < modifiersStrings.length; i++) {
- // test if this modifier is valid (already used or othe contrary has alreday been used.
- if(!modifiersUsed.get(modifiersStrings[i])) {
- if(modifiersStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(modifiersStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, modifiersStrings[i].length(), null, modifiersStringsName[i], null,
- modifiersStringsInfo[i]);
- v.add(proposal);
- }
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java
deleted file mode 100644
index baaf3b6399d..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyModifiersProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for property modifiers strings.
- */
-public class PropertyModifiersProposal implements ICompletionProposalComputer {
-
- /**
- *
- */
- private static final String EMPTY_MODIFIERS = "{}";
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add [] ans set the cursor after left curly
- if(EMPTY_MODIFIERS.startsWith(prefix)) {
- proposal = new CompletionProposal(EMPTY_MODIFIERS, documentOffset - prefix.length(), prefix.length()
- + selectionRange, 1, null, "{ <PropertyModifiers> }", null, "Property modifiers");
- v.add(proposal);
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java
deleted file mode 100644
index 38dd9f7133d..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertyRedefineProposal.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Completion proposal computer for multiplicity strings.
- */
-public class PropertyRedefineProposal implements ICompletionProposalComputer {
-
- /**
- *
- *
- * @param property
- */
- public PropertyRedefineProposal(Property property) {
- this.property = property;
- }
-
- /**
- *
- */
- private Property property;
-
- /**
- *
- *
- * @return the property
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- *
- *
- * @param property
- * the property to set
- */
- public void setProperty(Property property) {
- this.property = property;
- }
-
- /*
- * (non-Javadoc)
- *
- * @seecom.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.
- * ICompletionProposalComputer#generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- Iterator<Property> it = PropertyUtil.getRedefinableProperties(property).iterator();
- while(it.hasNext()) {
- Property prop = it.next();
- String name = prop.getName();
-
- if(name.startsWith(prefix)) {
- v
- .add(new CompletionProposal(prop.getName(), documentOffset - prefix.length(), prefix.length()
- + selectionRange, prop.getName().length(), null, prop.getName(), null, prop
- .getQualifiedName()));
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java
deleted file mode 100644
index aa3384a11a1..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/PropertySubsetsProposal.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Completion proposal computer for multiplicity strings.
- */
-public class PropertySubsetsProposal implements ICompletionProposalComputer {
-
- /**
- *
- *
- * @param property
- */
- public PropertySubsetsProposal(Property property) {
- this.property = property;
- }
-
- /**
- *
- */
- private Property property;
-
- /**
- *
- *
- * @return the property
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- *
- *
- * @param property
- * the property to set
- */
- public void setProperty(Property property) {
- this.property = property;
- }
-
- /*
- * (non-Javadoc)
- *
- * @seecom.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.
- * ICompletionProposalComputer#generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- Iterator<Property> it = PropertyUtil.getSubsettablesProperties(property, true).iterator();
- while(it.hasNext()) {
- Property prop = it.next();
- String name = prop.getName();
-
- if(name.startsWith(prefix)) {
- v
- .add(new CompletionProposal(prop.getName(), documentOffset - prefix.length(), prefix.length()
- + selectionRange, prop.getName().length(), null, prop.getName(), null, prop
- .getQualifiedName()));
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java
deleted file mode 100644
index b46b0f29b0a..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/TypeCompletionProposalComputer.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008, 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann TANGUY (CEA LIST) yann.tanguy@cea.fr
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter;
-import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
-import org.eclipse.papyrus.uml.tools.utils.TemplateSignatureUtil;
-import org.eclipse.papyrus.uml.tools.utils.TypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.TemplateableElement;
-import org.eclipse.uml2.uml.Type;
-
-/**
- *
- */
-public class TypeCompletionProposalComputer implements ICompletionProposalComputer {
-
- private static final String UNDEFINED_TYPE = "<Undefined>";
-
- private Element element;
-
- /** set up a filter for choice of values */
- private ICompletionFilter completionFilter;
-
- /** Type of the filtered property */
- private final int propertyType;
-
- /**
- * Instantiates a new type completion proposal computer without active filter
- */
- public TypeCompletionProposalComputer() {
- this.completionFilter = new CompletionFilterSourceViewerConfiguration.NullCompletionFilter();
- this.propertyType = -1;
- }
-
- /**
- * Instantiates a new type completion proposal computer with active filter on property
- *
- * @param completionFilter the i completion filter
- * @param propertyType the property type
- */
- public TypeCompletionProposalComputer(ICompletionFilter completionFilter, int propertyType) {
- this.completionFilter = completionFilter == null ? new CompletionFilterSourceViewerConfiguration.NullCompletionFilter()
- : completionFilter;
- this.propertyType = propertyType;
- }
-
- /**
- *
- *
- * @return the element
- */
- public Element getElement() {
- return element;
- }
-
- /**
- *
- *
- * @param element
- * the element to set
- */
- public void setElement(Element element) {
- this.element = element;
- }
-
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // first, add <Undefined>
- if (UNDEFINED_TYPE.startsWith(prefix)) {
- proposal = new CompletionProposal(UNDEFINED_TYPE, documentOffset - prefix.length(), prefix.length()
- + selectionRange, UNDEFINED_TYPE.length(), null, UNDEFINED_TYPE, null, "Undefined Type");
- v.add(proposal);
- }
-
- if (element != null) {
- // then, all accessible types, by alphabetic order...
- Set<Type> types = computeAccessibleTypeList(element);
- // generate the list of types, in alphabetical order
- Iterator<Type> it = types.iterator();
- while (it.hasNext()) {
- Type type = it.next();
- if (!completionFilter.filter(propertyType, type)) {
- String name = type.getName();
- if (name != null && name.startsWith(prefix)) {
- // create a completion processor for the type if prefix
- // corresponds
- proposal = new CompletionProposal(name, documentOffset - prefix.length(), prefix.length()
- + selectionRange, name.length(), null, TypeUtil.getInfoString(type), null, "");
- v.add(proposal);
- }
- }
- }
- }
- return v;
- }
-
- /**
- *
- *
- * @param element
- *
- * @return
- */
- public Set<Type> computeAccessibleTypeList(Element element) {
- LinkedHashSet<Type> list = new LinkedHashSet<Type>();
- // adds directly accessible elements
- list.addAll(PackageUtil.getAccessibleTypes(element.getNearestPackage()));
-
- // In the context where element is owned by a template,
- // types declared in the context of the template must also be added
- if (element.getOwner() != null && element.getOwner() instanceof TemplateableElement) {
- TemplateableElement template = (TemplateableElement) element.getOwner();
- if (template.isTemplate()) {
- list.addAll(TemplateSignatureUtil.getAccessibleTypes(template.getOwnedTemplateSignature()));
- }
- }
-
- // adds all elements
- list.addAll(PackageUtil.getAllTypes(element.getNearestPackage()));
-
- return list;
- }
-
- /**
- * Simple comparator for types, based on their names.
- */
- private class TypeNameComparator implements Comparator<Type> {
-
- /**
- *
- *
- * @param o2
- * @param o1
- *
- * @return
- */
- public int compare(Type o1, Type o2) {
- return o1.getName().compareTo(o2.getName());
- }
-
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java
deleted file mode 100644
index 661ed4fb752..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_BooleanValue_CompletionProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_BooleanValue_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_BooleanValue_Strings = { "true", "false", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_BooleanValue_StringsInfo = { NFPMessages.BooleanValue_True_StringsInfo,
- NFPMessages.BooleanValue_False_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_BooleanValue_StringName = { NFPMessages.BooleanValue_True_StringName,
- NFPMessages.BooleanValue_False_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_BooleanValue_Strings.length; i++) {
- if(TVL_BooleanValue_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_BooleanValue_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_BooleanValue_Strings[i].length(), null, TVL_BooleanValue_StringName[i],
- null, TVL_BooleanValue_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java
deleted file mode 100644
index b0db06066ec..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_DefaultValue_CompletionProposal.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_DefaultValue_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_DefaultValue_Strings = { "-", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_DefaultValue_StringsInfo = { NFPMessages.DefaultValue_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_DefaultValue_StringName = { NFPMessages.DefaultValue_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_DefaultValue_Strings.length; i++) {
- if(TVL_DefaultValue_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_DefaultValue_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_DefaultValue_Strings[i].length(), null, TVL_DefaultValue_StringName[i],
- null, TVL_DefaultValue_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java
deleted file mode 100644
index 229de3a9cf6..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_EnumerationLiteral_CompletionProposal.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-
-public class VSL_EnumerationLiteral_CompletionProposal implements ICompletionProposalComputer {
-
- private static ArrayList<String> enumLiterals;
-
- private static Enumeration enumeration;
-
- public void setDataType(DataType datatype) {
- enumeration = (Enumeration)datatype;
- }
-
- // /** Text inserted in the editor */
- // final static private String[] TVL_EnumLiteral_Strings = {
- // "true",
- // "false",
- // };
-
- /** Text displayed in the information window */
- final static private String[] TVL_Enumeration_StringsInfo = { NFPMessages.Enumeration_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Enumeration_StringName = { NFPMessages.Enumeration_StringName, };
-
- public static void computeTVL_Enumeration_String() {
- enumLiterals = new ArrayList<String>();
-
- if(enumeration != null) {
- Iterator<EnumerationLiteral> iter = enumeration.getOwnedLiterals().iterator();
- while(iter.hasNext()) {
- EnumerationLiteral enumLiteral = iter.next();
- enumLiterals.add(enumLiteral.getName());
- }
- } else {
- enumLiterals.add("<EnumerationLiteral>");
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
- computeTVL_Enumeration_String();
-
- // adds all name (static strings...)
- for(int i = 0; i < enumLiterals.size(); i++) {
- if(enumLiterals.get(i).startsWith(prefix)) {
- proposal = new CompletionProposal(enumLiterals.get(i), documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, enumLiterals.get(i).length(), null, enumLiterals.get(i), null,
- TVL_Enumeration_StringsInfo[0]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java
deleted file mode 100644
index 5755630c9e7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Integer_CompletionProposal.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-// TODO: DONE: add (+/-) to the grammar in order to be able to handle positive and negative integers. this remark applies to real as well
-// TODO: Integers accept ".". We have to fix this error in the grammar.
-public class VSL_Integer_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_Integer_Strings = { "", "0x", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_Integer_StringsInfo = { NFPMessages.Integer_Decimal_StringsInfo,
- NFPMessages.Integer_Hexadecimal_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Integer_StringName = { NFPMessages.Integer_Decimal_StringName,
- NFPMessages.Integer_Hexadecimal_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_Integer_Strings.length; i++) {
- if(TVL_Integer_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_Integer_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_Integer_Strings[i].length(), null, TVL_Integer_StringName[i], null,
- TVL_Integer_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java
deleted file mode 100644
index aeb44672476..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NFP_VS_CompletionProposal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_NFP_VS_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_NFP_VS_Strings = { "literal ", "interval ", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_NFP_VS_StringsInfo = { NFPMessages.NFP_VS_Literal_StringsInfo,
- NFPMessages.NFP_VS_Interval_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_NFP_VS_StringName = { NFPMessages.NFP_VS_Literal_StringName,
- NFPMessages.NFP_VS_Interval_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_NFP_VS_Strings.length; i++) {
- if(TVL_NFP_VS_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_NFP_VS_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_NFP_VS_Strings[i].length(), null, TVL_NFP_VS_StringName[i], null,
- TVL_NFP_VS_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java
deleted file mode 100644
index 0d3b7c46804..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NullValue_CompletionProposal.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_NullValue_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_NullValue_Strings = { "null", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_NullValue_StringsInfo = { NFPMessages.NullValue_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_NullValue_StringName = { NFPMessages.NullValue_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_NullValue_Strings.length; i++) {
- if(TVL_NullValue_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_NullValue_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_NullValue_Strings[i].length(), null, TVL_NullValue_StringName[i], null,
- TVL_NullValue_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java
deleted file mode 100644
index 385844552ad..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_NumberLiteral_CompletionProposal.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_NumberLiteral_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_NumberLiteral_Strings = { "", "", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_NumberLiteral_StringsInfo = { NFPMessages.NumberLiteral_Integer_StringsInfo,
- NFPMessages.NumberLiteral_Real_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_NumberLiteral_StringName = { NFPMessages.NumberLiteral_Integer_StringName,
- NFPMessages.NumberLiteral_Real_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_NumberLiteral_Strings.length; i++) {
- if(TVL_NumberLiteral_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_NumberLiteral_Strings[i], documentOffset - prefix.length(),
- prefix.length() + selectionRange, TVL_NumberLiteral_Strings[i].length(), null,
- TVL_NumberLiteral_StringName[i], null, TVL_NumberLiteral_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java
deleted file mode 100644
index d59f9957aae..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Real_CompletionProposal.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-// TODO: handle cases of float and double types
-
-public class VSL_Real_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_Real_Strings = { ".", "E-", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_Real_StringsInfo = { NFPMessages.RealPoint_StringsInfo,
- NFPMessages.RealExpo_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Real_StringsName = { NFPMessages.RealPoint_StringsName,
- NFPMessages.RealExpo_StringsName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
- // adds all name (static strings...)
- for(int i = 0; i < TVL_Real_Strings.length; i++) {
- if(TVL_Real_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_Real_Strings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, TVL_Real_Strings[i].length(), null, TVL_Real_StringsName[i], null,
- TVL_Real_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java
deleted file mode 100644
index a474b70c40c..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_StringLiteral_CompletionProposal.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-public class VSL_StringLiteral_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_StringLiteral_Strings = { "\'\'", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_StringLiteral_StringsInfo = { NFPMessages.StringLiteral_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_StringLiteral_StringName = { NFPMessages.StringLiteral_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_StringLiteral_Strings.length; i++) {
- if(TVL_StringLiteral_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_StringLiteral_Strings[i], documentOffset - prefix.length(),
- prefix.length() + selectionRange, TVL_StringLiteral_Strings[i].length() - 1, null,
- TVL_StringLiteral_StringName[i], null, TVL_StringLiteral_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java
deleted file mode 100644
index 4b8e0f7731c..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_Tuple_CompletionProposal.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-import org.eclipse.uml2.uml.DataType;
-import org.eclipse.uml2.uml.Property;
-
-public class VSL_Tuple_CompletionProposal implements ICompletionProposalComputer {
-
- private static DataType dataType;
-
- private static String tupleTypeString;
-
- public void setDataType(DataType datatype) {
- dataType = datatype;
- }
-
- /**
- *
- * @return returns the string containing properties of the data type for completion
- */
- public static String computeTVL_Tuple_String() {
- String tupleString = "(";
- tupleTypeString = "(";
- // if datatype is defined
- if(dataType != null) {
- if(dataType.getOwnedAttributes().size() > 0) {
- Iterator<Property> propIter = dataType.getAllAttributes().iterator();
- while(propIter.hasNext()) {
- Property prop = propIter.next();
- DataType propType = (DataType)prop.getType();
- tupleString += prop.getName() + "=";
- if(prop.getDefault() != null)
- tupleString += prop.getDefault();
- tupleString += " , ";
- tupleTypeString += prop.getName() + ": " + propType.getName() + ", ";
- }
- } else {
- tupleString = dataType.getName();
- }
- }
-
- tupleString = tupleString.substring(0, tupleString.length() - 3);
- tupleString += ")";
- tupleTypeString = tupleTypeString.substring(0, tupleTypeString.length() - 2);
- tupleTypeString += ")";
- return tupleString;
- }
-
- /** Text inserted in the editor */
- /*
- * final static private String[] TVL_Tuple_Strings = { computeTVL_Tuple_String(), };
- */
-
- /** Text displayed in the information window */
- final static private String[] TVL_Tuple_StringsInfo = { NFPMessages.Tuple_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_Tuple_StringName = { NFPMessages.Tuple_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
- String tupleString = computeTVL_Tuple_String();
- if(tupleString.startsWith(prefix)) {
- proposal = new CompletionProposal(tupleString, documentOffset - prefix.length(), prefix.length()
- + selectionRange, tupleString.length() - 1, null, tupleTypeString, null, TVL_Tuple_StringsInfo[0]);
- v.add(proposal);
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java
deleted file mode 100644
index b63d632c463..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VSL_UnlimitedNatural_CompletionProposal.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.messages.NFPMessages;
-
-//unlimited natural
-// TODO: To change the symbol of Infinity='*' (UML2 & MARTE) because it conflict with multiplication operator
-public class VSL_UnlimitedNatural_CompletionProposal implements ICompletionProposalComputer {
-
- /** Text inserted in the editor */
- final static private String[] TVL_UnlimitedNatural_Strings = { "", "0x", "*", };
-
- /** Text displayed in the information window */
- final static private String[] TVL_UnlimitedNatural_StringsInfo = {
- NFPMessages.UnlimitedNatural_Decimal_StringsInfo, NFPMessages.UnlimitedNatural_Hexadecimal_StringsInfo,
- NFPMessages.UnlimitedNatural_Star_StringsInfo, };
-
- /** Text displayed in the completion area window */
- final static private String[] TVL_UnlimitedNatural_StringName = { NFPMessages.UnlimitedNatural_Decimal_StringName,
- NFPMessages.UnlimitedNatural_Hexadecimal_StringName, NFPMessages.UnlimitedNatural_Star_StringName, };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all name (static strings...)
- for(int i = 0; i < TVL_UnlimitedNatural_Strings.length; i++) {
- if(TVL_UnlimitedNatural_Strings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(TVL_UnlimitedNatural_Strings[i], documentOffset - prefix.length(),
- prefix.length() + selectionRange, TVL_UnlimitedNatural_Strings[i].length(), null,
- TVL_UnlimitedNatural_StringName[i], null, TVL_UnlimitedNatural_StringsInfo[i]);
- v.add(proposal);
- }
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java
deleted file mode 100644
index 818fd784739..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/completionproposals/VisibilityCompletionProposal.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.completionproposals;
-
-import java.util.List;
-import java.util.Vector;
-
-import org.eclipse.jface.text.contentassist.CompletionProposal;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-
-/**
- * Completion proposal computer for visibilities.
- */
-public class VisibilityCompletionProposal implements ICompletionProposalComputer {
-
- /**
- * Text inserted in the editor.
- */
- final static public String[] visibilityStrings = { "+", "-", "#", "~", };
-
- /**
- * Text displayed in the information window.
- */
- final static public String[] visibilityStringsInfo = { "Public visibility", "Private visibility",
- "Protected visibility", "Package visibility", };
-
- /**
- * Text displayed in the completion area window.
- */
- final static public String[] visibilityStringsName = { "+", "-", "#", "~", };
-
- /*
- * (non-Javadoc)
- *
- * @see
- * com.cea.papyrus.classdiagram.parsers.texteditor.completionproposals.ICompletionProposalComputer
- * #generateCompletionProposals(int, int, java.lang.String)
- */
- /**
- *
- *
- * @param selectionRange
- * @param prefix
- * @param documentOffset
- *
- * @return
- */
- public List<ICompletionProposal> generateCompletionProposals(int documentOffset, int selectionRange, String prefix) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
-
- // adds each Completion proposal
- ICompletionProposal proposal = null;
-
- // adds all standard multiplicities (static strings...)
- for(int i = 0; i < visibilityStrings.length; i++) {
- if(visibilityStrings[i].startsWith(prefix)) {
- proposal = new CompletionProposal(visibilityStrings[i], documentOffset - prefix.length(), prefix
- .length()
- + selectionRange, visibilityStrings[i].length(), null, visibilityStringsName[i], null,
- visibilityStringsInfo[i]);
- v.add(proposal);
- }
- }
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java
deleted file mode 100644
index 3bf89d13cbc..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IContext.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-/**
- *
- */
-public abstract interface IContext {
-
- /**
- *
- */
- public static final int DEFAULT = 0;
-
- /**
- *
- */
- public static final int VISIBILITY = 1;
-
- /**
- *
- */
- public static final int DIRECTION = 2;
-
- /**
- *
- */
- public static final int NAME = 3;
-
- /**
- *
- */
- public static final int AFTER_COLON = 4;
-
- /**
- *
- */
- public static final int PARAMETER_TYPE = 5;
-
- /**
- *
- */
- public static final int MULTIPLICITY = 6;
-
- /**
- *
- */
- public static final int DEFAULT_VALUE = 7;
-
- /**
- *
- */
- public static final int PARAMETER_MODIFIERS = 8;
-
- /**
- *
- */
- public static final int PARAMETER_MODIFIER = 9;
-
- /**
- *
- */
- public static final int IN_MULTIPLICITY = 10;
-
- /**
- *
- */
- public static final int AFTER_MULTIPLICITY = 11;
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java
deleted file mode 100644
index e451afb8038..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/IParameterLabelColorConstants.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- * Used colors constants definitions.
- */
-public interface IParameterLabelColorConstants {
-
- /** DEFAULT definition */
- public final String DEFAULT = "default";
-
- /** KEYWORD definition */
- public final String KEYWORD = "keyword";
-
- /** STRING definition */
- public final String STRING = "string";
-
- /** SYMBOL definition */
- public final String SYMBOL = "symbol";
-
- /** DEFAULT color value definition */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /** CONSTANT color value definition */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /** BACKGROUND color value definition */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /** KEYWORD color value definition */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /** STRING color value definition */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /** SYMBOL color value definition */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java
deleted file mode 100644
index 8ab90bbcb8a..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterConfigurationForUML.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
-import org.eclipse.papyrus.parsers.modelgenerator.ParameterGenerator;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.ParameterUtil;
-import org.eclipse.uml2.uml.Parameter;
-
-/**
- * Configuration Class for the direct edition of a UML property
- */
-public class ParameterConfigurationForUML extends DefaultDirectEditorConfiguration {
-
- /** Configuration of the source viewer */
- final private ParameterLabelSourceViewerConfiguration configuration;
-
- /**
- * Creates a new ParameterConfigurationForUML.
- */
- public ParameterConfigurationForUML() {
- configuration = new ParameterLabelSourceViewerConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public SourceViewerConfiguration getSourceViewerConfiguration() {
- return configuration;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTextToEdit(Object editedObject) {
- if(editedObject instanceof Parameter) {
- return ParameterUtil.getLabel((Parameter)editedObject);
- }
- return "not a Parameter";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object preEditAction(Object objectToEdit) {
- if(objectToEdit instanceof Parameter) {
- configuration.setParameter((Parameter)objectToEdit);
- }
- return super.preEditAction(objectToEdit);
- }
-
- /**
- * {@inheritDoc}
- */
- public Object postEditAction(Object editedObject, String text) {
- // Should undo the various creations done in the property edition
- // (template binding, etc...)
- if(editedObject instanceof Parameter) {
- ParameterGenerator generator = new ParameterGenerator(((Parameter)editedObject));
- generator.parseAndModifyParameter(text);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IInputValidator getInputValidator() {
- return new IInputValidator() {
-
- public String isValid(String newText) {
- if(getObjectToEdit() instanceof Parameter) {
- ParameterGenerator generator = new ParameterGenerator(((Parameter)getObjectToEdit()));
- return generator.parseAndValidateParameter(newText);
- }
- return null;
- }
- };
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Selection getTextSelection(String value, Object editedObject) {
- if(editedObject instanceof Parameter) {
- Parameter parameter = (Parameter)editedObject;
- String name = NamedElementUtil.getName(parameter);
- int start = value.indexOf(name);
- int length = name.length();
- return new Selection(start, length);
- }
- return super.getTextSelection(value, editedObject);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java
deleted file mode 100644
index 7257b03f96d..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelColorProvider.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider to syntax highlight.
- */
-public class ParameterLabelColorProvider implements IParameterLabelColorConstants {
-
- /** Default instance */
- private static ParameterLabelColorProvider instance;
-
- /** Default constructor */
- private ParameterLabelColorProvider() {
- }
-
- /**
- * Get singleton instance
- *
- * @return the default instance
- */
- public static ParameterLabelColorProvider getDefault() {
- if(instance == null) {
- instance = new ParameterLabelColorProvider();
- }
- return instance;
- }
-
- /** Used color table */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the preference store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT, IParameterLabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD, IParameterLabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING, IParameterLabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL, IParameterLabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = fColorTable.get(aName);
- if(color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL, IParameterLabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if(rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'");
- }
- fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator<Color> colors = fColorTable.values().iterator();
- while(colors.hasNext()) {
- colors.next().dispose();
- }
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java
deleted file mode 100644
index aa800a09165..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelCompletionProcessor.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.ParameterLabelParser;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.LabelCompletionProcessor;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DefaultValueCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DirectionCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.MultiplicityCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.NameCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.ParameterModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.ParameterModifiersProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.TypeCompletionProposalComputer;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.uml2.uml.Parameter;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPropertyLabelKeywords
- */
-public class ParameterLabelCompletionProcessor extends LabelCompletionProcessor implements IContext {
-
- /** The completion filter. */
- private final ICompletionFilter completionFilter;
-
- /** The {@link Parameter} to modify */
- private Parameter parameter;
-
- /** The modifiers used. */
- private Map<String, Boolean> modifiersUsed;
-
- /**
- * Constructor
- *
- * @param parameter
- * the parsed {@link Parameter}
- */
- public ParameterLabelCompletionProcessor(Parameter parameter) {
- this.parameter = parameter;
- this.completionFilter = new CompletionFilterSourceViewerConfiguration.NullCompletionFilter();
- }
-
- /**
- * The Constructor.
- *
- * @param property
- * the property
- * @param iCompletionFilter
- * the i completion filter
- */
- public ParameterLabelCompletionProcessor(Parameter parameter, ICompletionFilter iCompletionFilter) {
- this.parameter = parameter;
- this.completionFilter = iCompletionFilter;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletionProposals(org.eclipse.jface.text.ITextViewer, int)
- */
- /**
- * This method computes completion proposal for currently edited Parameter label.
- *
- * @param viewer
- * @param documentOffset
- *
- * @return completion proposals
- */
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- String text;
- String prefix = "";
- ParameterLabelLexer lexer = null;
- ParameterLabelParser parser = null;
- Collection<ICompletionProposal> result = null;
- int selectionRange = 0;
-
- try {
- text = viewer.getDocument().get(0, documentOffset);
- lexer = new ParameterLabelLexer(new ANTLRStringStream(text));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
-
- parser = new ParameterLabelParser(tokens, parameter, new SimpleStringErrorReporter());
- parser.setValidation(true);
- selectionRange = viewer.getSelectedRange().y;
- parser.label();
- modifiersUsed = parser.getModifiersUsed();
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (BadLocationException e) {
- e.printStackTrace();
- } catch (RuntimeException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (RecognitionException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- }
-
- return result.toArray(new ICompletionProposal[]{});
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor
- * #computeCompletions(org.eclipse.jface.text.ITextViewer, int, int, int)
- */
- /**
- * Compute completion possibilities depending on existing edited label (prefix, it may not be
- * complete).
- *
- * @param viewer
- * @param selectionRange
- * @param context
- * @param documentOffset
- *
- * @return
- */
- @Override
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset, int selectionRange) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- ParameterModifierProposal modifierProposalComputer = new ParameterModifierProposal();
- modifierProposalComputer.setModifiersUsed(modifiersUsed);
-
- String prefix = getPrefix(viewer, documentOffset);
- switch(context) {
-
- // DEFAULT : visibility or direction or name
- case IContext.DEFAULT:
- v.addAll(new VisibilityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DirectionCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // VISIBILITY : direction or name
- case IContext.VISIBILITY:
- v.addAll(new DirectionCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // DIRECTION : name
- case IContext.DIRECTION:
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // NAME: either ':' or ":undefined"
- case IContext.NAME:
- v.addAll(createCompletionProposalsWithDifferentName(new String[]{ ": ", ": <Undefined>" }, new String[]{ "Parameter type", "Undefined Parameter type" }, new String[]{ ": <Type Name>", ": <Undefined>" }, "", documentOffset));
- break;
-
- // PROPERTY TYPE (after ":") model types or undefined
- case IContext.AFTER_COLON:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- TypeCompletionProposalComputer computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(parameter);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // MULTIPLICITY: multiplicity or default value or property modifiers
- case IContext.PARAMETER_TYPE:
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.PARAMETER_TYPE);
- computer.setElement(parameter);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // IN_MULTIPLICITY(after '['): does nothing
- case IContext.MULTIPLICITY:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(parameter);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new ParameterModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // : default value or property modifiers
- case IContext.IN_MULTIPLICITY:
- prefix = getPrefixForMultiplicity(viewer, documentOffset);
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // AFTER_MULTIPLICITY(after ']')
- case IContext.AFTER_MULTIPLICITY:
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new ParameterModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // DEFAULT_VALUE: property modifiers
- case IContext.DEFAULT_VALUE:
- v.addAll(new ParameterModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PARAMETER_MODIFIERS:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PARAMETER_MODIFIER:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
- default:
- break;
- }
-
- return v;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java
deleted file mode 100644
index 0fa9c5e0600..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelPartitionScanner.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.Token;
-
-/**
- * Scanner that splits document into several parts<BR>
- * Two different rules at this time :
- * <ul>
- * <li>RTACTION_STRING</li>
- * <li>Multi line comment</li>
- * </ul>
- * .
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedPartitionScanner
- */
-public class ParameterLabelPartitionScanner extends RuleBasedPartitionScanner {
-
- /**
- *
- */
- public static final String PARAMETER_MODIFIERS_STRING = "_rt_action_string";
-
- /**
- * Creates a partition scanner dedicated to the action language.
- */
- public ParameterLabelPartitionScanner() {
- IToken tagString = new Token(PARAMETER_MODIFIERS_STRING);
- IPredicateRule[] rules = new IPredicateRule[1];
- rules[0] = new MultiLineRule("{", "}", tagString, (char)0, true);
- setPredicateRules(rules);
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java
deleted file mode 100644
index 7899942273c..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelScanner.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.papyrus.parsers.texteditor.WhitespaceDetector;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.ParameterModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Scanner for the action language.<BR>
- * It implements the interface IALKeywords, which contains the different keywords available in the
- * action language
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedScanner
- * @see com.cea.actionlanguage.sharedresources.texteditor.IRTActionKeywords
- */
-public class ParameterLabelScanner extends RuleBasedScanner implements IParameterLabelColorConstants {
-
- /** Color for the default token */
- private Color defaultColor;
-
- /** Color for keywords */
- private Color keywordColor;
-
- /** Color for special chars */
- private Color symbolColor;
-
- /**
- * Creates a new rule based scanner.
- */
- public ParameterLabelScanner() {
- defaultColor = ParameterLabelColorProvider.getDefault().getColor(DEFAULT);
- keywordColor = ParameterLabelColorProvider.getDefault().getColor(KEYWORD);
- symbolColor = ParameterLabelColorProvider.getDefault().getColor(SYMBOL);
-
- IToken other = new Token(new TextAttribute(defaultColor));
- IToken keyword = new Token(new TextAttribute(keywordColor, null, SWT.BOLD));
- IToken symbol = new Token(new TextAttribute(symbolColor, null, SWT.BOLD));
-
- IRule[] rules = new IRule[2];
-
- WordRule wordRule = new WordRule(new ParameterWordDetector(), other);
- for(int i = 0; i < VisibilityCompletionProposal.visibilityStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(visibilityStrings[i]), keyword);
- }
-
- for(int i = 0; i < ParameterModifierProposal.modifiersStrings.length; i++) {
- wordRule.addWord(ParameterModifierProposal.modifiersStrings[i].trim(), keyword);
- }
-
- wordRule.addWord("+", symbol);
- wordRule.addWord("-", symbol);
- wordRule.addWord("#", symbol);
- wordRule.addWord("~", symbol);
- wordRule.addWord("/", symbol);
- wordRule.addWord("+/", symbol);
- wordRule.addWord("-/", symbol);
- wordRule.addWord("#/", symbol);
- wordRule.addWord(":", symbol);
- wordRule.addWord("in", symbol);
- wordRule.addWord("out", symbol);
- wordRule.addWord("inout", symbol);
- wordRule.addWord("return", symbol);
-
- rules[0] = wordRule;
- rules[1] = new WhitespaceRule(new WhitespaceDetector());
-
- setRules(rules);
- }
-
- /**
- * returns the word for the scanner, without quotes.
- *
- * @param word
- *
- * @return
- */
- public static String getWordWithoutQuotes(String word) {
- String tmp = "";
- tmp = word.replaceAll("'", "");
- return tmp;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java
deleted file mode 100644
index 383d1aa6442..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterLabelSourceViewerConfiguration.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Parameter;
-
-/**
- * This class bundles the configuration space of the action language source viewer. Instances of
- * this class are passed to the configure method of <code>SourceViewer</code>.
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration
- */
-public class ParameterLabelSourceViewerConfiguration extends CompletionFilterSourceViewerConfiguration {
-
- /** Edited {@link Parameter} */
- private Parameter parameter;
-
- /**
- * Creates a new ParameterLabelSourceViewerConfiguration
- *
- * @param parameter
- * the {@link Parameter} to edit
- */
- public ParameterLabelSourceViewerConfiguration(Parameter parameter) {
- super(null);
- setParameter(parameter);
- }
-
- /**
- * Creates a new ParameterLabelSourceViewerConfiguration
- */
- public ParameterLabelSourceViewerConfiguration() {
- this(null, null);
- }
-
- /**
- * Instantiates a new property label source viewer configuration.
- *
- * @param property
- * the property
- * @param filter
- * the filter
- */
- public ParameterLabelSourceViewerConfiguration(Parameter parameter, ICompletionFilter filter) {
- super(filter);
- setParameter(parameter);
- }
-
- /**
- * @param filter
- */
- public ParameterLabelSourceViewerConfiguration(ICompletionFilter filter) {
- this(null, filter);
- }
-
- /**
- * Token scanner
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
-
- /**
- * Constructor
- *
- * @param attribute
- */
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- // creating damager/repairer for single line comments
- Color colorString = ParameterLabelColorProvider.getDefault().getColor(IParameterLabelColorConstants.STRING);
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorString)));
-
- reconciler.setDamager(dr, ParameterLabelPartitionScanner.PARAMETER_MODIFIERS_STRING);
- reconciler.setRepairer(dr, ParameterLabelPartitionScanner.PARAMETER_MODIFIERS_STRING);
-
- // creating damager/repairer for other zones (action language zone)
- dr = new DefaultDamagerRepairer(new ParameterLabelScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- IContentAssistProcessor processor = new ParameterLabelCompletionProcessor(parameter, getFilter());
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- // IInformationControlCreator
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
-
- return assistant;
- }
-
- /**
- * Returns the edited {@link Parameter}
- *
- * @return the {@link Parameter} to edit
- */
- public Parameter getParameter() {
- return parameter;
- }
-
- /**
- * Sets the {@link Parameter} to Edit
- *
- * @param collaborationUse
- * the {@link Parameter} to edit
- */
- public void setParameter(Parameter parameter) {
- this.parameter = parameter;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java
deleted file mode 100644
index 525be717e8c..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/parameterlabel/ParameterWordDetector.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2010 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- * Yann Tanguy (CEA LIST) yann.tanguy@cea.fr - customization for Parameter
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.parameterlabel;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-/**
- * Basic word detector for the scanner.<BR>
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWordDetector
- */
-public class ParameterWordDetector implements IWordDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordPart(char character) {
- Character ch = Character.valueOf(character);
-
- if(ch.compareTo('+') == 0) {
- return true;
- } else if(ch.compareTo('-') == 0) {
- return true;
- } else if(ch.compareTo('#') == 0) {
- return true;
- } else if(ch.compareTo('~') == 0) {
- return true;
- } else if(ch.compareTo('/') == 0) {
- return true;
- } else if(ch.compareTo(':') == 0) {
- return true;
- }
-
- return Character.isLetter(character);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordStart(char character) {
- Character ch = Character.valueOf(character);
-
- if(ch.compareTo('+') == 0) {
- return true;
- } else if(ch.compareTo('-') == 0) {
- return true;
- } else if(ch.compareTo('#') == 0) {
- return true;
- } else if(ch.compareTo('~') == 0) {
- return true;
- } else if(ch.compareTo('/') == 0) {
- return true;
- } else if(ch.compareTo(':') == 0) {
- return true;
- }
- return Character.isLetter(character);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java
deleted file mode 100644
index 59bb9ce76bf..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IContext.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-/**
- *
- */
-public abstract interface IContext {
-
- /**
- *
- */
- public static final int DEFAULT = 0;
-
- /**
- *
- */
- public static final int VISIBILITY = 1;
-
- /**
- *
- */
- public static final int IS_DERIVED = 2;
-
- /**
- *
- */
- public static final int NAME = 3;
-
- /**
- *
- */
- public static final int AFTER_COLON = 4;
-
- /**
- *
- */
- public static final int PROPERTY_TYPE = 5;
-
- /**
- *
- */
- public static final int MULTIPLICITY = 6;
-
- /**
- *
- */
- public static final int DEFAULT_VALUE = 7;
-
- /**
- *
- */
- public static final int PROPERTY_MODIFIERS = 8;
-
- /**
- *
- */
- public static final int PROPERTY_MODIFIER = 9;
-
- /**
- *
- */
- public static final int IN_MULTIPLICITY = 10;
-
- /**
- *
- */
- public static final int SUBSET_PROPERTY = 11;
-
- /**
- *
- */
- public static final int REDEFINE_PROPERTY = 12;
-
- /**
- *
- */
- public static final int AFTER_MULTIPLICITY = 13;
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java
deleted file mode 100644
index b1c0c54ff5a..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/IPropertyLabelColorConstants.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.swt.graphics.RGB;
-
-/**
- *
- */
-public interface IPropertyLabelColorConstants {
-
- /**
- *
- */
- public final String DEFAULT = "default";
-
- /**
- *
- */
- public final String KEYWORD = "keyword";
-
- /**
- *
- */
- public final String STRING = "string";
-
- /**
- *
- */
- public final String SYMBOL = "symbol";
-
- /**
- *
- */
- public final RGB RGB_DEFAULT = new RGB(0, 0, 0);
-
- /**
- *
- */
- public final RGB RGB_CONSTANT = new RGB(120, 120, 120);
-
- /**
- *
- */
- public final RGB RGB_BACKGROUND = new RGB(255, 255, 255);
-
- /**
- *
- */
- public final RGB RGB_KEYWORD = new RGB(127, 0, 85);
-
- /**
- *
- */
- public final RGB RGB_STRING = new RGB(85, 200, 85);
-
- /**
- *
- */
- public final RGB RGB_SYMBOL = new RGB(42, 0, 255);
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java
deleted file mode 100644
index 574b0eb03d0..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyConfigurationForUML.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.dialogs.IInputValidator;
-import org.eclipse.jface.text.source.SourceViewerConfiguration;
-import org.eclipse.papyrus.extensionpoints.editors.configuration.DefaultDirectEditorConfiguration;
-import org.eclipse.papyrus.parsers.modelgenerator.PropertyGenerator;
-import org.eclipse.papyrus.uml.tools.utils.PropertyUtil;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Configuration Class for the direct edition of a UML property
- */
-public class PropertyConfigurationForUML extends DefaultDirectEditorConfiguration {
-
- /** configuration of the source viewer */
- final private PropertyLabelSourceViewerConfiguration configuration;
-
- /**
- * Creates a new PropertyConfigurationForUML.
- */
- public PropertyConfigurationForUML() {
- configuration = new PropertyLabelSourceViewerConfiguration();
- }
-
- /**
- * {@inheritDoc}
- */
- public SourceViewerConfiguration getSourceViewerConfiguration() {
- return configuration;
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTextToEdit(Object editedObject) {
- if (editedObject instanceof Property) {
- return PropertyUtil.getLabel((Property) editedObject);
- }
- return "not a Property";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Object preEditAction(Object objectToEdit) {
- if (objectToEdit instanceof Property) {
- configuration.setProperty((Property) objectToEdit);
- }
- return super.preEditAction(objectToEdit);
- }
-
- /**
- * {@inheritDoc}
- */
- public Object postEditAction(Object editedObject, String text) {
- // should undo the various creations done in the property edition
- // (template binding, etc...)
- if (editedObject instanceof Property) {
- PropertyGenerator generator = new PropertyGenerator(((Property) editedObject));
- generator.parseAndModifyProperty(text);
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IInputValidator getInputValidator() {
- return new IInputValidator() {
-
- public String isValid(String newText) {
- if (getObjectToEdit() instanceof Property) {
- PropertyGenerator generator = new PropertyGenerator(((Property) getObjectToEdit()));
- return generator.parseAndValidateProperty(newText);
- }
- return null;
- }
- };
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Selection getTextSelection(String value, Object editedObject) {
- if (editedObject instanceof Property) {
- Property property = (Property) editedObject;
- String name = PropertyUtil.getName(property);
- int start = value.indexOf(name);
- int length = name.length();
- return new Selection(start, length);
- }
- return super.getTextSelection(value, editedObject);
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java
deleted file mode 100644
index 527ca6f7829..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelColorProvider.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferenceConverter;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.papyrus.parsers.preferences.IPreferencesConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
-
-/**
- * Color provider to syntax highlight.
- */
-public class PropertyLabelColorProvider implements IPropertyLabelColorConstants {
-
- /**
- *
- */
- private static PropertyLabelColorProvider instance;
-
- /**
- *
- */
- private PropertyLabelColorProvider() {
- }
-
- /**
- *
- *
- * @return
- */
- public static PropertyLabelColorProvider getDefault() {
- if(instance == null) {
- instance = new PropertyLabelColorProvider();
- }
- return instance;
- }
-
- /**
- *
- */
- protected Map<String, Color> fColorTable = new HashMap<String, Color>(10);
-
- /**
- * Set default colors in given preference store.
- *
- * @param aStore
- * the pref store
- */
- public static void initializeDefaults(IPreferenceStore aStore) {
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_DEFAULT,
- IPropertyLabelColorConstants.RGB_DEFAULT);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_KEYWORD,
- IPropertyLabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_STRING,
- IPropertyLabelColorConstants.RGB_STRING);
- PreferenceConverter.setDefault(aStore, IPreferencesConstants.COLOR_SYMBOL,
- IPropertyLabelColorConstants.RGB_SYMBOL);
- }
-
- /**
- * Returns specified color that is stored in the color table. If color not found in color table
- * then a new instance is created from according preferences value and stored in color table.
- *
- * @param aName
- * the name of the color
- *
- * @return the color instance
- */
- public Color getColor(String aName) {
-
- Color color = fColorTable.get(aName);
- if(color == null) {
- IPreferenceStore store = PapyrusParsersPlugin.getDefault().getPreferenceStore();
-
- // PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_KEYWORD,
- // ILabelColorConstants.RGB_KEYWORD);
- PreferenceConverter.setValue(store, IPreferencesConstants.COLOR_SYMBOL,
- IPropertyLabelColorConstants.RGB_SYMBOL);
-
- RGB rgb = PreferenceConverter.getColor(store, IPreferencesConstants.PREFIX_COLOR + aName);
- if(rgb != null) {
- color = new Color(Display.getCurrent(), rgb);
- } else {
- color = Display.getCurrent().getSystemColor(SWT.COLOR_LIST_FOREGROUND);
- PapyrusParsersPlugin.logError("Undefined color '" + aName + "'");
- }
- fColorTable.put(aName, color);
- }
- return color;
- }
-
- /**
- * Release all of the color resources held onto by the color provider.
- */
- public void dispose() {
- Iterator colors = fColorTable.values().iterator();
- while(colors.hasNext()) {
- ((Color)colors.next()).dispose();
- }
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java
deleted file mode 100644
index 3009c5a2453..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelCompletionProcessor.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import java.util.Collection;
-import java.util.Map;
-import java.util.Vector;
-
-import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
-import org.antlr.runtime.RecognitionException;
-import org.eclipse.jface.text.BadLocationException;
-import org.eclipse.jface.text.ITextViewer;
-import org.eclipse.jface.text.contentassist.ICompletionProposal;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelLexer;
-import org.eclipse.papyrus.parsers.antlr.PropertyLabelParser;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.papyrus.parsers.texteditor.LabelCompletionProcessor;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration.ICompletionFilter;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DefaultValueCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DerivedPropertyCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.MultiplicityCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.NameCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyModifiersProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyRedefineProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertySubsetsProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.TypeCompletionProposalComputer;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.papyrus.parsers.util.SimpleStringErrorReporter;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * Completion processor for action language. <BR>
- * Main class to process the different completions given by the texteditor to its user
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor
- * @see org.eclipse.jface.text.contentassist.IContentAssistProcessor
- * @see com.cea.actionlanguage.sharedresources.texteditor.IPropertyLabelKeywords
- */
-public class PropertyLabelCompletionProcessor extends LabelCompletionProcessor implements IContext {
-
-
- /** The completion filter. */
- private final ICompletionFilter completionFilter;
-
- /** The filtered property */
- private Property property;
-
- /** The modifiers used. */
- private Map<String, Boolean> modifiersUsed;
-
- /**
- * Instantiates a new property label completion processor.
- *
- * @param property
- * the property
- */
- public PropertyLabelCompletionProcessor(Property property) {
- this.property = property;
- this.completionFilter = new CompletionFilterSourceViewerConfiguration.NullCompletionFilter();
- }
-
- /**
- * The Constructor.
- *
- * @param property
- * the property
- * @param iCompletionFilter
- * the i completion filter
- */
- public PropertyLabelCompletionProcessor(Property property, ICompletionFilter iCompletionFilter) {
- this.property = property;
- this.completionFilter = iCompletionFilter;
- }
-
- /**
- * Compute completion proposals.
- *
- * @param viewer
- * the viewer
- * @param documentOffset
- * the document offset
- *
- * @return the i completion proposal[]
- */
- @Override
- public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int documentOffset) {
- String text;
- String prefix = "";
- PropertyLabelLexer lexer = null;
- PropertyLabelParser parser = null;
- Collection<ICompletionProposal> result = null;
- int selectionRange = 0;
-
- try {
- text = viewer.getDocument().get(0, documentOffset);
- lexer = new PropertyLabelLexer(new ANTLRStringStream(text));
- CommonTokenStream tokens = new CommonTokenStream(lexer);
-
- parser = new PropertyLabelParser(tokens, property, new SimpleStringErrorReporter());
- parser.setValidation(true);
- selectionRange = viewer.getSelectedRange().y;
- parser.label();
- modifiersUsed = parser.getModifiersUsed();
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (BadLocationException e) {
- e.printStackTrace();
- } catch (RuntimeException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- } catch (RecognitionException e) {
- modifiersUsed = parser.getModifiersUsed();
- prefix = getPrefix(viewer, documentOffset);
- result = computeCompletions(viewer, parser.getContext(), documentOffset, selectionRange);
- }
-
- return result.toArray(new ICompletionProposal[]{});
- }
-
- /**
- * @see com.cea.papyrus.classdiagram.parsers.texteditor.LabelCompletionProcessor #computeCompletions(org.eclipse.jface.text.ITextViewer, int, int,
- * int)
- */
-
- public Collection<ICompletionProposal> computeCompletions(ITextViewer viewer, int context, int documentOffset, int selectionRange) {
- Vector<ICompletionProposal> v = new Vector<ICompletionProposal>();
- PropertyModifierProposal modifierProposalComputer = new PropertyModifierProposal();;
- modifierProposalComputer.setModifiersUsed(modifiersUsed);
-
- String prefix = getPrefix(viewer, documentOffset);
- switch(context) {
-
- // DEFAULT : visibility, isDerived or name
- case IContext.DEFAULT:
- v.addAll(new VisibilityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DerivedPropertyCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // VISIBILITY : isDerived or name
- case IContext.VISIBILITY:
- v.addAll(new DerivedPropertyCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // IS_DERIVED: name
- case IContext.IS_DERIVED:
- v.addAll(new NameCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // NAME: either ':' or ":undefined"
- case IContext.NAME:
- v.addAll(createCompletionProposalsWithDifferentName(new String[]{ ": ", ": <Undefined>" }, new String[]{ "Property type", "Undefined property type" }, new String[]{ ": <Type Name>", ": <Undefined>" }, "", documentOffset));
- break;
-
- // PROPERTY TYPE (after ":") model types or undefined
- case IContext.AFTER_COLON:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- TypeCompletionProposalComputer computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(property);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // MULTIPLICITY: multiplicity or default value or property modifiers
- case IContext.PROPERTY_TYPE:
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.PROPERTY_TYPE);
- computer.setElement(property);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // IN_MULTIPLICITY(after '['): does nothing
- case IContext.MULTIPLICITY:
- // create properties visible in the model
- // specific prefix for type... ('<' possible at the beginning)
- prefix = getPrefixForType(viewer, documentOffset);
- // generate completion for TypeUtil
- computer = new TypeCompletionProposalComputer(completionFilter, IContext.AFTER_COLON);
- computer.setElement(property);
- v.addAll(computer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new PropertyModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // : default value or property modifiers
- case IContext.IN_MULTIPLICITY:
- prefix = getPrefixForMultiplicity(viewer, documentOffset);
- v.addAll(new MultiplicityCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // AFTER_MULTIPLICITY(after ']')
- case IContext.AFTER_MULTIPLICITY:
- v.addAll(new DefaultValueCompletionProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- v.addAll(new PropertyModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- // DEFAULT_VALUE: property modifiers
- case IContext.DEFAULT_VALUE:
- v.addAll(new PropertyModifiersProposal().generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PROPERTY_MODIFIERS:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.PROPERTY_MODIFIER:
- v.addAll(modifierProposalComputer.generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.SUBSET_PROPERTY:
- v.addAll(new PropertySubsetsProposal(property).generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
-
- case IContext.REDEFINE_PROPERTY:
- v.addAll(new PropertyRedefineProposal(property).generateCompletionProposals(documentOffset, selectionRange, prefix));
- break;
- default:
- break;
-
- }
- return v;
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java
deleted file mode 100644
index b9ff99c9cfd..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelContextType.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.templates.GlobalTemplateVariables;
-import org.eclipse.jface.text.templates.TemplateContextType;
-
-/**
- * A simple context type for PropertyUtil label.
- */
-public class PropertyLabelContextType extends TemplateContextType {
-
- /**
- * This context's id.
- */
- public static final String PROPERTYLABEL_CONTEXT_TYPE = "com.cea.papyrus.classdiagram.parsers.texteditor.propertylabel.type";
-
- /**
- * The constructor. Creates a new PROPERTY LABEL context type.
- */
- public PropertyLabelContextType() {
- addGlobalResolvers();
- }
-
- /**
- * adds a variable resolver to the context type.
- */
- private void addGlobalResolvers() {
- addResolver(new GlobalTemplateVariables.Cursor());
- addResolver(new GlobalTemplateVariables.WordSelection());
- addResolver(new GlobalTemplateVariables.LineSelection());
- addResolver(new GlobalTemplateVariables.Dollar());
- addResolver(new GlobalTemplateVariables.Date());
- addResolver(new GlobalTemplateVariables.Year());
- addResolver(new GlobalTemplateVariables.Time());
- addResolver(new GlobalTemplateVariables.User());
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java
deleted file mode 100644
index cd4f20bcebf..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelPartitionScanner.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.rules.IPredicateRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.MultiLineRule;
-import org.eclipse.jface.text.rules.RuleBasedPartitionScanner;
-import org.eclipse.jface.text.rules.Token;
-
-/**
- * Scanner that splits document into several parts<BR>
- * Two different rules at this time :
- * <ul>
- * <li>RTACTION_STRING</li>
- * <li>Multi line comment</li>
- * </ul>
- * .
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedPartitionScanner
- */
-public class PropertyLabelPartitionScanner extends RuleBasedPartitionScanner {
-
- /**
- *
- */
- public static final String PROPERTY_MODIFIERS_STRING = "_rt_action_string";
-
- /**
- * Creates a partition scanner dedicated to the action language.
- */
- public PropertyLabelPartitionScanner() {
- IToken tagString = new Token(PROPERTY_MODIFIERS_STRING);
- IPredicateRule[] rules = new IPredicateRule[1];
- rules[0] = new MultiLineRule("{", "}", tagString, (char)0, true);
- setPredicateRules(rules);
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java
deleted file mode 100644
index 2cff120d1df..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelScanner.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.rules.IRule;
-import org.eclipse.jface.text.rules.IToken;
-import org.eclipse.jface.text.rules.RuleBasedScanner;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.rules.WhitespaceRule;
-import org.eclipse.jface.text.rules.WordRule;
-import org.eclipse.papyrus.parsers.texteditor.WhitespaceDetector;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.DerivedPropertyCompletionProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.PropertyModifierProposal;
-import org.eclipse.papyrus.parsers.texteditor.completionproposals.VisibilityCompletionProposal;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-
-/**
- * Scanner for the action language.<BR>
- * It implements the interface IALKeywords, which contains the different keywords available in the
- * action language
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.RuleBasedScanner
- * @see com.cea.actionlanguage.sharedresources.texteditor.IRTActionKeywords
- */
-public class PropertyLabelScanner extends RuleBasedScanner implements IPropertyLabelColorConstants {
-
- // Color for the default token
- /**
- *
- */
- private Color defaultColor;
-
- // Color for keywords
- /**
- *
- */
- private Color keywordColor;
-
- // Color for special chars
- /**
- *
- */
- private Color symbolColor;
-
- /**
- * Creates a new rule based scanner.
- */
- public PropertyLabelScanner() {
- defaultColor = PropertyLabelColorProvider.getDefault().getColor(DEFAULT);
- keywordColor = PropertyLabelColorProvider.getDefault().getColor(KEYWORD);
- symbolColor = PropertyLabelColorProvider.getDefault().getColor(SYMBOL);
-
- IToken other = new Token(new TextAttribute(defaultColor));
- IToken keyword = new Token(new TextAttribute(keywordColor, null, SWT.BOLD));
- IToken symbol = new Token(new TextAttribute(symbolColor, null, SWT.BOLD));
-
- IRule[] rules = new IRule[2];
-
- WordRule wordRule = new WordRule(new PropertyWordDetector(), other);
- for(int i = 0; i < VisibilityCompletionProposal.visibilityStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(visibilityStrings[i]), keyword);
- }
- for(int i = 0; i < DerivedPropertyCompletionProposal.derivedPropertyStrings.length; i++) {
- // wordRule.addWord(getWordWithoutQuotes(isDerivedStrings[i]), keyword);
- }
- for(int i = 0; i < PropertyModifierProposal.modifiersStrings.length; i++) {
- wordRule.addWord(PropertyModifierProposal.modifiersStrings[i].trim(), keyword);
- }
-
- wordRule.addWord("+", symbol);
- wordRule.addWord("-", symbol);
- wordRule.addWord("#", symbol);
- wordRule.addWord("~", symbol);
- wordRule.addWord("/", symbol);
- wordRule.addWord("+/", symbol);
- wordRule.addWord("-/", symbol);
- wordRule.addWord("#/", symbol);
- wordRule.addWord(":", symbol);
-
- rules[0] = wordRule;
- rules[1] = new WhitespaceRule(new WhitespaceDetector());
-
- setRules(rules);
- }
-
- /**
- * returns the word for the scanner, without quotes.
- *
- * @param word
- *
- * @return
- */
- public static String getWordWithoutQuotes(String word) {
- String tmp = "";
- tmp = word.replaceAll("'", "");
- return tmp;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java
deleted file mode 100644
index 1a77f5de514..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelSourceViewerConfiguration.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.IDocument;
-import org.eclipse.jface.text.TextAttribute;
-import org.eclipse.jface.text.contentassist.ContentAssistant;
-import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
-import org.eclipse.jface.text.contentassist.IContentAssistant;
-import org.eclipse.jface.text.presentation.IPresentationReconciler;
-import org.eclipse.jface.text.presentation.PresentationReconciler;
-import org.eclipse.jface.text.rules.BufferedRuleBasedScanner;
-import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
-import org.eclipse.jface.text.rules.Token;
-import org.eclipse.jface.text.source.ISourceViewer;
-import org.eclipse.papyrus.parsers.texteditor.CompletionFilterSourceViewerConfiguration;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.uml2.uml.Property;
-
-/**
- * This class bundles the configuration space of the action language source viewer. Instances of
- * this class are passed to the configure method of <code>SourceViewer</code>.
- *
- * @see org.eclipse.jface.text.source.SourceViewerConfiguration
- */
-public class PropertyLabelSourceViewerConfiguration extends CompletionFilterSourceViewerConfiguration {
-
- /** edited PropertyUtil */
- private Property property;
-
- /**
- * Creates a new PropertyLabelSourceViewerConfiguration
- */
- public PropertyLabelSourceViewerConfiguration() {
- this(null, null);
- }
-
- /**
- * Creates a new PropertyLabelSourceViewerConfiguration
- *
- * @param property
- * the property to edit
- */
- public PropertyLabelSourceViewerConfiguration(Property property) {
- super(null);
- setProperty(property);
- }
-
- /**
- * Instantiates a new property label source viewer configuration.
- *
- * @param property
- * the property
- * @param filter
- * the filter
- */
- public PropertyLabelSourceViewerConfiguration(Property property, ICompletionFilter filter) {
- super(filter);
- setProperty(property);
- }
-
- /**
- * @param filter
- */
- public PropertyLabelSourceViewerConfiguration(ICompletionFilter filter) {
- this(null, filter);
- }
-
- /**
- *
- */
- static class SingleTokenScanner extends BufferedRuleBasedScanner {
-
- /**
- *
- *
- * @param attribute
- */
- public SingleTokenScanner(TextAttribute attribute) {
- setDefaultReturnToken(new Token(attribute));
- }
- };
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
- PresentationReconciler reconciler = new PresentationReconciler();
-
- // creating damager/repairer for single line comments
- Color colorString = PropertyLabelColorProvider.getDefault().getColor(IPropertyLabelColorConstants.STRING);
- DefaultDamagerRepairer dr = new DefaultDamagerRepairer(new SingleTokenScanner(new TextAttribute(colorString)));
-
- reconciler.setDamager(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
- reconciler.setRepairer(dr, PropertyLabelPartitionScanner.PROPERTY_MODIFIERS_STRING);
-
- // creating damager/repairer for other zones (action language zone)
- dr = new DefaultDamagerRepairer(new PropertyLabelScanner());
- reconciler.setDamager(dr, IDocument.DEFAULT_CONTENT_TYPE);
- reconciler.setRepairer(dr, IDocument.DEFAULT_CONTENT_TYPE);
-
- return reconciler;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
- ContentAssistant assistant = new ContentAssistant();
-
- IContentAssistProcessor processor = new PropertyLabelCompletionProcessor(property, getFilter());
- assistant.setContentAssistProcessor(processor, IDocument.DEFAULT_CONTENT_TYPE);
-
- // IInformationControlCreator
- assistant.setInformationControlCreator(getInformationControlCreator(sourceViewer));
-
- assistant.enableAutoActivation(true);
- assistant.setAutoActivationDelay(500);
-
- return assistant;
- }
-
- /**
- * Returns the edited PropertyUtil
- *
- * @return the property to edit
- */
- public Property getProperty() {
- return property;
- }
-
- /**
- * Sets the property to Edit
- *
- * @param property
- * the property to edit
- */
- public void setProperty(Property property) {
- this.property = property;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java
deleted file mode 100644
index eadecc988e7..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyLabelTemplateUI.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import java.io.IOException;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.jface.text.templates.ContextTypeRegistry;
-import org.eclipse.jface.text.templates.persistence.TemplateStore;
-import org.eclipse.papyrus.parsers.PapyrusParsersPlugin;
-import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry;
-import org.eclipse.ui.editors.text.templates.ContributionTemplateStore;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-/**
- * Template management for the text editor.
- */
-public class PropertyLabelTemplateUI {
-
- /**
- * Key to store custom templates.
- */
- private static final String CUSTOM_TEMPLATES_KEY = "com.cea.accorduml.view.rtaction.texteditor.customtemplates";
-
- /**
- * The shared instance.
- */
- private static PropertyLabelTemplateUI fInstance;
-
- /**
- * The template store.
- */
- private TemplateStore fStore;
-
- /**
- * The context type registry.
- */
- private ContributionContextTypeRegistry fRegistry;
-
- /**
- *
- */
- private PropertyLabelTemplateUI() {
- }
-
- /**
- * Returns the shared instance.
- *
- * @return the shared instance
- */
- public static PropertyLabelTemplateUI getDefault() {
- if(fInstance == null) {
- fInstance = new PropertyLabelTemplateUI();
- }
- return fInstance;
- }
-
- /**
- * Returns this plug-in's template store.
- *
- * @return the template store of this plug-in instance
- */
- public TemplateStore getTemplateStore() {
- if(fStore == null) {
- fStore = new ContributionTemplateStore(getContextTypeRegistry(), PapyrusParsersPlugin.getDefault()
- .getPreferenceStore(), CUSTOM_TEMPLATES_KEY);
- try {
- fStore.load();
- } catch (IOException e) {
- PapyrusParsersPlugin.logException(e);
- }
- }
- return fStore;
- }
-
- /**
- * Returns this plug-in's context type registry.
- *
- * @return the context type registry for this plug-in instance
- */
- public ContextTypeRegistry getContextTypeRegistry() {
- if(fRegistry == null) {
- // create an configure the contexts available in the template editor
- fRegistry = new ContributionContextTypeRegistry();
- fRegistry.addContextType(PropertyLabelContextType.PROPERTYLABEL_CONTEXT_TYPE);
- }
- return fRegistry;
- }
-
- /* Forward plug-in methods to javaeditor example plugin default instance */
- /**
- *
- *
- * @return
- */
- public ImageRegistry getImageRegistry() {
- return PapyrusParsersPlugin.getDefault().getImageRegistry();
- }
-
- /**
- * Creates and returns the <code>ImageDescriptor</code> for an image from a plugin.
- *
- * @param imageFilePath
- * relative path to the file that stores the image
- * @param pluginId
- * the identifier of the plugin
- *
- * @return the image descriptor
- *
- * @see AbstractUIPlugin#imageDescriptorFromPlugin(java.lang.String, java.lang.String)
- */
- public static ImageDescriptor imageDescriptorFromPlugin(String pluginId, String imageFilePath) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imageFilePath);
- }
-
- /**
- * Returns the preference store of the plugin.
- *
- * @return the preference store of the plugin
- *
- * @see AbstractUIPlugin#getPreferenceStore()
- */
- public IPreferenceStore getPreferenceStore() {
- return PapyrusParsersPlugin.getDefault().getPreferenceStore();
- }
-
- /**
- * Save plugin preferences.
- *
- * @see org.eclipse.core.runtime.Plugin#savePluginPreferences()
- */
- public void savePluginPreferences() {
- PapyrusParsersPlugin.getDefault().savePluginPreferences();
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java
deleted file mode 100644
index a84dae3b6dc..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/texteditor/propertylabel/PropertyWordDetector.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.texteditor.propertylabel;
-
-import org.eclipse.jface.text.rules.IWordDetector;
-
-/**
- * Basic word detector for the scanner.<BR>
- *
- * @author Remi SCHNEKENBURGER
- * @see org.eclipse.jface.text.rules.IWordDetector
- */
-public class PropertyWordDetector implements IWordDetector {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordPart(char character) {
- Character ch = Character.valueOf(character);
-
- if(ch.compareTo('+') == 0) {
- return true;
- } else if(ch.compareTo('-') == 0) {
- return true;
- } else if(ch.compareTo('#') == 0) {
- return true;
- } else if(ch.compareTo('~') == 0) {
- return true;
- } else if(ch.compareTo('/') == 0) {
- return true;
- } else if(ch.compareTo(':') == 0) {
- return true;
- }
-
- return Character.isLetter(character);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char)
- */
- /**
- *
- *
- * @param character
- *
- * @return
- */
- public boolean isWordStart(char character) {
- Character ch = Character.valueOf(character);
-
- if(ch.compareTo('+') == 0) {
- return true;
- } else if(ch.compareTo('-') == 0) {
- return true;
- } else if(ch.compareTo('#') == 0) {
- return true;
- } else if(ch.compareTo('~') == 0) {
- return true;
- } else if(ch.compareTo('/') == 0) {
- return true;
- } else if(ch.compareTo(':') == 0) {
- return true;
- }
- return Character.isLetter(character);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java
deleted file mode 100644
index 055ca827d15..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Assert.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.eclipse.core.runtime.AssertionFailedException;
-
-/**
- * <code>Assert</code> is useful for for embedding runtime sanity checks in code. The predicate
- * methods all test a condition and throw some type of unchecked exception if the condition does not
- * hold.
- * <p>
- * Assertion failure exceptions, like most runtime exceptions, are thrown when something is misbehaving. Assertion failures are invariably unspecified
- * behavior; consequently, clients should never rely on these being thrown (and certainly should not being catching them specifically).
- * </p>
- * <p>
- * This class is not intended to be instantiated or sub-classed by clients.
- * </p>
- */
-public class Assert {
-
- /* This class is not intended to be instantiated. */
- /**
- *
- */
- private Assert() {
- // not allowed
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is not the case, some kind of
- * unchecked exception is thrown.
- *
- * @param object
- * the value to test
- */
- public static void isNotNull(Object object) {
- isNotNull(object, "");
- }
-
- /**
- * Asserts that the given object is not <code>null</code>. If this is not the case, some kind of
- * unchecked exception is thrown. The given message is included in that exception, to aid
- * debugging.
- *
- * @param object
- * the value to test
- * @param message
- * the message to include in the exception
- */
- public static void isNotNull(Object object, String message) {
- if(object == null) {
- throw new AssertionFailedException("null argument:" + message);
- }
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java
deleted file mode 100644
index 9253fbee524..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/AssertionFailedException.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in <code>Assert</code>.
- *
- * @see Assert
- */
-public class AssertionFailedException extends RuntimeException {
-
- /**
- *
- */
- private static final long serialVersionUID = 5329046801658039137L;
-
- /**
- * Constructs a new exception with the given message.
- *
- * @param detail
- * the message
- */
- public AssertionFailedException(String detail) {
- super(detail);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java
deleted file mode 100644
index 5114d9351c1..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/IErrorReporter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * Interface that should be implemented by parsers and lexers that exports error messages to
- * somewhere else the System out stream.
- */
-public interface IErrorReporter {
-
- /**
- * Reports an error
- *
- * @param error
- * the error to report
- */
- void reportError(String error);
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java
deleted file mode 100644
index 8b4faeb8c08..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/Messages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2009 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Manages messages and labels for this plugin.
- */
-public class Messages extends NLS {
-
- /** name of the bundle */
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.parsers.util.messages"; //$NON-NLS-1$
-
- public static String NameMissing;
-
- public static String MismatchedToken;
-
- public static String NoViableAltException;
-
- /** initializer */
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- /**
- * Default Constructor.
- */
- private Messages() {
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java
deleted file mode 100644
index 1a7c3c5774c..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/MultiplicityException.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * Exception to manage ill-formed multiplicity
- */
-public class MultiplicityException extends RuntimeException {
-
- /** Serial ID */
- private static final long serialVersionUID = -6675171028982908999L;
-
- /**
- * Creates a new MultiplicityException.
- *
- * @param message
- * the message of the exception
- */
- public MultiplicityException(String message) {
- super(message);
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java
deleted file mode 100644
index e04c90c0ffb..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/NameException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.antlr.runtime.RecognitionException;
-
-/**
- * Exception to manage bad name exception
- */
-public class NameException extends RecognitionException {
-
- /** Serial ID */
- private static final long serialVersionUID = -8831007802595595763L;
-
- /**
- * Creates a new MultiplicityException.
- *
- * @param message
- * the message of the exception
- */
- public NameException() {
- super();
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java
deleted file mode 100644
index 9278c19dba4..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/SimpleStringErrorReporter.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * Simple implementation of the error reporter for lexer/parser generated from ANTLR grammar
- */
-public class SimpleStringErrorReporter implements IErrorReporter {
-
- /** stored message */
- private String message = null;
-
- /**
- * {@inheritDoc}
- */
- public void reportError(String error) {
- setMessage(error);
- }
-
- /**
- * Sets the error message
- *
- * @param message
- * the message to set
- */
- public void setMessage(String message) {
- this.message = message;
- }
-
- /**
- * Returns the error message
- *
- * @return the message to return
- */
- public String getMessage() {
- return message;
- }
-
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java
deleted file mode 100644
index 83dc415337c..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/TypeRecognitionException.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in <code>Assert</code>.
- *
- * @see Assert
- */
-public class TypeRecognitionException extends RuntimeException {
-
- /**
- * serial ID
- *
- * @generated
- */
- private static final long serialVersionUID = -8893242382872509656L;
-
- private String typeName = null;
-
- /**
- * Constructs a new exception with the given message.
- *
- * @param detail
- * the message
- */
- public TypeRecognitionException(String message, String typeName) {
- super(message);
- this.typeName = typeName;
- }
-
- public String getTypeName() {
- return typeName;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java
deleted file mode 100644
index b9309a8650a..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/UnboundTemplateRecognitionException.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) Remi.Schnekenburger@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.parsers.util;
-
-import org.eclipse.uml2.uml.TemplateableElement;
-
-/**
- * <code>AssertionFailedException</code> is a runtime exception thrown by some of the methods in <code>Assert</code>.
- *
- * @see Assert
- */
-public class UnboundTemplateRecognitionException extends RuntimeException {
-
- /**
- * serial ID
- *
- * @generated
- */
- private static final long serialVersionUID = -3962411131136049484L;
-
- private org.eclipse.uml2.uml.TemplateableElement template;
-
- /**
- * Constructs a new exception with the given message.
- *
- * @param detail
- * the message
- */
- public UnboundTemplateRecognitionException(String message, TemplateableElement template) {
- super(message);
- this.template = template;
- }
-
- public TemplateableElement getTemplate() {
- return template;
- }
-}
diff --git a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties b/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties
deleted file mode 100644
index eca6f584cc4..00000000000
--- a/plugins/others/org.eclipse.papyrus.parsers/src/org/eclipse/papyrus/parsers/util/messages.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-NameMissing=Please enter a correct name for the property
-MismatchedToken =[{0}] Was waiting for {1}. Found ( {2} ) instead.
-NoViableAltException=[{0}] Was waiting for {1}. Found ( {2} ) instead.

Back to the top