diff options
Diffstat (limited to 'plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext')
2 files changed, 100 insertions, 100 deletions
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/META-INF/MANIFEST.MF b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/META-INF/MANIFEST.MF index 9c6897663ee..603c7f7c67f 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/META-INF/MANIFEST.MF +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/META-INF/MANIFEST.MF @@ -31,4 +31,4 @@ Bundle-ManifestVersion: 2 Import-Package: org.apache.log4j;version="[1.2.0,2.0.0)",
org.eclipse.xtext.xbase.lib;version="[2.10.0,3.0.0)"
Bundle-SymbolicName: org.eclipse.papyrus.uml.textedit.property.xtext;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/src/org/eclipse/papyrus/uml/textedit/property/xtext/UmlProperty.xtext b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/src/org/eclipse/papyrus/uml/textedit/property/xtext/UmlProperty.xtext index 93beefd0c71..fd016b11906 100644 --- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/src/org/eclipse/papyrus/uml/textedit/property/xtext/UmlProperty.xtext +++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext/src/org/eclipse/papyrus/uml/textedit/property/xtext/UmlProperty.xtext @@ -1,99 +1,99 @@ -/***************************************************************************** - * 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: - * CEA LIST - Initial API and implementation - * - *****************************************************************************/ - -grammar org.eclipse.papyrus.uml.textedit.property.xtext.UmlProperty with org.eclipse.papyrus.uml.alf.Common - -import "http://www.eclipse.org/uml2/5.0.0/UML" as uml -import "http://www.eclipse.org/emf/2002/Ecore" as ecore - - -generate umlProperty "http://www.eclipse.org/papyrus/uml/textedit/property/xtext/UmlProperty" - -PropertyRule: - (visibility = VisibilityRule)? - (derived ?= "/")? - name=ID (':' (type=TypeRule | typeUndefined?="<Undefined>"))? - (multiplicity = MultiplicityRule) ? - (modifiers = ModifiersRule) ? - (default = DefaultValueRule) ? ; - -enum VisibilityKind: - public = "+" - | private = "-" - | protected = "#" - | package = "~" -; - -VisibilityRule: - visibility = VisibilityKind -; - -TypeRule : - (path=QualifiedName)? type=[uml::Classifier] ; - -QualifiedName : - path=[uml::Namespace]'::' (remaining=QualifiedName)? ; - -MultiplicityRule: - "[" bounds+=BoundSpecification ('..' bounds+=BoundSpecification)? "]" ; - -BoundSpecification: - value = (UnlimitedLiteral | StringLiteral) ; - -UnlimitedLiteral : INT |'*'; - -StringLiteral : STRING; - -ModifiersRule: - {ModifiersRule}'{' (values += ModifierSpecification (',' values += ModifierSpecification)*)? '}'; - -ModifierSpecification: - value = ModifierKind - | redefines = RedefinesRule - | subsets = SubsetsRule ; - -enum ModifierKind: - readOnly = "readOnly" - | union = "union" - | ordered = "ordered" - | unique = "unique" ; - -RedefinesRule : - 'redefines' property = [uml::Property] ; - -SubsetsRule : - 'subsets' property = [uml::Property] ; - -DefaultValueRule : - '=' default = Value ; - -Value : IntValue | StringValue | BooleanValue | RealValue | NullValue | NoValue; - -IntValue : literalInteger = INT; - -StringValue : literalString = STRING; - -enum BooleanLiterals: - true = "true" | - false = "false" -; - -BooleanValue : literalBoolean = BooleanLiterals; - -//TODO: Support all Java-compliant doubles -RealValue : integer = INT '.' | '.' fraction = INT | integer = INT "." fraction = INT; - -NullValue : {NullValue}'null'; - -NoValue : {NoValue}'none'; +/*****************************************************************************
+ * 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+grammar org.eclipse.papyrus.uml.textedit.property.xtext.UmlProperty with org.eclipse.papyrus.uml.alf.Common
+
+import "http://www.eclipse.org/uml2/5.0.0/UML" as uml
+import "http://www.eclipse.org/emf/2002/Ecore" as ecore
+
+
+generate umlProperty "http://www.eclipse.org/papyrus/uml/textedit/property/xtext/UmlProperty"
+
+PropertyRule:
+ (visibility = VisibilityRule)?
+ (derived ?= "/")?
+ name=ID (':' (type=TypeRule | typeUndefined?="<Undefined>"))?
+ (multiplicity = MultiplicityRule) ?
+ (modifiers = ModifiersRule) ?
+ (default = DefaultValueRule) ? ;
+
+enum VisibilityKind:
+ public = "+"
+ | private = "-"
+ | protected = "#"
+ | package = "~"
+;
+
+VisibilityRule:
+ visibility = VisibilityKind
+;
+
+TypeRule :
+ (path=QualifiedName)? type=[uml::Classifier] ;
+
+QualifiedName :
+ path=[uml::Namespace]'::' (remaining=QualifiedName)? ;
+
+MultiplicityRule:
+ "[" bounds+=BoundSpecification ('..' bounds+=BoundSpecification)? "]" ;
+
+BoundSpecification:
+ value = (UnlimitedLiteral | StringLiteral) ;
+
+UnlimitedLiteral : INT |'*';
+
+StringLiteral : STRING;
+
+ModifiersRule:
+ {ModifiersRule}'{' (values += ModifierSpecification (',' values += ModifierSpecification)*)? '}';
+
+ModifierSpecification:
+ value = ModifierKind
+ | redefines = RedefinesRule
+ | subsets = SubsetsRule ;
+
+enum ModifierKind:
+ readOnly = "readOnly"
+ | union = "union"
+ | ordered = "ordered"
+ | unique = "unique" ;
+
+RedefinesRule :
+ 'redefines' property = [uml::Property] ;
+
+SubsetsRule :
+ 'subsets' property = [uml::Property] ;
+
+DefaultValueRule :
+ '=' default = Value ;
+
+Value : IntValue | StringValue | BooleanValue | RealValue | NullValue | NoValue;
+
+IntValue : literalInteger = INT;
+
+StringValue : literalString = STRING;
+
+enum BooleanLiterals:
+ TRUE = "true" |
+ FALSE = "false"
+;
+
+BooleanValue : literalBoolean = BooleanLiterals;
+
+//TODO: Support all Java-compliant doubles
+RealValue : integer = INT '.' | '.' fraction = INT | integer = INT "." fraction = INT;
+
+NullValue : {NullValue}'null';
+
+NoValue : {NoValue}'none';
|