mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
[#1231] added testlanguage for transient things not in grammar
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
parent
97191fa592
commit
6a25670bab
38 changed files with 4261 additions and 1539 deletions
|
@ -73,6 +73,10 @@
|
|||
<eClassifiers xsi:type="ecore:EClass" name="EClassRef" eSuperTypes="#//Model">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="ref" eType="ecore:EClass platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WithTransientContainer" eSuperTypes="#//Model">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="child" eType="ecore:EClass ../../testlang-src/org/eclipse/xtext/ide/tests/testlanguage/WithTransient.ecore#//WithTransient"
|
||||
containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="ManyValues" eSuperTypes="#//ManyOptionalValues">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" upperBound="-1"
|
||||
eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
modelDirectory="/org.eclipse.xtext.ide.tests/testlang-src-gen" modelPluginID="org.eclipse.xtext.ide.tests"
|
||||
forceOverwrite="true" modelName="PartialSerializationTestLanguage" updateClasspath="false"
|
||||
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="6.0"
|
||||
copyrightFields="false" runtimeVersion="2.12" usedGenPackages="platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore">
|
||||
copyrightFields="false" runtimeVersion="2.12" usedGenPackages="platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../testlang-src/org/eclipse/xtext/ide/tests/testlanguage/WithTransient.genmodel#//withtransient">
|
||||
<genPackages prefix="PartialSerializationTestLanguage" basePackage="org.eclipse.xtext.ide.tests.testlanguage"
|
||||
disposableProviderFactory="true" fileExtensions="pstl" ecorePackage="PartialSerializationTestLanguage.ecore#/">
|
||||
<genClasses ecoreClass="PartialSerializationTestLanguage.ecore#//Model">
|
||||
|
@ -62,6 +62,9 @@
|
|||
<genClasses ecoreClass="PartialSerializationTestLanguage.ecore#//EClassRef">
|
||||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialSerializationTestLanguage.ecore#//EClassRef/ref"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="PartialSerializationTestLanguage.ecore#//WithTransientContainer">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialSerializationTestLanguage.ecore#//WithTransientContainer/child"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="PartialSerializationTestLanguage.ecore#//ManyValues">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialSerializationTestLanguage.ecore#//ManyValues/name"/>
|
||||
</genClasses>
|
||||
|
|
|
@ -10,7 +10,9 @@ package org.eclipse.xtext.ide.tests.serializer
|
|||
import com.google.inject.Inject
|
||||
import javax.inject.Provider
|
||||
import org.eclipse.emf.ecore.EObject
|
||||
import org.eclipse.emf.ecore.util.EcoreUtil
|
||||
import org.eclipse.xtext.formatting2.regionaccess.ITextRegionAccess
|
||||
import org.eclipse.xtext.ide.serializer.IChangeSerializer
|
||||
import org.eclipse.xtext.ide.serializer.impl.ChangeSerializer
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.MandatoryChild
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.MandatoryValue
|
||||
|
@ -19,14 +21,13 @@ import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage
|
|||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalChildList
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalValue
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.PartialSerializationTestLanguageFactory
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.tests.PartialSerializationTestLanguageInjectorProvider
|
||||
import org.eclipse.xtext.testing.InjectWith
|
||||
import org.eclipse.xtext.testing.XtextRunner
|
||||
import org.eclipse.xtext.testing.util.InMemoryURIHandler
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.eclipse.emf.ecore.util.EcoreUtil
|
||||
import org.eclipse.xtext.ide.serializer.IChangeSerializer
|
||||
|
||||
/**
|
||||
* @author Moritz Eysholdt - Initial contribution and API
|
||||
|
@ -541,6 +542,23 @@ class PartialSerializerTest {
|
|||
'''
|
||||
}
|
||||
|
||||
@Test
|
||||
def void testTransientValueChange() {
|
||||
recordDiff(WithTransientContainer, "#30 foo") [
|
||||
child.packageName = "bar"
|
||||
] === '''
|
||||
0 0 H
|
||||
B WithTransientContainer Model
|
||||
0 3 S "#30" Model:'#30'
|
||||
3 1 H " " Whitespace:TerminalRule'WS'
|
||||
B WithTransient'foo' WithTransientContainer:child=WithTransient path:WithTransientContainer/child
|
||||
4 3 S "foo" WithTransient:name=ID
|
||||
E WithTransient'foo' WithTransientContainer:child=WithTransient path:WithTransientContainer/child
|
||||
E WithTransientContainer Model
|
||||
7 0 H
|
||||
'''
|
||||
}
|
||||
|
||||
def private <T extends EObject> ITextRegionAccess recordDiff(Class<T> modelType, CharSequence modelText,
|
||||
IChangeSerializer.IModification<T> modification) {
|
||||
val fs = new InMemoryURIHandler()
|
||||
|
|
Binary file not shown.
|
@ -51,6 +51,7 @@ public class PartialSerializationTestLanguageParser extends AbstractPartialConte
|
|||
builder.put(grammarAccess.getModelAccess().getGroup_11(), "rule__Model__Group_11__0");
|
||||
builder.put(grammarAccess.getModelAccess().getGroup_12(), "rule__Model__Group_12__0");
|
||||
builder.put(grammarAccess.getModelAccess().getGroup_13(), "rule__Model__Group_13__0");
|
||||
builder.put(grammarAccess.getModelAccess().getGroup_14(), "rule__Model__Group_14__0");
|
||||
builder.put(grammarAccess.getOptionalValueAccess().getGroup(), "rule__OptionalValue__Group__0");
|
||||
builder.put(grammarAccess.getManyOptionalValuesAccess().getGroup(), "rule__ManyOptionalValues__Group__0");
|
||||
builder.put(grammarAccess.getOptionalChildAccess().getGroup(), "rule__OptionalChild__Group__0");
|
||||
|
@ -90,6 +91,8 @@ public class PartialSerializationTestLanguageParser extends AbstractPartialConte
|
|||
builder.put(grammarAccess.getNodeAccess().getRefAssignment_4_0_2_1(), "rule__Node__RefAssignment_4_0_2_1");
|
||||
builder.put(grammarAccess.getEClassDeclAccess().getNameAssignment(), "rule__EClassDecl__NameAssignment");
|
||||
builder.put(grammarAccess.getEClassRefAccess().getRefAssignment(), "rule__EClassRef__RefAssignment");
|
||||
builder.put(grammarAccess.getWithTransientContainerAccess().getChildAssignment(), "rule__WithTransientContainer__ChildAssignment");
|
||||
builder.put(grammarAccess.getWithTransientAccess().getNameAssignment(), "rule__WithTransient__NameAssignment");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -542,6 +542,56 @@ finally {
|
|||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
// Entry rule entryRuleWithTransientContainer
|
||||
entryRuleWithTransientContainer
|
||||
:
|
||||
{ before(grammarAccess.getWithTransientContainerRule()); }
|
||||
ruleWithTransientContainer
|
||||
{ after(grammarAccess.getWithTransientContainerRule()); }
|
||||
EOF
|
||||
;
|
||||
|
||||
// Rule WithTransientContainer
|
||||
ruleWithTransientContainer
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWithTransientContainerAccess().getChildAssignment()); }
|
||||
(rule__WithTransientContainer__ChildAssignment)
|
||||
{ after(grammarAccess.getWithTransientContainerAccess().getChildAssignment()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
// Entry rule entryRuleWithTransient
|
||||
entryRuleWithTransient
|
||||
:
|
||||
{ before(grammarAccess.getWithTransientRule()); }
|
||||
ruleWithTransient
|
||||
{ after(grammarAccess.getWithTransientRule()); }
|
||||
EOF
|
||||
;
|
||||
|
||||
// Rule WithTransient
|
||||
ruleWithTransient
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWithTransientAccess().getNameAssignment()); }
|
||||
(rule__WithTransient__NameAssignment)
|
||||
{ after(grammarAccess.getWithTransientAccess().getNameAssignment()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__Model__Alternatives
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
|
@ -630,6 +680,12 @@ rule__Model__Alternatives
|
|||
(rule__Model__Group_13__0)
|
||||
{ after(grammarAccess.getModelAccess().getGroup_13()); }
|
||||
)
|
||||
|
|
||||
(
|
||||
{ before(grammarAccess.getModelAccess().getGroup_14()); }
|
||||
(rule__Model__Group_14__0)
|
||||
{ after(grammarAccess.getModelAccess().getGroup_14()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
|
@ -1419,6 +1475,60 @@ finally {
|
|||
}
|
||||
|
||||
|
||||
rule__Model__Group_14__0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
rule__Model__Group_14__0__Impl
|
||||
rule__Model__Group_14__1
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__Model__Group_14__0__Impl
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getModelAccess().getNumberSignDigitThreeDigitZeroKeyword_14_0()); }
|
||||
'#30'
|
||||
{ after(grammarAccess.getModelAccess().getNumberSignDigitThreeDigitZeroKeyword_14_0()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__Model__Group_14__1
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
rule__Model__Group_14__1__Impl
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__Model__Group_14__1__Impl
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getModelAccess().getWithTransientContainerParserRuleCall_14_1()); }
|
||||
ruleWithTransientContainer
|
||||
{ after(grammarAccess.getModelAccess().getWithTransientContainerParserRuleCall_14_1()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
|
||||
rule__OptionalValue__Group__0
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
|
@ -3094,6 +3204,36 @@ finally {
|
|||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WithTransientContainer__ChildAssignment
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWithTransientContainerAccess().getChildWithTransientParserRuleCall_0()); }
|
||||
ruleWithTransient
|
||||
{ after(grammarAccess.getWithTransientContainerAccess().getChildWithTransientParserRuleCall_0()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
rule__WithTransient__NameAssignment
|
||||
@init {
|
||||
int stackSize = keepStackSize();
|
||||
}
|
||||
:
|
||||
(
|
||||
{ before(grammarAccess.getWithTransientAccess().getNameIDTerminalRuleCall_0()); }
|
||||
RULE_ID
|
||||
{ after(grammarAccess.getWithTransientAccess().getNameIDTerminalRuleCall_0()); }
|
||||
)
|
||||
;
|
||||
finally {
|
||||
restoreStackSize(stackSize);
|
||||
}
|
||||
|
||||
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
|
||||
|
||||
RULE_INT : ('0'..'9')+;
|
||||
|
|
|
@ -10,22 +10,23 @@
|
|||
'#23'=24
|
||||
'#24'=25
|
||||
'#3'=14
|
||||
'#30'=26
|
||||
'#4'=15
|
||||
'#5'=16
|
||||
'.'=38
|
||||
':'=32
|
||||
'.'=39
|
||||
':'=33
|
||||
';'=11
|
||||
'child'=33
|
||||
'children1'=29
|
||||
'direct'=31
|
||||
'import'=35
|
||||
'kw1'=26
|
||||
'kw2'=27
|
||||
'ref'=37
|
||||
'refs'=36
|
||||
'subs'=34
|
||||
'{'=28
|
||||
'}'=30
|
||||
'child'=34
|
||||
'children1'=30
|
||||
'direct'=32
|
||||
'import'=36
|
||||
'kw1'=27
|
||||
'kw2'=28
|
||||
'ref'=38
|
||||
'refs'=37
|
||||
'subs'=35
|
||||
'{'=29
|
||||
'}'=31
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_ID=4
|
||||
RULE_INT=5
|
||||
|
@ -61,3 +62,4 @@ T__35=35
|
|||
T__36=36
|
||||
T__37=37
|
||||
T__38=38
|
||||
T__39=39
|
||||
|
|
|
@ -20,6 +20,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
public static final int T__16=16;
|
||||
public static final int T__38=38;
|
||||
public static final int T__17=17;
|
||||
public static final int T__39=39;
|
||||
public static final int T__18=18;
|
||||
public static final int T__11=11;
|
||||
public static final int T__33=33;
|
||||
|
@ -381,10 +382,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__26;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:26:7: ( 'kw1' )
|
||||
// InternalPartialSerializationTestLanguage.g:26:9: 'kw1'
|
||||
// InternalPartialSerializationTestLanguage.g:26:7: ( '#30' )
|
||||
// InternalPartialSerializationTestLanguage.g:26:9: '#30'
|
||||
{
|
||||
match("kw1");
|
||||
match("#30");
|
||||
|
||||
|
||||
}
|
||||
|
@ -402,10 +403,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__27;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:27:7: ( 'kw2' )
|
||||
// InternalPartialSerializationTestLanguage.g:27:9: 'kw2'
|
||||
// InternalPartialSerializationTestLanguage.g:27:7: ( 'kw1' )
|
||||
// InternalPartialSerializationTestLanguage.g:27:9: 'kw1'
|
||||
{
|
||||
match("kw2");
|
||||
match("kw1");
|
||||
|
||||
|
||||
}
|
||||
|
@ -423,10 +424,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__28;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:28:7: ( '{' )
|
||||
// InternalPartialSerializationTestLanguage.g:28:9: '{'
|
||||
// InternalPartialSerializationTestLanguage.g:28:7: ( 'kw2' )
|
||||
// InternalPartialSerializationTestLanguage.g:28:9: 'kw2'
|
||||
{
|
||||
match('{');
|
||||
match("kw2");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -443,11 +445,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__29;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:29:7: ( 'children1' )
|
||||
// InternalPartialSerializationTestLanguage.g:29:9: 'children1'
|
||||
// InternalPartialSerializationTestLanguage.g:29:7: ( '{' )
|
||||
// InternalPartialSerializationTestLanguage.g:29:9: '{'
|
||||
{
|
||||
match("children1");
|
||||
|
||||
match('{');
|
||||
|
||||
}
|
||||
|
||||
|
@ -464,10 +465,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__30;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:30:7: ( '}' )
|
||||
// InternalPartialSerializationTestLanguage.g:30:9: '}'
|
||||
// InternalPartialSerializationTestLanguage.g:30:7: ( 'children1' )
|
||||
// InternalPartialSerializationTestLanguage.g:30:9: 'children1'
|
||||
{
|
||||
match('}');
|
||||
match("children1");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -484,11 +486,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__31;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:31:7: ( 'direct' )
|
||||
// InternalPartialSerializationTestLanguage.g:31:9: 'direct'
|
||||
// InternalPartialSerializationTestLanguage.g:31:7: ( '}' )
|
||||
// InternalPartialSerializationTestLanguage.g:31:9: '}'
|
||||
{
|
||||
match("direct");
|
||||
|
||||
match('}');
|
||||
|
||||
}
|
||||
|
||||
|
@ -505,10 +506,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__32;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:32:7: ( ':' )
|
||||
// InternalPartialSerializationTestLanguage.g:32:9: ':'
|
||||
// InternalPartialSerializationTestLanguage.g:32:7: ( 'direct' )
|
||||
// InternalPartialSerializationTestLanguage.g:32:9: 'direct'
|
||||
{
|
||||
match(':');
|
||||
match("direct");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -525,11 +527,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__33;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:33:7: ( 'child' )
|
||||
// InternalPartialSerializationTestLanguage.g:33:9: 'child'
|
||||
// InternalPartialSerializationTestLanguage.g:33:7: ( ':' )
|
||||
// InternalPartialSerializationTestLanguage.g:33:9: ':'
|
||||
{
|
||||
match("child");
|
||||
|
||||
match(':');
|
||||
|
||||
}
|
||||
|
||||
|
@ -546,10 +547,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__34;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:34:7: ( 'subs' )
|
||||
// InternalPartialSerializationTestLanguage.g:34:9: 'subs'
|
||||
// InternalPartialSerializationTestLanguage.g:34:7: ( 'child' )
|
||||
// InternalPartialSerializationTestLanguage.g:34:9: 'child'
|
||||
{
|
||||
match("subs");
|
||||
match("child");
|
||||
|
||||
|
||||
}
|
||||
|
@ -567,10 +568,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__35;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:35:7: ( 'import' )
|
||||
// InternalPartialSerializationTestLanguage.g:35:9: 'import'
|
||||
// InternalPartialSerializationTestLanguage.g:35:7: ( 'subs' )
|
||||
// InternalPartialSerializationTestLanguage.g:35:9: 'subs'
|
||||
{
|
||||
match("import");
|
||||
match("subs");
|
||||
|
||||
|
||||
}
|
||||
|
@ -588,10 +589,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__36;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:36:7: ( 'refs' )
|
||||
// InternalPartialSerializationTestLanguage.g:36:9: 'refs'
|
||||
// InternalPartialSerializationTestLanguage.g:36:7: ( 'import' )
|
||||
// InternalPartialSerializationTestLanguage.g:36:9: 'import'
|
||||
{
|
||||
match("refs");
|
||||
match("import");
|
||||
|
||||
|
||||
}
|
||||
|
@ -609,10 +610,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__37;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:37:7: ( 'ref' )
|
||||
// InternalPartialSerializationTestLanguage.g:37:9: 'ref'
|
||||
// InternalPartialSerializationTestLanguage.g:37:7: ( 'refs' )
|
||||
// InternalPartialSerializationTestLanguage.g:37:9: 'refs'
|
||||
{
|
||||
match("ref");
|
||||
match("refs");
|
||||
|
||||
|
||||
}
|
||||
|
@ -630,10 +631,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__38;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:38:7: ( '.' )
|
||||
// InternalPartialSerializationTestLanguage.g:38:9: '.'
|
||||
// InternalPartialSerializationTestLanguage.g:38:7: ( 'ref' )
|
||||
// InternalPartialSerializationTestLanguage.g:38:9: 'ref'
|
||||
{
|
||||
match('.');
|
||||
match("ref");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -645,15 +647,35 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
// $ANTLR end "T__38"
|
||||
|
||||
// $ANTLR start "T__39"
|
||||
public final void mT__39() throws RecognitionException {
|
||||
try {
|
||||
int _type = T__39;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:39:7: ( '.' )
|
||||
// InternalPartialSerializationTestLanguage.g:39:9: '.'
|
||||
{
|
||||
match('.');
|
||||
|
||||
}
|
||||
|
||||
state.type = _type;
|
||||
state.channel = _channel;
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
// $ANTLR end "T__39"
|
||||
|
||||
// $ANTLR start "RULE_ID"
|
||||
public final void mRULE_ID() throws RecognitionException {
|
||||
try {
|
||||
int _type = RULE_ID;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3097:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
|
||||
// InternalPartialSerializationTestLanguage.g:3097:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
// InternalPartialSerializationTestLanguage.g:3237:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
|
||||
// InternalPartialSerializationTestLanguage.g:3237:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:3097:11: ( '^' )?
|
||||
// InternalPartialSerializationTestLanguage.g:3237:11: ( '^' )?
|
||||
int alt1=2;
|
||||
int LA1_0 = input.LA(1);
|
||||
|
||||
|
@ -662,7 +684,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt1) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3097:11: '^'
|
||||
// InternalPartialSerializationTestLanguage.g:3237:11: '^'
|
||||
{
|
||||
match('^');
|
||||
|
||||
|
@ -680,7 +702,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
recover(mse);
|
||||
throw mse;}
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:3097:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
// InternalPartialSerializationTestLanguage.g:3237:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
loop2:
|
||||
do {
|
||||
int alt2=2;
|
||||
|
@ -729,10 +751,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_INT;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3099:10: ( ( '0' .. '9' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:3099:12: ( '0' .. '9' )+
|
||||
// InternalPartialSerializationTestLanguage.g:3239:10: ( ( '0' .. '9' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:3239:12: ( '0' .. '9' )+
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:3099:12: ( '0' .. '9' )+
|
||||
// InternalPartialSerializationTestLanguage.g:3239:12: ( '0' .. '9' )+
|
||||
int cnt3=0;
|
||||
loop3:
|
||||
do {
|
||||
|
@ -746,7 +768,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt3) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3099:13: '0' .. '9'
|
||||
// InternalPartialSerializationTestLanguage.g:3239:13: '0' .. '9'
|
||||
{
|
||||
matchRange('0','9');
|
||||
|
||||
|
@ -778,10 +800,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_STRING;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3101:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:3101:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
// InternalPartialSerializationTestLanguage.g:3241:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:3241:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:3101:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
// InternalPartialSerializationTestLanguage.g:3241:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
int alt6=2;
|
||||
int LA6_0 = input.LA(1);
|
||||
|
||||
|
@ -799,10 +821,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt6) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3101:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
|
||||
// InternalPartialSerializationTestLanguage.g:3241:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
|
||||
{
|
||||
match('\"');
|
||||
// InternalPartialSerializationTestLanguage.g:3101:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
|
||||
// InternalPartialSerializationTestLanguage.g:3241:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
|
||||
loop4:
|
||||
do {
|
||||
int alt4=3;
|
||||
|
@ -818,7 +840,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt4) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3101:21: '\\\\' .
|
||||
// InternalPartialSerializationTestLanguage.g:3241:21: '\\\\' .
|
||||
{
|
||||
match('\\');
|
||||
matchAny();
|
||||
|
@ -826,7 +848,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 2 :
|
||||
// InternalPartialSerializationTestLanguage.g:3101:28: ~ ( ( '\\\\' | '\"' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:3241:28: ~ ( ( '\\\\' | '\"' ) )
|
||||
{
|
||||
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
|
||||
input.consume();
|
||||
|
@ -851,10 +873,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 2 :
|
||||
// InternalPartialSerializationTestLanguage.g:3101:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
|
||||
// InternalPartialSerializationTestLanguage.g:3241:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
|
||||
{
|
||||
match('\'');
|
||||
// InternalPartialSerializationTestLanguage.g:3101:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
|
||||
// InternalPartialSerializationTestLanguage.g:3241:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
|
||||
loop5:
|
||||
do {
|
||||
int alt5=3;
|
||||
|
@ -870,7 +892,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt5) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3101:54: '\\\\' .
|
||||
// InternalPartialSerializationTestLanguage.g:3241:54: '\\\\' .
|
||||
{
|
||||
match('\\');
|
||||
matchAny();
|
||||
|
@ -878,7 +900,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 2 :
|
||||
// InternalPartialSerializationTestLanguage.g:3101:61: ~ ( ( '\\\\' | '\\'' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:3241:61: ~ ( ( '\\\\' | '\\'' ) )
|
||||
{
|
||||
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
|
||||
input.consume();
|
||||
|
@ -921,12 +943,12 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_ML_COMMENT;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3103:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
|
||||
// InternalPartialSerializationTestLanguage.g:3103:19: '/*' ( options {greedy=false; } : . )* '*/'
|
||||
// InternalPartialSerializationTestLanguage.g:3243:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
|
||||
// InternalPartialSerializationTestLanguage.g:3243:19: '/*' ( options {greedy=false; } : . )* '*/'
|
||||
{
|
||||
match("/*");
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:3103:24: ( options {greedy=false; } : . )*
|
||||
// InternalPartialSerializationTestLanguage.g:3243:24: ( options {greedy=false; } : . )*
|
||||
loop7:
|
||||
do {
|
||||
int alt7=2;
|
||||
|
@ -951,7 +973,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt7) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3103:52: .
|
||||
// InternalPartialSerializationTestLanguage.g:3243:52: .
|
||||
{
|
||||
matchAny();
|
||||
|
||||
|
@ -981,12 +1003,12 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_SL_COMMENT;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3105:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
|
||||
// InternalPartialSerializationTestLanguage.g:3105:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
|
||||
// InternalPartialSerializationTestLanguage.g:3245:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
|
||||
// InternalPartialSerializationTestLanguage.g:3245:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
|
||||
{
|
||||
match("//");
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:3105:24: (~ ( ( '\\n' | '\\r' ) ) )*
|
||||
// InternalPartialSerializationTestLanguage.g:3245:24: (~ ( ( '\\n' | '\\r' ) ) )*
|
||||
loop8:
|
||||
do {
|
||||
int alt8=2;
|
||||
|
@ -999,7 +1021,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt8) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3105:24: ~ ( ( '\\n' | '\\r' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:3245:24: ~ ( ( '\\n' | '\\r' ) )
|
||||
{
|
||||
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
|
||||
input.consume();
|
||||
|
@ -1019,7 +1041,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
} while (true);
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:3105:40: ( ( '\\r' )? '\\n' )?
|
||||
// InternalPartialSerializationTestLanguage.g:3245:40: ( ( '\\r' )? '\\n' )?
|
||||
int alt10=2;
|
||||
int LA10_0 = input.LA(1);
|
||||
|
||||
|
@ -1028,9 +1050,9 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt10) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3105:41: ( '\\r' )? '\\n'
|
||||
// InternalPartialSerializationTestLanguage.g:3245:41: ( '\\r' )? '\\n'
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:3105:41: ( '\\r' )?
|
||||
// InternalPartialSerializationTestLanguage.g:3245:41: ( '\\r' )?
|
||||
int alt9=2;
|
||||
int LA9_0 = input.LA(1);
|
||||
|
||||
|
@ -1039,7 +1061,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt9) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:3105:41: '\\r'
|
||||
// InternalPartialSerializationTestLanguage.g:3245:41: '\\r'
|
||||
{
|
||||
match('\r');
|
||||
|
||||
|
@ -1071,10 +1093,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_WS;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3107:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:3107:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
// InternalPartialSerializationTestLanguage.g:3247:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:3247:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:3107:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
// InternalPartialSerializationTestLanguage.g:3247:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
int cnt11=0;
|
||||
loop11:
|
||||
do {
|
||||
|
@ -1128,8 +1150,8 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_ANY_OTHER;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:3109:16: ( . )
|
||||
// InternalPartialSerializationTestLanguage.g:3109:18: .
|
||||
// InternalPartialSerializationTestLanguage.g:3249:16: ( . )
|
||||
// InternalPartialSerializationTestLanguage.g:3249:18: .
|
||||
{
|
||||
matchAny();
|
||||
|
||||
|
@ -1144,8 +1166,8 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
// $ANTLR end "RULE_ANY_OTHER"
|
||||
|
||||
public void mTokens() throws RecognitionException {
|
||||
// InternalPartialSerializationTestLanguage.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
|
||||
int alt12=35;
|
||||
// InternalPartialSerializationTestLanguage.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
|
||||
int alt12=36;
|
||||
alt12 = dfa12.predict(input);
|
||||
switch (alt12) {
|
||||
case 1 :
|
||||
|
@ -1345,49 +1367,56 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 29 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:178: RULE_ID
|
||||
// InternalPartialSerializationTestLanguage.g:1:178: T__39
|
||||
{
|
||||
mT__39();
|
||||
|
||||
}
|
||||
break;
|
||||
case 30 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:184: RULE_ID
|
||||
{
|
||||
mRULE_ID();
|
||||
|
||||
}
|
||||
break;
|
||||
case 30 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:186: RULE_INT
|
||||
case 31 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:192: RULE_INT
|
||||
{
|
||||
mRULE_INT();
|
||||
|
||||
}
|
||||
break;
|
||||
case 31 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:195: RULE_STRING
|
||||
case 32 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:201: RULE_STRING
|
||||
{
|
||||
mRULE_STRING();
|
||||
|
||||
}
|
||||
break;
|
||||
case 32 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:207: RULE_ML_COMMENT
|
||||
case 33 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:213: RULE_ML_COMMENT
|
||||
{
|
||||
mRULE_ML_COMMENT();
|
||||
|
||||
}
|
||||
break;
|
||||
case 33 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:223: RULE_SL_COMMENT
|
||||
case 34 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:229: RULE_SL_COMMENT
|
||||
{
|
||||
mRULE_SL_COMMENT();
|
||||
|
||||
}
|
||||
break;
|
||||
case 34 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:239: RULE_WS
|
||||
case 35 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:245: RULE_WS
|
||||
{
|
||||
mRULE_WS();
|
||||
|
||||
}
|
||||
break;
|
||||
case 35 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:247: RULE_ANY_OTHER
|
||||
case 36 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:253: RULE_ANY_OTHER
|
||||
{
|
||||
mRULE_ANY_OTHER();
|
||||
|
||||
|
@ -1401,17 +1430,17 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
protected DFA12 dfa12 = new DFA12(this);
|
||||
static final String DFA12_eotS =
|
||||
"\2\uffff\1\24\1\34\1\uffff\1\34\1\uffff\1\34\1\uffff\3\34\1\uffff\1\24\2\uffff\3\24\3\uffff\1\57\1\65\3\uffff\1\34\2\uffff\1\34\1\uffff\1\34\1\uffff\3\34\21\uffff\1\75\1\76\4\34\1\104\2\uffff\2\34\1\107\1\34\1\111\1\uffff\1\113\1\34\1\uffff\1\34\1\uffff\1\34\1\uffff\1\117\1\120\1\34\2\uffff\1\34\1\123\1\uffff";
|
||||
"\2\uffff\1\24\1\34\1\uffff\1\34\1\uffff\1\34\1\uffff\3\34\1\uffff\1\24\2\uffff\3\24\3\uffff\1\57\1\65\1\67\2\uffff\1\34\2\uffff\1\34\1\uffff\1\34\1\uffff\3\34\23\uffff\1\77\1\100\4\34\1\106\2\uffff\2\34\1\111\1\34\1\113\1\uffff\1\115\1\34\1\uffff\1\34\1\uffff\1\34\1\uffff\1\121\1\122\1\34\2\uffff\1\34\1\125\1\uffff";
|
||||
static final String DFA12_eofS =
|
||||
"\124\uffff";
|
||||
"\126\uffff";
|
||||
static final String DFA12_minS =
|
||||
"\1\0\1\uffff\1\61\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\1\uffff\1\101\2\uffff\2\0\1\52\3\uffff\2\60\3\uffff\1\61\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\21\uffff\2\60\1\154\1\145\1\163\1\157\1\60\2\uffff\1\144\1\143\1\60\1\162\1\60\1\uffff\1\60\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\60\1\156\2\uffff\1\61\1\60\1\uffff";
|
||||
"\1\0\1\uffff\1\61\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\1\uffff\1\101\2\uffff\2\0\1\52\3\uffff\3\60\2\uffff\1\61\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\23\uffff\2\60\1\154\1\145\1\163\1\157\1\60\2\uffff\1\144\1\143\1\60\1\162\1\60\1\uffff\1\60\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\60\1\156\2\uffff\1\61\1\60\1\uffff";
|
||||
static final String DFA12_maxS =
|
||||
"\1\uffff\1\uffff\1\65\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\1\uffff\1\172\2\uffff\2\uffff\1\57\3\uffff\1\63\1\64\3\uffff\1\62\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\21\uffff\2\172\1\154\1\145\1\163\1\157\1\172\2\uffff\1\144\1\143\1\172\1\162\1\172\1\uffff\1\172\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\172\1\156\2\uffff\1\61\1\172\1\uffff";
|
||||
"\1\uffff\1\uffff\1\65\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\1\uffff\1\172\2\uffff\2\uffff\1\57\3\uffff\1\63\1\64\1\60\2\uffff\1\62\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\23\uffff\2\172\1\154\1\145\1\163\1\157\1\172\2\uffff\1\144\1\143\1\172\1\162\1\172\1\uffff\1\172\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\172\1\156\2\uffff\1\61\1\172\1\uffff";
|
||||
static final String DFA12_acceptS =
|
||||
"\1\uffff\1\1\2\uffff\1\22\1\uffff\1\24\1\uffff\1\26\3\uffff\1\34\1\uffff\1\35\1\36\3\uffff\1\42\1\43\1\1\2\uffff\1\4\1\5\1\6\1\uffff\1\35\1\22\1\uffff\1\24\1\uffff\1\26\3\uffff\1\34\1\36\1\37\1\40\1\41\1\42\1\7\1\10\1\11\1\12\1\2\1\13\1\14\1\15\1\16\1\17\1\3\7\uffff\1\20\1\21\5\uffff\1\33\2\uffff\1\30\1\uffff\1\32\1\uffff\1\27\3\uffff\1\25\1\31\2\uffff\1\23";
|
||||
"\1\uffff\1\1\2\uffff\1\23\1\uffff\1\25\1\uffff\1\27\3\uffff\1\35\1\uffff\1\36\1\37\3\uffff\1\43\1\44\1\1\3\uffff\1\5\1\6\1\uffff\1\36\1\23\1\uffff\1\25\1\uffff\1\27\3\uffff\1\35\1\37\1\40\1\41\1\42\1\43\1\7\1\10\1\11\1\12\1\2\1\13\1\14\1\15\1\16\1\17\1\3\1\20\1\4\7\uffff\1\21\1\22\5\uffff\1\34\2\uffff\1\31\1\uffff\1\33\1\uffff\1\30\3\uffff\1\26\1\32\2\uffff\1\24";
|
||||
static final String DFA12_specialS =
|
||||
"\1\2\17\uffff\1\0\1\1\102\uffff}>";
|
||||
"\1\1\17\uffff\1\0\1\2\104\uffff}>";
|
||||
static final String[] DFA12_transitionS = {
|
||||
"\11\24\2\23\2\24\1\23\22\24\1\23\1\24\1\20\1\2\3\24\1\21\6\24\1\14\1\22\12\17\1\10\1\1\5\24\32\16\3\24\1\15\1\16\1\24\2\16\1\5\1\7\4\16\1\12\1\16\1\3\6\16\1\13\1\11\7\16\1\4\1\24\1\6\uff82\24",
|
||||
"",
|
||||
|
@ -1437,19 +1466,21 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
"",
|
||||
"\1\53\1\54\1\55\1\56",
|
||||
"\1\60\1\61\1\62\1\63\1\64",
|
||||
"\1\66",
|
||||
"",
|
||||
"",
|
||||
"\1\70\1\71",
|
||||
"",
|
||||
"\1\66\1\67",
|
||||
"",
|
||||
"",
|
||||
"\1\70",
|
||||
"",
|
||||
"\1\71",
|
||||
"",
|
||||
"\1\72",
|
||||
"",
|
||||
"\1\73",
|
||||
"",
|
||||
"\1\74",
|
||||
"\1\75",
|
||||
"\1\76",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
@ -1469,32 +1500,32 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
"",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"\1\77",
|
||||
"\1\100",
|
||||
"\1\101",
|
||||
"\1\102",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\22\34\1\103\7\34",
|
||||
"\1\103",
|
||||
"\1\104",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\22\34\1\105\7\34",
|
||||
"",
|
||||
"",
|
||||
"\1\105",
|
||||
"\1\106",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"\1\107",
|
||||
"\1\110",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"\1\112",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\21\34\1\112\10\34",
|
||||
"\1\114",
|
||||
"",
|
||||
"\1\115",
|
||||
"",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\21\34\1\114\10\34",
|
||||
"\1\116",
|
||||
"",
|
||||
"\1\117",
|
||||
"",
|
||||
"\1\120",
|
||||
"",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
"\1\121",
|
||||
"\1\123",
|
||||
"",
|
||||
"",
|
||||
"\1\122",
|
||||
"\1\124",
|
||||
"\12\34\7\uffff\32\34\4\uffff\1\34\1\uffff\32\34",
|
||||
""
|
||||
};
|
||||
|
@ -1529,7 +1560,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
this.transition = DFA12_transition;
|
||||
}
|
||||
public String getDescription() {
|
||||
return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
|
||||
return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
|
||||
}
|
||||
public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
|
||||
IntStream input = _input;
|
||||
|
@ -1546,16 +1577,6 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
if ( s>=0 ) return s;
|
||||
break;
|
||||
case 1 :
|
||||
int LA12_17 = input.LA(1);
|
||||
|
||||
s = -1;
|
||||
if ( ((LA12_17>='\u0000' && LA12_17<='\uFFFF')) ) {s = 39;}
|
||||
|
||||
else s = 20;
|
||||
|
||||
if ( s>=0 ) return s;
|
||||
break;
|
||||
case 2 :
|
||||
int LA12_0 = input.LA(1);
|
||||
|
||||
s = -1;
|
||||
|
@ -1599,6 +1620,16 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='$' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='-')||(LA12_0>='<' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||LA12_0=='|'||(LA12_0>='~' && LA12_0<='\uFFFF')) ) {s = 20;}
|
||||
|
||||
if ( s>=0 ) return s;
|
||||
break;
|
||||
case 2 :
|
||||
int LA12_17 = input.LA(1);
|
||||
|
||||
s = -1;
|
||||
if ( ((LA12_17>='\u0000' && LA12_17<='\uFFFF')) ) {s = 39;}
|
||||
|
||||
else s = 20;
|
||||
|
||||
if ( s>=0 ) return s;
|
||||
break;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -300,6 +300,21 @@ ruleModel returns [EObject current=null]
|
|||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
otherlv_28='#30'
|
||||
{
|
||||
newLeafNode(otherlv_28, grammarAccess.getModelAccess().getNumberSignDigitThreeDigitZeroKeyword_14_0());
|
||||
}
|
||||
{
|
||||
newCompositeNode(grammarAccess.getModelAccess().getWithTransientContainerParserRuleCall_14_1());
|
||||
}
|
||||
this_WithTransientContainer_29=ruleWithTransientContainer
|
||||
{
|
||||
$current = $this_WithTransientContainer_29.current;
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
|
@ -1214,6 +1229,77 @@ ruleEClassRef returns [EObject current=null]
|
|||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleWithTransientContainer
|
||||
entryRuleWithTransientContainer returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getWithTransientContainerRule()); }
|
||||
iv_ruleWithTransientContainer=ruleWithTransientContainer
|
||||
{ $current=$iv_ruleWithTransientContainer.current; }
|
||||
EOF;
|
||||
|
||||
// Rule WithTransientContainer
|
||||
ruleWithTransientContainer returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getWithTransientContainerAccess().getChildWithTransientParserRuleCall_0());
|
||||
}
|
||||
lv_child_0_0=ruleWithTransient
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getWithTransientContainerRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"child",
|
||||
lv_child_0_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguage.WithTransient");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleWithTransient
|
||||
entryRuleWithTransient returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getWithTransientRule()); }
|
||||
iv_ruleWithTransient=ruleWithTransient
|
||||
{ $current=$iv_ruleWithTransient.current; }
|
||||
EOF;
|
||||
|
||||
// Rule WithTransient
|
||||
ruleWithTransient returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
lv_name_0_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_0_0, grammarAccess.getWithTransientAccess().getNameIDTerminalRuleCall_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getWithTransientRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_0_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
|
||||
|
||||
RULE_INT : ('0'..'9')+;
|
||||
|
|
|
@ -10,22 +10,23 @@
|
|||
'#23'=23
|
||||
'#24'=24
|
||||
'#3'=13
|
||||
'#30'=25
|
||||
'#4'=14
|
||||
'#5'=15
|
||||
'.'=38
|
||||
':'=31
|
||||
';'=37
|
||||
'child'=32
|
||||
'children1'=28
|
||||
'direct'=30
|
||||
'import'=34
|
||||
'kw1'=25
|
||||
'kw2'=26
|
||||
'ref'=36
|
||||
'refs'=35
|
||||
'subs'=33
|
||||
'{'=27
|
||||
'}'=29
|
||||
'.'=39
|
||||
':'=32
|
||||
';'=38
|
||||
'child'=33
|
||||
'children1'=29
|
||||
'direct'=31
|
||||
'import'=35
|
||||
'kw1'=26
|
||||
'kw2'=27
|
||||
'ref'=37
|
||||
'refs'=36
|
||||
'subs'=34
|
||||
'{'=28
|
||||
'}'=30
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_ID=4
|
||||
RULE_INT=5
|
||||
|
@ -61,3 +62,4 @@ T__35=35
|
|||
T__36=36
|
||||
T__37=37
|
||||
T__38=38
|
||||
T__39=39
|
||||
|
|
|
@ -20,6 +20,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
public static final int T__16=16;
|
||||
public static final int T__38=38;
|
||||
public static final int T__17=17;
|
||||
public static final int T__39=39;
|
||||
public static final int T__18=18;
|
||||
public static final int T__11=11;
|
||||
public static final int T__33=33;
|
||||
|
@ -361,10 +362,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__25;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:25:7: ( 'kw1' )
|
||||
// InternalPartialSerializationTestLanguage.g:25:9: 'kw1'
|
||||
// InternalPartialSerializationTestLanguage.g:25:7: ( '#30' )
|
||||
// InternalPartialSerializationTestLanguage.g:25:9: '#30'
|
||||
{
|
||||
match("kw1");
|
||||
match("#30");
|
||||
|
||||
|
||||
}
|
||||
|
@ -382,10 +383,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__26;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:26:7: ( 'kw2' )
|
||||
// InternalPartialSerializationTestLanguage.g:26:9: 'kw2'
|
||||
// InternalPartialSerializationTestLanguage.g:26:7: ( 'kw1' )
|
||||
// InternalPartialSerializationTestLanguage.g:26:9: 'kw1'
|
||||
{
|
||||
match("kw2");
|
||||
match("kw1");
|
||||
|
||||
|
||||
}
|
||||
|
@ -403,10 +404,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__27;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:27:7: ( '{' )
|
||||
// InternalPartialSerializationTestLanguage.g:27:9: '{'
|
||||
// InternalPartialSerializationTestLanguage.g:27:7: ( 'kw2' )
|
||||
// InternalPartialSerializationTestLanguage.g:27:9: 'kw2'
|
||||
{
|
||||
match('{');
|
||||
match("kw2");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -423,11 +425,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__28;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:28:7: ( 'children1' )
|
||||
// InternalPartialSerializationTestLanguage.g:28:9: 'children1'
|
||||
// InternalPartialSerializationTestLanguage.g:28:7: ( '{' )
|
||||
// InternalPartialSerializationTestLanguage.g:28:9: '{'
|
||||
{
|
||||
match("children1");
|
||||
|
||||
match('{');
|
||||
|
||||
}
|
||||
|
||||
|
@ -444,10 +445,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__29;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:29:7: ( '}' )
|
||||
// InternalPartialSerializationTestLanguage.g:29:9: '}'
|
||||
// InternalPartialSerializationTestLanguage.g:29:7: ( 'children1' )
|
||||
// InternalPartialSerializationTestLanguage.g:29:9: 'children1'
|
||||
{
|
||||
match('}');
|
||||
match("children1");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -464,11 +466,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__30;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:30:7: ( 'direct' )
|
||||
// InternalPartialSerializationTestLanguage.g:30:9: 'direct'
|
||||
// InternalPartialSerializationTestLanguage.g:30:7: ( '}' )
|
||||
// InternalPartialSerializationTestLanguage.g:30:9: '}'
|
||||
{
|
||||
match("direct");
|
||||
|
||||
match('}');
|
||||
|
||||
}
|
||||
|
||||
|
@ -485,10 +486,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__31;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:31:7: ( ':' )
|
||||
// InternalPartialSerializationTestLanguage.g:31:9: ':'
|
||||
// InternalPartialSerializationTestLanguage.g:31:7: ( 'direct' )
|
||||
// InternalPartialSerializationTestLanguage.g:31:9: 'direct'
|
||||
{
|
||||
match(':');
|
||||
match("direct");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -505,11 +507,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__32;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:32:7: ( 'child' )
|
||||
// InternalPartialSerializationTestLanguage.g:32:9: 'child'
|
||||
// InternalPartialSerializationTestLanguage.g:32:7: ( ':' )
|
||||
// InternalPartialSerializationTestLanguage.g:32:9: ':'
|
||||
{
|
||||
match("child");
|
||||
|
||||
match(':');
|
||||
|
||||
}
|
||||
|
||||
|
@ -526,10 +527,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__33;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:33:7: ( 'subs' )
|
||||
// InternalPartialSerializationTestLanguage.g:33:9: 'subs'
|
||||
// InternalPartialSerializationTestLanguage.g:33:7: ( 'child' )
|
||||
// InternalPartialSerializationTestLanguage.g:33:9: 'child'
|
||||
{
|
||||
match("subs");
|
||||
match("child");
|
||||
|
||||
|
||||
}
|
||||
|
@ -547,10 +548,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__34;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:34:7: ( 'import' )
|
||||
// InternalPartialSerializationTestLanguage.g:34:9: 'import'
|
||||
// InternalPartialSerializationTestLanguage.g:34:7: ( 'subs' )
|
||||
// InternalPartialSerializationTestLanguage.g:34:9: 'subs'
|
||||
{
|
||||
match("import");
|
||||
match("subs");
|
||||
|
||||
|
||||
}
|
||||
|
@ -568,10 +569,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__35;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:35:7: ( 'refs' )
|
||||
// InternalPartialSerializationTestLanguage.g:35:9: 'refs'
|
||||
// InternalPartialSerializationTestLanguage.g:35:7: ( 'import' )
|
||||
// InternalPartialSerializationTestLanguage.g:35:9: 'import'
|
||||
{
|
||||
match("refs");
|
||||
match("import");
|
||||
|
||||
|
||||
}
|
||||
|
@ -589,10 +590,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__36;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:36:7: ( 'ref' )
|
||||
// InternalPartialSerializationTestLanguage.g:36:9: 'ref'
|
||||
// InternalPartialSerializationTestLanguage.g:36:7: ( 'refs' )
|
||||
// InternalPartialSerializationTestLanguage.g:36:9: 'refs'
|
||||
{
|
||||
match("ref");
|
||||
match("refs");
|
||||
|
||||
|
||||
}
|
||||
|
@ -610,10 +611,11 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__37;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:37:7: ( ';' )
|
||||
// InternalPartialSerializationTestLanguage.g:37:9: ';'
|
||||
// InternalPartialSerializationTestLanguage.g:37:7: ( 'ref' )
|
||||
// InternalPartialSerializationTestLanguage.g:37:9: 'ref'
|
||||
{
|
||||
match(';');
|
||||
match("ref");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -630,10 +632,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = T__38;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:38:7: ( '.' )
|
||||
// InternalPartialSerializationTestLanguage.g:38:9: '.'
|
||||
// InternalPartialSerializationTestLanguage.g:38:7: ( ';' )
|
||||
// InternalPartialSerializationTestLanguage.g:38:9: ';'
|
||||
{
|
||||
match('.');
|
||||
match(';');
|
||||
|
||||
}
|
||||
|
||||
|
@ -645,15 +647,35 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
// $ANTLR end "T__38"
|
||||
|
||||
// $ANTLR start "T__39"
|
||||
public final void mT__39() throws RecognitionException {
|
||||
try {
|
||||
int _type = T__39;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:39:7: ( '.' )
|
||||
// InternalPartialSerializationTestLanguage.g:39:9: '.'
|
||||
{
|
||||
match('.');
|
||||
|
||||
}
|
||||
|
||||
state.type = _type;
|
||||
state.channel = _channel;
|
||||
}
|
||||
finally {
|
||||
}
|
||||
}
|
||||
// $ANTLR end "T__39"
|
||||
|
||||
// $ANTLR start "RULE_ID"
|
||||
public final void mRULE_ID() throws RecognitionException {
|
||||
try {
|
||||
int _type = RULE_ID;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1217:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
|
||||
// InternalPartialSerializationTestLanguage.g:1217:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
// InternalPartialSerializationTestLanguage.g:1303:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
|
||||
// InternalPartialSerializationTestLanguage.g:1303:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:1217:11: ( '^' )?
|
||||
// InternalPartialSerializationTestLanguage.g:1303:11: ( '^' )?
|
||||
int alt1=2;
|
||||
int LA1_0 = input.LA(1);
|
||||
|
||||
|
@ -662,7 +684,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt1) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1217:11: '^'
|
||||
// InternalPartialSerializationTestLanguage.g:1303:11: '^'
|
||||
{
|
||||
match('^');
|
||||
|
||||
|
@ -680,7 +702,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
recover(mse);
|
||||
throw mse;}
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:1217:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
// InternalPartialSerializationTestLanguage.g:1303:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
|
||||
loop2:
|
||||
do {
|
||||
int alt2=2;
|
||||
|
@ -729,10 +751,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_INT;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1219:10: ( ( '0' .. '9' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:1219:12: ( '0' .. '9' )+
|
||||
// InternalPartialSerializationTestLanguage.g:1305:10: ( ( '0' .. '9' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:1305:12: ( '0' .. '9' )+
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:1219:12: ( '0' .. '9' )+
|
||||
// InternalPartialSerializationTestLanguage.g:1305:12: ( '0' .. '9' )+
|
||||
int cnt3=0;
|
||||
loop3:
|
||||
do {
|
||||
|
@ -746,7 +768,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt3) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1219:13: '0' .. '9'
|
||||
// InternalPartialSerializationTestLanguage.g:1305:13: '0' .. '9'
|
||||
{
|
||||
matchRange('0','9');
|
||||
|
||||
|
@ -778,10 +800,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_STRING;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1221:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:1221:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
// InternalPartialSerializationTestLanguage.g:1307:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:1307:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:1221:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
// InternalPartialSerializationTestLanguage.g:1307:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
|
||||
int alt6=2;
|
||||
int LA6_0 = input.LA(1);
|
||||
|
||||
|
@ -799,10 +821,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt6) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1221:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
|
||||
// InternalPartialSerializationTestLanguage.g:1307:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
|
||||
{
|
||||
match('\"');
|
||||
// InternalPartialSerializationTestLanguage.g:1221:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
|
||||
// InternalPartialSerializationTestLanguage.g:1307:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
|
||||
loop4:
|
||||
do {
|
||||
int alt4=3;
|
||||
|
@ -818,7 +840,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt4) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1221:21: '\\\\' .
|
||||
// InternalPartialSerializationTestLanguage.g:1307:21: '\\\\' .
|
||||
{
|
||||
match('\\');
|
||||
matchAny();
|
||||
|
@ -826,7 +848,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 2 :
|
||||
// InternalPartialSerializationTestLanguage.g:1221:28: ~ ( ( '\\\\' | '\"' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:1307:28: ~ ( ( '\\\\' | '\"' ) )
|
||||
{
|
||||
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
|
||||
input.consume();
|
||||
|
@ -851,10 +873,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 2 :
|
||||
// InternalPartialSerializationTestLanguage.g:1221:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
|
||||
// InternalPartialSerializationTestLanguage.g:1307:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
|
||||
{
|
||||
match('\'');
|
||||
// InternalPartialSerializationTestLanguage.g:1221:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
|
||||
// InternalPartialSerializationTestLanguage.g:1307:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
|
||||
loop5:
|
||||
do {
|
||||
int alt5=3;
|
||||
|
@ -870,7 +892,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt5) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1221:54: '\\\\' .
|
||||
// InternalPartialSerializationTestLanguage.g:1307:54: '\\\\' .
|
||||
{
|
||||
match('\\');
|
||||
matchAny();
|
||||
|
@ -878,7 +900,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 2 :
|
||||
// InternalPartialSerializationTestLanguage.g:1221:61: ~ ( ( '\\\\' | '\\'' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:1307:61: ~ ( ( '\\\\' | '\\'' ) )
|
||||
{
|
||||
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
|
||||
input.consume();
|
||||
|
@ -921,12 +943,12 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_ML_COMMENT;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1223:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
|
||||
// InternalPartialSerializationTestLanguage.g:1223:19: '/*' ( options {greedy=false; } : . )* '*/'
|
||||
// InternalPartialSerializationTestLanguage.g:1309:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
|
||||
// InternalPartialSerializationTestLanguage.g:1309:19: '/*' ( options {greedy=false; } : . )* '*/'
|
||||
{
|
||||
match("/*");
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:1223:24: ( options {greedy=false; } : . )*
|
||||
// InternalPartialSerializationTestLanguage.g:1309:24: ( options {greedy=false; } : . )*
|
||||
loop7:
|
||||
do {
|
||||
int alt7=2;
|
||||
|
@ -951,7 +973,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt7) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1223:52: .
|
||||
// InternalPartialSerializationTestLanguage.g:1309:52: .
|
||||
{
|
||||
matchAny();
|
||||
|
||||
|
@ -981,12 +1003,12 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_SL_COMMENT;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1225:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
|
||||
// InternalPartialSerializationTestLanguage.g:1225:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
|
||||
// InternalPartialSerializationTestLanguage.g:1311:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
|
||||
// InternalPartialSerializationTestLanguage.g:1311:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
|
||||
{
|
||||
match("//");
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:1225:24: (~ ( ( '\\n' | '\\r' ) ) )*
|
||||
// InternalPartialSerializationTestLanguage.g:1311:24: (~ ( ( '\\n' | '\\r' ) ) )*
|
||||
loop8:
|
||||
do {
|
||||
int alt8=2;
|
||||
|
@ -999,7 +1021,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
switch (alt8) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1225:24: ~ ( ( '\\n' | '\\r' ) )
|
||||
// InternalPartialSerializationTestLanguage.g:1311:24: ~ ( ( '\\n' | '\\r' ) )
|
||||
{
|
||||
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
|
||||
input.consume();
|
||||
|
@ -1019,7 +1041,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
} while (true);
|
||||
|
||||
// InternalPartialSerializationTestLanguage.g:1225:40: ( ( '\\r' )? '\\n' )?
|
||||
// InternalPartialSerializationTestLanguage.g:1311:40: ( ( '\\r' )? '\\n' )?
|
||||
int alt10=2;
|
||||
int LA10_0 = input.LA(1);
|
||||
|
||||
|
@ -1028,9 +1050,9 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt10) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1225:41: ( '\\r' )? '\\n'
|
||||
// InternalPartialSerializationTestLanguage.g:1311:41: ( '\\r' )? '\\n'
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:1225:41: ( '\\r' )?
|
||||
// InternalPartialSerializationTestLanguage.g:1311:41: ( '\\r' )?
|
||||
int alt9=2;
|
||||
int LA9_0 = input.LA(1);
|
||||
|
||||
|
@ -1039,7 +1061,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
switch (alt9) {
|
||||
case 1 :
|
||||
// InternalPartialSerializationTestLanguage.g:1225:41: '\\r'
|
||||
// InternalPartialSerializationTestLanguage.g:1311:41: '\\r'
|
||||
{
|
||||
match('\r');
|
||||
|
||||
|
@ -1071,10 +1093,10 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_WS;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1227:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:1227:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
// InternalPartialSerializationTestLanguage.g:1313:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
|
||||
// InternalPartialSerializationTestLanguage.g:1313:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
{
|
||||
// InternalPartialSerializationTestLanguage.g:1227:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
// InternalPartialSerializationTestLanguage.g:1313:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
|
||||
int cnt11=0;
|
||||
loop11:
|
||||
do {
|
||||
|
@ -1128,8 +1150,8 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
try {
|
||||
int _type = RULE_ANY_OTHER;
|
||||
int _channel = DEFAULT_TOKEN_CHANNEL;
|
||||
// InternalPartialSerializationTestLanguage.g:1229:16: ( . )
|
||||
// InternalPartialSerializationTestLanguage.g:1229:18: .
|
||||
// InternalPartialSerializationTestLanguage.g:1315:16: ( . )
|
||||
// InternalPartialSerializationTestLanguage.g:1315:18: .
|
||||
{
|
||||
matchAny();
|
||||
|
||||
|
@ -1144,8 +1166,8 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
// $ANTLR end "RULE_ANY_OTHER"
|
||||
|
||||
public void mTokens() throws RecognitionException {
|
||||
// InternalPartialSerializationTestLanguage.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
|
||||
int alt12=35;
|
||||
// InternalPartialSerializationTestLanguage.g:1:8: ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER )
|
||||
int alt12=36;
|
||||
alt12 = dfa12.predict(input);
|
||||
switch (alt12) {
|
||||
case 1 :
|
||||
|
@ -1345,49 +1367,56 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
}
|
||||
break;
|
||||
case 29 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:178: RULE_ID
|
||||
// InternalPartialSerializationTestLanguage.g:1:178: T__39
|
||||
{
|
||||
mT__39();
|
||||
|
||||
}
|
||||
break;
|
||||
case 30 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:184: RULE_ID
|
||||
{
|
||||
mRULE_ID();
|
||||
|
||||
}
|
||||
break;
|
||||
case 30 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:186: RULE_INT
|
||||
case 31 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:192: RULE_INT
|
||||
{
|
||||
mRULE_INT();
|
||||
|
||||
}
|
||||
break;
|
||||
case 31 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:195: RULE_STRING
|
||||
case 32 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:201: RULE_STRING
|
||||
{
|
||||
mRULE_STRING();
|
||||
|
||||
}
|
||||
break;
|
||||
case 32 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:207: RULE_ML_COMMENT
|
||||
case 33 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:213: RULE_ML_COMMENT
|
||||
{
|
||||
mRULE_ML_COMMENT();
|
||||
|
||||
}
|
||||
break;
|
||||
case 33 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:223: RULE_SL_COMMENT
|
||||
case 34 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:229: RULE_SL_COMMENT
|
||||
{
|
||||
mRULE_SL_COMMENT();
|
||||
|
||||
}
|
||||
break;
|
||||
case 34 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:239: RULE_WS
|
||||
case 35 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:245: RULE_WS
|
||||
{
|
||||
mRULE_WS();
|
||||
|
||||
}
|
||||
break;
|
||||
case 35 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:247: RULE_ANY_OTHER
|
||||
case 36 :
|
||||
// InternalPartialSerializationTestLanguage.g:1:253: RULE_ANY_OTHER
|
||||
{
|
||||
mRULE_ANY_OTHER();
|
||||
|
||||
|
@ -1401,17 +1430,17 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
protected DFA12 dfa12 = new DFA12(this);
|
||||
static final String DFA12_eotS =
|
||||
"\1\uffff\1\24\1\33\1\uffff\1\33\1\uffff\1\33\1\uffff\3\33\2\uffff\1\24\2\uffff\3\24\2\uffff\1\57\1\65\3\uffff\1\33\2\uffff\1\33\1\uffff\1\33\1\uffff\3\33\22\uffff\1\75\1\76\4\33\1\104\2\uffff\2\33\1\107\1\33\1\111\1\uffff\1\113\1\33\1\uffff\1\33\1\uffff\1\33\1\uffff\1\117\1\120\1\33\2\uffff\1\33\1\123\1\uffff";
|
||||
"\1\uffff\1\24\1\33\1\uffff\1\33\1\uffff\1\33\1\uffff\3\33\2\uffff\1\24\2\uffff\3\24\2\uffff\1\57\1\65\1\67\2\uffff\1\33\2\uffff\1\33\1\uffff\1\33\1\uffff\3\33\24\uffff\1\77\1\100\4\33\1\106\2\uffff\2\33\1\111\1\33\1\113\1\uffff\1\115\1\33\1\uffff\1\33\1\uffff\1\33\1\uffff\1\121\1\122\1\33\2\uffff\1\33\1\125\1\uffff";
|
||||
static final String DFA12_eofS =
|
||||
"\124\uffff";
|
||||
"\126\uffff";
|
||||
static final String DFA12_minS =
|
||||
"\1\0\1\61\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\2\uffff\1\101\2\uffff\2\0\1\52\2\uffff\2\60\3\uffff\1\61\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\22\uffff\2\60\1\154\1\145\1\163\1\157\1\60\2\uffff\1\144\1\143\1\60\1\162\1\60\1\uffff\1\60\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\60\1\156\2\uffff\1\61\1\60\1\uffff";
|
||||
"\1\0\1\61\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\2\uffff\1\101\2\uffff\2\0\1\52\2\uffff\3\60\2\uffff\1\61\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\24\uffff\2\60\1\154\1\145\1\163\1\157\1\60\2\uffff\1\144\1\143\1\60\1\162\1\60\1\uffff\1\60\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\60\1\156\2\uffff\1\61\1\60\1\uffff";
|
||||
static final String DFA12_maxS =
|
||||
"\1\uffff\1\65\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\2\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\63\1\64\3\uffff\1\62\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\22\uffff\2\172\1\154\1\145\1\163\1\157\1\172\2\uffff\1\144\1\143\1\172\1\162\1\172\1\uffff\1\172\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\172\1\156\2\uffff\1\61\1\172\1\uffff";
|
||||
"\1\uffff\1\65\1\167\1\uffff\1\150\1\uffff\1\151\1\uffff\1\165\1\155\1\145\2\uffff\1\172\2\uffff\2\uffff\1\57\2\uffff\1\63\1\64\1\60\2\uffff\1\62\2\uffff\1\151\1\uffff\1\162\1\uffff\1\142\1\160\1\146\24\uffff\2\172\1\154\1\145\1\163\1\157\1\172\2\uffff\1\144\1\143\1\172\1\162\1\172\1\uffff\1\172\1\164\1\uffff\1\164\1\uffff\1\145\1\uffff\2\172\1\156\2\uffff\1\61\1\172\1\uffff";
|
||||
static final String DFA12_acceptS =
|
||||
"\3\uffff\1\21\1\uffff\1\23\1\uffff\1\25\3\uffff\1\33\1\34\1\uffff\1\35\1\36\3\uffff\1\42\1\43\2\uffff\1\3\1\4\1\5\1\uffff\1\35\1\21\1\uffff\1\23\1\uffff\1\25\3\uffff\1\33\1\34\1\36\1\37\1\40\1\41\1\42\1\6\1\7\1\10\1\11\1\1\1\12\1\13\1\14\1\15\1\16\1\2\7\uffff\1\17\1\20\5\uffff\1\32\2\uffff\1\27\1\uffff\1\31\1\uffff\1\26\3\uffff\1\24\1\30\2\uffff\1\22";
|
||||
"\3\uffff\1\22\1\uffff\1\24\1\uffff\1\26\3\uffff\1\34\1\35\1\uffff\1\36\1\37\3\uffff\1\43\1\44\3\uffff\1\4\1\5\1\uffff\1\36\1\22\1\uffff\1\24\1\uffff\1\26\3\uffff\1\34\1\35\1\37\1\40\1\41\1\42\1\43\1\6\1\7\1\10\1\11\1\1\1\12\1\13\1\14\1\15\1\16\1\2\1\17\1\3\7\uffff\1\20\1\21\5\uffff\1\33\2\uffff\1\30\1\uffff\1\32\1\uffff\1\27\3\uffff\1\25\1\31\2\uffff\1\23";
|
||||
static final String DFA12_specialS =
|
||||
"\1\2\17\uffff\1\0\1\1\102\uffff}>";
|
||||
"\1\1\17\uffff\1\0\1\2\104\uffff}>";
|
||||
static final String[] DFA12_transitionS = {
|
||||
"\11\24\2\23\2\24\1\23\22\24\1\23\1\24\1\20\1\1\3\24\1\21\6\24\1\14\1\22\12\17\1\7\1\13\5\24\32\16\3\24\1\15\1\16\1\24\2\16\1\4\1\6\4\16\1\11\1\16\1\2\6\16\1\12\1\10\7\16\1\3\1\24\1\5\uff82\24",
|
||||
"\1\25\1\26\1\27\1\30\1\31",
|
||||
|
@ -1436,19 +1465,21 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
"",
|
||||
"\1\53\1\54\1\55\1\56",
|
||||
"\1\60\1\61\1\62\1\63\1\64",
|
||||
"\1\66",
|
||||
"",
|
||||
"",
|
||||
"\1\70\1\71",
|
||||
"",
|
||||
"\1\66\1\67",
|
||||
"",
|
||||
"",
|
||||
"\1\70",
|
||||
"",
|
||||
"\1\71",
|
||||
"",
|
||||
"\1\72",
|
||||
"",
|
||||
"\1\73",
|
||||
"",
|
||||
"\1\74",
|
||||
"\1\75",
|
||||
"\1\76",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
|
@ -1469,32 +1500,32 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
"",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"\1\77",
|
||||
"\1\100",
|
||||
"\1\101",
|
||||
"\1\102",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\22\33\1\103\7\33",
|
||||
"\1\103",
|
||||
"\1\104",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\22\33\1\105\7\33",
|
||||
"",
|
||||
"",
|
||||
"\1\105",
|
||||
"\1\106",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"\1\107",
|
||||
"\1\110",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"\1\112",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\21\33\1\112\10\33",
|
||||
"\1\114",
|
||||
"",
|
||||
"\1\115",
|
||||
"",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\21\33\1\114\10\33",
|
||||
"\1\116",
|
||||
"",
|
||||
"\1\117",
|
||||
"",
|
||||
"\1\120",
|
||||
"",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
"\1\121",
|
||||
"\1\123",
|
||||
"",
|
||||
"",
|
||||
"\1\122",
|
||||
"\1\124",
|
||||
"\12\33\7\uffff\32\33\4\uffff\1\33\1\uffff\32\33",
|
||||
""
|
||||
};
|
||||
|
@ -1529,7 +1560,7 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
this.transition = DFA12_transition;
|
||||
}
|
||||
public String getDescription() {
|
||||
return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
|
||||
return "1:1: Tokens : ( T__11 | T__12 | T__13 | T__14 | T__15 | T__16 | T__17 | T__18 | T__19 | T__20 | T__21 | T__22 | T__23 | T__24 | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | RULE_ID | RULE_INT | RULE_STRING | RULE_ML_COMMENT | RULE_SL_COMMENT | RULE_WS | RULE_ANY_OTHER );";
|
||||
}
|
||||
public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
|
||||
IntStream input = _input;
|
||||
|
@ -1546,16 +1577,6 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
if ( s>=0 ) return s;
|
||||
break;
|
||||
case 1 :
|
||||
int LA12_17 = input.LA(1);
|
||||
|
||||
s = -1;
|
||||
if ( ((LA12_17>='\u0000' && LA12_17<='\uFFFF')) ) {s = 39;}
|
||||
|
||||
else s = 20;
|
||||
|
||||
if ( s>=0 ) return s;
|
||||
break;
|
||||
case 2 :
|
||||
int LA12_0 = input.LA(1);
|
||||
|
||||
s = -1;
|
||||
|
@ -1599,6 +1620,16 @@ public class InternalPartialSerializationTestLanguageLexer extends Lexer {
|
|||
|
||||
else if ( ((LA12_0>='\u0000' && LA12_0<='\b')||(LA12_0>='\u000B' && LA12_0<='\f')||(LA12_0>='\u000E' && LA12_0<='\u001F')||LA12_0=='!'||(LA12_0>='$' && LA12_0<='&')||(LA12_0>='(' && LA12_0<='-')||(LA12_0>='<' && LA12_0<='@')||(LA12_0>='[' && LA12_0<=']')||LA12_0=='`'||LA12_0=='|'||(LA12_0>='~' && LA12_0<='\uFFFF')) ) {s = 20;}
|
||||
|
||||
if ( s>=0 ) return s;
|
||||
break;
|
||||
case 2 :
|
||||
int LA12_17 = input.LA(1);
|
||||
|
||||
s = -1;
|
||||
if ( ((LA12_17>='\u0000' && LA12_17<='\uFFFF')) ) {s = 39;}
|
||||
|
||||
else s = 20;
|
||||
|
||||
if ( s>=0 ) return s;
|
||||
break;
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -180,6 +180,15 @@ public interface PartialSerializationTestLanguageFactory extends EFactory
|
|||
*/
|
||||
EClassRef createEClassRef();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>With Transient Container</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>With Transient Container</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WithTransientContainer createWithTransientContainer();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Many Values</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -699,6 +699,43 @@ public interface PartialSerializationTestLanguagePackage extends EPackage
|
|||
*/
|
||||
int ECLASS_REF_FEATURE_COUNT = MODEL_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.WithTransientContainerImpl <em>With Transient Container</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.WithTransientContainerImpl
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.PartialSerializationTestLanguagePackageImpl#getWithTransientContainer()
|
||||
* @generated
|
||||
*/
|
||||
int WITH_TRANSIENT_CONTAINER = 17;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Clazz</b></em>' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WITH_TRANSIENT_CONTAINER__CLAZZ = MODEL__CLAZZ;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Child</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WITH_TRANSIENT_CONTAINER__CHILD = MODEL_FEATURE_COUNT + 0;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>With Transient Container</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WITH_TRANSIENT_CONTAINER_FEATURE_COUNT = MODEL_FEATURE_COUNT + 1;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.ManyValuesImpl <em>Many Values</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -707,7 +744,7 @@ public interface PartialSerializationTestLanguagePackage extends EPackage
|
|||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.PartialSerializationTestLanguagePackageImpl#getManyValues()
|
||||
* @generated
|
||||
*/
|
||||
int MANY_VALUES = 17;
|
||||
int MANY_VALUES = 18;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Clazz</b></em>' containment reference list.
|
||||
|
@ -1149,6 +1186,27 @@ public interface PartialSerializationTestLanguagePackage extends EPackage
|
|||
*/
|
||||
EReference getEClassRef_Ref();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer <em>With Transient Container</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>With Transient Container</em>'.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer
|
||||
* @generated
|
||||
*/
|
||||
EClass getWithTransientContainer();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the containment reference '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer#getChild <em>Child</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the containment reference '<em>Child</em>'.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer#getChild()
|
||||
* @see #getWithTransientContainer()
|
||||
* @generated
|
||||
*/
|
||||
EReference getWithTransientContainer_Child();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.ManyValues <em>Many Values</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -1539,6 +1597,24 @@ public interface PartialSerializationTestLanguagePackage extends EPackage
|
|||
*/
|
||||
EReference ECLASS_REF__REF = eINSTANCE.getEClassRef_Ref();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.WithTransientContainerImpl <em>With Transient Container</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.WithTransientContainerImpl
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.PartialSerializationTestLanguagePackageImpl#getWithTransientContainer()
|
||||
* @generated
|
||||
*/
|
||||
EClass WITH_TRANSIENT_CONTAINER = eINSTANCE.getWithTransientContainer();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Child</b></em>' containment reference feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference WITH_TRANSIENT_CONTAINER__CHILD = eINSTANCE.getWithTransientContainer_Child();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.ManyValuesImpl <em>Many Values</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
/**
|
||||
* Copyright (c) 2016, 2017 TypeFox GmbH (http://www.typefox.io) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>With Transient Container</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer#getChild <em>Child</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.PartialSerializationTestLanguagePackage#getWithTransientContainer()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WithTransientContainer extends Model
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Child</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Child</em>' containment reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Child</em>' containment reference.
|
||||
* @see #setChild(WithTransient)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.PartialSerializationTestLanguagePackage#getWithTransientContainer_Child()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
WithTransient getChild();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer#getChild <em>Child</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Child</em>' containment reference.
|
||||
* @see #getChild()
|
||||
* @generated
|
||||
*/
|
||||
void setChild(WithTransient value);
|
||||
|
||||
} // WithTransientContainer
|
|
@ -86,6 +86,7 @@ public class PartialSerializationTestLanguageFactoryImpl extends EFactoryImpl im
|
|||
case PartialSerializationTestLanguagePackage.IMPORT: return createImport();
|
||||
case PartialSerializationTestLanguagePackage.NODE: return createNode();
|
||||
case PartialSerializationTestLanguagePackage.ECLASS_REF: return createEClassRef();
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER: return createWithTransientContainer();
|
||||
case PartialSerializationTestLanguagePackage.MANY_VALUES: return createManyValues();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
|
@ -279,6 +280,17 @@ public class PartialSerializationTestLanguageFactoryImpl extends EFactoryImpl im
|
|||
return eClassRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithTransientContainer createWithTransientContainer()
|
||||
{
|
||||
WithTransientContainerImpl withTransientContainer = new WithTransientContainerImpl();
|
||||
return withTransientContainer;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
|
|
@ -35,6 +35,9 @@ import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage
|
|||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.SubChild;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.TwoChildLists;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.TwoChilds;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
|
@ -163,6 +166,13 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
*/
|
||||
private EClass eClassRefEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass withTransientContainerEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -220,6 +230,7 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
|
||||
// Initialize simple dependencies
|
||||
EcorePackage.eINSTANCE.eClass();
|
||||
WithtransientPackage.eINSTANCE.eClass();
|
||||
|
||||
// Create package meta-data objects
|
||||
thePartialSerializationTestLanguagePackage.createPackageContents();
|
||||
|
@ -626,6 +637,26 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
return (EReference)eClassRefEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getWithTransientContainer()
|
||||
{
|
||||
return withTransientContainerEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getWithTransientContainer_Child()
|
||||
{
|
||||
return (EReference)withTransientContainerEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
|
@ -732,6 +763,9 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
eClassRefEClass = createEClass(ECLASS_REF);
|
||||
createEReference(eClassRefEClass, ECLASS_REF__REF);
|
||||
|
||||
withTransientContainerEClass = createEClass(WITH_TRANSIENT_CONTAINER);
|
||||
createEReference(withTransientContainerEClass, WITH_TRANSIENT_CONTAINER__CHILD);
|
||||
|
||||
manyValuesEClass = createEClass(MANY_VALUES);
|
||||
createEAttribute(manyValuesEClass, MANY_VALUES__NAME);
|
||||
}
|
||||
|
@ -762,6 +796,7 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
|
||||
// Obtain other dependent packages
|
||||
EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
|
||||
WithtransientPackage theWithtransientPackage = (WithtransientPackage)EPackage.Registry.INSTANCE.getEPackage(WithtransientPackage.eNS_URI);
|
||||
|
||||
// Create type parameters
|
||||
|
||||
|
@ -781,6 +816,7 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
optionalChildListEClass.getESuperTypes().add(this.getModel());
|
||||
nodeEClass.getESuperTypes().add(this.getModel());
|
||||
eClassRefEClass.getESuperTypes().add(this.getModel());
|
||||
withTransientContainerEClass.getESuperTypes().add(this.getModel());
|
||||
manyValuesEClass.getESuperTypes().add(this.getManyOptionalValues());
|
||||
|
||||
// Initialize classes and features; add operations and parameters
|
||||
|
@ -840,6 +876,9 @@ public class PartialSerializationTestLanguagePackageImpl extends EPackageImpl im
|
|||
initEClass(eClassRefEClass, EClassRef.class, "EClassRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getEClassRef_Ref(), theEcorePackage.getEClass(), null, "ref", null, 0, 1, EClassRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(withTransientContainerEClass, WithTransientContainer.class, "WithTransientContainer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getWithTransientContainer_Child(), theWithtransientPackage.getWithTransient(), null, "child", null, 0, 1, WithTransientContainer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(manyValuesEClass, ManyValues.class, "ManyValues", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getManyValues_Name(), theEcorePackage.getEString(), "name", null, 0, -1, ManyValues.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
|
|
|
@ -0,0 +1,199 @@
|
|||
/**
|
||||
* Copyright (c) 2016, 2017 TypeFox GmbH (http://www.typefox.io) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.PartialSerializationTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>With Transient Container</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.impl.WithTransientContainerImpl#getChild <em>Child</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WithTransientContainerImpl extends ModelImpl implements WithTransientContainer
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getChild() <em>Child</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getChild()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected WithTransient child;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WithTransientContainerImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return PartialSerializationTestLanguagePackage.Literals.WITH_TRANSIENT_CONTAINER;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithTransient getChild()
|
||||
{
|
||||
return child;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain basicSetChild(WithTransient newChild, NotificationChain msgs)
|
||||
{
|
||||
WithTransient oldChild = child;
|
||||
child = newChild;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD, oldChild, newChild);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setChild(WithTransient newChild)
|
||||
{
|
||||
if (newChild != child)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (child != null)
|
||||
msgs = ((InternalEObject)child).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD, null, msgs);
|
||||
if (newChild != null)
|
||||
msgs = ((InternalEObject)newChild).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD, null, msgs);
|
||||
msgs = basicSetChild(newChild, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD, newChild, newChild));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD:
|
||||
return basicSetChild(null, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD:
|
||||
return getChild();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD:
|
||||
setChild((WithTransient)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD:
|
||||
setChild((WithTransient)null);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER__CHILD:
|
||||
return child != null;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //WithTransientContainerImpl
|
|
@ -165,6 +165,11 @@ public class PartialSerializationTestLanguageAdapterFactory extends AdapterFacto
|
|||
return createEClassRefAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseWithTransientContainer(WithTransientContainer object)
|
||||
{
|
||||
return createWithTransientContainerAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseManyValues(ManyValues object)
|
||||
{
|
||||
return createManyValuesAdapter();
|
||||
|
@ -446,6 +451,21 @@ public class PartialSerializationTestLanguageAdapterFactory extends AdapterFacto
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer <em>With Transient Container</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWithTransientContainerAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.ManyValues <em>Many Values</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -209,6 +209,14 @@ public class PartialSerializationTestLanguageSwitch<T> extends Switch<T>
|
|||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER:
|
||||
{
|
||||
WithTransientContainer withTransientContainer = (WithTransientContainer)theEObject;
|
||||
T result = caseWithTransientContainer(withTransientContainer);
|
||||
if (result == null) result = caseModel(withTransientContainer);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case PartialSerializationTestLanguagePackage.MANY_VALUES:
|
||||
{
|
||||
ManyValues manyValues = (ManyValues)theEObject;
|
||||
|
@ -494,6 +502,22 @@ public class PartialSerializationTestLanguageSwitch<T> extends Switch<T>
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>With Transient Container</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>With Transient Container</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWithTransientContainer(WithTransientContainer object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Many Values</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
|
|
|
@ -34,7 +34,10 @@ import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage
|
|||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.SubChild;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.TwoChildLists;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.TwoChilds;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.PartialSerializationTestLanguageGrammarAccess;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage;
|
||||
import org.eclipse.xtext.serializer.ISerializationContext;
|
||||
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
|
||||
import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
|
||||
|
@ -111,6 +114,15 @@ public class PartialSerializationTestLanguageSemanticSequencer extends AbstractD
|
|||
case PartialSerializationTestLanguagePackage.TWO_CHILDS:
|
||||
sequence_TwoChilds(context, (TwoChilds) semanticObject);
|
||||
return;
|
||||
case PartialSerializationTestLanguagePackage.WITH_TRANSIENT_CONTAINER:
|
||||
sequence_WithTransientContainer(context, (WithTransientContainer) semanticObject);
|
||||
return;
|
||||
}
|
||||
else if (epackage == WithtransientPackage.eINSTANCE)
|
||||
switch (semanticObject.eClass().getClassifierID()) {
|
||||
case WithtransientPackage.WITH_TRANSIENT:
|
||||
sequence_WithTransient(context, (WithTransient) semanticObject);
|
||||
return;
|
||||
}
|
||||
if (errorAcceptor != null)
|
||||
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
|
||||
|
@ -381,4 +393,41 @@ public class PartialSerializationTestLanguageSemanticSequencer extends AbstractD
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Model returns WithTransientContainer
|
||||
* WithTransientContainer returns WithTransientContainer
|
||||
*
|
||||
* Constraint:
|
||||
* child=WithTransient
|
||||
*/
|
||||
protected void sequence_WithTransientContainer(ISerializationContext context, WithTransientContainer semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, PartialSerializationTestLanguagePackage.Literals.WITH_TRANSIENT_CONTAINER__CHILD) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, PartialSerializationTestLanguagePackage.Literals.WITH_TRANSIENT_CONTAINER__CHILD));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getWithTransientContainerAccess().getChildWithTransientParserRuleCall_0(), semanticObject.getChild());
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* WithTransient returns WithTransient
|
||||
*
|
||||
* Constraint:
|
||||
* name=ID
|
||||
*/
|
||||
protected void sequence_WithTransient(ISerializationContext context, WithTransient semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, WithtransientPackage.Literals.WITH_TRANSIENT__NAME) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, WithtransientPackage.Literals.WITH_TRANSIENT__NAME));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getWithTransientAccess().getNameIDTerminalRuleCall_0(), semanticObject.getName());
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -74,6 +74,9 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
private final Group cGroup_13 = (Group)cAlternatives.eContents().get(13);
|
||||
private final Keyword cNumberSignDigitTwoDigitFourKeyword_13_0 = (Keyword)cGroup_13.eContents().get(0);
|
||||
private final RuleCall cTwoChildsParserRuleCall_13_1 = (RuleCall)cGroup_13.eContents().get(1);
|
||||
private final Group cGroup_14 = (Group)cAlternatives.eContents().get(14);
|
||||
private final Keyword cNumberSignDigitThreeDigitZeroKeyword_14_0 = (Keyword)cGroup_14.eContents().get(0);
|
||||
private final RuleCall cWithTransientContainerParserRuleCall_14_1 = (RuleCall)cGroup_14.eContents().get(1);
|
||||
|
||||
//Model:
|
||||
// "#1" Node |
|
||||
|
@ -90,12 +93,14 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
// "#21" EClassRef |
|
||||
// "#22" TwoChildLists |
|
||||
// "#23" ChildWithSubChilds |
|
||||
// "#24" TwoChilds;
|
||||
// "#24" TwoChilds |
|
||||
// "#30" WithTransientContainer;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//"#1" Node | "#2" MandatoryValue | "#3" OptionalValue | "#4" MandatoryChild | "#5" OptionalChild | "#10"
|
||||
//ManyOptionalValues | "#11" ManyMandatoryValues | "#12" MandatoryChildList | "#13" OptionalChildList | // "#14" Imports |
|
||||
//"#20" clazz+=EClassDecl+ | "#21" EClassRef | "#22" TwoChildLists | "#23" ChildWithSubChilds | "#24" TwoChilds
|
||||
//"#20" clazz+=EClassDecl+ | "#21" EClassRef | "#22" TwoChildLists | "#23" ChildWithSubChilds | "#24" TwoChilds | "#30"
|
||||
//WithTransientContainer
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//"#1" Node
|
||||
|
@ -228,6 +233,15 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
|
||||
//TwoChilds
|
||||
public RuleCall getTwoChildsParserRuleCall_13_1() { return cTwoChildsParserRuleCall_13_1; }
|
||||
|
||||
//"#30" WithTransientContainer
|
||||
public Group getGroup_14() { return cGroup_14; }
|
||||
|
||||
//"#30"
|
||||
public Keyword getNumberSignDigitThreeDigitZeroKeyword_14_0() { return cNumberSignDigitThreeDigitZeroKeyword_14_0; }
|
||||
|
||||
//WithTransientContainer
|
||||
public RuleCall getWithTransientContainerParserRuleCall_14_1() { return cWithTransientContainerParserRuleCall_14_1; }
|
||||
}
|
||||
public class MandatoryValueElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguage.MandatoryValue");
|
||||
|
@ -646,7 +660,7 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
//QualifiedName
|
||||
public RuleCall getRefsNodeQualifiedNameParserRuleCall_3_1_0_1() { return cRefsNodeQualifiedNameParserRuleCall_3_1_0_1; }
|
||||
|
||||
//"{" children+=Node* ("ref" ref=[Node|QualifiedName])? "}" | ";"
|
||||
//("{" children+=Node* ("ref" ref=[Node|QualifiedName])? "}" | ";")
|
||||
public Alternatives getAlternatives_4() { return cAlternatives_4; }
|
||||
|
||||
//"{" children+=Node* ("ref" ref=[Node|QualifiedName])? "}"
|
||||
|
@ -743,6 +757,36 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
//QualifiedName
|
||||
public RuleCall getRefEClassQualifiedNameParserRuleCall_0_1() { return cRefEClassQualifiedNameParserRuleCall_0_1; }
|
||||
}
|
||||
public class WithTransientContainerElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguage.WithTransientContainer");
|
||||
private final Assignment cChildAssignment = (Assignment)rule.eContents().get(1);
|
||||
private final RuleCall cChildWithTransientParserRuleCall_0 = (RuleCall)cChildAssignment.eContents().get(0);
|
||||
|
||||
//WithTransientContainer:
|
||||
// child=WithTransient;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//child=WithTransient
|
||||
public Assignment getChildAssignment() { return cChildAssignment; }
|
||||
|
||||
//WithTransient
|
||||
public RuleCall getChildWithTransientParserRuleCall_0() { return cChildWithTransientParserRuleCall_0; }
|
||||
}
|
||||
public class WithTransientElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguage.WithTransient");
|
||||
private final Assignment cNameAssignment = (Assignment)rule.eContents().get(1);
|
||||
private final RuleCall cNameIDTerminalRuleCall_0 = (RuleCall)cNameAssignment.eContents().get(0);
|
||||
|
||||
//WithTransient withtransient::WithTransient:
|
||||
// name=ID;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment() { return cNameAssignment; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_0() { return cNameIDTerminalRuleCall_0; }
|
||||
}
|
||||
|
||||
|
||||
private final ModelElements pModel;
|
||||
|
@ -764,6 +808,8 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
private final QualifiedNameElements pQualifiedName;
|
||||
private final EClassDeclElements pEClassDecl;
|
||||
private final EClassRefElements pEClassRef;
|
||||
private final WithTransientContainerElements pWithTransientContainer;
|
||||
private final WithTransientElements pWithTransient;
|
||||
|
||||
private final Grammar grammar;
|
||||
|
||||
|
@ -793,6 +839,8 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
this.pQualifiedName = new QualifiedNameElements();
|
||||
this.pEClassDecl = new EClassDeclElements();
|
||||
this.pEClassRef = new EClassRefElements();
|
||||
this.pWithTransientContainer = new WithTransientContainerElements();
|
||||
this.pWithTransient = new WithTransientElements();
|
||||
}
|
||||
|
||||
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
|
||||
|
@ -837,7 +885,8 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
// "#21" EClassRef |
|
||||
// "#22" TwoChildLists |
|
||||
// "#23" ChildWithSubChilds |
|
||||
// "#24" TwoChilds;
|
||||
// "#24" TwoChilds |
|
||||
// "#30" WithTransientContainer;
|
||||
public ModelElements getModelAccess() {
|
||||
return pModel;
|
||||
}
|
||||
|
@ -1037,6 +1086,26 @@ public class PartialSerializationTestLanguageGrammarAccess extends AbstractGramm
|
|||
return getEClassRefAccess().getRule();
|
||||
}
|
||||
|
||||
//WithTransientContainer:
|
||||
// child=WithTransient;
|
||||
public WithTransientContainerElements getWithTransientContainerAccess() {
|
||||
return pWithTransientContainer;
|
||||
}
|
||||
|
||||
public ParserRule getWithTransientContainerRule() {
|
||||
return getWithTransientContainerAccess().getRule();
|
||||
}
|
||||
|
||||
//WithTransient withtransient::WithTransient:
|
||||
// name=ID;
|
||||
public WithTransientElements getWithTransientAccess() {
|
||||
return pWithTransient;
|
||||
}
|
||||
|
||||
public ParserRule getWithTransientRule() {
|
||||
return getWithTransientAccess().getRule();
|
||||
}
|
||||
|
||||
//terminal ID:
|
||||
// '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
|
||||
public TerminalRule getIDRule() {
|
||||
|
|
|
@ -228,7 +228,7 @@ public class TestLanguageGrammarAccess extends AbstractGrammarElementFinder {
|
|||
//(TypeReference | PrimitiveType) (arrayDiemensions+='[' ']')*
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//TypeReference | PrimitiveType
|
||||
//(TypeReference | PrimitiveType)
|
||||
public Alternatives getAlternatives_0() { return cAlternatives_0; }
|
||||
|
||||
//TypeReference
|
||||
|
|
|
@ -19,6 +19,7 @@ public abstract class AbstractPartialSerializationTestLanguageValidator extends
|
|||
List<EPackage> result = new ArrayList<EPackage>();
|
||||
result.add(org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.PartialSerializationTestLanguagePackage.eINSTANCE);
|
||||
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/emf/2002/Ecore"));
|
||||
result.add(EPackage.Registry.INSTANCE.getEPackage("http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,83 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>With Transient</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#getPackageName <em>Package Name</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage#getWithTransient()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface WithTransient 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.withtransient.WithtransientPackage#getWithTransient_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#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>Package Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Package 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>Package Name</em>' attribute.
|
||||
* @see #setPackageName(String)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage#getWithTransient_PackageName()
|
||||
* @model transient="true"
|
||||
* @generated
|
||||
*/
|
||||
String getPackageName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#getPackageName <em>Package Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Package Name</em>' attribute.
|
||||
* @see #getPackageName()
|
||||
* @generated
|
||||
*/
|
||||
void setPackageName(String value);
|
||||
|
||||
} // WithTransient
|
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient;
|
||||
|
||||
import org.eclipse.emf.ecore.EFactory;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Factory</b> for the model.
|
||||
* It provides a create method for each non-abstract class of the model.
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage
|
||||
* @generated
|
||||
*/
|
||||
public interface WithtransientFactory extends EFactory
|
||||
{
|
||||
/**
|
||||
* The singleton instance of the factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
WithtransientFactory eINSTANCE = org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithtransientFactoryImpl.init();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>With Transient</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>With Transient</em>'.
|
||||
* @generated
|
||||
*/
|
||||
WithTransient createWithTransient();
|
||||
|
||||
/**
|
||||
* Returns the package supported by this factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the package supported by this factory.
|
||||
* @generated
|
||||
*/
|
||||
WithtransientPackage getWithtransientPackage();
|
||||
|
||||
} //WithtransientFactory
|
|
@ -0,0 +1,184 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient;
|
||||
|
||||
import org.eclipse.emf.ecore.EAttribute;
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Package</b> for the model.
|
||||
* It contains accessors for the meta objects to represent
|
||||
* <ul>
|
||||
* <li>each class,</li>
|
||||
* <li>each feature of each class,</li>
|
||||
* <li>each enum,</li>
|
||||
* <li>and each data type</li>
|
||||
* </ul>
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientFactory
|
||||
* @model kind="package"
|
||||
* @generated
|
||||
*/
|
||||
public interface WithtransientPackage extends EPackage
|
||||
{
|
||||
/**
|
||||
* The package name.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
String eNAME = "withtransient";
|
||||
|
||||
/**
|
||||
* The package namespace URI.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
String eNS_URI = "http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient";
|
||||
|
||||
/**
|
||||
* The package namespace name.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
String eNS_PREFIX = "withtransient";
|
||||
|
||||
/**
|
||||
* The singleton instance of the package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
WithtransientPackage eINSTANCE = org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithtransientPackageImpl.init();
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithTransientImpl <em>With Transient</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithTransientImpl
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithtransientPackageImpl#getWithTransient()
|
||||
* @generated
|
||||
*/
|
||||
int WITH_TRANSIENT = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WITH_TRANSIENT__NAME = 0;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Package Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WITH_TRANSIENT__PACKAGE_NAME = 1;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>With Transient</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int WITH_TRANSIENT_FEATURE_COUNT = 2;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient <em>With Transient</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for class '<em>With Transient</em>'.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient
|
||||
* @generated
|
||||
*/
|
||||
EClass getWithTransient();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#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.withtransient.WithTransient#getName()
|
||||
* @see #getWithTransient()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWithTransient_Name();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the attribute '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#getPackageName <em>Package Name</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the attribute '<em>Package Name</em>'.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient#getPackageName()
|
||||
* @see #getWithTransient()
|
||||
* @generated
|
||||
*/
|
||||
EAttribute getWithTransient_PackageName();
|
||||
|
||||
/**
|
||||
* Returns the factory that creates the instances of the model.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the factory that creates the instances of the model.
|
||||
* @generated
|
||||
*/
|
||||
WithtransientFactory getWithtransientFactory();
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* Defines literals for the meta objects that represent
|
||||
* <ul>
|
||||
* <li>each class,</li>
|
||||
* <li>each feature of each class,</li>
|
||||
* <li>each enum,</li>
|
||||
* <li>and each data type</li>
|
||||
* </ul>
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
interface Literals
|
||||
{
|
||||
/**
|
||||
* The meta object literal for the '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithTransientImpl <em>With Transient</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithTransientImpl
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithtransientPackageImpl#getWithTransient()
|
||||
* @generated
|
||||
*/
|
||||
EClass WITH_TRANSIENT = eINSTANCE.getWithTransient();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WITH_TRANSIENT__NAME = eINSTANCE.getWithTransient_Name();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Package Name</b></em>' attribute feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EAttribute WITH_TRANSIENT__PACKAGE_NAME = eINSTANCE.getWithTransient_PackageName();
|
||||
|
||||
}
|
||||
|
||||
} //WithtransientPackage
|
|
@ -0,0 +1,238 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>With Transient</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithTransientImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl.WithTransientImpl#getPackageName <em>Package Name</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class WithTransientImpl extends MinimalEObjectImpl.Container implements WithTransient
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String name = NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getPackageName() <em>Package Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getPackageName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String PACKAGE_NAME_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getPackageName() <em>Package Name</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getPackageName()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String packageName = PACKAGE_NAME_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WithTransientImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return WithtransientPackage.Literals.WITH_TRANSIENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- 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, WithtransientPackage.WITH_TRANSIENT__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getPackageName()
|
||||
{
|
||||
return packageName;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setPackageName(String newPackageName)
|
||||
{
|
||||
String oldPackageName = packageName;
|
||||
packageName = newPackageName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, WithtransientPackage.WITH_TRANSIENT__PACKAGE_NAME, oldPackageName, packageName));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WithtransientPackage.WITH_TRANSIENT__NAME:
|
||||
return getName();
|
||||
case WithtransientPackage.WITH_TRANSIENT__PACKAGE_NAME:
|
||||
return getPackageName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WithtransientPackage.WITH_TRANSIENT__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
case WithtransientPackage.WITH_TRANSIENT__PACKAGE_NAME:
|
||||
setPackageName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WithtransientPackage.WITH_TRANSIENT__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
case WithtransientPackage.WITH_TRANSIENT__PACKAGE_NAME:
|
||||
setPackageName(PACKAGE_NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case WithtransientPackage.WITH_TRANSIENT__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
case WithtransientPackage.WITH_TRANSIENT__PACKAGE_NAME:
|
||||
return PACKAGE_NAME_EDEFAULT == null ? packageName != null : !PACKAGE_NAME_EDEFAULT.equals(packageName);
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (eIsProxy()) return super.toString();
|
||||
|
||||
StringBuffer result = new StringBuffer(super.toString());
|
||||
result.append(" (name: ");
|
||||
result.append(name);
|
||||
result.append(", packageName: ");
|
||||
result.append(packageName);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //WithTransientImpl
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.EFactoryImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.plugin.EcorePlugin;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Factory</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class WithtransientFactoryImpl extends EFactoryImpl implements WithtransientFactory
|
||||
{
|
||||
/**
|
||||
* Creates the default factory implementation.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public static WithtransientFactory init()
|
||||
{
|
||||
try
|
||||
{
|
||||
WithtransientFactory theWithtransientFactory = (WithtransientFactory)EPackage.Registry.INSTANCE.getEFactory(WithtransientPackage.eNS_URI);
|
||||
if (theWithtransientFactory != null)
|
||||
{
|
||||
return theWithtransientFactory;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
EcorePlugin.INSTANCE.log(exception);
|
||||
}
|
||||
return new WithtransientFactoryImpl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of the factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithtransientFactoryImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public EObject create(EClass eClass)
|
||||
{
|
||||
switch (eClass.getClassifierID())
|
||||
{
|
||||
case WithtransientPackage.WITH_TRANSIENT: return createWithTransient();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithTransient createWithTransient()
|
||||
{
|
||||
WithTransientImpl withTransient = new WithTransientImpl();
|
||||
return withTransient;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithtransientPackage getWithtransientPackage()
|
||||
{
|
||||
return (WithtransientPackage)getEPackage();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @deprecated
|
||||
* @generated
|
||||
*/
|
||||
@Deprecated
|
||||
public static WithtransientPackage getPackage()
|
||||
{
|
||||
return WithtransientPackage.eINSTANCE;
|
||||
}
|
||||
|
||||
} //WithtransientFactoryImpl
|
|
@ -0,0 +1,202 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EAttribute;
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientFactory;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Package</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class WithtransientPackageImpl extends EPackageImpl implements WithtransientPackage
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass withTransientEClass = null;
|
||||
|
||||
/**
|
||||
* Creates an instance of the model <b>Package</b>, registered with
|
||||
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
|
||||
* package URI value.
|
||||
* <p>Note: the correct way to create the package is via the static
|
||||
* factory method {@link #init init()}, which also performs
|
||||
* initialization of the package, or returns the registered package,
|
||||
* if one already exists.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.emf.ecore.EPackage.Registry
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage#eNS_URI
|
||||
* @see #init()
|
||||
* @generated
|
||||
*/
|
||||
private WithtransientPackageImpl()
|
||||
{
|
||||
super(eNS_URI, WithtransientFactory.eINSTANCE);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private static boolean isInited = false;
|
||||
|
||||
/**
|
||||
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
|
||||
*
|
||||
* <p>This method is used to initialize {@link WithtransientPackage#eINSTANCE} when that field is accessed.
|
||||
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #eNS_URI
|
||||
* @see #createPackageContents()
|
||||
* @see #initializePackageContents()
|
||||
* @generated
|
||||
*/
|
||||
public static WithtransientPackage init()
|
||||
{
|
||||
if (isInited) return (WithtransientPackage)EPackage.Registry.INSTANCE.getEPackage(WithtransientPackage.eNS_URI);
|
||||
|
||||
// Obtain or create and register package
|
||||
WithtransientPackageImpl theWithtransientPackage = (WithtransientPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof WithtransientPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new WithtransientPackageImpl());
|
||||
|
||||
isInited = true;
|
||||
|
||||
// Create package meta-data objects
|
||||
theWithtransientPackage.createPackageContents();
|
||||
|
||||
// Initialize created meta-data
|
||||
theWithtransientPackage.initializePackageContents();
|
||||
|
||||
// Mark meta-data to indicate it can't be changed
|
||||
theWithtransientPackage.freeze();
|
||||
|
||||
|
||||
// Update the registry and return the package
|
||||
EPackage.Registry.INSTANCE.put(WithtransientPackage.eNS_URI, theWithtransientPackage);
|
||||
return theWithtransientPackage;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getWithTransient()
|
||||
{
|
||||
return withTransientEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWithTransient_Name()
|
||||
{
|
||||
return (EAttribute)withTransientEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getWithTransient_PackageName()
|
||||
{
|
||||
return (EAttribute)withTransientEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithtransientFactory getWithtransientFactory()
|
||||
{
|
||||
return (WithtransientFactory)getEFactoryInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private boolean isCreated = false;
|
||||
|
||||
/**
|
||||
* Creates the meta-model objects for the package. This method is
|
||||
* guarded to have no affect on any invocation but its first.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void createPackageContents()
|
||||
{
|
||||
if (isCreated) return;
|
||||
isCreated = true;
|
||||
|
||||
// Create classes and their features
|
||||
withTransientEClass = createEClass(WITH_TRANSIENT);
|
||||
createEAttribute(withTransientEClass, WITH_TRANSIENT__NAME);
|
||||
createEAttribute(withTransientEClass, WITH_TRANSIENT__PACKAGE_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private boolean isInitialized = false;
|
||||
|
||||
/**
|
||||
* Complete the initialization of the package and its meta-model. This
|
||||
* method is guarded to have no affect on any invocation but its first.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void initializePackageContents()
|
||||
{
|
||||
if (isInitialized) return;
|
||||
isInitialized = true;
|
||||
|
||||
// Initialize package
|
||||
setName(eNAME);
|
||||
setNsPrefix(eNS_PREFIX);
|
||||
setNsURI(eNS_URI);
|
||||
|
||||
// Create type parameters
|
||||
|
||||
// Set bounds for type parameters
|
||||
|
||||
// Add supertypes to classes
|
||||
|
||||
// Initialize classes and features; add operations and parameters
|
||||
initEClass(withTransientEClass, WithTransient.class, "WithTransient", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getWithTransient_Name(), ecorePackage.getEString(), "name", null, 0, 1, WithTransient.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getWithTransient_PackageName(), ecorePackage.getEString(), "packageName", null, 0, 1, WithTransient.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
// Create resource
|
||||
createResource(eNS_URI);
|
||||
}
|
||||
|
||||
} //WithtransientPackageImpl
|
|
@ -0,0 +1,137 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient.util;
|
||||
|
||||
import org.eclipse.emf.common.notify.Adapter;
|
||||
import org.eclipse.emf.common.notify.Notifier;
|
||||
|
||||
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Adapter Factory</b> for the model.
|
||||
* It provides an adapter <code>createXXX</code> method for each class of the model.
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage
|
||||
* @generated
|
||||
*/
|
||||
public class WithtransientAdapterFactory extends AdapterFactoryImpl
|
||||
{
|
||||
/**
|
||||
* The cached model package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected static WithtransientPackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the adapter factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithtransientAdapterFactory()
|
||||
{
|
||||
if (modelPackage == null)
|
||||
{
|
||||
modelPackage = WithtransientPackage.eINSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether this factory is applicable for the type of the object.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
|
||||
* <!-- end-user-doc -->
|
||||
* @return whether this factory is applicable for the type of the object.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean isFactoryForType(Object object)
|
||||
{
|
||||
if (object == modelPackage)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (object instanceof EObject)
|
||||
{
|
||||
return ((EObject)object).eClass().getEPackage() == modelPackage;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* The switch that delegates to the <code>createXXX</code> methods.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected WithtransientSwitch<Adapter> modelSwitch =
|
||||
new WithtransientSwitch<Adapter>()
|
||||
{
|
||||
@Override
|
||||
public Adapter caseWithTransient(WithTransient object)
|
||||
{
|
||||
return createWithTransientAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter defaultCase(EObject object)
|
||||
{
|
||||
return createEObjectAdapter();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates an adapter for the <code>target</code>.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param target the object to adapt.
|
||||
* @return the adapter for the <code>target</code>.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Adapter createAdapter(Notifier target)
|
||||
{
|
||||
return modelSwitch.doSwitch((EObject)target);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient <em>With Transient</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null so that we can easily ignore cases;
|
||||
* it's useful to ignore a case when inheritance will catch all the cases anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createWithTransientAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for the default case.
|
||||
* <!-- begin-user-doc -->
|
||||
* This default implementation returns null.
|
||||
* <!-- end-user-doc -->
|
||||
* @return the new adapter.
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createEObjectAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
} //WithtransientAdapterFactory
|
|
@ -0,0 +1,124 @@
|
|||
/**
|
||||
* Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
|
||||
* 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
|
||||
*/
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.withtransient.util;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
|
||||
import org.eclipse.emf.ecore.util.Switch;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* The <b>Switch</b> for the model's inheritance hierarchy.
|
||||
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
|
||||
* to invoke the <code>caseXXX</code> method for each class of the model,
|
||||
* starting with the actual class of the object
|
||||
* and proceeding up the inheritance hierarchy
|
||||
* until a non-null result is returned,
|
||||
* which is the result of the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithtransientPackage
|
||||
* @generated
|
||||
*/
|
||||
public class WithtransientSwitch<T> extends Switch<T>
|
||||
{
|
||||
/**
|
||||
* The cached model package
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected static WithtransientPackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the switch.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public WithtransientSwitch()
|
||||
{
|
||||
if (modelPackage == null)
|
||||
{
|
||||
modelPackage = WithtransientPackage.eINSTANCE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether this is a switch for the given package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param ePackage the package in question.
|
||||
* @return whether this is a switch for the given package.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected boolean isSwitchFor(EPackage ePackage)
|
||||
{
|
||||
return ePackage == modelPackage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the first non-null result returned by a <code>caseXXX</code> call.
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected T doSwitch(int classifierID, EObject theEObject)
|
||||
{
|
||||
switch (classifierID)
|
||||
{
|
||||
case WithtransientPackage.WITH_TRANSIENT:
|
||||
{
|
||||
WithTransient withTransient = (WithTransient)theEObject;
|
||||
T result = caseWithTransient(withTransient);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
default: return defaultCase(theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>With Transient</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>With Transient</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseWithTransient(WithTransient object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* This implementation returns null;
|
||||
* returning a non-null result will terminate the switch, but this is the last case anyway.
|
||||
* <!-- end-user-doc -->
|
||||
* @param object the target of the switch.
|
||||
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public T defaultCase(EObject object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
} //WithtransientSwitch
|
|
@ -97,6 +97,7 @@ Workflow {
|
|||
}
|
||||
language = StandardLanguage {
|
||||
referencedResource = "platform:/resource/org.eclipse.emf.ecore/model/Ecore.genmodel"
|
||||
referencedResource = "platform:/resource/org.eclipse.xtext.ide.tests/testlang-src/org/eclipse/xtext/ide/tests/testlanguage/WithTransient.genmodel"
|
||||
name = "org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguage"
|
||||
fileExtensions = "pstl"
|
||||
serializer = {
|
||||
|
@ -130,4 +131,9 @@ Workflow {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
component = org.eclipse.emf.mwe2.ecore.EcoreGenerator {
|
||||
genModel = "platform:/resource/org.eclipse.xtext.ide.tests/testlang-src/org/eclipse/xtext/ide/tests/testlanguage/WithTransient.genmodel"
|
||||
srcPath = "platform./resource/${baseName}/testlang-src-gen"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ grammar org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguag
|
|||
with org.eclipse.xtext.common.Terminals
|
||||
|
||||
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
|
||||
import "http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient" as withtransient
|
||||
|
||||
generate partialSerializationTestLanguage
|
||||
"http://www.eclipse.org/xtext/ide/tests/testlanguage/PartialSerializationTestLanguage"
|
||||
|
@ -28,7 +29,8 @@ Model:
|
|||
"#21" EClassRef |
|
||||
"#22" TwoChildLists |
|
||||
"#23" ChildWithSubChilds |
|
||||
"#24" TwoChilds
|
||||
"#24" TwoChilds |
|
||||
"#30" WithTransientContainer
|
||||
;
|
||||
|
||||
MandatoryValue:
|
||||
|
@ -103,3 +105,10 @@ EClassDecl returns ecore::EClass:
|
|||
|
||||
EClassRef:
|
||||
ref=[ecore::EClass|QualifiedName];
|
||||
|
||||
WithTransientContainer:
|
||||
child=WithTransient
|
||||
;
|
||||
WithTransient returns withtransient::WithTransient:
|
||||
name=ID
|
||||
;
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="withtransient" nsURI="http://www.eclipse.org/xtext/ide/tests/testlanguage/mm/withtransient"
|
||||
nsPrefix="withtransient">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="WithTransient">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="packageName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
|
||||
transient="true"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
|
||||
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2019 itemis AG (http://www.itemis.eu) and others.
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"
|
||||
modelDirectory="/org.eclipse.xtext.ide.tests/testlang-src-gen" modelPluginID="org.eclipse.xtext.ide.tests"
|
||||
forceOverwrite="true" modelName="WithTransient" updateClasspath="false"
|
||||
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" complianceLevel="6.0"
|
||||
copyrightFields="false" runtimeVersion="2.12" >
|
||||
<foreignModel>WithTransient.ecore</foreignModel>
|
||||
<genPackages prefix="Withtransient" basePackage="org.eclipse.xtext.ide.tests.testlanguage"
|
||||
disposableProviderFactory="true" ecorePackage="WithTransient.ecore#/">
|
||||
<genClasses ecoreClass="WithTransient.ecore#//WithTransient">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WithTransient.ecore#//WithTransient/name"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute WithTransient.ecore#//WithTransient/packageName"/>
|
||||
</genClasses>
|
||||
</genPackages>
|
||||
</genmodel:GenModel>
|
|
@ -25,7 +25,9 @@ import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage
|
|||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalChildList;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.OptionalValue;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.PartialSerializationTestLanguageFactory;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.partialSerializationTestLanguage.WithTransientContainer;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.tests.PartialSerializationTestLanguageInjectorProvider;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.withtransient.WithTransient;
|
||||
import org.eclipse.xtext.testing.InjectWith;
|
||||
import org.eclipse.xtext.testing.XtextRunner;
|
||||
import org.eclipse.xtext.testing.util.InMemoryURIHandler;
|
||||
|
@ -1121,6 +1123,39 @@ public class PartialSerializerTest {
|
|||
this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTransientValueChange() {
|
||||
final IChangeSerializer.IModification<WithTransientContainer> _function = (WithTransientContainer it) -> {
|
||||
WithTransient _child = it.getChild();
|
||||
_child.setPackageName("bar");
|
||||
};
|
||||
ITextRegionAccess _recordDiff = this.<WithTransientContainer>recordDiff(WithTransientContainer.class, "#30 foo", _function);
|
||||
StringConcatenation _builder = new StringConcatenation();
|
||||
_builder.append("0 0 H");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("B WithTransientContainer Model");
|
||||
_builder.newLine();
|
||||
_builder.append("0 3 S \"#30\" Model:\'#30\'");
|
||||
_builder.newLine();
|
||||
_builder.append("3 1 H \" \" Whitespace:TerminalRule\'WS\'");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("B WithTransient\'foo\' WithTransientContainer:child=WithTransient path:WithTransientContainer/child");
|
||||
_builder.newLine();
|
||||
_builder.append("4 3 S \"foo\" WithTransient:name=ID");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("E WithTransient\'foo\' WithTransientContainer:child=WithTransient path:WithTransientContainer/child");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("E WithTransientContainer Model");
|
||||
_builder.newLine();
|
||||
_builder.append("7 0 H");
|
||||
_builder.newLine();
|
||||
this._changeSerializerTestHelper.operator_tripleEquals(_recordDiff, _builder);
|
||||
}
|
||||
|
||||
private <T extends EObject> ITextRegionAccess recordDiff(final Class<T> modelType, final CharSequence modelText, final IChangeSerializer.IModification<T> modification) {
|
||||
final InMemoryURIHandler fs = new InMemoryURIHandler();
|
||||
String _string = modelText.toString();
|
||||
|
|
Loading…
Reference in a new issue