mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 08:48:55 +00:00
[ide tests] changed test language
This commit is contained in:
parent
6d3c086477
commit
5c13e51cb5
15 changed files with 293 additions and 295 deletions
|
@ -12,8 +12,8 @@
|
|||
eType="#//Property" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Property">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//Type" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Type">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="arrayDiemensions" unique="false"
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TestLanguage.ecore#//TypeDeclaration/properties"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="TestLanguage.ecore#//Property">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestLanguage.ecore#//Property/name"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TestLanguage.ecore#//Property/type"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestLanguage.ecore#//Property/name"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="TestLanguage.ecore#//Type">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute TestLanguage.ecore#//Type/arrayDiemensions"/>
|
||||
|
|
Binary file not shown.
|
@ -48,8 +48,8 @@ public class TestLanguageParser extends AbstractContentAssistParser {
|
|||
put(grammarAccess.getModelAccess().getTypesAssignment(), "rule__Model__TypesAssignment");
|
||||
put(grammarAccess.getTypeDeclarationAccess().getNameAssignment_1(), "rule__TypeDeclaration__NameAssignment_1");
|
||||
put(grammarAccess.getTypeDeclarationAccess().getPropertiesAssignment_3(), "rule__TypeDeclaration__PropertiesAssignment_3");
|
||||
put(grammarAccess.getPropertyAccess().getNameAssignment_0(), "rule__Property__NameAssignment_0");
|
||||
put(grammarAccess.getPropertyAccess().getTypeAssignment_1(), "rule__Property__TypeAssignment_1");
|
||||
put(grammarAccess.getPropertyAccess().getTypeAssignment_0(), "rule__Property__TypeAssignment_0");
|
||||
put(grammarAccess.getPropertyAccess().getNameAssignment_1(), "rule__Property__NameAssignment_1");
|
||||
put(grammarAccess.getTypeAccess().getArrayDiemensionsAssignment_1_0(), "rule__Type__ArrayDiemensionsAssignment_1_0");
|
||||
put(grammarAccess.getTypeReferenceAccess().getTypeRefAssignment(), "rule__TypeReference__TypeRefAssignment");
|
||||
put(grammarAccess.getPrimitiveTypeAccess().getNameAssignment(), "rule__PrimitiveType__NameAssignment");
|
||||
|
|
|
@ -404,9 +404,9 @@ rule__Property__Group__0__Impl
|
|||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getPropertyAccess().getNameAssignment_0()); }
|
||||
(rule__Property__NameAssignment_0)
|
||||
{ after(grammarAccess.getPropertyAccess().getNameAssignment_0()); }
|
||||
{ before(grammarAccess.getPropertyAccess().getTypeAssignment_0()); }
|
||||
(rule__Property__TypeAssignment_0)
|
||||
{ after(grammarAccess.getPropertyAccess().getTypeAssignment_0()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
|
@ -430,9 +430,9 @@ rule__Property__Group__1__Impl
|
|||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getPropertyAccess().getTypeAssignment_1()); }
|
||||
(rule__Property__TypeAssignment_1)
|
||||
{ after(grammarAccess.getPropertyAccess().getTypeAssignment_1()); }
|
||||
{ before(grammarAccess.getPropertyAccess().getNameAssignment_1()); }
|
||||
(rule__Property__NameAssignment_1)
|
||||
{ after(grammarAccess.getPropertyAccess().getNameAssignment_1()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
|
@ -593,30 +593,30 @@ finally {
|
|||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__Property__NameAssignment_0
|
||||
rule__Property__TypeAssignment_0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0()); }
|
||||
RULE_ID
|
||||
{ after(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0()); }
|
||||
{ before(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0()); }
|
||||
ruleType
|
||||
{ after(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__Property__TypeAssignment_1
|
||||
rule__Property__NameAssignment_1
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0()); }
|
||||
ruleType
|
||||
{ after(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0()); }
|
||||
{ before(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0()); }
|
||||
RULE_ID
|
||||
{ after(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
|
|
|
@ -1023,7 +1023,7 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
int alt4=2;
|
||||
int LA4_0 = input.LA(1);
|
||||
|
||||
if ( (LA4_0==RULE_ID) ) {
|
||||
if ( (LA4_0==RULE_ID||(LA4_0>=11 && LA4_0<=13)) ) {
|
||||
alt4=1;
|
||||
}
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
// InternalTestLanguage.g:393:1: ( rule__Property__Group__0__Impl rule__Property__Group__1 )
|
||||
// InternalTestLanguage.g:394:2: rule__Property__Group__0__Impl rule__Property__Group__1
|
||||
{
|
||||
pushFollow(FOLLOW_8);
|
||||
pushFollow(FOLLOW_4);
|
||||
rule__Property__Group__0__Impl();
|
||||
|
||||
state._fsp--;
|
||||
|
@ -1177,31 +1177,31 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
|
||||
|
||||
// $ANTLR start "rule__Property__Group__0__Impl"
|
||||
// InternalTestLanguage.g:401:1: rule__Property__Group__0__Impl : ( ( rule__Property__NameAssignment_0 ) ) ;
|
||||
// InternalTestLanguage.g:401:1: rule__Property__Group__0__Impl : ( ( rule__Property__TypeAssignment_0 ) ) ;
|
||||
public final void rule__Property__Group__0__Impl() throws RecognitionException {
|
||||
|
||||
int stackSize = keepStackSize();
|
||||
|
||||
try {
|
||||
// InternalTestLanguage.g:405:1: ( ( ( rule__Property__NameAssignment_0 ) ) )
|
||||
// InternalTestLanguage.g:406:1: ( ( rule__Property__NameAssignment_0 ) )
|
||||
// InternalTestLanguage.g:405:1: ( ( ( rule__Property__TypeAssignment_0 ) ) )
|
||||
// InternalTestLanguage.g:406:1: ( ( rule__Property__TypeAssignment_0 ) )
|
||||
{
|
||||
// InternalTestLanguage.g:406:1: ( ( rule__Property__NameAssignment_0 ) )
|
||||
// InternalTestLanguage.g:407:2: ( rule__Property__NameAssignment_0 )
|
||||
// InternalTestLanguage.g:406:1: ( ( rule__Property__TypeAssignment_0 ) )
|
||||
// InternalTestLanguage.g:407:2: ( rule__Property__TypeAssignment_0 )
|
||||
{
|
||||
before(grammarAccess.getPropertyAccess().getNameAssignment_0());
|
||||
// InternalTestLanguage.g:408:2: ( rule__Property__NameAssignment_0 )
|
||||
// InternalTestLanguage.g:408:3: rule__Property__NameAssignment_0
|
||||
before(grammarAccess.getPropertyAccess().getTypeAssignment_0());
|
||||
// InternalTestLanguage.g:408:2: ( rule__Property__TypeAssignment_0 )
|
||||
// InternalTestLanguage.g:408:3: rule__Property__TypeAssignment_0
|
||||
{
|
||||
pushFollow(FOLLOW_2);
|
||||
rule__Property__NameAssignment_0();
|
||||
rule__Property__TypeAssignment_0();
|
||||
|
||||
state._fsp--;
|
||||
|
||||
|
||||
}
|
||||
|
||||
after(grammarAccess.getPropertyAccess().getNameAssignment_0());
|
||||
after(grammarAccess.getPropertyAccess().getTypeAssignment_0());
|
||||
|
||||
}
|
||||
|
||||
|
@ -1257,31 +1257,31 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
|
||||
|
||||
// $ANTLR start "rule__Property__Group__1__Impl"
|
||||
// InternalTestLanguage.g:427:1: rule__Property__Group__1__Impl : ( ( rule__Property__TypeAssignment_1 ) ) ;
|
||||
// InternalTestLanguage.g:427:1: rule__Property__Group__1__Impl : ( ( rule__Property__NameAssignment_1 ) ) ;
|
||||
public final void rule__Property__Group__1__Impl() throws RecognitionException {
|
||||
|
||||
int stackSize = keepStackSize();
|
||||
|
||||
try {
|
||||
// InternalTestLanguage.g:431:1: ( ( ( rule__Property__TypeAssignment_1 ) ) )
|
||||
// InternalTestLanguage.g:432:1: ( ( rule__Property__TypeAssignment_1 ) )
|
||||
// InternalTestLanguage.g:431:1: ( ( ( rule__Property__NameAssignment_1 ) ) )
|
||||
// InternalTestLanguage.g:432:1: ( ( rule__Property__NameAssignment_1 ) )
|
||||
{
|
||||
// InternalTestLanguage.g:432:1: ( ( rule__Property__TypeAssignment_1 ) )
|
||||
// InternalTestLanguage.g:433:2: ( rule__Property__TypeAssignment_1 )
|
||||
// InternalTestLanguage.g:432:1: ( ( rule__Property__NameAssignment_1 ) )
|
||||
// InternalTestLanguage.g:433:2: ( rule__Property__NameAssignment_1 )
|
||||
{
|
||||
before(grammarAccess.getPropertyAccess().getTypeAssignment_1());
|
||||
// InternalTestLanguage.g:434:2: ( rule__Property__TypeAssignment_1 )
|
||||
// InternalTestLanguage.g:434:3: rule__Property__TypeAssignment_1
|
||||
before(grammarAccess.getPropertyAccess().getNameAssignment_1());
|
||||
// InternalTestLanguage.g:434:2: ( rule__Property__NameAssignment_1 )
|
||||
// InternalTestLanguage.g:434:3: rule__Property__NameAssignment_1
|
||||
{
|
||||
pushFollow(FOLLOW_2);
|
||||
rule__Property__TypeAssignment_1();
|
||||
rule__Property__NameAssignment_1();
|
||||
|
||||
state._fsp--;
|
||||
|
||||
|
||||
}
|
||||
|
||||
after(grammarAccess.getPropertyAccess().getTypeAssignment_1());
|
||||
after(grammarAccess.getPropertyAccess().getNameAssignment_1());
|
||||
|
||||
}
|
||||
|
||||
|
@ -1313,7 +1313,7 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
// InternalTestLanguage.g:447:1: ( rule__Type__Group__0__Impl rule__Type__Group__1 )
|
||||
// InternalTestLanguage.g:448:2: rule__Type__Group__0__Impl rule__Type__Group__1
|
||||
{
|
||||
pushFollow(FOLLOW_9);
|
||||
pushFollow(FOLLOW_8);
|
||||
rule__Type__Group__0__Impl();
|
||||
|
||||
state._fsp--;
|
||||
|
@ -1450,7 +1450,7 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
case 1 :
|
||||
// InternalTestLanguage.g:488:3: rule__Type__Group_1__0
|
||||
{
|
||||
pushFollow(FOLLOW_10);
|
||||
pushFollow(FOLLOW_9);
|
||||
rule__Type__Group_1__0();
|
||||
|
||||
state._fsp--;
|
||||
|
@ -1496,7 +1496,7 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
// InternalTestLanguage.g:501:1: ( rule__Type__Group_1__0__Impl rule__Type__Group_1__1 )
|
||||
// InternalTestLanguage.g:502:2: rule__Type__Group_1__0__Impl rule__Type__Group_1__1
|
||||
{
|
||||
pushFollow(FOLLOW_11);
|
||||
pushFollow(FOLLOW_10);
|
||||
rule__Type__Group_1__0__Impl();
|
||||
|
||||
state._fsp--;
|
||||
|
@ -1760,63 +1760,26 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
// $ANTLR end "rule__TypeDeclaration__PropertiesAssignment_3"
|
||||
|
||||
|
||||
// $ANTLR start "rule__Property__NameAssignment_0"
|
||||
// InternalTestLanguage.g:596:1: rule__Property__NameAssignment_0 : ( RULE_ID ) ;
|
||||
public final void rule__Property__NameAssignment_0() throws RecognitionException {
|
||||
// $ANTLR start "rule__Property__TypeAssignment_0"
|
||||
// InternalTestLanguage.g:596:1: rule__Property__TypeAssignment_0 : ( ruleType ) ;
|
||||
public final void rule__Property__TypeAssignment_0() throws RecognitionException {
|
||||
|
||||
int stackSize = keepStackSize();
|
||||
|
||||
try {
|
||||
// InternalTestLanguage.g:600:1: ( ( RULE_ID ) )
|
||||
// InternalTestLanguage.g:601:2: ( RULE_ID )
|
||||
// InternalTestLanguage.g:600:1: ( ( ruleType ) )
|
||||
// InternalTestLanguage.g:601:2: ( ruleType )
|
||||
{
|
||||
// InternalTestLanguage.g:601:2: ( RULE_ID )
|
||||
// InternalTestLanguage.g:602:3: RULE_ID
|
||||
// InternalTestLanguage.g:601:2: ( ruleType )
|
||||
// InternalTestLanguage.g:602:3: ruleType
|
||||
{
|
||||
before(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0());
|
||||
match(input,RULE_ID,FOLLOW_2);
|
||||
after(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
reportError(re);
|
||||
recover(input,re);
|
||||
}
|
||||
finally {
|
||||
|
||||
restoreStackSize(stackSize);
|
||||
|
||||
}
|
||||
return ;
|
||||
}
|
||||
// $ANTLR end "rule__Property__NameAssignment_0"
|
||||
|
||||
|
||||
// $ANTLR start "rule__Property__TypeAssignment_1"
|
||||
// InternalTestLanguage.g:611:1: rule__Property__TypeAssignment_1 : ( ruleType ) ;
|
||||
public final void rule__Property__TypeAssignment_1() throws RecognitionException {
|
||||
|
||||
int stackSize = keepStackSize();
|
||||
|
||||
try {
|
||||
// InternalTestLanguage.g:615:1: ( ( ruleType ) )
|
||||
// InternalTestLanguage.g:616:2: ( ruleType )
|
||||
{
|
||||
// InternalTestLanguage.g:616:2: ( ruleType )
|
||||
// InternalTestLanguage.g:617:3: ruleType
|
||||
{
|
||||
before(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0());
|
||||
before(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0());
|
||||
pushFollow(FOLLOW_2);
|
||||
ruleType();
|
||||
|
||||
state._fsp--;
|
||||
|
||||
after(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0());
|
||||
after(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0());
|
||||
|
||||
}
|
||||
|
||||
|
@ -1835,7 +1798,44 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
}
|
||||
return ;
|
||||
}
|
||||
// $ANTLR end "rule__Property__TypeAssignment_1"
|
||||
// $ANTLR end "rule__Property__TypeAssignment_0"
|
||||
|
||||
|
||||
// $ANTLR start "rule__Property__NameAssignment_1"
|
||||
// InternalTestLanguage.g:611:1: rule__Property__NameAssignment_1 : ( RULE_ID ) ;
|
||||
public final void rule__Property__NameAssignment_1() throws RecognitionException {
|
||||
|
||||
int stackSize = keepStackSize();
|
||||
|
||||
try {
|
||||
// InternalTestLanguage.g:615:1: ( ( RULE_ID ) )
|
||||
// InternalTestLanguage.g:616:2: ( RULE_ID )
|
||||
{
|
||||
// InternalTestLanguage.g:616:2: ( RULE_ID )
|
||||
// InternalTestLanguage.g:617:3: RULE_ID
|
||||
{
|
||||
before(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0());
|
||||
match(input,RULE_ID,FOLLOW_2);
|
||||
after(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0());
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
reportError(re);
|
||||
recover(input,re);
|
||||
}
|
||||
finally {
|
||||
|
||||
restoreStackSize(stackSize);
|
||||
|
||||
}
|
||||
return ;
|
||||
}
|
||||
// $ANTLR end "rule__Property__NameAssignment_1"
|
||||
|
||||
|
||||
// $ANTLR start "rule__Type__ArrayDiemensionsAssignment_1_0"
|
||||
|
@ -1984,11 +1984,10 @@ public class InternalTestLanguageParser extends AbstractInternalContentAssistPar
|
|||
public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000004002L});
|
||||
public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000000010L});
|
||||
public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000008000L});
|
||||
public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000010010L});
|
||||
public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000000012L});
|
||||
public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000003810L});
|
||||
public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000040000L});
|
||||
public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000040002L});
|
||||
public static final BitSet FOLLOW_11 = new BitSet(new long[]{0x0000000000020000L});
|
||||
public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000013810L});
|
||||
public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000003812L});
|
||||
public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000040000L});
|
||||
public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000040002L});
|
||||
public static final BitSet FOLLOW_10 = new BitSet(new long[]{0x0000000000020000L});
|
||||
|
||||
}
|
|
@ -186,9 +186,28 @@ ruleProperty returns [EObject current=null]
|
|||
(
|
||||
(
|
||||
(
|
||||
lv_name_0_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_0_0, grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0());
|
||||
newCompositeNode(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0());
|
||||
}
|
||||
lv_type_0_0=ruleType
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPropertyRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"type",
|
||||
lv_type_0_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.TestLanguage.Type");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
lv_name_1_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_1_0, grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
|
@ -197,30 +216,11 @@ ruleProperty returns [EObject current=null]
|
|||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_0_0,
|
||||
lv_name_1_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0());
|
||||
}
|
||||
lv_type_1_0=ruleType
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getPropertyRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"type",
|
||||
lv_type_1_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.TestLanguage.Type");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
int alt2=2;
|
||||
int LA2_0 = input.LA(1);
|
||||
|
||||
if ( (LA2_0==RULE_ID) ) {
|
||||
if ( (LA2_0==RULE_ID||(LA2_0>=16 && LA2_0<=18)) ) {
|
||||
alt2=1;
|
||||
}
|
||||
|
||||
|
@ -402,61 +402,35 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
|
||||
|
||||
// $ANTLR start "ruleProperty"
|
||||
// InternalTestLanguage.g:179:1: ruleProperty returns [EObject current=null] : ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_type_1_0= ruleType ) ) ) ;
|
||||
// InternalTestLanguage.g:179:1: ruleProperty returns [EObject current=null] : ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) ) ;
|
||||
public final EObject ruleProperty() throws RecognitionException {
|
||||
EObject current = null;
|
||||
|
||||
Token lv_name_0_0=null;
|
||||
EObject lv_type_1_0 = null;
|
||||
Token lv_name_1_0=null;
|
||||
EObject lv_type_0_0 = null;
|
||||
|
||||
|
||||
|
||||
enterRule();
|
||||
|
||||
try {
|
||||
// InternalTestLanguage.g:185:2: ( ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_type_1_0= ruleType ) ) ) )
|
||||
// InternalTestLanguage.g:186:2: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_type_1_0= ruleType ) ) )
|
||||
// InternalTestLanguage.g:185:2: ( ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) ) )
|
||||
// InternalTestLanguage.g:186:2: ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) )
|
||||
{
|
||||
// InternalTestLanguage.g:186:2: ( ( (lv_name_0_0= RULE_ID ) ) ( (lv_type_1_0= ruleType ) ) )
|
||||
// InternalTestLanguage.g:187:3: ( (lv_name_0_0= RULE_ID ) ) ( (lv_type_1_0= ruleType ) )
|
||||
// InternalTestLanguage.g:186:2: ( ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) ) )
|
||||
// InternalTestLanguage.g:187:3: ( (lv_type_0_0= ruleType ) ) ( (lv_name_1_0= RULE_ID ) )
|
||||
{
|
||||
// InternalTestLanguage.g:187:3: ( (lv_name_0_0= RULE_ID ) )
|
||||
// InternalTestLanguage.g:188:4: (lv_name_0_0= RULE_ID )
|
||||
// InternalTestLanguage.g:187:3: ( (lv_type_0_0= ruleType ) )
|
||||
// InternalTestLanguage.g:188:4: (lv_type_0_0= ruleType )
|
||||
{
|
||||
// InternalTestLanguage.g:188:4: (lv_name_0_0= RULE_ID )
|
||||
// InternalTestLanguage.g:189:5: lv_name_0_0= RULE_ID
|
||||
// InternalTestLanguage.g:188:4: (lv_type_0_0= ruleType )
|
||||
// InternalTestLanguage.g:189:5: lv_type_0_0= ruleType
|
||||
{
|
||||
lv_name_0_0=(Token)match(input,RULE_ID,FOLLOW_7);
|
||||
|
||||
newLeafNode(lv_name_0_0, grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0());
|
||||
newCompositeNode(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0());
|
||||
|
||||
|
||||
if (current==null) {
|
||||
current = createModelElement(grammarAccess.getPropertyRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
current,
|
||||
"name",
|
||||
lv_name_0_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// InternalTestLanguage.g:205:3: ( (lv_type_1_0= ruleType ) )
|
||||
// InternalTestLanguage.g:206:4: (lv_type_1_0= ruleType )
|
||||
{
|
||||
// InternalTestLanguage.g:206:4: (lv_type_1_0= ruleType )
|
||||
// InternalTestLanguage.g:207:5: lv_type_1_0= ruleType
|
||||
{
|
||||
|
||||
newCompositeNode(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0());
|
||||
|
||||
pushFollow(FOLLOW_2);
|
||||
lv_type_1_0=ruleType();
|
||||
pushFollow(FOLLOW_4);
|
||||
lv_type_0_0=ruleType();
|
||||
|
||||
state._fsp--;
|
||||
|
||||
|
@ -467,7 +441,7 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
set(
|
||||
current,
|
||||
"type",
|
||||
lv_type_1_0,
|
||||
lv_type_0_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.TestLanguage.Type");
|
||||
afterParserOrEnumRuleCall();
|
||||
|
||||
|
@ -475,6 +449,32 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// InternalTestLanguage.g:206:3: ( (lv_name_1_0= RULE_ID ) )
|
||||
// InternalTestLanguage.g:207:4: (lv_name_1_0= RULE_ID )
|
||||
{
|
||||
// InternalTestLanguage.g:207:4: (lv_name_1_0= RULE_ID )
|
||||
// InternalTestLanguage.g:208:5: lv_name_1_0= RULE_ID
|
||||
{
|
||||
lv_name_1_0=(Token)match(input,RULE_ID,FOLLOW_2);
|
||||
|
||||
newLeafNode(lv_name_1_0, grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0());
|
||||
|
||||
|
||||
if (current==null) {
|
||||
current = createModelElement(grammarAccess.getPropertyRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
current,
|
||||
"name",
|
||||
lv_name_1_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -580,7 +580,7 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
|
||||
newCompositeNode(grammarAccess.getTypeAccess().getTypeReferenceParserRuleCall_0_0());
|
||||
|
||||
pushFollow(FOLLOW_8);
|
||||
pushFollow(FOLLOW_7);
|
||||
this_TypeReference_0=ruleTypeReference();
|
||||
|
||||
state._fsp--;
|
||||
|
@ -598,7 +598,7 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
|
||||
newCompositeNode(grammarAccess.getTypeAccess().getPrimitiveTypeParserRuleCall_0_1());
|
||||
|
||||
pushFollow(FOLLOW_8);
|
||||
pushFollow(FOLLOW_7);
|
||||
this_PrimitiveType_1=rulePrimitiveType();
|
||||
|
||||
state._fsp--;
|
||||
|
@ -634,7 +634,7 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
// InternalTestLanguage.g:264:5: (lv_arrayDiemensions_2_0= '[' )
|
||||
// InternalTestLanguage.g:265:6: lv_arrayDiemensions_2_0= '['
|
||||
{
|
||||
lv_arrayDiemensions_2_0=(Token)match(input,14,FOLLOW_9);
|
||||
lv_arrayDiemensions_2_0=(Token)match(input,14,FOLLOW_8);
|
||||
|
||||
newLeafNode(lv_arrayDiemensions_2_0, grammarAccess.getTypeAccess().getArrayDiemensionsLeftSquareBracketKeyword_1_0_0());
|
||||
|
||||
|
@ -650,7 +650,7 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
|
||||
}
|
||||
|
||||
otherlv_3=(Token)match(input,15,FOLLOW_8);
|
||||
otherlv_3=(Token)match(input,15,FOLLOW_7);
|
||||
|
||||
newLeafNode(otherlv_3, grammarAccess.getTypeAccess().getRightSquareBracketKeyword_1_1());
|
||||
|
||||
|
@ -944,9 +944,8 @@ public class InternalTestLanguageParser extends AbstractInternalAntlrParser {
|
|||
public static final BitSet FOLLOW_3 = new BitSet(new long[]{0x0000000000000802L});
|
||||
public static final BitSet FOLLOW_4 = new BitSet(new long[]{0x0000000000000010L});
|
||||
public static final BitSet FOLLOW_5 = new BitSet(new long[]{0x0000000000001000L});
|
||||
public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000002010L});
|
||||
public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000070010L});
|
||||
public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000004002L});
|
||||
public static final BitSet FOLLOW_9 = new BitSet(new long[]{0x0000000000008000L});
|
||||
public static final BitSet FOLLOW_6 = new BitSet(new long[]{0x0000000000072010L});
|
||||
public static final BitSet FOLLOW_7 = new BitSet(new long[]{0x0000000000004002L});
|
||||
public static final BitSet FOLLOW_8 = new BitSet(new long[]{0x0000000000008000L});
|
||||
|
||||
}
|
|
@ -115,18 +115,18 @@ public class TestLanguageSemanticSequencer extends AbstractDelegatingSemanticSeq
|
|||
* Property returns Property
|
||||
*
|
||||
* Constraint:
|
||||
* (name=ID type=Type)
|
||||
* (type=Type name=ID)
|
||||
*/
|
||||
protected void sequence_Property(ISerializationContext context, Property semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, TestLanguagePackage.Literals.PROPERTY__NAME) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TestLanguagePackage.Literals.PROPERTY__NAME));
|
||||
if (transientValues.isValueTransient(semanticObject, TestLanguagePackage.Literals.PROPERTY__TYPE) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TestLanguagePackage.Literals.PROPERTY__TYPE));
|
||||
if (transientValues.isValueTransient(semanticObject, TestLanguagePackage.Literals.PROPERTY__NAME) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, TestLanguagePackage.Literals.PROPERTY__NAME));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_0_0(), semanticObject.getName());
|
||||
feeder.accept(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_1_0(), semanticObject.getType());
|
||||
feeder.accept(grammarAccess.getPropertyAccess().getTypeTypeParserRuleCall_0_0(), semanticObject.getType());
|
||||
feeder.accept(grammarAccess.getPropertyAccess().getNameIDTerminalRuleCall_1_0(), semanticObject.getName());
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -86,29 +86,29 @@ public class TestLanguageGrammarAccess extends AbstractGrammarElementFinder {
|
|||
public class PropertyElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.TestLanguage.Property");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cNameAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cNameIDTerminalRuleCall_0_0 = (RuleCall)cNameAssignment_0.eContents().get(0);
|
||||
private final Assignment cTypeAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cTypeTypeParserRuleCall_1_0 = (RuleCall)cTypeAssignment_1.eContents().get(0);
|
||||
private final Assignment cTypeAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cTypeTypeParserRuleCall_0_0 = (RuleCall)cTypeAssignment_0.eContents().get(0);
|
||||
private final Assignment cNameAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cNameIDTerminalRuleCall_1_0 = (RuleCall)cNameAssignment_1.eContents().get(0);
|
||||
|
||||
//Property:
|
||||
// name=ID type=Type;
|
||||
// type=Type name=ID;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//name=ID type=Type
|
||||
//type=Type name=ID
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_0() { return cNameAssignment_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_0_0() { return cNameIDTerminalRuleCall_0_0; }
|
||||
|
||||
//type=Type
|
||||
public Assignment getTypeAssignment_1() { return cTypeAssignment_1; }
|
||||
public Assignment getTypeAssignment_0() { return cTypeAssignment_0; }
|
||||
|
||||
//Type
|
||||
public RuleCall getTypeTypeParserRuleCall_1_0() { return cTypeTypeParserRuleCall_1_0; }
|
||||
public RuleCall getTypeTypeParserRuleCall_0_0() { return cTypeTypeParserRuleCall_0_0; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_1() { return cNameAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_1_0() { return cNameIDTerminalRuleCall_1_0; }
|
||||
}
|
||||
public class TypeElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.TestLanguage.Type");
|
||||
|
@ -271,7 +271,7 @@ public class TestLanguageGrammarAccess extends AbstractGrammarElementFinder {
|
|||
}
|
||||
|
||||
//Property:
|
||||
// name=ID type=Type;
|
||||
// type=Type name=ID;
|
||||
public PropertyElements getPropertyAccess() {
|
||||
return pProperty;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ import org.eclipse.emf.ecore.EObject;
|
|||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getType <em>Type</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TestLanguagePackage#getProperty()
|
||||
|
@ -28,32 +28,6 @@ import org.eclipse.emf.ecore.EObject;
|
|||
*/
|
||||
public interface Property extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TestLanguagePackage#getProperty_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Type</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -80,4 +54,30 @@ public interface Property extends EObject
|
|||
*/
|
||||
void setType(Type value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TestLanguagePackage#getProperty_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Name</em>' attribute.
|
||||
* @see #getName()
|
||||
* @generated
|
||||
*/
|
||||
void setName(String value);
|
||||
|
||||
} // Property
|
||||
|
|
|
@ -136,15 +136,6 @@ public interface TestLanguagePackage extends EPackage
|
|||
*/
|
||||
int PROPERTY = 2;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PROPERTY__NAME = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Type</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -152,7 +143,16 @@ public interface TestLanguagePackage extends EPackage
|
|||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PROPERTY__TYPE = 1;
|
||||
int PROPERTY__TYPE = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int PROPERTY__NAME = 1;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Property</em>' class.
|
||||
|
@ -329,17 +329,6 @@ public interface TestLanguagePackage extends EPackage
|
|||
*/
|
||||
EClass getProperty();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName <em>Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Name</em>'.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName()
|
||||
* @see #getProperty()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getProperty_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getType <em>Type</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -351,6 +340,17 @@ public interface TestLanguagePackage extends EPackage
|
|||
*/
|
||||
EReference getProperty_Type();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName <em>Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Name</em>'.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Property#getName()
|
||||
* @see #getProperty()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getProperty_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type <em>Type</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -491,14 +491,6 @@ public interface TestLanguagePackage extends EPackage
|
|||
*/
|
||||
EClass PROPERTY = eINSTANCE.getProperty();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute PROPERTY__NAME = eINSTANCE.getProperty_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Type</b></em>' containment reference feature.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -507,6 +499,14 @@ public interface TestLanguagePackage extends EPackage
|
|||
*/
|
||||
EReference PROPERTY__TYPE = eINSTANCE.getProperty_Type();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute PROPERTY__NAME = eINSTANCE.getProperty_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.impl.TypeImpl <em>Type</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -28,14 +28,24 @@ import org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type;
|
|||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.impl.PropertyImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.impl.PropertyImpl#getType <em>Type</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.testLanguage.impl.PropertyImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class PropertyImpl extends MinimalEObjectImpl.Container implements Property
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getType()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected Type type;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -56,16 +66,6 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getType()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected Type type;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -87,29 +87,6 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
return TestLanguagePackage.Literals.PROPERTY;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, TestLanguagePackage.PROPERTY__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -158,6 +135,29 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
eNotify(new ENotificationImpl(this, Notification.SET, TestLanguagePackage.PROPERTY__TYPE, newType, newType));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, TestLanguagePackage.PROPERTY__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -184,10 +184,10 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
return getName();
|
||||
case TestLanguagePackage.PROPERTY__TYPE:
|
||||
return getType();
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
return getName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
@ -202,12 +202,12 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case TestLanguagePackage.PROPERTY__TYPE:
|
||||
setType((Type)newValue);
|
||||
return;
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
@ -222,12 +222,12 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case TestLanguagePackage.PROPERTY__TYPE:
|
||||
setType((Type)null);
|
||||
return;
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
@ -242,10 +242,10 @@ public class PropertyImpl extends MinimalEObjectImpl.Container implements Proper
|
|||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case TestLanguagePackage.PROPERTY__TYPE:
|
||||
return type != null;
|
||||
case TestLanguagePackage.PROPERTY__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
|
|
@ -201,9 +201,9 @@ public class TestLanguagePackageImpl extends EPackageImpl implements TestLanguag
|
|||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getProperty_Name()
|
||||
public EReference getProperty_Type()
|
||||
{
|
||||
return (EAttribute)propertyEClass.getEStructuralFeatures().get(0);
|
||||
return (EReference)propertyEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -211,9 +211,9 @@ public class TestLanguagePackageImpl extends EPackageImpl implements TestLanguag
|
|||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getProperty_Type()
|
||||
public EAttribute getProperty_Name()
|
||||
{
|
||||
return (EReference)propertyEClass.getEStructuralFeatures().get(1);
|
||||
return (EAttribute)propertyEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -314,8 +314,8 @@ public class TestLanguagePackageImpl extends EPackageImpl implements TestLanguag
|
|||
createEReference(typeDeclarationEClass, TYPE_DECLARATION__PROPERTIES);
|
||||
|
||||
propertyEClass = createEClass(PROPERTY);
|
||||
createEAttribute(propertyEClass, PROPERTY__NAME);
|
||||
createEReference(propertyEClass, PROPERTY__TYPE);
|
||||
createEAttribute(propertyEClass, PROPERTY__NAME);
|
||||
|
||||
typeEClass = createEClass(TYPE);
|
||||
createEAttribute(typeEClass, TYPE__ARRAY_DIEMENSIONS);
|
||||
|
@ -368,8 +368,8 @@ public class TestLanguagePackageImpl extends EPackageImpl implements TestLanguag
|
|||
initEReference(getTypeDeclaration_Properties(), this.getProperty(), null, "properties", null, 0, -1, TypeDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(propertyEClass, Property.class, "Property", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getProperty_Type(), this.getType(), null, "type", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getProperty_Name(), ecorePackage.getEString(), "name", null, 0, 1, Property.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getType_ArrayDiemensions(), ecorePackage.getEString(), "arrayDiemensions", null, 0, -1, Type.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
|
|
@ -18,7 +18,7 @@ TypeDeclaration:
|
|||
'}';
|
||||
|
||||
Property:
|
||||
name=ID type=Type
|
||||
type=Type name=ID
|
||||
;
|
||||
|
||||
Type :
|
||||
|
|
Loading…
Reference in a new issue