Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions kerml/src/examples/Simple Tests/Associations.kerml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ package Associations {
end [0..*] feature y1 redefines y;
}

assoc struct C {
const end [1] feature a;
const end feature b;
}

metaclass M;
assoc XY {
end [0..1] feature x : X {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ package Associations {
end [0..*] feature y1 redefines y;
}

assoc struct C {
const end [1] feature a;
const end feature b;
}

metaclass M;
assoc XY {
// Ensure that the owned cross feature is typed correctly,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.ide;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.ide.contentassist.antlr;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.ui;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.ui;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.ui.internal;

import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
Expand All @@ -29,7 +29,7 @@ public class XtextActivator extends AbstractUIPlugin {

private static XtextActivator INSTANCE;

private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
private Map<String, Injector> injectors = Collections.synchronizedMap(new HashMap<>(2));
Comment thread
seidewitz marked this conversation as resolved.

@Override
public void start(BundleContext context) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext;

Expand Down
Binary file modified org.omg.kerml.xtext/src-gen/org/omg/kerml/xtext/KerML.xtextbin
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.parser.antlr;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
package org.omg.kerml.xtext.parser.antlr;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* generated by Xtext 2.34.0
* generated by Xtext 2.38.0
*/
grammar InternalKerML;

Expand Down Expand Up @@ -4683,6 +4683,47 @@ ruleClassifierConjugation returns [EObject current=null]
;


// Rule EndFeaturePrefix
ruleEndFeaturePrefix[EObject in_current] returns [EObject current=in_current]
@init {
enterRule();
}
@after {
leaveRule();
}:
(
(
(
lv_isConstant_0_0='const'
{
newLeafNode(lv_isConstant_0_0, grammarAccess.getEndFeaturePrefixAccess().getIsConstantConstKeyword_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getEndFeaturePrefixRule());
}
setWithLastConsumed($current, "isConstant", lv_isConstant_0_0 != null, "const");
}
)
)?
(
(
lv_isEnd_1_0='end'
{
newLeafNode(lv_isEnd_1_0, grammarAccess.getEndFeaturePrefixAccess().getIsEndEndKeyword_1_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getEndFeaturePrefixRule());
}
setWithLastConsumed($current, "isEnd", lv_isEnd_1_0 != null, "end");
}
)
)
)
;


// Rule BasicFeaturePrefix
ruleBasicFeaturePrefix[EObject in_current] returns [EObject current=in_current]
@init {
Expand Down Expand Up @@ -4816,20 +4857,17 @@ ruleFeaturePrefix[EObject in_current] returns [EObject current=in_current]
(
(
(
(
(
lv_isEnd_0_0='end'
{
newLeafNode(lv_isEnd_0_0, grammarAccess.getFeaturePrefixAccess().getIsEndEndKeyword_0_0_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getFeaturePrefixRule());
}
setWithLastConsumed($current, "isEnd", lv_isEnd_0_0 != null, "end");
}
)
)
{
if ($current==null) {
$current = createModelElement(grammarAccess.getFeaturePrefixRule());
}
newCompositeNode(grammarAccess.getFeaturePrefixAccess().getEndFeaturePrefixParserRuleCall_0_0_0());
}
this_EndFeaturePrefix_0=ruleEndFeaturePrefix[$current]
{
$current = $this_EndFeaturePrefix_0.current;
afterParserOrEnumRuleCall();
}
(
(
{
Expand Down Expand Up @@ -5034,20 +5072,17 @@ ruleFeature returns [EObject current=null]
|
(
(
(
(
lv_isEnd_4_0='end'
{
newLeafNode(lv_isEnd_4_0, grammarAccess.getFeatureAccess().getIsEndEndKeyword_0_1_0_0_0());
}
{
if ($current==null) {
$current = createModelElement(grammarAccess.getFeatureRule());
}
setWithLastConsumed($current, "isEnd", lv_isEnd_4_0 != null, "end");
}
)
)
{
if ($current==null) {
$current = createModelElement(grammarAccess.getFeatureRule());
}
newCompositeNode(grammarAccess.getFeatureAccess().getEndFeaturePrefixParserRuleCall_0_1_0_0());
}
this_EndFeaturePrefix_4=ruleEndFeaturePrefix[$current]
{
$current = $this_EndFeaturePrefix_4.current;
afterParserOrEnumRuleCall();
}
|
{
if ($current==null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@
'class'=94
'classifier'=57
'comment'=22
'composite'=60
'composite'=62
'conjugate'=55
'conjugates'=46
'conjugation'=54
'connector'=97
'const'=63
'const'=59
'crosses'=79
'datatype'=93
'default'=89
'dependency'=18
'derived'=59
'derived'=61
'differences'=50
'disjoining'=56
'disjoint'=47
'doc'=25
'else'=122
'end'=64
'end'=60
'expr'=108
'false'=113
'feature'=65
Expand Down Expand Up @@ -111,7 +111,7 @@
'ordered'=71
'out'=157
'package'=39
'portion'=61
'portion'=63
'predicate'=109
'private'=154
'protected'=155
Expand All @@ -138,7 +138,7 @@
'typed'=74
'typing'=84
'unions'=48
'var'=62
'var'=64
'xor'=128
'{'=16
'|'=126
Expand Down
Loading