Skip to content

Commit

Permalink
Oml 2.6.0 (#118)
Browse files Browse the repository at this point in the history
* increment minor version to 2.6.0
* Contains various fixes and improvements:
- Added Argument.getValue()
- Fixed double parsing in DSL
- Switched unsigned int to int instead of long
- Switch antecedent and consequent params in OmlBuilder/OmlWrite.addRule
- Added new API in OmlBuilder
- Modified OmlConstant API to only retain Oml constants
- Improved formatting PropertyValueAssertion in DSL
  • Loading branch information
melaasar committed Apr 3, 2024
1 parent 9de5420 commit 6f911bf
Show file tree
Hide file tree
Showing 48 changed files with 683 additions and 307 deletions.
2 changes: 1 addition & 1 deletion io.opencaesar.oml.api.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="io.opencaesar.oml.api.feature"
label="%featureName"
version="2.5.0"
version="2.6.0"
provider-name="%providerName">

<description>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.api.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.api.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="io.opencaesar.oml.dsl.feature"
label="%featureName"
version="2.5.0"
version="2.6.0"
provider-name="%providerName">

<description>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.dsl.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: io.opencaesar.oml.dsl.ide
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-SymbolicName: io.opencaesar.oml.dsl.ide; singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.ide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.dsl.ide</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.ui.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: io.opencaesar.oml.dsl.ui.tests
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-SymbolicName: io.opencaesar.oml.dsl.ui.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.ui.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.dsl.ui.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: io.opencaesar.oml.dsl.ui
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-SymbolicName: io.opencaesar.oml.dsl.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.dsl.ui</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Automatic-Module-Name: io.opencaesar.oml.dsl
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-SymbolicName: io.opencaesar.oml.dsl; singleton:=true
Bundle-ActivationPolicy: lazy
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.dsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.dsl</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
4 changes: 2 additions & 2 deletions io.opencaesar.oml.dsl/src/io/opencaesar/oml/dsl/Oml.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ Integer returns ecore::EInt: UNSIGNED_INTEGER_STR | INTEGER_STR;

Decimal returns Decimal: DECIMAL_STR;

Double returns ecore::EDouble: DOUBLE_STR;
Double returns Double: DOUBLE_STR;

//----------------------------

Expand All @@ -421,7 +421,7 @@ terminal INTEGER_STR: ('+'|'-')? DIGIT+;

terminal DECIMAL_STR: ('+'|'-')? (DIGIT+('.'DIGIT*)? | ('.'DIGIT+));

terminal DOUBLE_STR: ('+'|'-')? (DIGIT+('.'DIGIT*)? | ('.'DIGIT+)) (('e'|'E') ('+'|'-')? DIGIT+)?;
terminal DOUBLE_STR: ('+'|'-')? (DIGIT+('.'DIGIT*)? | ('.'DIGIT+)) ('e'|'E') ('+'|'-')? DIGIT+;

terminal STRING: ('"' (!('"'|'\\') | '\\'.)* '"') | ("'" (!("'"|'\\') | '\\'.)* "'") | ("'''" -> "'''") | '"""' -> '"""';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,9 @@ protected void _format(LiteralEnumerationAxiom axiom, IFormattableDocument doc)

protected void _format(PropertyValueAssertion assertion, IFormattableDocument doc) {
doc.append(feature(assertion, OmlPackage.Literals.PROPERTY_VALUE_ASSERTION__PROPERTY), oneSpace());
if (assertion.getContainedValue() != null) {
doc.format(assertion.getContainedValue());
}
}

protected void _format(TypePredicate predicate, IFormattableDocument doc) {
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.edit/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: io.opencaesar.oml.edit;singleton:=true
Automatic-Module-Name: io.opencaesar.oml.edit
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-ClassPath: .
Bundle-Activator: io.opencaesar.oml.provider.OmlEditPlugin$Implementation
Bundle-Vendor: %providerName
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.edit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.edit</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ public Object getImage(Object object) {
*/
@Override
public String getText(Object object) {
Long labelValue = ((ScalarEquivalenceAxiom)object).getLength();
Integer labelValue = ((ScalarEquivalenceAxiom)object).getLength();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_ScalarEquivalenceAxiom_type") :
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.editor/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: io.opencaesar.oml.editor;singleton:=true
Automatic-Module-Name: io.opencaesar.oml.editor
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-ClassPath: .
Bundle-Activator: io.opencaesar.oml.presentation.OmlEditorPlugin$Implementation
Bundle-Vendor: %providerName
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.editor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.editor</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.repository</artifactId>
<packaging>eclipse-repository</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.sdk.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="io.opencaesar.oml.sdk.feature"
label="%featureName"
version="2.5.0"
version="2.6.0"
provider-name="%providerName">

<description>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.sdk.feature/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.sdk.feature</artifactId>
<packaging>eclipse-feature</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml.target/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml.target</artifactId>
<packaging>eclipse-target-definition</packaging>
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: io.opencaesar.oml;singleton:=true
Automatic-Module-Name: io.opencaesar.oml
Bundle-Version: 2.5.0
Bundle-Version: 2.6.0
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
2 changes: 1 addition & 1 deletion io.opencaesar.oml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.opencaesar.oml</groupId>
<artifactId>io.opencaesar.oml.parent</artifactId>
<version>2.5.0</version>
<version>2.6.0</version>
</parent>
<artifactId>io.opencaesar.oml</artifactId>
<packaging>eclipse-plugin</packaging>
Expand Down
11 changes: 11 additions & 0 deletions io.opencaesar.oml/src-gen/io/opencaesar/oml/Argument.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,15 @@ public interface Argument extends Element {
*/
void setInstance(NamedInstance value);

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* Gets the value of the annotation
* <!-- end-model-doc -->
* @model kind="operation" unique="false"
* @generated
*/
Object getValue();

} // Argument
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public interface DoubleLiteral extends Literal {
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(Double)
* @see io.opencaesar.oml.OmlPackage#getDoubleLiteral_Value()
* @model default="0.0" unique="false"
* @model default="0.0" unique="false" dataType="io.opencaesar.oml.Double"
* @generated
*/
Double getValue();
Expand Down
Loading

0 comments on commit 6f911bf

Please sign in to comment.