mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
[#861] test language and corresponding test exhibiting a deep bug in the content assist parser
Signed-off-by: Christian Schneider <christian.schneider@typefox.io>
This commit is contained in:
parent
93e3e31da5
commit
7cce0484d4
75 changed files with 21764 additions and 0 deletions
|
@ -0,0 +1,47 @@
|
|||
<?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="core861_contentAssistLookAheadTestLanguage" nsURI="http://www.eclipse.org/xtext/ide/tests/testlanguage/Core861_ContentAssistLookAheadTestLanguage"
|
||||
nsPrefix="core861_contentAssistLookAheadTestLanguage">
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Member">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="annotations" upperBound="-1"
|
||||
eType="#//Annotation" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="modifier" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//Type" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="FieldDecl" eSuperTypes="#//Member">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="initVal" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="MethodDecl" eSuperTypes="#//Member">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="decls" upperBound="-1"
|
||||
eType="#//FieldDecl" containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="statements" upperBound="-1"
|
||||
eType="#//Statement" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Type"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Statement"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="AssignmentStatement" eSuperTypes="#//Statement"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="FeatureCall" eSuperTypes="#//AssignmentStatement">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="feature" eType="#//Member"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Annotation">
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="values" unique="false"
|
||||
upperBound="-1" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="IntType" eSuperTypes="#//Type"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="TypeRef" eSuperTypes="#//Type">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//Type"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Return" eSuperTypes="#//Statement"/>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="Assignment" eSuperTypes="#//AssignmentStatement">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="feature" eType="#//FeatureCall"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="rhs" eType="ecore:EDataType platform:/resource/org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="MemberCall" eSuperTypes="#//FeatureCall">
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="owner" eType="#//FeatureCall"
|
||||
containment="true"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="member" eType="#//Member"/>
|
||||
</eClassifiers>
|
||||
</ecore:EPackage>
|
|
@ -0,0 +1,48 @@
|
|||
<?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) 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"
|
||||
modelDirectory="/org.eclipse.xtext.ide.tests/testlang-src-gen" modelPluginID="org.eclipse.xtext.ide.tests"
|
||||
forceOverwrite="true" modelName="Core861_ContentAssistLookAheadTestLanguage" 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">
|
||||
<genPackages prefix="Core861_contentAssistLookAheadTestLanguage" basePackage="org.eclipse.xtext.ide.tests.testlanguage"
|
||||
disposableProviderFactory="true" fileExtensions="contentAssistLookAheadTestLanguage"
|
||||
ecorePackage="Core861_ContentAssistLookAheadTestLanguage.ecore#/">
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//Member">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//Member/annotations"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Core861_ContentAssistLookAheadTestLanguage.ecore#//Member/modifier"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//Member/type"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Core861_ContentAssistLookAheadTestLanguage.ecore#//Member/name"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//FieldDecl">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Core861_ContentAssistLookAheadTestLanguage.ecore#//FieldDecl/initVal"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//MethodDecl">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//MethodDecl/decls"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//MethodDecl/statements"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//Type"/>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//Statement"/>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//AssignmentStatement"/>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//FeatureCall">
|
||||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//FeatureCall/feature"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//Annotation">
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Core861_ContentAssistLookAheadTestLanguage.ecore#//Annotation/key"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Core861_ContentAssistLookAheadTestLanguage.ecore#//Annotation/values"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//IntType"/>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//TypeRef">
|
||||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//TypeRef/type"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//Return"/>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//Assignment">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//Assignment/feature"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute Core861_ContentAssistLookAheadTestLanguage.ecore#//Assignment/rhs"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="Core861_ContentAssistLookAheadTestLanguage.ecore#//MemberCall">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//MemberCall/owner"/>
|
||||
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference Core861_ContentAssistLookAheadTestLanguage.ecore#//MemberCall/member"/>
|
||||
</genClasses>
|
||||
</genPackages>
|
||||
</genmodel:GenModel>
|
|
@ -0,0 +1,95 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2018 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.editor.contentassist
|
||||
|
||||
import com.google.common.base.Preconditions
|
||||
import com.google.inject.Inject
|
||||
import java.util.concurrent.Executors
|
||||
import org.eclipse.emf.common.util.URI
|
||||
import org.eclipse.xtext.grammaranalysis.impl.GrammarElementTitleSwitch
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageIdeInjectorProvider
|
||||
import org.eclipse.xtext.resource.FileExtensionProvider
|
||||
import org.eclipse.xtext.resource.IResourceFactory
|
||||
import org.eclipse.xtext.resource.XtextResource
|
||||
import org.eclipse.xtext.resource.XtextResourceSet
|
||||
import org.eclipse.xtext.testing.InjectWith
|
||||
import org.eclipse.xtext.testing.XtextRunner
|
||||
import org.eclipse.xtext.util.StringInputStream
|
||||
import org.eclipse.xtext.util.TextRegion
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import static extension org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* @author Christian Schneider - Initial contribution and API
|
||||
*/
|
||||
@RunWith(XtextRunner)
|
||||
@InjectWith(Core861_ContentAssistLookAheadTestLanguageIdeInjectorProvider)
|
||||
class Core861_ContentAssistLookAheadTest {
|
||||
|
||||
@Test
|
||||
def void test() {
|
||||
val good1 = '''
|
||||
int y() {
|
||||
bar<|>
|
||||
}
|
||||
'''.toString.firstSetGrammarElementsToString
|
||||
|
||||
val good2 = '''
|
||||
public int y () {
|
||||
bar<|>
|
||||
}
|
||||
'''.toString.firstSetGrammarElementsToString
|
||||
|
||||
|
||||
val bad = '''
|
||||
public int y() {
|
||||
bar<|>
|
||||
}
|
||||
'''.toString.firstSetGrammarElementsToString
|
||||
|
||||
good1.assertEquals(good2)
|
||||
good2.assertEquals(bad)
|
||||
}
|
||||
|
||||
@Inject ContentAssistContextFactory factory
|
||||
val cursor = "<|>"
|
||||
|
||||
def String firstSetGrammarElementsToString(String input) {
|
||||
val offset = input.indexOf(cursor)
|
||||
Preconditions.checkArgument(offset >= 0, "you forgot to provide a cursor")
|
||||
val doc = input.replace(cursor, "")
|
||||
val res = parse(doc)
|
||||
|
||||
factory.pool = Executors.newSingleThreadExecutor
|
||||
val ctxs = factory.create(doc, new TextRegion(0, 0), offset, res)
|
||||
val f = new GrammarElementTitleSwitch().showAssignments.showQualified.showRule
|
||||
return '''
|
||||
«FOR ctx : ctxs.indexed»
|
||||
context«ctx.key» {
|
||||
«FOR ele:ctx.value.firstSetGrammarElements»
|
||||
«ele.eClass.name»: «f.apply(ele)»
|
||||
«ENDFOR»
|
||||
}
|
||||
«ENDFOR»
|
||||
'''
|
||||
}
|
||||
|
||||
@Inject FileExtensionProvider fileExtension
|
||||
@Inject IResourceFactory resFactory
|
||||
|
||||
def private XtextResource parse(String doc) {
|
||||
val uri = URI.createURI("dummy." + fileExtension.primaryFileExtension)
|
||||
val res = resFactory.createResource(uri) as XtextResource
|
||||
new XtextResourceSet().resources += res
|
||||
res.load(new StringInputStream(doc), emptyMap)
|
||||
return res
|
||||
}
|
||||
}
|
|
@ -2,3 +2,4 @@ org.eclipse.xtext.ide.tests.testlanguage.ide.TestLanguageIdeSetup
|
|||
org.eclipse.xtext.ide.tests.testlanguage.ide.IndentationAwareUiTestLanguageIdeSetup
|
||||
org.eclipse.xtext.ide.tests.testlanguage.ide.PartialContentAssistTestLanguageIdeSetup
|
||||
org.eclipse.xtext.ide.tests.testlanguage.ide.PartialSerializationTestLanguageIdeSetup
|
||||
org.eclipse.xtext.ide.tests.testlanguage.ide.Core861_ContentAssistLookAheadTestLanguageIdeSetup
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.name.Names;
|
||||
import java.util.Properties;
|
||||
import org.eclipse.xtext.Constants;
|
||||
import org.eclipse.xtext.IGrammarAccess;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.parser.antlr.Core861_ContentAssistLookAheadTestLanguageAntlrTokenFileProvider;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.parser.antlr.Core861_ContentAssistLookAheadTestLanguageParser;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.parser.antlr.internal.InternalCore861_ContentAssistLookAheadTestLanguageLexer;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.scoping.Core861_ContentAssistLookAheadTestLanguageScopeProvider;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.serializer.Core861_ContentAssistLookAheadTestLanguageSemanticSequencer;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.serializer.Core861_ContentAssistLookAheadTestLanguageSyntacticSequencer;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.Core861_ContentAssistLookAheadTestLanguageGrammarAccess;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.validation.Core861_ContentAssistLookAheadTestLanguageConfigurableIssueCodesProvider;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.validation.Core861_ContentAssistLookAheadTestLanguageValidator;
|
||||
import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider;
|
||||
import org.eclipse.xtext.naming.IQualifiedNameProvider;
|
||||
import org.eclipse.xtext.parser.IParser;
|
||||
import org.eclipse.xtext.parser.ITokenToStringConverter;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenToStringConverter;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
import org.eclipse.xtext.parser.antlr.LexerBindings;
|
||||
import org.eclipse.xtext.parser.antlr.LexerProvider;
|
||||
import org.eclipse.xtext.resource.IContainer;
|
||||
import org.eclipse.xtext.resource.IResourceDescriptions;
|
||||
import org.eclipse.xtext.resource.containers.IAllContainersState;
|
||||
import org.eclipse.xtext.resource.containers.ResourceSetBasedAllContainersStateProvider;
|
||||
import org.eclipse.xtext.resource.containers.StateBasedContainerManager;
|
||||
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
|
||||
import org.eclipse.xtext.resource.impl.ResourceSetBasedResourceDescriptions;
|
||||
import org.eclipse.xtext.scoping.IGlobalScopeProvider;
|
||||
import org.eclipse.xtext.scoping.IScopeProvider;
|
||||
import org.eclipse.xtext.scoping.IgnoreCaseLinking;
|
||||
import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
|
||||
import org.eclipse.xtext.scoping.impl.DefaultGlobalScopeProvider;
|
||||
import org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider;
|
||||
import org.eclipse.xtext.serializer.ISerializer;
|
||||
import org.eclipse.xtext.serializer.impl.Serializer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ISemanticSequencer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ISyntacticSequencer;
|
||||
import org.eclipse.xtext.service.DefaultRuntimeModule;
|
||||
import org.eclipse.xtext.service.SingletonBinding;
|
||||
import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider;
|
||||
|
||||
/**
|
||||
* Manual modifications go to {@link Core861_ContentAssistLookAheadTestLanguageRuntimeModule}.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public abstract class AbstractCore861_ContentAssistLookAheadTestLanguageRuntimeModule extends DefaultRuntimeModule {
|
||||
|
||||
protected Properties properties = null;
|
||||
|
||||
@Override
|
||||
public void configure(Binder binder) {
|
||||
properties = tryBindProperties(binder, "org/eclipse/xtext/ide/tests/testlanguage/Core861_ContentAssistLookAheadTestLanguage.properties");
|
||||
super.configure(binder);
|
||||
}
|
||||
|
||||
public void configureLanguageName(Binder binder) {
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage");
|
||||
}
|
||||
|
||||
public void configureFileExtensions(Binder binder) {
|
||||
if (properties == null || properties.getProperty(Constants.FILE_EXTENSIONS) == null)
|
||||
binder.bind(String.class).annotatedWith(Names.named(Constants.FILE_EXTENSIONS)).toInstance("contentAssistLookAheadTestLanguage");
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
|
||||
public ClassLoader bindClassLoaderToInstance() {
|
||||
return getClass().getClassLoader();
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2
|
||||
public Class<? extends IGrammarAccess> bindIGrammarAccess() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageGrammarAccess.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISemanticSequencer> bindISemanticSequencer() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageSemanticSequencer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageSyntacticSequencer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2
|
||||
public Class<? extends ISerializer> bindISerializer() {
|
||||
return Serializer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IParser> bindIParser() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageParser.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends ITokenToStringConverter> bindITokenToStringConverter() {
|
||||
return AntlrTokenToStringConverter.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IAntlrTokenFileProvider> bindIAntlrTokenFileProvider() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageAntlrTokenFileProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends Lexer> bindLexer() {
|
||||
return InternalCore861_ContentAssistLookAheadTestLanguageLexer.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends ITokenDefProvider> bindITokenDefProvider() {
|
||||
return AntlrTokenDefProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Provider<? extends InternalCore861_ContentAssistLookAheadTestLanguageLexer> provideInternalCore861_ContentAssistLookAheadTestLanguageLexer() {
|
||||
return LexerProvider.create(InternalCore861_ContentAssistLookAheadTestLanguageLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public void configureRuntimeLexer(Binder binder) {
|
||||
binder.bind(Lexer.class)
|
||||
.annotatedWith(Names.named(LexerBindings.RUNTIME))
|
||||
.to(InternalCore861_ContentAssistLookAheadTestLanguageLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
|
||||
@SingletonBinding(eager=true)
|
||||
public Class<? extends Core861_ContentAssistLookAheadTestLanguageValidator> bindCore861_ContentAssistLookAheadTestLanguageValidator() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageValidator.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
|
||||
public Class<? extends ConfigurableIssueCodesProvider> bindConfigurableIssueCodesProvider() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageConfigurableIssueCodesProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public Class<? extends IScopeProvider> bindIScopeProvider() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public void configureIScopeProviderDelegate(Binder binder) {
|
||||
binder.bind(IScopeProvider.class).annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_DELEGATE)).to(ImportedNamespaceAwareLocalScopeProvider.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() {
|
||||
return DefaultGlobalScopeProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2
|
||||
public void configureIgnoreCaseLinking(Binder binder) {
|
||||
binder.bindConstant().annotatedWith(IgnoreCaseLinking.class).to(false);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
|
||||
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
|
||||
return DefaultDeclarativeQualifiedNameProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public Class<? extends IContainer.Manager> bindIContainer$Manager() {
|
||||
return StateBasedContainerManager.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public Class<? extends IAllContainersState.Provider> bindIAllContainersState$Provider() {
|
||||
return ResourceSetBasedAllContainersStateProvider.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public void configureIResourceDescriptions(Binder binder) {
|
||||
binder.bind(IResourceDescriptions.class).to(ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
|
||||
public void configureIResourceDescriptionsPersisted(Binder binder) {
|
||||
binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(ResourceSetBasedResourceDescriptions.class);
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.xtext.ISetup;
|
||||
import org.eclipse.xtext.common.TerminalsStandaloneSetup;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.resource.IResourceFactory;
|
||||
import org.eclipse.xtext.resource.IResourceServiceProvider;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageStandaloneSetupGenerated implements ISetup {
|
||||
|
||||
@Override
|
||||
public Injector createInjectorAndDoEMFRegistration() {
|
||||
TerminalsStandaloneSetup.doSetup();
|
||||
|
||||
Injector injector = createInjector();
|
||||
register(injector);
|
||||
return injector;
|
||||
}
|
||||
|
||||
public Injector createInjector() {
|
||||
return Guice.createInjector(new Core861_ContentAssistLookAheadTestLanguageRuntimeModule());
|
||||
}
|
||||
|
||||
public void register(Injector injector) {
|
||||
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/xtext/ide/tests/testlanguage/Core861_ContentAssistLookAheadTestLanguage")) {
|
||||
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/xtext/ide/tests/testlanguage/Core861_ContentAssistLookAheadTestLanguage", Core861_contentAssistLookAheadTestLanguagePackage.eINSTANCE);
|
||||
}
|
||||
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class);
|
||||
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class);
|
||||
|
||||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("contentAssistLookAheadTestLanguage", resourceFactory);
|
||||
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("contentAssistLookAheadTestLanguage", serviceProvider);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Annotation</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation#getKey <em>Key</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation#getValues <em>Values</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAnnotation()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Annotation extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Key</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Key</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Key</em>' attribute.
|
||||
* @see #setKey(String)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAnnotation_Key()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getKey();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation#getKey <em>Key</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Key</em>' attribute.
|
||||
* @see #getKey()
|
||||
* @generated
|
||||
*/
|
||||
void setKey(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Values</b></em>' attribute list.
|
||||
* The list contents are of type {@link java.lang.String}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Values</em>' attribute list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Values</em>' attribute list.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAnnotation_Values()
|
||||
* @model unique="false"
|
||||
* @generated
|
||||
*/
|
||||
EList<String> getValues();
|
||||
|
||||
} // Annotation
|
|
@ -0,0 +1,82 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Assignment</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment#getFeature <em>Feature</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment#getRhs <em>Rhs</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAssignment()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Assignment extends AssignmentStatement
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Feature</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Feature</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>Feature</em>' containment reference.
|
||||
* @see #setFeature(FeatureCall)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAssignment_Feature()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
FeatureCall getFeature();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment#getFeature <em>Feature</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Feature</em>' containment reference.
|
||||
* @see #getFeature()
|
||||
* @generated
|
||||
*/
|
||||
void setFeature(FeatureCall value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Rhs</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Rhs</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Rhs</em>' attribute.
|
||||
* @see #setRhs(int)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAssignment_Rhs()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
int getRhs();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment#getRhs <em>Rhs</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Rhs</em>' attribute.
|
||||
* @see #getRhs()
|
||||
* @generated
|
||||
*/
|
||||
void setRhs(int value);
|
||||
|
||||
} // Assignment
|
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Assignment Statement</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getAssignmentStatement()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface AssignmentStatement extends Statement
|
||||
{
|
||||
} // AssignmentStatement
|
|
@ -0,0 +1,156 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage
|
||||
* @generated
|
||||
*/
|
||||
public interface Core861_contentAssistLookAheadTestLanguageFactory extends EFactory
|
||||
{
|
||||
/**
|
||||
* The singleton instance of the factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
Core861_contentAssistLookAheadTestLanguageFactory eINSTANCE = org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.Core861_contentAssistLookAheadTestLanguageFactoryImpl.init();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Member</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Member</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Member createMember();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Field Decl</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Field Decl</em>'.
|
||||
* @generated
|
||||
*/
|
||||
FieldDecl createFieldDecl();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Method Decl</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Method Decl</em>'.
|
||||
* @generated
|
||||
*/
|
||||
MethodDecl createMethodDecl();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Type</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Type</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Type createType();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Statement</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Statement</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Statement createStatement();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Assignment Statement</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Assignment Statement</em>'.
|
||||
* @generated
|
||||
*/
|
||||
AssignmentStatement createAssignmentStatement();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Feature Call</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Feature Call</em>'.
|
||||
* @generated
|
||||
*/
|
||||
FeatureCall createFeatureCall();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Annotation</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Annotation</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Annotation createAnnotation();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Int Type</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Int Type</em>'.
|
||||
* @generated
|
||||
*/
|
||||
IntType createIntType();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Type Ref</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Type Ref</em>'.
|
||||
* @generated
|
||||
*/
|
||||
TypeRef createTypeRef();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Return</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Return</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Return createReturn();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Assignment</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Assignment</em>'.
|
||||
* @generated
|
||||
*/
|
||||
Assignment createAssignment();
|
||||
|
||||
/**
|
||||
* Returns a new object of class '<em>Member Call</em>'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return a new object of class '<em>Member Call</em>'.
|
||||
* @generated
|
||||
*/
|
||||
MemberCall createMemberCall();
|
||||
|
||||
/**
|
||||
* Returns the package supported by this factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the package supported by this factory.
|
||||
* @generated
|
||||
*/
|
||||
Core861_contentAssistLookAheadTestLanguagePackage getCore861_contentAssistLookAheadTestLanguagePackage();
|
||||
|
||||
} //Core861_contentAssistLookAheadTestLanguageFactory
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Feature Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall#getFeature <em>Feature</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getFeatureCall()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface FeatureCall extends AssignmentStatement
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Feature</b></em>' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Feature</em>' reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Feature</em>' reference.
|
||||
* @see #setFeature(Member)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getFeatureCall_Feature()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
Member getFeature();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall#getFeature <em>Feature</em>}' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Feature</em>' reference.
|
||||
* @see #getFeature()
|
||||
* @generated
|
||||
*/
|
||||
void setFeature(Member value);
|
||||
|
||||
} // FeatureCall
|
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Field Decl</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl#getInitVal <em>Init Val</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getFieldDecl()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface FieldDecl extends Member
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Init Val</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Init Val</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Init Val</em>' attribute.
|
||||
* @see #setInitVal(int)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getFieldDecl_InitVal()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
int getInitVal();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl#getInitVal <em>Init Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Init Val</em>' attribute.
|
||||
* @see #getInitVal()
|
||||
* @generated
|
||||
*/
|
||||
void setInitVal(int value);
|
||||
|
||||
} // FieldDecl
|
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Int Type</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getIntType()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface IntType extends Type
|
||||
{
|
||||
} // IntType
|
|
@ -0,0 +1,129 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Member</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#getAnnotations <em>Annotations</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#getModifier <em>Modifier</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#getType <em>Type</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMember()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Member extends EObject
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Annotations</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Annotations</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Annotations</em>' containment reference list.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMember_Annotations()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<Annotation> getAnnotations();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Modifier</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Modifier</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Modifier</em>' attribute.
|
||||
* @see #setModifier(String)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMember_Modifier()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getModifier();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#getModifier <em>Modifier</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Modifier</em>' attribute.
|
||||
* @see #getModifier()
|
||||
* @generated
|
||||
*/
|
||||
void setModifier(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Type</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Type</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>Type</em>' containment reference.
|
||||
* @see #setType(Type)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMember_Type()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#getType <em>Type</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Type</em>' containment reference.
|
||||
* @see #getType()
|
||||
* @generated
|
||||
*/
|
||||
void setType(Type value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Name</b></em>' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Name</em>' attribute isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Name</em>' attribute.
|
||||
* @see #setName(String)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMember_Name()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member#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);
|
||||
|
||||
} // Member
|
|
@ -0,0 +1,82 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Member Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall#getOwner <em>Owner</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall#getMember <em>Member</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMemberCall()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface MemberCall extends FeatureCall
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Owner</b></em>' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Owner</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>Owner</em>' containment reference.
|
||||
* @see #setOwner(FeatureCall)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMemberCall_Owner()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
FeatureCall getOwner();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall#getOwner <em>Owner</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Owner</em>' containment reference.
|
||||
* @see #getOwner()
|
||||
* @generated
|
||||
*/
|
||||
void setOwner(FeatureCall value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Member</b></em>' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Member</em>' reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Member</em>' reference.
|
||||
* @see #setMember(Member)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMemberCall_Member()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
Member getMember();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall#getMember <em>Member</em>}' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Member</em>' reference.
|
||||
* @see #getMember()
|
||||
* @generated
|
||||
*/
|
||||
void setMember(Member value);
|
||||
|
||||
} // MemberCall
|
|
@ -0,0 +1,63 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Method Decl</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MethodDecl#getDecls <em>Decls</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MethodDecl#getStatements <em>Statements</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMethodDecl()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface MethodDecl extends Member
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Decls</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Decls</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Decls</em>' containment reference list.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMethodDecl_Decls()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<FieldDecl> getDecls();
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Statements</b></em>' containment reference list.
|
||||
* The list contents are of type {@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Statement}.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Statements</em>' containment reference list isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Statements</em>' containment reference list.
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getMethodDecl_Statements()
|
||||
* @model containment="true"
|
||||
* @generated
|
||||
*/
|
||||
EList<Statement> getStatements();
|
||||
|
||||
} // MethodDecl
|
|
@ -0,0 +1,23 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Return</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getReturn()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Return extends Statement
|
||||
{
|
||||
} // Return
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Statement</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getStatement()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Statement extends EObject
|
||||
{
|
||||
} // Statement
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Type</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getType()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface Type extends EObject
|
||||
{
|
||||
} // Type
|
|
@ -0,0 +1,55 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage;
|
||||
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* A representation of the model object '<em><b>Type Ref</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* <p>
|
||||
* The following features are supported:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.TypeRef#getType <em>Type</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getTypeRef()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
public interface TypeRef extends Type
|
||||
{
|
||||
/**
|
||||
* Returns the value of the '<em><b>Type</b></em>' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Type</em>' reference isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Type</em>' reference.
|
||||
* @see #setType(Type)
|
||||
* @see org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#getTypeRef_Type()
|
||||
* @model
|
||||
* @generated
|
||||
*/
|
||||
Type getType();
|
||||
|
||||
/**
|
||||
* Sets the value of the '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.TypeRef#getType <em>Type</em>}' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @param value the new value of the '<em>Type</em>' reference.
|
||||
* @see #getType()
|
||||
* @generated
|
||||
*/
|
||||
void setType(Type value);
|
||||
|
||||
} // TypeRef
|
|
@ -0,0 +1,227 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EDataTypeEList;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Annotation</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.AnnotationImpl#getKey <em>Key</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.AnnotationImpl#getValues <em>Values</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class AnnotationImpl extends MinimalEObjectImpl.Container implements Annotation
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getKey() <em>Key</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getKey()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String KEY_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getKey() <em>Key</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getKey()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String key = KEY_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getValues() <em>Values</em>}' attribute list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getValues()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<String> values;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected AnnotationImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.ANNOTATION;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getKey()
|
||||
{
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setKey(String newKey)
|
||||
{
|
||||
String oldKey = key;
|
||||
key = newKey;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__KEY, oldKey, key));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<String> getValues()
|
||||
{
|
||||
if (values == null)
|
||||
{
|
||||
values = new EDataTypeEList<String>(String.class, this, Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__VALUES);
|
||||
}
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__KEY:
|
||||
return getKey();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__VALUES:
|
||||
return getValues();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__KEY:
|
||||
setKey((String)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__VALUES:
|
||||
getValues().clear();
|
||||
getValues().addAll((Collection<? extends String>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__KEY:
|
||||
setKey(KEY_EDEFAULT);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__VALUES:
|
||||
getValues().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__KEY:
|
||||
return KEY_EDEFAULT == null ? key != null : !KEY_EDEFAULT.equals(key);
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION__VALUES:
|
||||
return values != null && !values.isEmpty();
|
||||
}
|
||||
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(" (key: ");
|
||||
result.append(key);
|
||||
result.append(", values: ");
|
||||
result.append(values);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //AnnotationImpl
|
|
@ -0,0 +1,269 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.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.core861_contentAssistLookAheadTestLanguage.Assignment;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Assignment</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.AssignmentImpl#getFeature <em>Feature</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.AssignmentImpl#getRhs <em>Rhs</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class AssignmentImpl extends AssignmentStatementImpl implements Assignment
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getFeature() <em>Feature</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getFeature()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected FeatureCall feature;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getRhs() <em>Rhs</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getRhs()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final int RHS_EDEFAULT = 0;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getRhs() <em>Rhs</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getRhs()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected int rhs = RHS_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected AssignmentImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.ASSIGNMENT;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public FeatureCall getFeature()
|
||||
{
|
||||
return feature;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain basicSetFeature(FeatureCall newFeature, NotificationChain msgs)
|
||||
{
|
||||
FeatureCall oldFeature = feature;
|
||||
feature = newFeature;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE, oldFeature, newFeature);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setFeature(FeatureCall newFeature)
|
||||
{
|
||||
if (newFeature != feature)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (feature != null)
|
||||
msgs = ((InternalEObject)feature).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE, null, msgs);
|
||||
if (newFeature != null)
|
||||
msgs = ((InternalEObject)newFeature).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE, null, msgs);
|
||||
msgs = basicSetFeature(newFeature, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE, newFeature, newFeature));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public int getRhs()
|
||||
{
|
||||
return rhs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setRhs(int newRhs)
|
||||
{
|
||||
int oldRhs = rhs;
|
||||
rhs = newRhs;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__RHS, oldRhs, rhs));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE:
|
||||
return basicSetFeature(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 Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE:
|
||||
return getFeature();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__RHS:
|
||||
return getRhs();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE:
|
||||
setFeature((FeatureCall)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__RHS:
|
||||
setRhs((Integer)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE:
|
||||
setFeature((FeatureCall)null);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__RHS:
|
||||
setRhs(RHS_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__FEATURE:
|
||||
return feature != null;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT__RHS:
|
||||
return rhs != RHS_EDEFAULT;
|
||||
}
|
||||
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(" (rhs: ");
|
||||
result.append(rhs);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //AssignmentImpl
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.AssignmentStatement;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Assignment Statement</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class AssignmentStatementImpl extends StatementImpl implements AssignmentStatement
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected AssignmentStatementImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.ASSIGNMENT_STATEMENT;
|
||||
}
|
||||
|
||||
} //AssignmentStatementImpl
|
|
@ -0,0 +1,255 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.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.core861_contentAssistLookAheadTestLanguage.*;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Factory</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class Core861_contentAssistLookAheadTestLanguageFactoryImpl extends EFactoryImpl implements Core861_contentAssistLookAheadTestLanguageFactory
|
||||
{
|
||||
/**
|
||||
* Creates the default factory implementation.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public static Core861_contentAssistLookAheadTestLanguageFactory init()
|
||||
{
|
||||
try
|
||||
{
|
||||
Core861_contentAssistLookAheadTestLanguageFactory theCore861_contentAssistLookAheadTestLanguageFactory = (Core861_contentAssistLookAheadTestLanguageFactory)EPackage.Registry.INSTANCE.getEFactory(Core861_contentAssistLookAheadTestLanguagePackage.eNS_URI);
|
||||
if (theCore861_contentAssistLookAheadTestLanguageFactory != null)
|
||||
{
|
||||
return theCore861_contentAssistLookAheadTestLanguageFactory;
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
EcorePlugin.INSTANCE.log(exception);
|
||||
}
|
||||
return new Core861_contentAssistLookAheadTestLanguageFactoryImpl();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an instance of the factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Core861_contentAssistLookAheadTestLanguageFactoryImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public EObject create(EClass eClass)
|
||||
{
|
||||
switch (eClass.getClassifierID())
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER: return createMember();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL: return createFieldDecl();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL: return createMethodDecl();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE: return createType();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.STATEMENT: return createStatement();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT_STATEMENT: return createAssignmentStatement();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL: return createFeatureCall();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION: return createAnnotation();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.INT_TYPE: return createIntType();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF: return createTypeRef();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.RETURN: return createReturn();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT: return createAssignment();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL: return createMemberCall();
|
||||
default:
|
||||
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Member createMember()
|
||||
{
|
||||
MemberImpl member = new MemberImpl();
|
||||
return member;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public FieldDecl createFieldDecl()
|
||||
{
|
||||
FieldDeclImpl fieldDecl = new FieldDeclImpl();
|
||||
return fieldDecl;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public MethodDecl createMethodDecl()
|
||||
{
|
||||
MethodDeclImpl methodDecl = new MethodDeclImpl();
|
||||
return methodDecl;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Type createType()
|
||||
{
|
||||
TypeImpl type = new TypeImpl();
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Statement createStatement()
|
||||
{
|
||||
StatementImpl statement = new StatementImpl();
|
||||
return statement;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public AssignmentStatement createAssignmentStatement()
|
||||
{
|
||||
AssignmentStatementImpl assignmentStatement = new AssignmentStatementImpl();
|
||||
return assignmentStatement;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public FeatureCall createFeatureCall()
|
||||
{
|
||||
FeatureCallImpl featureCall = new FeatureCallImpl();
|
||||
return featureCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Annotation createAnnotation()
|
||||
{
|
||||
AnnotationImpl annotation = new AnnotationImpl();
|
||||
return annotation;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public IntType createIntType()
|
||||
{
|
||||
IntTypeImpl intType = new IntTypeImpl();
|
||||
return intType;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public TypeRef createTypeRef()
|
||||
{
|
||||
TypeRefImpl typeRef = new TypeRefImpl();
|
||||
return typeRef;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Return createReturn()
|
||||
{
|
||||
ReturnImpl return_ = new ReturnImpl();
|
||||
return return_;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Assignment createAssignment()
|
||||
{
|
||||
AssignmentImpl assignment = new AssignmentImpl();
|
||||
return assignment;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public MemberCall createMemberCall()
|
||||
{
|
||||
MemberCallImpl memberCall = new MemberCallImpl();
|
||||
return memberCall;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Core861_contentAssistLookAheadTestLanguagePackage getCore861_contentAssistLookAheadTestLanguagePackage()
|
||||
{
|
||||
return (Core861_contentAssistLookAheadTestLanguagePackage)getEPackage();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @deprecated
|
||||
* @generated
|
||||
*/
|
||||
@Deprecated
|
||||
public static Core861_contentAssistLookAheadTestLanguagePackage getPackage()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.eINSTANCE;
|
||||
}
|
||||
|
||||
} //Core861_contentAssistLookAheadTestLanguageFactoryImpl
|
|
@ -0,0 +1,639 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EAttribute;
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.emf.ecore.EReference;
|
||||
import org.eclipse.emf.ecore.EcorePackage;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.EPackageImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.AssignmentStatement;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguageFactory;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.IntType;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MethodDecl;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Return;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Statement;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Type;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.TypeRef;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model <b>Package</b>.
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public class Core861_contentAssistLookAheadTestLanguagePackageImpl extends EPackageImpl implements Core861_contentAssistLookAheadTestLanguagePackage
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass memberEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass fieldDeclEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass methodDeclEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass typeEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass statementEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass assignmentStatementEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass featureCallEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass annotationEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass intTypeEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass typeRefEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass returnEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass assignmentEClass = null;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
private EClass memberCallEClass = 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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage#eNS_URI
|
||||
* @see #init()
|
||||
* @generated
|
||||
*/
|
||||
private Core861_contentAssistLookAheadTestLanguagePackageImpl()
|
||||
{
|
||||
super(eNS_URI, Core861_contentAssistLookAheadTestLanguageFactory.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 Core861_contentAssistLookAheadTestLanguagePackage#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 Core861_contentAssistLookAheadTestLanguagePackage init()
|
||||
{
|
||||
if (isInited) return (Core861_contentAssistLookAheadTestLanguagePackage)EPackage.Registry.INSTANCE.getEPackage(Core861_contentAssistLookAheadTestLanguagePackage.eNS_URI);
|
||||
|
||||
// Obtain or create and register package
|
||||
Core861_contentAssistLookAheadTestLanguagePackageImpl theCore861_contentAssistLookAheadTestLanguagePackage = (Core861_contentAssistLookAheadTestLanguagePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Core861_contentAssistLookAheadTestLanguagePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Core861_contentAssistLookAheadTestLanguagePackageImpl());
|
||||
|
||||
isInited = true;
|
||||
|
||||
// Initialize simple dependencies
|
||||
EcorePackage.eINSTANCE.eClass();
|
||||
|
||||
// Create package meta-data objects
|
||||
theCore861_contentAssistLookAheadTestLanguagePackage.createPackageContents();
|
||||
|
||||
// Initialize created meta-data
|
||||
theCore861_contentAssistLookAheadTestLanguagePackage.initializePackageContents();
|
||||
|
||||
// Mark meta-data to indicate it can't be changed
|
||||
theCore861_contentAssistLookAheadTestLanguagePackage.freeze();
|
||||
|
||||
|
||||
// Update the registry and return the package
|
||||
EPackage.Registry.INSTANCE.put(Core861_contentAssistLookAheadTestLanguagePackage.eNS_URI, theCore861_contentAssistLookAheadTestLanguagePackage);
|
||||
return theCore861_contentAssistLookAheadTestLanguagePackage;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getMember()
|
||||
{
|
||||
return memberEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMember_Annotations()
|
||||
{
|
||||
return (EReference)memberEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getMember_Modifier()
|
||||
{
|
||||
return (EAttribute)memberEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMember_Type()
|
||||
{
|
||||
return (EReference)memberEClass.getEStructuralFeatures().get(2);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getMember_Name()
|
||||
{
|
||||
return (EAttribute)memberEClass.getEStructuralFeatures().get(3);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getFieldDecl()
|
||||
{
|
||||
return fieldDeclEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getFieldDecl_InitVal()
|
||||
{
|
||||
return (EAttribute)fieldDeclEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getMethodDecl()
|
||||
{
|
||||
return methodDeclEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMethodDecl_Decls()
|
||||
{
|
||||
return (EReference)methodDeclEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMethodDecl_Statements()
|
||||
{
|
||||
return (EReference)methodDeclEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getType()
|
||||
{
|
||||
return typeEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getStatement()
|
||||
{
|
||||
return statementEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getAssignmentStatement()
|
||||
{
|
||||
return assignmentStatementEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getFeatureCall()
|
||||
{
|
||||
return featureCallEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getFeatureCall_Feature()
|
||||
{
|
||||
return (EReference)featureCallEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getAnnotation()
|
||||
{
|
||||
return annotationEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getAnnotation_Key()
|
||||
{
|
||||
return (EAttribute)annotationEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getAnnotation_Values()
|
||||
{
|
||||
return (EAttribute)annotationEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getIntType()
|
||||
{
|
||||
return intTypeEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getTypeRef()
|
||||
{
|
||||
return typeRefEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getTypeRef_Type()
|
||||
{
|
||||
return (EReference)typeRefEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getReturn()
|
||||
{
|
||||
return returnEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getAssignment()
|
||||
{
|
||||
return assignmentEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getAssignment_Feature()
|
||||
{
|
||||
return (EReference)assignmentEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EAttribute getAssignment_Rhs()
|
||||
{
|
||||
return (EAttribute)assignmentEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EClass getMemberCall()
|
||||
{
|
||||
return memberCallEClass;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMemberCall_Owner()
|
||||
{
|
||||
return (EReference)memberCallEClass.getEStructuralFeatures().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMemberCall_Member()
|
||||
{
|
||||
return (EReference)memberCallEClass.getEStructuralFeatures().get(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Core861_contentAssistLookAheadTestLanguageFactory getCore861_contentAssistLookAheadTestLanguageFactory()
|
||||
{
|
||||
return (Core861_contentAssistLookAheadTestLanguageFactory)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
|
||||
memberEClass = createEClass(MEMBER);
|
||||
createEReference(memberEClass, MEMBER__ANNOTATIONS);
|
||||
createEAttribute(memberEClass, MEMBER__MODIFIER);
|
||||
createEReference(memberEClass, MEMBER__TYPE);
|
||||
createEAttribute(memberEClass, MEMBER__NAME);
|
||||
|
||||
fieldDeclEClass = createEClass(FIELD_DECL);
|
||||
createEAttribute(fieldDeclEClass, FIELD_DECL__INIT_VAL);
|
||||
|
||||
methodDeclEClass = createEClass(METHOD_DECL);
|
||||
createEReference(methodDeclEClass, METHOD_DECL__DECLS);
|
||||
createEReference(methodDeclEClass, METHOD_DECL__STATEMENTS);
|
||||
|
||||
typeEClass = createEClass(TYPE);
|
||||
|
||||
statementEClass = createEClass(STATEMENT);
|
||||
|
||||
assignmentStatementEClass = createEClass(ASSIGNMENT_STATEMENT);
|
||||
|
||||
featureCallEClass = createEClass(FEATURE_CALL);
|
||||
createEReference(featureCallEClass, FEATURE_CALL__FEATURE);
|
||||
|
||||
annotationEClass = createEClass(ANNOTATION);
|
||||
createEAttribute(annotationEClass, ANNOTATION__KEY);
|
||||
createEAttribute(annotationEClass, ANNOTATION__VALUES);
|
||||
|
||||
intTypeEClass = createEClass(INT_TYPE);
|
||||
|
||||
typeRefEClass = createEClass(TYPE_REF);
|
||||
createEReference(typeRefEClass, TYPE_REF__TYPE);
|
||||
|
||||
returnEClass = createEClass(RETURN);
|
||||
|
||||
assignmentEClass = createEClass(ASSIGNMENT);
|
||||
createEReference(assignmentEClass, ASSIGNMENT__FEATURE);
|
||||
createEAttribute(assignmentEClass, ASSIGNMENT__RHS);
|
||||
|
||||
memberCallEClass = createEClass(MEMBER_CALL);
|
||||
createEReference(memberCallEClass, MEMBER_CALL__OWNER);
|
||||
createEReference(memberCallEClass, MEMBER_CALL__MEMBER);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- 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);
|
||||
|
||||
// Obtain other dependent packages
|
||||
EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
|
||||
|
||||
// Create type parameters
|
||||
|
||||
// Set bounds for type parameters
|
||||
|
||||
// Add supertypes to classes
|
||||
fieldDeclEClass.getESuperTypes().add(this.getMember());
|
||||
methodDeclEClass.getESuperTypes().add(this.getMember());
|
||||
assignmentStatementEClass.getESuperTypes().add(this.getStatement());
|
||||
featureCallEClass.getESuperTypes().add(this.getAssignmentStatement());
|
||||
intTypeEClass.getESuperTypes().add(this.getType());
|
||||
typeRefEClass.getESuperTypes().add(this.getType());
|
||||
returnEClass.getESuperTypes().add(this.getStatement());
|
||||
assignmentEClass.getESuperTypes().add(this.getAssignmentStatement());
|
||||
memberCallEClass.getESuperTypes().add(this.getFeatureCall());
|
||||
|
||||
// Initialize classes and features; add operations and parameters
|
||||
initEClass(memberEClass, Member.class, "Member", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getMember_Annotations(), this.getAnnotation(), null, "annotations", null, 0, -1, Member.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getMember_Modifier(), theEcorePackage.getEString(), "modifier", null, 0, 1, Member.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getMember_Type(), this.getType(), null, "type", null, 0, 1, Member.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getMember_Name(), theEcorePackage.getEString(), "name", null, 0, 1, Member.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(fieldDeclEClass, FieldDecl.class, "FieldDecl", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getFieldDecl_InitVal(), theEcorePackage.getEInt(), "initVal", null, 0, 1, FieldDecl.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(methodDeclEClass, MethodDecl.class, "MethodDecl", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getMethodDecl_Decls(), this.getFieldDecl(), null, "decls", null, 0, -1, MethodDecl.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getMethodDecl_Statements(), this.getStatement(), null, "statements", null, 0, -1, MethodDecl.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(typeEClass, Type.class, "Type", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(statementEClass, Statement.class, "Statement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(assignmentStatementEClass, AssignmentStatement.class, "AssignmentStatement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(featureCallEClass, FeatureCall.class, "FeatureCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getFeatureCall_Feature(), this.getMember(), null, "feature", null, 0, 1, FeatureCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(annotationEClass, Annotation.class, "Annotation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEAttribute(getAnnotation_Key(), theEcorePackage.getEString(), "key", null, 0, 1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getAnnotation_Values(), theEcorePackage.getEString(), "values", null, 0, -1, Annotation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(intTypeEClass, IntType.class, "IntType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(typeRefEClass, TypeRef.class, "TypeRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getTypeRef_Type(), this.getType(), null, "type", null, 0, 1, TypeRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(returnEClass, Return.class, "Return", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
|
||||
initEClass(assignmentEClass, Assignment.class, "Assignment", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getAssignment_Feature(), this.getFeatureCall(), null, "feature", null, 0, 1, Assignment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getAssignment_Rhs(), theEcorePackage.getEInt(), "rhs", null, 0, 1, Assignment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(memberCallEClass, MemberCall.class, "MemberCall", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getMemberCall_Owner(), this.getFeatureCall(), null, "owner", null, 0, 1, MemberCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getMemberCall_Member(), this.getMember(), null, "member", null, 0, 1, MemberCall.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
// Create resource
|
||||
createResource(eNS_URI);
|
||||
}
|
||||
|
||||
} //Core861_contentAssistLookAheadTestLanguagePackageImpl
|
|
@ -0,0 +1,177 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Feature Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.FeatureCallImpl#getFeature <em>Feature</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class FeatureCallImpl extends AssignmentStatementImpl implements FeatureCall
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getFeature()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected Member feature;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected FeatureCallImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.FEATURE_CALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Member getFeature()
|
||||
{
|
||||
if (feature != null && feature.eIsProxy())
|
||||
{
|
||||
InternalEObject oldFeature = (InternalEObject)feature;
|
||||
feature = (Member)eResolveProxy(oldFeature);
|
||||
if (feature != oldFeature)
|
||||
{
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL__FEATURE, oldFeature, feature));
|
||||
}
|
||||
}
|
||||
return feature;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Member basicGetFeature()
|
||||
{
|
||||
return feature;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setFeature(Member newFeature)
|
||||
{
|
||||
Member oldFeature = feature;
|
||||
feature = newFeature;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL__FEATURE, oldFeature, feature));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL__FEATURE:
|
||||
if (resolve) return getFeature();
|
||||
return basicGetFeature();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL__FEATURE:
|
||||
setFeature((Member)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL__FEATURE:
|
||||
setFeature((Member)null);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL__FEATURE:
|
||||
return feature != null;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //FeatureCallImpl
|
|
@ -0,0 +1,181 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Field Decl</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.FieldDeclImpl#getInitVal <em>Init Val</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class FieldDeclImpl extends MemberImpl implements FieldDecl
|
||||
{
|
||||
/**
|
||||
* The default value of the '{@link #getInitVal() <em>Init Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getInitVal()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final int INIT_VAL_EDEFAULT = 0;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getInitVal() <em>Init Val</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getInitVal()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected int initVal = INIT_VAL_EDEFAULT;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected FieldDeclImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.FIELD_DECL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public int getInitVal()
|
||||
{
|
||||
return initVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setInitVal(int newInitVal)
|
||||
{
|
||||
int oldInitVal = initVal;
|
||||
initVal = newInitVal;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL__INIT_VAL, oldInitVal, initVal));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL__INIT_VAL:
|
||||
return getInitVal();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL__INIT_VAL:
|
||||
setInitVal((Integer)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL__INIT_VAL:
|
||||
setInitVal(INIT_VAL_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL__INIT_VAL:
|
||||
return initVal != INIT_VAL_EDEFAULT;
|
||||
}
|
||||
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(" (initVal: ");
|
||||
result.append(initVal);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //FieldDeclImpl
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.IntType;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Int Type</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class IntTypeImpl extends TypeImpl implements IntType
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected IntTypeImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.INT_TYPE;
|
||||
}
|
||||
|
||||
} //IntTypeImpl
|
|
@ -0,0 +1,264 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Member Call</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MemberCallImpl#getOwner <em>Owner</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MemberCallImpl#getMember <em>Member</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class MemberCallImpl extends FeatureCallImpl implements MemberCall
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getOwner() <em>Owner</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getOwner()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected FeatureCall owner;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getMember() <em>Member</em>}' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getMember()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected Member member;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected MemberCallImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER_CALL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public FeatureCall getOwner()
|
||||
{
|
||||
return owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain basicSetOwner(FeatureCall newOwner, NotificationChain msgs)
|
||||
{
|
||||
FeatureCall oldOwner = owner;
|
||||
owner = newOwner;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER, oldOwner, newOwner);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setOwner(FeatureCall newOwner)
|
||||
{
|
||||
if (newOwner != owner)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (owner != null)
|
||||
msgs = ((InternalEObject)owner).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER, null, msgs);
|
||||
if (newOwner != null)
|
||||
msgs = ((InternalEObject)newOwner).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER, null, msgs);
|
||||
msgs = basicSetOwner(newOwner, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER, newOwner, newOwner));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Member getMember()
|
||||
{
|
||||
if (member != null && member.eIsProxy())
|
||||
{
|
||||
InternalEObject oldMember = (InternalEObject)member;
|
||||
member = (Member)eResolveProxy(oldMember);
|
||||
if (member != oldMember)
|
||||
{
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__MEMBER, oldMember, member));
|
||||
}
|
||||
}
|
||||
return member;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Member basicGetMember()
|
||||
{
|
||||
return member;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setMember(Member newMember)
|
||||
{
|
||||
Member oldMember = member;
|
||||
member = newMember;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__MEMBER, oldMember, member));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER:
|
||||
return basicSetOwner(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 Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER:
|
||||
return getOwner();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__MEMBER:
|
||||
if (resolve) return getMember();
|
||||
return basicGetMember();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER:
|
||||
setOwner((FeatureCall)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__MEMBER:
|
||||
setMember((Member)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER:
|
||||
setOwner((FeatureCall)null);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__MEMBER:
|
||||
setMember((Member)null);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__OWNER:
|
||||
return owner != null;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL__MEMBER:
|
||||
return member != null;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //MemberCallImpl
|
|
@ -0,0 +1,373 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Member;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Type;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Member</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MemberImpl#getAnnotations <em>Annotations</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MemberImpl#getModifier <em>Modifier</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MemberImpl#getType <em>Type</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MemberImpl#getName <em>Name</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class MemberImpl extends MinimalEObjectImpl.Container implements Member
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getAnnotations() <em>Annotations</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAnnotations()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<Annotation> annotations;
|
||||
|
||||
/**
|
||||
* The default value of the '{@link #getModifier() <em>Modifier</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getModifier()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected static final String MODIFIER_EDEFAULT = null;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getModifier() <em>Modifier</em>}' attribute.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getModifier()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected String modifier = MODIFIER_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getType() <em>Type</em>}' containment reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getType()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected Type type;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected MemberImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<Annotation> getAnnotations()
|
||||
{
|
||||
if (annotations == null)
|
||||
{
|
||||
annotations = new EObjectContainmentEList<Annotation>(Annotation.class, this, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__ANNOTATIONS);
|
||||
}
|
||||
return annotations;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getModifier()
|
||||
{
|
||||
return modifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setModifier(String newModifier)
|
||||
{
|
||||
String oldModifier = modifier;
|
||||
modifier = newModifier;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__MODIFIER, oldModifier, modifier));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Type getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public NotificationChain basicSetType(Type newType, NotificationChain msgs)
|
||||
{
|
||||
Type oldType = type;
|
||||
type = newType;
|
||||
if (eNotificationRequired())
|
||||
{
|
||||
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE, oldType, newType);
|
||||
if (msgs == null) msgs = notification; else msgs.add(notification);
|
||||
}
|
||||
return msgs;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setType(Type newType)
|
||||
{
|
||||
if (newType != type)
|
||||
{
|
||||
NotificationChain msgs = null;
|
||||
if (type != null)
|
||||
msgs = ((InternalEObject)type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE, null, msgs);
|
||||
if (newType != null)
|
||||
msgs = ((InternalEObject)newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE, null, msgs);
|
||||
msgs = basicSetType(newType, msgs);
|
||||
if (msgs != null) msgs.dispatch();
|
||||
}
|
||||
else if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE, newType, newType));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setName(String newName)
|
||||
{
|
||||
String oldName = name;
|
||||
name = newName;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__NAME, oldName, name));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__ANNOTATIONS:
|
||||
return ((InternalEList<?>)getAnnotations()).basicRemove(otherEnd, msgs);
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE:
|
||||
return basicSetType(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 Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__ANNOTATIONS:
|
||||
return getAnnotations();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__MODIFIER:
|
||||
return getModifier();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE:
|
||||
return getType();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__NAME:
|
||||
return getName();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__ANNOTATIONS:
|
||||
getAnnotations().clear();
|
||||
getAnnotations().addAll((Collection<? extends Annotation>)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__MODIFIER:
|
||||
setModifier((String)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE:
|
||||
setType((Type)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__NAME:
|
||||
setName((String)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__ANNOTATIONS:
|
||||
getAnnotations().clear();
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__MODIFIER:
|
||||
setModifier(MODIFIER_EDEFAULT);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE:
|
||||
setType((Type)null);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__NAME:
|
||||
setName(NAME_EDEFAULT);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__ANNOTATIONS:
|
||||
return annotations != null && !annotations.isEmpty();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__MODIFIER:
|
||||
return MODIFIER_EDEFAULT == null ? modifier != null : !MODIFIER_EDEFAULT.equals(modifier);
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__TYPE:
|
||||
return type != null;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER__NAME:
|
||||
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
|
||||
}
|
||||
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(" (modifier: ");
|
||||
result.append(modifier);
|
||||
result.append(", name: ");
|
||||
result.append(name);
|
||||
result.append(')');
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
} //MemberImpl
|
|
@ -0,0 +1,209 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MethodDecl;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Statement;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Method Decl</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MethodDeclImpl#getDecls <em>Decls</em>}</li>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.MethodDeclImpl#getStatements <em>Statements</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class MethodDeclImpl extends MemberImpl implements MethodDecl
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getDecls() <em>Decls</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getDecls()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<FieldDecl> decls;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getStatements() <em>Statements</em>}' containment reference list.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getStatements()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EList<Statement> statements;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected MethodDeclImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.METHOD_DECL;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<FieldDecl> getDecls()
|
||||
{
|
||||
if (decls == null)
|
||||
{
|
||||
decls = new EObjectContainmentEList<FieldDecl>(FieldDecl.class, this, Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__DECLS);
|
||||
}
|
||||
return decls;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EList<Statement> getStatements()
|
||||
{
|
||||
if (statements == null)
|
||||
{
|
||||
statements = new EObjectContainmentEList<Statement>(Statement.class, this, Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__STATEMENTS);
|
||||
}
|
||||
return statements;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__DECLS:
|
||||
return ((InternalEList<?>)getDecls()).basicRemove(otherEnd, msgs);
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__STATEMENTS:
|
||||
return ((InternalEList<?>)getStatements()).basicRemove(otherEnd, 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 Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__DECLS:
|
||||
return getDecls();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__STATEMENTS:
|
||||
return getStatements();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__DECLS:
|
||||
getDecls().clear();
|
||||
getDecls().addAll((Collection<? extends FieldDecl>)newValue);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__STATEMENTS:
|
||||
getStatements().clear();
|
||||
getStatements().addAll((Collection<? extends Statement>)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__DECLS:
|
||||
getDecls().clear();
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__STATEMENTS:
|
||||
getStatements().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__DECLS:
|
||||
return decls != null && !decls.isEmpty();
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL__STATEMENTS:
|
||||
return statements != null && !statements.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //MethodDeclImpl
|
|
@ -0,0 +1,45 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Return;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Return</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class ReturnImpl extends StatementImpl implements Return
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected ReturnImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.RETURN;
|
||||
}
|
||||
|
||||
} //ReturnImpl
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Statement;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Statement</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class StatementImpl extends MinimalEObjectImpl.Container implements Statement
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected StatementImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.STATEMENT;
|
||||
}
|
||||
|
||||
} //StatementImpl
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
|
||||
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Type;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Type</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class TypeImpl extends MinimalEObjectImpl.Container implements Type
|
||||
{
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected TypeImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.TYPE;
|
||||
}
|
||||
|
||||
} //TypeImpl
|
|
@ -0,0 +1,177 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.impl;
|
||||
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
|
||||
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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Type;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.TypeRef;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* An implementation of the model object '<em><b>Type Ref</b></em>'.
|
||||
* <!-- end-user-doc -->
|
||||
* <p>
|
||||
* The following features are implemented:
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.impl.TypeRefImpl#getType <em>Type</em>}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
public class TypeRefImpl extends TypeImpl implements TypeRef
|
||||
{
|
||||
/**
|
||||
* The cached value of the '{@link #getType() <em>Type</em>}' reference.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getType()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected Type type;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected TypeRefImpl()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
protected EClass eStaticClass()
|
||||
{
|
||||
return Core861_contentAssistLookAheadTestLanguagePackage.Literals.TYPE_REF;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Type getType()
|
||||
{
|
||||
if (type != null && type.eIsProxy())
|
||||
{
|
||||
InternalEObject oldType = (InternalEObject)type;
|
||||
type = (Type)eResolveProxy(oldType);
|
||||
if (type != oldType)
|
||||
{
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.RESOLVE, Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF__TYPE, oldType, type));
|
||||
}
|
||||
}
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Type basicGetType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public void setType(Type newType)
|
||||
{
|
||||
Type oldType = type;
|
||||
type = newType;
|
||||
if (eNotificationRequired())
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF__TYPE, oldType, type));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public Object eGet(int featureID, boolean resolve, boolean coreType)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF__TYPE:
|
||||
if (resolve) return getType();
|
||||
return basicGetType();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eSet(int featureID, Object newValue)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF__TYPE:
|
||||
setType((Type)newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public void eUnset(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF__TYPE:
|
||||
setType((Type)null);
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
@Override
|
||||
public boolean eIsSet(int featureID)
|
||||
{
|
||||
switch (featureID)
|
||||
{
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF__TYPE:
|
||||
return type != null;
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
} //TypeRefImpl
|
|
@ -0,0 +1,377 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.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.core861_contentAssistLookAheadTestLanguage.*;
|
||||
|
||||
/**
|
||||
* <!-- 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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage
|
||||
* @generated
|
||||
*/
|
||||
public class Core861_contentAssistLookAheadTestLanguageAdapterFactory extends AdapterFactoryImpl
|
||||
{
|
||||
/**
|
||||
* The cached model package.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected static Core861_contentAssistLookAheadTestLanguagePackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the adapter factory.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Core861_contentAssistLookAheadTestLanguageAdapterFactory()
|
||||
{
|
||||
if (modelPackage == null)
|
||||
{
|
||||
modelPackage = Core861_contentAssistLookAheadTestLanguagePackage.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 Core861_contentAssistLookAheadTestLanguageSwitch<Adapter> modelSwitch =
|
||||
new Core861_contentAssistLookAheadTestLanguageSwitch<Adapter>()
|
||||
{
|
||||
@Override
|
||||
public Adapter caseMember(Member object)
|
||||
{
|
||||
return createMemberAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseFieldDecl(FieldDecl object)
|
||||
{
|
||||
return createFieldDeclAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseMethodDecl(MethodDecl object)
|
||||
{
|
||||
return createMethodDeclAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseType(Type object)
|
||||
{
|
||||
return createTypeAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseStatement(Statement object)
|
||||
{
|
||||
return createStatementAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseAssignmentStatement(AssignmentStatement object)
|
||||
{
|
||||
return createAssignmentStatementAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseFeatureCall(FeatureCall object)
|
||||
{
|
||||
return createFeatureCallAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseAnnotation(Annotation object)
|
||||
{
|
||||
return createAnnotationAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseIntType(IntType object)
|
||||
{
|
||||
return createIntTypeAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseTypeRef(TypeRef object)
|
||||
{
|
||||
return createTypeRefAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseReturn(Return object)
|
||||
{
|
||||
return createReturnAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseAssignment(Assignment object)
|
||||
{
|
||||
return createAssignmentAdapter();
|
||||
}
|
||||
@Override
|
||||
public Adapter caseMemberCall(MemberCall object)
|
||||
{
|
||||
return createMemberCallAdapter();
|
||||
}
|
||||
@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.core861_contentAssistLookAheadTestLanguage.Member <em>Member</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.core861_contentAssistLookAheadTestLanguage.Member
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createMemberAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl <em>Field Decl</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.core861_contentAssistLookAheadTestLanguage.FieldDecl
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createFieldDeclAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MethodDecl <em>Method Decl</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.core861_contentAssistLookAheadTestLanguage.MethodDecl
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createMethodDeclAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Type <em>Type</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.core861_contentAssistLookAheadTestLanguage.Type
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createTypeAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Statement <em>Statement</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.core861_contentAssistLookAheadTestLanguage.Statement
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createStatementAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.AssignmentStatement <em>Assignment Statement</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.core861_contentAssistLookAheadTestLanguage.AssignmentStatement
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createAssignmentStatementAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall <em>Feature Call</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.core861_contentAssistLookAheadTestLanguage.FeatureCall
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createFeatureCallAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation <em>Annotation</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.core861_contentAssistLookAheadTestLanguage.Annotation
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createAnnotationAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.IntType <em>Int Type</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.core861_contentAssistLookAheadTestLanguage.IntType
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createIntTypeAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.TypeRef <em>Type Ref</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.core861_contentAssistLookAheadTestLanguage.TypeRef
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createTypeRefAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Return <em>Return</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.core861_contentAssistLookAheadTestLanguage.Return
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createReturnAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment <em>Assignment</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.core861_contentAssistLookAheadTestLanguage.Assignment
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createAssignmentAdapter()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new adapter for an object of class '{@link org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall <em>Member Call</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.core861_contentAssistLookAheadTestLanguage.MemberCall
|
||||
* @generated
|
||||
*/
|
||||
public Adapter createMemberCallAdapter()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
} //Core861_contentAssistLookAheadTestLanguageAdapterFactory
|
|
@ -0,0 +1,413 @@
|
|||
/**
|
||||
* 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.core861_contentAssistLookAheadTestLanguage.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.core861_contentAssistLookAheadTestLanguage.*;
|
||||
|
||||
/**
|
||||
* <!-- 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.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage
|
||||
* @generated
|
||||
*/
|
||||
public class Core861_contentAssistLookAheadTestLanguageSwitch<T> extends Switch<T>
|
||||
{
|
||||
/**
|
||||
* The cached model package
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
protected static Core861_contentAssistLookAheadTestLanguagePackage modelPackage;
|
||||
|
||||
/**
|
||||
* Creates an instance of the switch.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public Core861_contentAssistLookAheadTestLanguageSwitch()
|
||||
{
|
||||
if (modelPackage == null)
|
||||
{
|
||||
modelPackage = Core861_contentAssistLookAheadTestLanguagePackage.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 Core861_contentAssistLookAheadTestLanguagePackage.MEMBER:
|
||||
{
|
||||
Member member = (Member)theEObject;
|
||||
T result = caseMember(member);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL:
|
||||
{
|
||||
FieldDecl fieldDecl = (FieldDecl)theEObject;
|
||||
T result = caseFieldDecl(fieldDecl);
|
||||
if (result == null) result = caseMember(fieldDecl);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL:
|
||||
{
|
||||
MethodDecl methodDecl = (MethodDecl)theEObject;
|
||||
T result = caseMethodDecl(methodDecl);
|
||||
if (result == null) result = caseMember(methodDecl);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE:
|
||||
{
|
||||
Type type = (Type)theEObject;
|
||||
T result = caseType(type);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.STATEMENT:
|
||||
{
|
||||
Statement statement = (Statement)theEObject;
|
||||
T result = caseStatement(statement);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT_STATEMENT:
|
||||
{
|
||||
AssignmentStatement assignmentStatement = (AssignmentStatement)theEObject;
|
||||
T result = caseAssignmentStatement(assignmentStatement);
|
||||
if (result == null) result = caseStatement(assignmentStatement);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL:
|
||||
{
|
||||
FeatureCall featureCall = (FeatureCall)theEObject;
|
||||
T result = caseFeatureCall(featureCall);
|
||||
if (result == null) result = caseAssignmentStatement(featureCall);
|
||||
if (result == null) result = caseStatement(featureCall);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION:
|
||||
{
|
||||
Annotation annotation = (Annotation)theEObject;
|
||||
T result = caseAnnotation(annotation);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.INT_TYPE:
|
||||
{
|
||||
IntType intType = (IntType)theEObject;
|
||||
T result = caseIntType(intType);
|
||||
if (result == null) result = caseType(intType);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF:
|
||||
{
|
||||
TypeRef typeRef = (TypeRef)theEObject;
|
||||
T result = caseTypeRef(typeRef);
|
||||
if (result == null) result = caseType(typeRef);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.RETURN:
|
||||
{
|
||||
Return return_ = (Return)theEObject;
|
||||
T result = caseReturn(return_);
|
||||
if (result == null) result = caseStatement(return_);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT:
|
||||
{
|
||||
Assignment assignment = (Assignment)theEObject;
|
||||
T result = caseAssignment(assignment);
|
||||
if (result == null) result = caseAssignmentStatement(assignment);
|
||||
if (result == null) result = caseStatement(assignment);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL:
|
||||
{
|
||||
MemberCall memberCall = (MemberCall)theEObject;
|
||||
T result = caseMemberCall(memberCall);
|
||||
if (result == null) result = caseFeatureCall(memberCall);
|
||||
if (result == null) result = caseAssignmentStatement(memberCall);
|
||||
if (result == null) result = caseStatement(memberCall);
|
||||
if (result == null) result = defaultCase(theEObject);
|
||||
return result;
|
||||
}
|
||||
default: return defaultCase(theEObject);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Member</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>Member</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseMember(Member object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Field Decl</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>Field Decl</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseFieldDecl(FieldDecl object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Method Decl</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>Method Decl</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseMethodDecl(MethodDecl object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Type</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>Type</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseType(Type object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Statement</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>Statement</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseStatement(Statement object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Assignment Statement</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>Assignment Statement</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseAssignmentStatement(AssignmentStatement object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Feature Call</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>Feature Call</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseFeatureCall(FeatureCall object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Annotation</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>Annotation</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseAnnotation(Annotation object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Int Type</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>Int Type</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseIntType(IntType object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Type Ref</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>Type Ref</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseTypeRef(TypeRef object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Return</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>Return</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseReturn(Return object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Assignment</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>Assignment</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseAssignment(Assignment object)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of interpreting the object as an instance of '<em>Member Call</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>Member Call</em>'.
|
||||
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
|
||||
* @generated
|
||||
*/
|
||||
public T caseMemberCall(MemberCall 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;
|
||||
}
|
||||
|
||||
} //Core861_contentAssistLookAheadTestLanguageSwitch
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
* 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.ide;
|
||||
|
||||
import com.google.inject.Binder;
|
||||
import com.google.inject.name.Names;
|
||||
import org.eclipse.xtext.ide.DefaultIdeModule;
|
||||
import org.eclipse.xtext.ide.LexerIdeBindings;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
|
||||
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2;
|
||||
import org.eclipse.xtext.ide.server.rename.IRenameService;
|
||||
import org.eclipse.xtext.ide.server.rename.RenameService;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.ide.contentassist.antlr.Core861_ContentAssistLookAheadTestLanguageParser;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.ide.contentassist.antlr.internal.InternalCore861_ContentAssistLookAheadTestLanguageLexer;
|
||||
|
||||
/**
|
||||
* Manual modifications go to {@link Core861_ContentAssistLookAheadTestLanguageIdeModule}.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public abstract class AbstractCore861_ContentAssistLookAheadTestLanguageIdeModule extends DefaultIdeModule {
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public void configureContentAssistLexer(Binder binder) {
|
||||
binder.bind(Lexer.class)
|
||||
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
|
||||
.to(InternalCore861_ContentAssistLookAheadTestLanguageLexer.class);
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageParser.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
|
||||
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
|
||||
return AntlrProposalConflictHelper.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
|
||||
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() {
|
||||
return FQNPrefixMatcher.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
|
||||
public Class<? extends IRenameService> bindIRenameService() {
|
||||
return RenameService.class;
|
||||
}
|
||||
|
||||
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
|
||||
public Class<? extends IRenameStrategy2> bindIRenameStrategy2() {
|
||||
return IRenameStrategy2.DefaultImpl.class;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
* 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.ide.contentassist.antlr;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.Map;
|
||||
import org.eclipse.xtext.AbstractElement;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.ide.contentassist.antlr.internal.InternalCore861_ContentAssistLookAheadTestLanguageParser;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.Core861_ContentAssistLookAheadTestLanguageGrammarAccess;
|
||||
|
||||
public class Core861_ContentAssistLookAheadTestLanguageParser extends AbstractContentAssistParser {
|
||||
|
||||
@Singleton
|
||||
public static final class NameMappings {
|
||||
|
||||
private final Map<AbstractElement, String> mappings;
|
||||
|
||||
@Inject
|
||||
public NameMappings(Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess) {
|
||||
ImmutableMap.Builder<AbstractElement, String> builder = ImmutableMap.builder();
|
||||
init(builder, grammarAccess);
|
||||
this.mappings = builder.build();
|
||||
}
|
||||
|
||||
public String getRuleName(AbstractElement element) {
|
||||
return mappings.get(element);
|
||||
}
|
||||
|
||||
private static void init(ImmutableMap.Builder<AbstractElement, String> builder, Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess) {
|
||||
builder.put(grammarAccess.getMemberAccess().getAlternatives(), "rule__Member__Alternatives");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getModifierAlternatives_1_0(), "rule__FieldDecl__ModifierAlternatives_1_0");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getModifierAlternatives_1_0(), "rule__MethodDecl__ModifierAlternatives_1_0");
|
||||
builder.put(grammarAccess.getTypeAccess().getAlternatives(), "rule__Type__Alternatives");
|
||||
builder.put(grammarAccess.getStatementAccess().getAlternatives(), "rule__Statement__Alternatives");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getGroup(), "rule__FieldDecl__Group__0");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getGroup_4(), "rule__FieldDecl__Group_4__0");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getGroup(), "rule__MethodDecl__Group__0");
|
||||
builder.put(grammarAccess.getTypeAccess().getGroup_0(), "rule__Type__Group_0__0");
|
||||
builder.put(grammarAccess.getTypeAccess().getGroup_1(), "rule__Type__Group_1__0");
|
||||
builder.put(grammarAccess.getQualifiedNameAccess().getGroup(), "rule__QualifiedName__Group__0");
|
||||
builder.put(grammarAccess.getQualifiedNameAccess().getGroup_1(), "rule__QualifiedName__Group_1__0");
|
||||
builder.put(grammarAccess.getStatementAccess().getGroup_1(), "rule__Statement__Group_1__0");
|
||||
builder.put(grammarAccess.getAssignmentStatementAccess().getGroup(), "rule__AssignmentStatement__Group__0");
|
||||
builder.put(grammarAccess.getAssignmentStatementAccess().getGroup_1(), "rule__AssignmentStatement__Group_1__0");
|
||||
builder.put(grammarAccess.getFeatureCallAccess().getGroup(), "rule__FeatureCall__Group__0");
|
||||
builder.put(grammarAccess.getFeatureCallAccess().getGroup_1(), "rule__FeatureCall__Group_1__0");
|
||||
builder.put(grammarAccess.getAnnotationAccess().getGroup(), "rule__Annotation__Group__0");
|
||||
builder.put(grammarAccess.getAnnotationAccess().getGroup_2(), "rule__Annotation__Group_2__0");
|
||||
builder.put(grammarAccess.getAnnotationAccess().getGroup_2_2(), "rule__Annotation__Group_2_2__0");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getAnnotationsAssignment_0(), "rule__FieldDecl__AnnotationsAssignment_0");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getModifierAssignment_1(), "rule__FieldDecl__ModifierAssignment_1");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getTypeAssignment_2(), "rule__FieldDecl__TypeAssignment_2");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getNameAssignment_3(), "rule__FieldDecl__NameAssignment_3");
|
||||
builder.put(grammarAccess.getFieldDeclAccess().getInitValAssignment_4_1(), "rule__FieldDecl__InitValAssignment_4_1");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getAnnotationsAssignment_0(), "rule__MethodDecl__AnnotationsAssignment_0");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getModifierAssignment_1(), "rule__MethodDecl__ModifierAssignment_1");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getTypeAssignment_2(), "rule__MethodDecl__TypeAssignment_2");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getNameAssignment_3(), "rule__MethodDecl__NameAssignment_3");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getDeclsAssignment_7(), "rule__MethodDecl__DeclsAssignment_7");
|
||||
builder.put(grammarAccess.getMethodDeclAccess().getStatementsAssignment_8(), "rule__MethodDecl__StatementsAssignment_8");
|
||||
builder.put(grammarAccess.getTypeAccess().getTypeAssignment_1_1(), "rule__Type__TypeAssignment_1_1");
|
||||
builder.put(grammarAccess.getAssignmentStatementAccess().getRhsAssignment_1_2(), "rule__AssignmentStatement__RhsAssignment_1_2");
|
||||
builder.put(grammarAccess.getFeatureCallAccess().getFeatureAssignment_0(), "rule__FeatureCall__FeatureAssignment_0");
|
||||
builder.put(grammarAccess.getFeatureCallAccess().getMemberAssignment_1_2(), "rule__FeatureCall__MemberAssignment_1_2");
|
||||
builder.put(grammarAccess.getAnnotationAccess().getKeyAssignment_1(), "rule__Annotation__KeyAssignment_1");
|
||||
builder.put(grammarAccess.getAnnotationAccess().getValuesAssignment_2_1(), "rule__Annotation__ValuesAssignment_2_1");
|
||||
builder.put(grammarAccess.getAnnotationAccess().getValuesAssignment_2_2_1(), "rule__Annotation__ValuesAssignment_2_2_1");
|
||||
}
|
||||
}
|
||||
|
||||
@Inject
|
||||
private NameMappings nameMappings;
|
||||
|
||||
@Inject
|
||||
private Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
protected InternalCore861_ContentAssistLookAheadTestLanguageParser createParser() {
|
||||
InternalCore861_ContentAssistLookAheadTestLanguageParser result = new InternalCore861_ContentAssistLookAheadTestLanguageParser(null);
|
||||
result.setGrammarAccess(grammarAccess);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getRuleName(AbstractElement element) {
|
||||
return nameMappings.getRuleName(element);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String[] getInitialHiddenTokens() {
|
||||
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
|
||||
}
|
||||
|
||||
public Core861_ContentAssistLookAheadTestLanguageGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
public void setGrammarAccess(Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
|
||||
public NameMappings getNameMappings() {
|
||||
return nameMappings;
|
||||
}
|
||||
|
||||
public void setNameMappings(NameMappings nameMappings) {
|
||||
this.nameMappings = nameMappings;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.ide.contentassist.antlr;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import org.eclipse.xtext.AbstractRule;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
|
||||
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
|
||||
import org.eclipse.xtext.util.PolymorphicDispatcher;
|
||||
|
||||
public class PartialCore861_ContentAssistLookAheadTestLanguageContentAssistParser extends Core861_ContentAssistLookAheadTestLanguageParser implements IPartialEditingContentAssistParser {
|
||||
|
||||
private AbstractRule rule;
|
||||
|
||||
@Override
|
||||
public void initializeFor(AbstractRule rule) {
|
||||
this.rule = rule;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
|
||||
if (rule == null || rule.eIsProxy())
|
||||
return Collections.emptyList();
|
||||
String methodName = "entryRule" + rule.getName();
|
||||
PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
|
||||
new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
|
||||
dispatcher.invoke();
|
||||
return parser.getFollowElements();
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,33 @@
|
|||
'('=15
|
||||
')'=16
|
||||
','=23
|
||||
'.'=20
|
||||
';'=13
|
||||
'='=14
|
||||
'@'=22
|
||||
'int'=19
|
||||
'private'=11
|
||||
'public'=12
|
||||
'return'=21
|
||||
'{'=17
|
||||
'}'=18
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_ID=4
|
||||
RULE_INT=5
|
||||
RULE_ML_COMMENT=7
|
||||
RULE_SL_COMMENT=8
|
||||
RULE_STRING=6
|
||||
RULE_WS=9
|
||||
T__11=11
|
||||
T__12=12
|
||||
T__13=13
|
||||
T__14=14
|
||||
T__15=15
|
||||
T__16=16
|
||||
T__17=17
|
||||
T__18=18
|
||||
T__19=19
|
||||
T__20=20
|
||||
T__21=21
|
||||
T__22=22
|
||||
T__23=23
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* 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.parser.antlr;
|
||||
|
||||
import java.io.InputStream;
|
||||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider;
|
||||
|
||||
public class Core861_ContentAssistLookAheadTestLanguageAntlrTokenFileProvider implements IAntlrTokenFileProvider {
|
||||
|
||||
@Override
|
||||
public InputStream getAntlrTokenFile() {
|
||||
ClassLoader classLoader = getClass().getClassLoader();
|
||||
return classLoader.getResourceAsStream("org/eclipse/xtext/ide/tests/testlanguage/parser/antlr/internal/InternalCore861_ContentAssistLookAheadTestLanguage.tokens");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* 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.parser.antlr;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.parser.antlr.internal.InternalCore861_ContentAssistLookAheadTestLanguageParser;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.Core861_ContentAssistLookAheadTestLanguageGrammarAccess;
|
||||
import org.eclipse.xtext.parser.antlr.AbstractAntlrParser;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
|
||||
public class Core861_ContentAssistLookAheadTestLanguageParser extends AbstractAntlrParser {
|
||||
|
||||
@Inject
|
||||
private Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) {
|
||||
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected InternalCore861_ContentAssistLookAheadTestLanguageParser createParser(XtextTokenStream stream) {
|
||||
return new InternalCore861_ContentAssistLookAheadTestLanguageParser(stream, getGrammarAccess());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getDefaultRuleName() {
|
||||
return "Member";
|
||||
}
|
||||
|
||||
public Core861_ContentAssistLookAheadTestLanguageGrammarAccess getGrammarAccess() {
|
||||
return this.grammarAccess;
|
||||
}
|
||||
|
||||
public void setGrammarAccess(Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess) {
|
||||
this.grammarAccess = grammarAccess;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,760 @@
|
|||
/*
|
||||
* 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
|
||||
*/
|
||||
grammar InternalCore861_ContentAssistLookAheadTestLanguage;
|
||||
|
||||
options {
|
||||
superClass=AbstractInternalAntlrParser;
|
||||
}
|
||||
|
||||
@lexer::header {
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.parser.antlr.internal;
|
||||
|
||||
// Hack: Use our own Lexer superclass by means of import.
|
||||
// Currently there is no other way to specify the superclass for the lexer.
|
||||
import org.eclipse.xtext.parser.antlr.Lexer;
|
||||
}
|
||||
|
||||
@parser::header {
|
||||
package org.eclipse.xtext.ide.tests.testlanguage.parser.antlr.internal;
|
||||
|
||||
import org.eclipse.xtext.*;
|
||||
import org.eclipse.xtext.parser.*;
|
||||
import org.eclipse.xtext.parser.impl.*;
|
||||
import org.eclipse.emf.ecore.util.EcoreUtil;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
|
||||
import org.eclipse.xtext.parser.antlr.XtextTokenStream.HiddenTokens;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrDatatypeRuleToken;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.Core861_ContentAssistLookAheadTestLanguageGrammarAccess;
|
||||
|
||||
}
|
||||
|
||||
@parser::members {
|
||||
|
||||
private Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
public InternalCore861_ContentAssistLookAheadTestLanguageParser(TokenStream input, Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess) {
|
||||
this(input);
|
||||
this.grammarAccess = grammarAccess;
|
||||
registerRules(grammarAccess.getGrammar());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFirstRuleName() {
|
||||
return "Member";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Core861_ContentAssistLookAheadTestLanguageGrammarAccess getGrammarAccess() {
|
||||
return grammarAccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@rulecatch {
|
||||
catch (RecognitionException re) {
|
||||
recover(input,re);
|
||||
appendSkippedTokens();
|
||||
}
|
||||
}
|
||||
|
||||
// Entry rule entryRuleMember
|
||||
entryRuleMember returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getMemberRule()); }
|
||||
iv_ruleMember=ruleMember
|
||||
{ $current=$iv_ruleMember.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Member
|
||||
ruleMember returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getMemberAccess().getFieldDeclParserRuleCall_0());
|
||||
}
|
||||
this_FieldDecl_0=ruleFieldDecl
|
||||
{
|
||||
$current = $this_FieldDecl_0.current;
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
|
|
||||
{
|
||||
newCompositeNode(grammarAccess.getMemberAccess().getMethodDeclParserRuleCall_1());
|
||||
}
|
||||
this_MethodDecl_1=ruleMethodDecl
|
||||
{
|
||||
$current = $this_MethodDecl_1.current;
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleFieldDecl
|
||||
entryRuleFieldDecl returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getFieldDeclRule()); }
|
||||
iv_ruleFieldDecl=ruleFieldDecl
|
||||
{ $current=$iv_ruleFieldDecl.current; }
|
||||
EOF;
|
||||
|
||||
// Rule FieldDecl
|
||||
ruleFieldDecl returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getFieldDeclAccess().getAnnotationsAnnotationParserRuleCall_0_0());
|
||||
}
|
||||
lv_annotations_0_0=ruleAnnotation
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getFieldDeclRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"annotations",
|
||||
lv_annotations_0_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Annotation");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)*
|
||||
(
|
||||
(
|
||||
(
|
||||
lv_modifier_1_1='private'
|
||||
{
|
||||
newLeafNode(lv_modifier_1_1, grammarAccess.getFieldDeclAccess().getModifierPrivateKeyword_1_0_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getFieldDeclRule());
|
||||
}
|
||||
setWithLastConsumed($current, "modifier", lv_modifier_1_1, null);
|
||||
}
|
||||
|
|
||||
lv_modifier_1_2='public'
|
||||
{
|
||||
newLeafNode(lv_modifier_1_2, grammarAccess.getFieldDeclAccess().getModifierPublicKeyword_1_0_1());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getFieldDeclRule());
|
||||
}
|
||||
setWithLastConsumed($current, "modifier", lv_modifier_1_2, null);
|
||||
}
|
||||
)
|
||||
)
|
||||
)?
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getFieldDeclAccess().getTypeTypeParserRuleCall_2_0());
|
||||
}
|
||||
lv_type_2_0=ruleType
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getFieldDeclRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"type",
|
||||
lv_type_2_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Type");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
lv_name_3_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_3_0, grammarAccess.getFieldDeclAccess().getNameIDTerminalRuleCall_3_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getFieldDeclRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_3_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_4='='
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getFieldDeclAccess().getEqualsSignKeyword_4_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_initVal_5_0=RULE_INT
|
||||
{
|
||||
newLeafNode(lv_initVal_5_0, grammarAccess.getFieldDeclAccess().getInitValINTTerminalRuleCall_4_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getFieldDeclRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"initVal",
|
||||
lv_initVal_5_0,
|
||||
"org.eclipse.xtext.common.Terminals.INT");
|
||||
}
|
||||
)
|
||||
)
|
||||
)?
|
||||
otherlv_6=';'
|
||||
{
|
||||
newLeafNode(otherlv_6, grammarAccess.getFieldDeclAccess().getSemicolonKeyword_5());
|
||||
}
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleMethodDecl
|
||||
entryRuleMethodDecl returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getMethodDeclRule()); }
|
||||
iv_ruleMethodDecl=ruleMethodDecl
|
||||
{ $current=$iv_ruleMethodDecl.current; }
|
||||
EOF;
|
||||
|
||||
// Rule MethodDecl
|
||||
ruleMethodDecl returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getMethodDeclAccess().getAnnotationsAnnotationParserRuleCall_0_0());
|
||||
}
|
||||
lv_annotations_0_0=ruleAnnotation
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"annotations",
|
||||
lv_annotations_0_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Annotation");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)*
|
||||
(
|
||||
(
|
||||
(
|
||||
lv_modifier_1_1='private'
|
||||
{
|
||||
newLeafNode(lv_modifier_1_1, grammarAccess.getMethodDeclAccess().getModifierPrivateKeyword_1_0_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
setWithLastConsumed($current, "modifier", lv_modifier_1_1, null);
|
||||
}
|
||||
|
|
||||
lv_modifier_1_2='public'
|
||||
{
|
||||
newLeafNode(lv_modifier_1_2, grammarAccess.getMethodDeclAccess().getModifierPublicKeyword_1_0_1());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
setWithLastConsumed($current, "modifier", lv_modifier_1_2, null);
|
||||
}
|
||||
)
|
||||
)
|
||||
)?
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getMethodDeclAccess().getTypeTypeParserRuleCall_2_0());
|
||||
}
|
||||
lv_type_2_0=ruleType
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
set(
|
||||
$current,
|
||||
"type",
|
||||
lv_type_2_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Type");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
lv_name_3_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_name_3_0, grammarAccess.getMethodDeclAccess().getNameIDTerminalRuleCall_3_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"name",
|
||||
lv_name_3_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
otherlv_4='('
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getMethodDeclAccess().getLeftParenthesisKeyword_4());
|
||||
}
|
||||
otherlv_5=')'
|
||||
{
|
||||
newLeafNode(otherlv_5, grammarAccess.getMethodDeclAccess().getRightParenthesisKeyword_5());
|
||||
}
|
||||
otherlv_6='{'
|
||||
{
|
||||
newLeafNode(otherlv_6, grammarAccess.getMethodDeclAccess().getLeftCurlyBracketKeyword_6());
|
||||
}
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getMethodDeclAccess().getDeclsFieldDeclParserRuleCall_7_0());
|
||||
}
|
||||
lv_decls_7_0=ruleFieldDecl
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"decls",
|
||||
lv_decls_7_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.FieldDecl");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)*
|
||||
(
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getMethodDeclAccess().getStatementsStatementParserRuleCall_8_0());
|
||||
}
|
||||
lv_statements_8_0=ruleStatement
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElementForParent(grammarAccess.getMethodDeclRule());
|
||||
}
|
||||
add(
|
||||
$current,
|
||||
"statements",
|
||||
lv_statements_8_0,
|
||||
"org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Statement");
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)*
|
||||
otherlv_9='}'
|
||||
{
|
||||
newLeafNode(otherlv_9, grammarAccess.getMethodDeclAccess().getRightCurlyBracketKeyword_9());
|
||||
}
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleType
|
||||
entryRuleType returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getTypeRule()); }
|
||||
iv_ruleType=ruleType
|
||||
{ $current=$iv_ruleType.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Type
|
||||
ruleType returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
$current = forceCreateModelElement(
|
||||
grammarAccess.getTypeAccess().getIntTypeAction_0_0(),
|
||||
$current);
|
||||
}
|
||||
)
|
||||
otherlv_1='int'
|
||||
{
|
||||
newLeafNode(otherlv_1, grammarAccess.getTypeAccess().getIntKeyword_0_1());
|
||||
}
|
||||
)
|
||||
|
|
||||
(
|
||||
(
|
||||
{
|
||||
$current = forceCreateModelElement(
|
||||
grammarAccess.getTypeAccess().getTypeRefAction_1_0(),
|
||||
$current);
|
||||
}
|
||||
)
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getTypeRule());
|
||||
}
|
||||
}
|
||||
{
|
||||
newCompositeNode(grammarAccess.getTypeAccess().getTypeTypeCrossReference_1_1_0());
|
||||
}
|
||||
ruleQualifiedName
|
||||
{
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleQualifiedName
|
||||
entryRuleQualifiedName returns [String current=null]:
|
||||
{ newCompositeNode(grammarAccess.getQualifiedNameRule()); }
|
||||
iv_ruleQualifiedName=ruleQualifiedName
|
||||
{ $current=$iv_ruleQualifiedName.current.getText(); }
|
||||
EOF;
|
||||
|
||||
// Rule QualifiedName
|
||||
ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
this_ID_0=RULE_ID
|
||||
{
|
||||
$current.merge(this_ID_0);
|
||||
}
|
||||
{
|
||||
newLeafNode(this_ID_0, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_0());
|
||||
}
|
||||
(
|
||||
kw='.'
|
||||
{
|
||||
$current.merge(kw);
|
||||
newLeafNode(kw, grammarAccess.getQualifiedNameAccess().getFullStopKeyword_1_0());
|
||||
}
|
||||
this_ID_2=RULE_ID
|
||||
{
|
||||
$current.merge(this_ID_2);
|
||||
}
|
||||
{
|
||||
newLeafNode(this_ID_2, grammarAccess.getQualifiedNameAccess().getIDTerminalRuleCall_1_1());
|
||||
}
|
||||
)*
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleStatement
|
||||
entryRuleStatement returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getStatementRule()); }
|
||||
iv_ruleStatement=ruleStatement
|
||||
{ $current=$iv_ruleStatement.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Statement
|
||||
ruleStatement returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getStatementAccess().getAssignmentStatementParserRuleCall_0());
|
||||
}
|
||||
this_AssignmentStatement_0=ruleAssignmentStatement
|
||||
{
|
||||
$current = $this_AssignmentStatement_0.current;
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
|
|
||||
(
|
||||
(
|
||||
{
|
||||
$current = forceCreateModelElement(
|
||||
grammarAccess.getStatementAccess().getReturnAction_1_0(),
|
||||
$current);
|
||||
}
|
||||
)
|
||||
otherlv_2='return'
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getStatementAccess().getReturnKeyword_1_1());
|
||||
}
|
||||
otherlv_3=';'
|
||||
{
|
||||
newLeafNode(otherlv_3, grammarAccess.getStatementAccess().getSemicolonKeyword_1_2());
|
||||
}
|
||||
)
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleAssignmentStatement
|
||||
entryRuleAssignmentStatement returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getAssignmentStatementRule()); }
|
||||
iv_ruleAssignmentStatement=ruleAssignmentStatement
|
||||
{ $current=$iv_ruleAssignmentStatement.current; }
|
||||
EOF;
|
||||
|
||||
// Rule AssignmentStatement
|
||||
ruleAssignmentStatement returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
{
|
||||
newCompositeNode(grammarAccess.getAssignmentStatementAccess().getFeatureCallParserRuleCall_0());
|
||||
}
|
||||
this_FeatureCall_0=ruleFeatureCall
|
||||
{
|
||||
$current = $this_FeatureCall_0.current;
|
||||
afterParserOrEnumRuleCall();
|
||||
}
|
||||
(
|
||||
(
|
||||
{
|
||||
$current = forceCreateModelElementAndSet(
|
||||
grammarAccess.getAssignmentStatementAccess().getAssignmentFeatureAction_1_0(),
|
||||
$current);
|
||||
}
|
||||
)
|
||||
otherlv_2='='
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getAssignmentStatementAccess().getEqualsSignKeyword_1_1());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_rhs_3_0=RULE_INT
|
||||
{
|
||||
newLeafNode(lv_rhs_3_0, grammarAccess.getAssignmentStatementAccess().getRhsINTTerminalRuleCall_1_2_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getAssignmentStatementRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"rhs",
|
||||
lv_rhs_3_0,
|
||||
"org.eclipse.xtext.common.Terminals.INT");
|
||||
}
|
||||
)
|
||||
)
|
||||
)?
|
||||
otherlv_4=';'
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getAssignmentStatementAccess().getSemicolonKeyword_2());
|
||||
}
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleFeatureCall
|
||||
entryRuleFeatureCall returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getFeatureCallRule()); }
|
||||
iv_ruleFeatureCall=ruleFeatureCall
|
||||
{ $current=$iv_ruleFeatureCall.current; }
|
||||
EOF;
|
||||
|
||||
// Rule FeatureCall
|
||||
ruleFeatureCall returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getFeatureCallRule());
|
||||
}
|
||||
}
|
||||
otherlv_0=RULE_ID
|
||||
{
|
||||
newLeafNode(otherlv_0, grammarAccess.getFeatureCallAccess().getFeatureMemberCrossReference_0_0());
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
(
|
||||
{
|
||||
$current = forceCreateModelElementAndSet(
|
||||
grammarAccess.getFeatureCallAccess().getMemberCallOwnerAction_1_0(),
|
||||
$current);
|
||||
}
|
||||
)
|
||||
(
|
||||
('.')=>
|
||||
otherlv_2='.'
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getFeatureCallAccess().getFullStopKeyword_1_1());
|
||||
}
|
||||
)
|
||||
(
|
||||
(
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getFeatureCallRule());
|
||||
}
|
||||
}
|
||||
otherlv_3=RULE_ID
|
||||
{
|
||||
newLeafNode(otherlv_3, grammarAccess.getFeatureCallAccess().getMemberMemberCrossReference_1_2_0());
|
||||
}
|
||||
)
|
||||
)
|
||||
)*
|
||||
)
|
||||
;
|
||||
|
||||
// Entry rule entryRuleAnnotation
|
||||
entryRuleAnnotation returns [EObject current=null]:
|
||||
{ newCompositeNode(grammarAccess.getAnnotationRule()); }
|
||||
iv_ruleAnnotation=ruleAnnotation
|
||||
{ $current=$iv_ruleAnnotation.current; }
|
||||
EOF;
|
||||
|
||||
// Rule Annotation
|
||||
ruleAnnotation returns [EObject current=null]
|
||||
@init {
|
||||
enterRule();
|
||||
}
|
||||
@after {
|
||||
leaveRule();
|
||||
}:
|
||||
(
|
||||
otherlv_0='@'
|
||||
{
|
||||
newLeafNode(otherlv_0, grammarAccess.getAnnotationAccess().getCommercialAtKeyword_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_key_1_0=RULE_ID
|
||||
{
|
||||
newLeafNode(lv_key_1_0, grammarAccess.getAnnotationAccess().getKeyIDTerminalRuleCall_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getAnnotationRule());
|
||||
}
|
||||
setWithLastConsumed(
|
||||
$current,
|
||||
"key",
|
||||
lv_key_1_0,
|
||||
"org.eclipse.xtext.common.Terminals.ID");
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_2='('
|
||||
{
|
||||
newLeafNode(otherlv_2, grammarAccess.getAnnotationAccess().getLeftParenthesisKeyword_2_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_values_3_0=RULE_STRING
|
||||
{
|
||||
newLeafNode(lv_values_3_0, grammarAccess.getAnnotationAccess().getValuesSTRINGTerminalRuleCall_2_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getAnnotationRule());
|
||||
}
|
||||
addWithLastConsumed(
|
||||
$current,
|
||||
"values",
|
||||
lv_values_3_0,
|
||||
"org.eclipse.xtext.common.Terminals.STRING");
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
otherlv_4=','
|
||||
{
|
||||
newLeafNode(otherlv_4, grammarAccess.getAnnotationAccess().getCommaKeyword_2_2_0());
|
||||
}
|
||||
(
|
||||
(
|
||||
lv_values_5_0=RULE_STRING
|
||||
{
|
||||
newLeafNode(lv_values_5_0, grammarAccess.getAnnotationAccess().getValuesSTRINGTerminalRuleCall_2_2_1_0());
|
||||
}
|
||||
{
|
||||
if ($current==null) {
|
||||
$current = createModelElement(grammarAccess.getAnnotationRule());
|
||||
}
|
||||
addWithLastConsumed(
|
||||
$current,
|
||||
"values",
|
||||
lv_values_5_0,
|
||||
"org.eclipse.xtext.common.Terminals.STRING");
|
||||
}
|
||||
)
|
||||
)
|
||||
)*
|
||||
otherlv_6=')'
|
||||
{
|
||||
newLeafNode(otherlv_6, grammarAccess.getAnnotationAccess().getRightParenthesisKeyword_2_3());
|
||||
}
|
||||
)?
|
||||
)
|
||||
;
|
||||
|
||||
RULE_ID : '^'? ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*;
|
||||
|
||||
RULE_INT : ('0'..'9')+;
|
||||
|
||||
RULE_STRING : ('"' ('\\' .|~(('\\'|'"')))* '"'|'\'' ('\\' .|~(('\\'|'\'')))* '\'');
|
||||
|
||||
RULE_ML_COMMENT : '/*' ( options {greedy=false;} : . )*'*/';
|
||||
|
||||
RULE_SL_COMMENT : '//' ~(('\n'|'\r'))* ('\r'? '\n')?;
|
||||
|
||||
RULE_WS : (' '|'\t'|'\r'|'\n')+;
|
||||
|
||||
RULE_ANY_OTHER : .;
|
|
@ -0,0 +1,33 @@
|
|||
'('=15
|
||||
')'=16
|
||||
','=23
|
||||
'.'=20
|
||||
';'=14
|
||||
'='=13
|
||||
'@'=22
|
||||
'int'=19
|
||||
'private'=11
|
||||
'public'=12
|
||||
'return'=21
|
||||
'{'=17
|
||||
'}'=18
|
||||
RULE_ANY_OTHER=10
|
||||
RULE_ID=4
|
||||
RULE_INT=5
|
||||
RULE_ML_COMMENT=7
|
||||
RULE_SL_COMMENT=8
|
||||
RULE_STRING=6
|
||||
RULE_WS=9
|
||||
T__11=11
|
||||
T__12=12
|
||||
T__13=13
|
||||
T__14=14
|
||||
T__15=15
|
||||
T__16=16
|
||||
T__17=17
|
||||
T__18=18
|
||||
T__19=19
|
||||
T__20=20
|
||||
T__21=21
|
||||
T__22=22
|
||||
T__23=23
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* 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.scoping;
|
||||
|
||||
import org.eclipse.xtext.scoping.impl.DelegatingScopeProvider;
|
||||
|
||||
public abstract class AbstractCore861_ContentAssistLookAheadTestLanguageScopeProvider extends DelegatingScopeProvider {
|
||||
}
|
|
@ -0,0 +1,235 @@
|
|||
/*
|
||||
* 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.serializer;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import java.util.Set;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.Action;
|
||||
import org.eclipse.xtext.Parameter;
|
||||
import org.eclipse.xtext.ParserRule;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Annotation;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Assignment;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FeatureCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.FieldDecl;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.IntType;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MemberCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.MethodDecl;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Return;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.TypeRef;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.Core861_ContentAssistLookAheadTestLanguageGrammarAccess;
|
||||
import org.eclipse.xtext.serializer.ISerializationContext;
|
||||
import org.eclipse.xtext.serializer.acceptor.SequenceFeeder;
|
||||
import org.eclipse.xtext.serializer.sequencer.AbstractDelegatingSemanticSequencer;
|
||||
import org.eclipse.xtext.serializer.sequencer.ITransientValueService.ValueTransient;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageSemanticSequencer extends AbstractDelegatingSemanticSequencer {
|
||||
|
||||
@Inject
|
||||
private Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
@Override
|
||||
public void sequence(ISerializationContext context, EObject semanticObject) {
|
||||
EPackage epackage = semanticObject.eClass().getEPackage();
|
||||
ParserRule rule = context.getParserRule();
|
||||
Action action = context.getAssignedAction();
|
||||
Set<Parameter> parameters = context.getEnabledBooleanParameters();
|
||||
if (epackage == Core861_contentAssistLookAheadTestLanguagePackage.eINSTANCE)
|
||||
switch (semanticObject.eClass().getClassifierID()) {
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ANNOTATION:
|
||||
sequence_Annotation(context, (Annotation) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.ASSIGNMENT:
|
||||
sequence_AssignmentStatement(context, (Assignment) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FEATURE_CALL:
|
||||
sequence_FeatureCall(context, (FeatureCall) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.FIELD_DECL:
|
||||
sequence_FieldDecl(context, (FieldDecl) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.INT_TYPE:
|
||||
sequence_Type(context, (IntType) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.MEMBER_CALL:
|
||||
sequence_FeatureCall(context, (MemberCall) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.METHOD_DECL:
|
||||
sequence_MethodDecl(context, (MethodDecl) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.RETURN:
|
||||
sequence_Statement(context, (Return) semanticObject);
|
||||
return;
|
||||
case Core861_contentAssistLookAheadTestLanguagePackage.TYPE_REF:
|
||||
sequence_Type(context, (TypeRef) semanticObject);
|
||||
return;
|
||||
}
|
||||
if (errorAcceptor != null)
|
||||
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
|
||||
}
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Annotation returns Annotation
|
||||
*
|
||||
* Constraint:
|
||||
* (key=ID (values+=STRING values+=STRING*)?)
|
||||
*/
|
||||
protected void sequence_Annotation(ISerializationContext context, Annotation semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Statement returns Assignment
|
||||
* AssignmentStatement returns Assignment
|
||||
*
|
||||
* Constraint:
|
||||
* (feature=AssignmentStatement_Assignment_1_0 rhs=INT)
|
||||
*/
|
||||
protected void sequence_AssignmentStatement(ISerializationContext context, Assignment semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.ASSIGNMENT__FEATURE) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.ASSIGNMENT__FEATURE));
|
||||
if (transientValues.isValueTransient(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.ASSIGNMENT__RHS) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.ASSIGNMENT__RHS));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getAssignmentStatementAccess().getAssignmentFeatureAction_1_0(), semanticObject.getFeature());
|
||||
feeder.accept(grammarAccess.getAssignmentStatementAccess().getRhsINTTerminalRuleCall_1_2_0(), semanticObject.getRhs());
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Statement returns FeatureCall
|
||||
* AssignmentStatement returns FeatureCall
|
||||
* AssignmentStatement.Assignment_1_0 returns FeatureCall
|
||||
* FeatureCall returns FeatureCall
|
||||
* FeatureCall.MemberCall_1_0 returns FeatureCall
|
||||
*
|
||||
* Constraint:
|
||||
* feature=[Member|ID]
|
||||
*/
|
||||
protected void sequence_FeatureCall(ISerializationContext context, FeatureCall semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.FEATURE_CALL__FEATURE) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.FEATURE_CALL__FEATURE));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getFeatureCallAccess().getFeatureMemberIDTerminalRuleCall_0_0_1(), semanticObject.eGet(Core861_contentAssistLookAheadTestLanguagePackage.Literals.FEATURE_CALL__FEATURE, false));
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Statement returns MemberCall
|
||||
* AssignmentStatement returns MemberCall
|
||||
* AssignmentStatement.Assignment_1_0 returns MemberCall
|
||||
* FeatureCall returns MemberCall
|
||||
* FeatureCall.MemberCall_1_0 returns MemberCall
|
||||
*
|
||||
* Constraint:
|
||||
* (owner=FeatureCall_MemberCall_1_0 member=[Member|ID])
|
||||
*/
|
||||
protected void sequence_FeatureCall(ISerializationContext context, MemberCall semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER_CALL__OWNER) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER_CALL__OWNER));
|
||||
if (transientValues.isValueTransient(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER_CALL__MEMBER) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER_CALL__MEMBER));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getFeatureCallAccess().getMemberCallOwnerAction_1_0(), semanticObject.getOwner());
|
||||
feeder.accept(grammarAccess.getFeatureCallAccess().getMemberMemberIDTerminalRuleCall_1_2_0_1(), semanticObject.eGet(Core861_contentAssistLookAheadTestLanguagePackage.Literals.MEMBER_CALL__MEMBER, false));
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Member returns FieldDecl
|
||||
* FieldDecl returns FieldDecl
|
||||
*
|
||||
* Constraint:
|
||||
* (annotations+=Annotation* (modifier='private' | modifier='public')? type=Type name=ID initVal=INT?)
|
||||
*/
|
||||
protected void sequence_FieldDecl(ISerializationContext context, FieldDecl semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Member returns MethodDecl
|
||||
* MethodDecl returns MethodDecl
|
||||
*
|
||||
* Constraint:
|
||||
* (
|
||||
* annotations+=Annotation*
|
||||
* (modifier='private' | modifier='public')?
|
||||
* type=Type
|
||||
* name=ID
|
||||
* decls+=FieldDecl*
|
||||
* statements+=Statement*
|
||||
* )
|
||||
*/
|
||||
protected void sequence_MethodDecl(ISerializationContext context, MethodDecl semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Statement returns Return
|
||||
*
|
||||
* Constraint:
|
||||
* {Return}
|
||||
*/
|
||||
protected void sequence_Statement(ISerializationContext context, Return semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Type returns IntType
|
||||
*
|
||||
* Constraint:
|
||||
* {IntType}
|
||||
*/
|
||||
protected void sequence_Type(ISerializationContext context, IntType semanticObject) {
|
||||
genericSequencer.createSequence(context, semanticObject);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contexts:
|
||||
* Type returns TypeRef
|
||||
*
|
||||
* Constraint:
|
||||
* type=[Type|QualifiedName]
|
||||
*/
|
||||
protected void sequence_Type(ISerializationContext context, TypeRef semanticObject) {
|
||||
if (errorAcceptor != null) {
|
||||
if (transientValues.isValueTransient(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.TYPE_REF__TYPE) == ValueTransient.YES)
|
||||
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Core861_contentAssistLookAheadTestLanguagePackage.Literals.TYPE_REF__TYPE));
|
||||
}
|
||||
SequenceFeeder feeder = createSequencerFeeder(context, semanticObject);
|
||||
feeder.accept(grammarAccess.getTypeAccess().getTypeTypeQualifiedNameParserRuleCall_1_1_0_1(), semanticObject.eGet(Core861_contentAssistLookAheadTestLanguagePackage.Literals.TYPE_REF__TYPE, false));
|
||||
feeder.finish();
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* 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.serializer;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import java.util.List;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
import org.eclipse.xtext.IGrammarAccess;
|
||||
import org.eclipse.xtext.RuleCall;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.services.Core861_ContentAssistLookAheadTestLanguageGrammarAccess;
|
||||
import org.eclipse.xtext.nodemodel.INode;
|
||||
import org.eclipse.xtext.serializer.analysis.GrammarAlias.AbstractElementAlias;
|
||||
import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider.ISynTransition;
|
||||
import org.eclipse.xtext.serializer.sequencer.AbstractSyntacticSequencer;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageSyntacticSequencer extends AbstractSyntacticSequencer {
|
||||
|
||||
protected Core861_ContentAssistLookAheadTestLanguageGrammarAccess grammarAccess;
|
||||
|
||||
@Inject
|
||||
protected void init(IGrammarAccess access) {
|
||||
grammarAccess = (Core861_ContentAssistLookAheadTestLanguageGrammarAccess) access;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node) {
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void emitUnassignedTokens(EObject semanticObject, ISynTransition transition, INode fromNode, INode toNode) {
|
||||
if (transition.getAmbiguousSyntaxes().isEmpty()) return;
|
||||
List<INode> transitionNodes = collectNodes(fromNode, toNode);
|
||||
for (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {
|
||||
List<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);
|
||||
acceptNodes(getLastNavigableState(), syntaxNodes);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,650 @@
|
|||
/*
|
||||
* 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.services;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Singleton;
|
||||
import java.util.List;
|
||||
import org.eclipse.xtext.Action;
|
||||
import org.eclipse.xtext.Alternatives;
|
||||
import org.eclipse.xtext.Assignment;
|
||||
import org.eclipse.xtext.CrossReference;
|
||||
import org.eclipse.xtext.Grammar;
|
||||
import org.eclipse.xtext.GrammarUtil;
|
||||
import org.eclipse.xtext.Group;
|
||||
import org.eclipse.xtext.Keyword;
|
||||
import org.eclipse.xtext.ParserRule;
|
||||
import org.eclipse.xtext.RuleCall;
|
||||
import org.eclipse.xtext.TerminalRule;
|
||||
import org.eclipse.xtext.common.services.TerminalsGrammarAccess;
|
||||
import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder;
|
||||
import org.eclipse.xtext.service.GrammarProvider;
|
||||
|
||||
@Singleton
|
||||
public class Core861_ContentAssistLookAheadTestLanguageGrammarAccess extends AbstractGrammarElementFinder {
|
||||
|
||||
public class MemberElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Member");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final RuleCall cFieldDeclParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
|
||||
private final RuleCall cMethodDeclParserRuleCall_1 = (RuleCall)cAlternatives.eContents().get(1);
|
||||
|
||||
//Member:
|
||||
// FieldDecl | MethodDecl;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//FieldDecl | MethodDecl
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//FieldDecl
|
||||
public RuleCall getFieldDeclParserRuleCall_0() { return cFieldDeclParserRuleCall_0; }
|
||||
|
||||
//MethodDecl
|
||||
public RuleCall getMethodDeclParserRuleCall_1() { return cMethodDeclParserRuleCall_1; }
|
||||
}
|
||||
public class FieldDeclElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.FieldDecl");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cAnnotationsAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cAnnotationsAnnotationParserRuleCall_0_0 = (RuleCall)cAnnotationsAssignment_0.eContents().get(0);
|
||||
private final Assignment cModifierAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final Alternatives cModifierAlternatives_1_0 = (Alternatives)cModifierAssignment_1.eContents().get(0);
|
||||
private final Keyword cModifierPrivateKeyword_1_0_0 = (Keyword)cModifierAlternatives_1_0.eContents().get(0);
|
||||
private final Keyword cModifierPublicKeyword_1_0_1 = (Keyword)cModifierAlternatives_1_0.eContents().get(1);
|
||||
private final Assignment cTypeAssignment_2 = (Assignment)cGroup.eContents().get(2);
|
||||
private final RuleCall cTypeTypeParserRuleCall_2_0 = (RuleCall)cTypeAssignment_2.eContents().get(0);
|
||||
private final Assignment cNameAssignment_3 = (Assignment)cGroup.eContents().get(3);
|
||||
private final RuleCall cNameIDTerminalRuleCall_3_0 = (RuleCall)cNameAssignment_3.eContents().get(0);
|
||||
private final Group cGroup_4 = (Group)cGroup.eContents().get(4);
|
||||
private final Keyword cEqualsSignKeyword_4_0 = (Keyword)cGroup_4.eContents().get(0);
|
||||
private final Assignment cInitValAssignment_4_1 = (Assignment)cGroup_4.eContents().get(1);
|
||||
private final RuleCall cInitValINTTerminalRuleCall_4_1_0 = (RuleCall)cInitValAssignment_4_1.eContents().get(0);
|
||||
private final Keyword cSemicolonKeyword_5 = (Keyword)cGroup.eContents().get(5);
|
||||
|
||||
//FieldDecl:
|
||||
// annotations+=Annotation* modifier=('private' | 'public')? type=Type name=ID ('=' initVal=INT)? ';';
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//annotations+=Annotation* modifier=('private' | 'public')? type=Type name=ID ('=' initVal=INT)? ';'
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//annotations+=Annotation*
|
||||
public Assignment getAnnotationsAssignment_0() { return cAnnotationsAssignment_0; }
|
||||
|
||||
//Annotation
|
||||
public RuleCall getAnnotationsAnnotationParserRuleCall_0_0() { return cAnnotationsAnnotationParserRuleCall_0_0; }
|
||||
|
||||
//modifier=('private' | 'public')?
|
||||
public Assignment getModifierAssignment_1() { return cModifierAssignment_1; }
|
||||
|
||||
//('private' | 'public')
|
||||
public Alternatives getModifierAlternatives_1_0() { return cModifierAlternatives_1_0; }
|
||||
|
||||
//'private'
|
||||
public Keyword getModifierPrivateKeyword_1_0_0() { return cModifierPrivateKeyword_1_0_0; }
|
||||
|
||||
//'public'
|
||||
public Keyword getModifierPublicKeyword_1_0_1() { return cModifierPublicKeyword_1_0_1; }
|
||||
|
||||
//type=Type
|
||||
public Assignment getTypeAssignment_2() { return cTypeAssignment_2; }
|
||||
|
||||
//Type
|
||||
public RuleCall getTypeTypeParserRuleCall_2_0() { return cTypeTypeParserRuleCall_2_0; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_3() { return cNameAssignment_3; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_3_0() { return cNameIDTerminalRuleCall_3_0; }
|
||||
|
||||
//('=' initVal=INT)?
|
||||
public Group getGroup_4() { return cGroup_4; }
|
||||
|
||||
//'='
|
||||
public Keyword getEqualsSignKeyword_4_0() { return cEqualsSignKeyword_4_0; }
|
||||
|
||||
//initVal=INT
|
||||
public Assignment getInitValAssignment_4_1() { return cInitValAssignment_4_1; }
|
||||
|
||||
//INT
|
||||
public RuleCall getInitValINTTerminalRuleCall_4_1_0() { return cInitValINTTerminalRuleCall_4_1_0; }
|
||||
|
||||
//';'
|
||||
public Keyword getSemicolonKeyword_5() { return cSemicolonKeyword_5; }
|
||||
}
|
||||
public class MethodDeclElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.MethodDecl");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cAnnotationsAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final RuleCall cAnnotationsAnnotationParserRuleCall_0_0 = (RuleCall)cAnnotationsAssignment_0.eContents().get(0);
|
||||
private final Assignment cModifierAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final Alternatives cModifierAlternatives_1_0 = (Alternatives)cModifierAssignment_1.eContents().get(0);
|
||||
private final Keyword cModifierPrivateKeyword_1_0_0 = (Keyword)cModifierAlternatives_1_0.eContents().get(0);
|
||||
private final Keyword cModifierPublicKeyword_1_0_1 = (Keyword)cModifierAlternatives_1_0.eContents().get(1);
|
||||
private final Assignment cTypeAssignment_2 = (Assignment)cGroup.eContents().get(2);
|
||||
private final RuleCall cTypeTypeParserRuleCall_2_0 = (RuleCall)cTypeAssignment_2.eContents().get(0);
|
||||
private final Assignment cNameAssignment_3 = (Assignment)cGroup.eContents().get(3);
|
||||
private final RuleCall cNameIDTerminalRuleCall_3_0 = (RuleCall)cNameAssignment_3.eContents().get(0);
|
||||
private final Keyword cLeftParenthesisKeyword_4 = (Keyword)cGroup.eContents().get(4);
|
||||
private final Keyword cRightParenthesisKeyword_5 = (Keyword)cGroup.eContents().get(5);
|
||||
private final Keyword cLeftCurlyBracketKeyword_6 = (Keyword)cGroup.eContents().get(6);
|
||||
private final Assignment cDeclsAssignment_7 = (Assignment)cGroup.eContents().get(7);
|
||||
private final RuleCall cDeclsFieldDeclParserRuleCall_7_0 = (RuleCall)cDeclsAssignment_7.eContents().get(0);
|
||||
private final Assignment cStatementsAssignment_8 = (Assignment)cGroup.eContents().get(8);
|
||||
private final RuleCall cStatementsStatementParserRuleCall_8_0 = (RuleCall)cStatementsAssignment_8.eContents().get(0);
|
||||
private final Keyword cRightCurlyBracketKeyword_9 = (Keyword)cGroup.eContents().get(9);
|
||||
|
||||
//MethodDecl:
|
||||
// annotations+=Annotation* modifier=('private' | 'public')? type=Type name=ID '(' ')' '{'
|
||||
// decls+=FieldDecl*
|
||||
// statements+=Statement*
|
||||
// '}';
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//annotations+=Annotation* modifier=('private' | 'public')? type=Type name=ID '(' ')' '{' decls+=FieldDecl*
|
||||
//statements+=Statement* '}'
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//annotations+=Annotation*
|
||||
public Assignment getAnnotationsAssignment_0() { return cAnnotationsAssignment_0; }
|
||||
|
||||
//Annotation
|
||||
public RuleCall getAnnotationsAnnotationParserRuleCall_0_0() { return cAnnotationsAnnotationParserRuleCall_0_0; }
|
||||
|
||||
//modifier=('private' | 'public')?
|
||||
public Assignment getModifierAssignment_1() { return cModifierAssignment_1; }
|
||||
|
||||
//('private' | 'public')
|
||||
public Alternatives getModifierAlternatives_1_0() { return cModifierAlternatives_1_0; }
|
||||
|
||||
//'private'
|
||||
public Keyword getModifierPrivateKeyword_1_0_0() { return cModifierPrivateKeyword_1_0_0; }
|
||||
|
||||
//'public'
|
||||
public Keyword getModifierPublicKeyword_1_0_1() { return cModifierPublicKeyword_1_0_1; }
|
||||
|
||||
//type=Type
|
||||
public Assignment getTypeAssignment_2() { return cTypeAssignment_2; }
|
||||
|
||||
//Type
|
||||
public RuleCall getTypeTypeParserRuleCall_2_0() { return cTypeTypeParserRuleCall_2_0; }
|
||||
|
||||
//name=ID
|
||||
public Assignment getNameAssignment_3() { return cNameAssignment_3; }
|
||||
|
||||
//ID
|
||||
public RuleCall getNameIDTerminalRuleCall_3_0() { return cNameIDTerminalRuleCall_3_0; }
|
||||
|
||||
//'('
|
||||
public Keyword getLeftParenthesisKeyword_4() { return cLeftParenthesisKeyword_4; }
|
||||
|
||||
//')'
|
||||
public Keyword getRightParenthesisKeyword_5() { return cRightParenthesisKeyword_5; }
|
||||
|
||||
//'{'
|
||||
public Keyword getLeftCurlyBracketKeyword_6() { return cLeftCurlyBracketKeyword_6; }
|
||||
|
||||
//decls+=FieldDecl*
|
||||
public Assignment getDeclsAssignment_7() { return cDeclsAssignment_7; }
|
||||
|
||||
//FieldDecl
|
||||
public RuleCall getDeclsFieldDeclParserRuleCall_7_0() { return cDeclsFieldDeclParserRuleCall_7_0; }
|
||||
|
||||
//statements+=Statement*
|
||||
public Assignment getStatementsAssignment_8() { return cStatementsAssignment_8; }
|
||||
|
||||
//Statement
|
||||
public RuleCall getStatementsStatementParserRuleCall_8_0() { return cStatementsStatementParserRuleCall_8_0; }
|
||||
|
||||
//'}'
|
||||
public Keyword getRightCurlyBracketKeyword_9() { return cRightCurlyBracketKeyword_9; }
|
||||
}
|
||||
public class TypeElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Type");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final Group cGroup_0 = (Group)cAlternatives.eContents().get(0);
|
||||
private final Action cIntTypeAction_0_0 = (Action)cGroup_0.eContents().get(0);
|
||||
private final Keyword cIntKeyword_0_1 = (Keyword)cGroup_0.eContents().get(1);
|
||||
private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1);
|
||||
private final Action cTypeRefAction_1_0 = (Action)cGroup_1.eContents().get(0);
|
||||
private final Assignment cTypeAssignment_1_1 = (Assignment)cGroup_1.eContents().get(1);
|
||||
private final CrossReference cTypeTypeCrossReference_1_1_0 = (CrossReference)cTypeAssignment_1_1.eContents().get(0);
|
||||
private final RuleCall cTypeTypeQualifiedNameParserRuleCall_1_1_0_1 = (RuleCall)cTypeTypeCrossReference_1_1_0.eContents().get(1);
|
||||
|
||||
//Type:
|
||||
// {IntType} "int" | {TypeRef} type=[Type|QualifiedName];
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//{IntType} "int" | {TypeRef} type=[Type|QualifiedName]
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//{IntType} "int"
|
||||
public Group getGroup_0() { return cGroup_0; }
|
||||
|
||||
//{IntType}
|
||||
public Action getIntTypeAction_0_0() { return cIntTypeAction_0_0; }
|
||||
|
||||
//"int"
|
||||
public Keyword getIntKeyword_0_1() { return cIntKeyword_0_1; }
|
||||
|
||||
//{TypeRef} type=[Type|QualifiedName]
|
||||
public Group getGroup_1() { return cGroup_1; }
|
||||
|
||||
//{TypeRef}
|
||||
public Action getTypeRefAction_1_0() { return cTypeRefAction_1_0; }
|
||||
|
||||
//type=[Type|QualifiedName]
|
||||
public Assignment getTypeAssignment_1_1() { return cTypeAssignment_1_1; }
|
||||
|
||||
//[Type|QualifiedName]
|
||||
public CrossReference getTypeTypeCrossReference_1_1_0() { return cTypeTypeCrossReference_1_1_0; }
|
||||
|
||||
//QualifiedName
|
||||
public RuleCall getTypeTypeQualifiedNameParserRuleCall_1_1_0_1() { return cTypeTypeQualifiedNameParserRuleCall_1_1_0_1; }
|
||||
}
|
||||
public class QualifiedNameElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.QualifiedName");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final RuleCall cIDTerminalRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
|
||||
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
|
||||
private final Keyword cFullStopKeyword_1_0 = (Keyword)cGroup_1.eContents().get(0);
|
||||
private final RuleCall cIDTerminalRuleCall_1_1 = (RuleCall)cGroup_1.eContents().get(1);
|
||||
|
||||
//QualifiedName:
|
||||
// ID ('.' ID)*;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//ID ('.' ID)*
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//ID
|
||||
public RuleCall getIDTerminalRuleCall_0() { return cIDTerminalRuleCall_0; }
|
||||
|
||||
//('.' ID)*
|
||||
public Group getGroup_1() { return cGroup_1; }
|
||||
|
||||
//'.'
|
||||
public Keyword getFullStopKeyword_1_0() { return cFullStopKeyword_1_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getIDTerminalRuleCall_1_1() { return cIDTerminalRuleCall_1_1; }
|
||||
}
|
||||
public class StatementElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Statement");
|
||||
private final Alternatives cAlternatives = (Alternatives)rule.eContents().get(1);
|
||||
private final RuleCall cAssignmentStatementParserRuleCall_0 = (RuleCall)cAlternatives.eContents().get(0);
|
||||
private final Group cGroup_1 = (Group)cAlternatives.eContents().get(1);
|
||||
private final Action cReturnAction_1_0 = (Action)cGroup_1.eContents().get(0);
|
||||
private final Keyword cReturnKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1);
|
||||
private final Keyword cSemicolonKeyword_1_2 = (Keyword)cGroup_1.eContents().get(2);
|
||||
|
||||
//Statement:
|
||||
// AssignmentStatement
|
||||
// | {Return} 'return' ';';
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//AssignmentStatement | {Return} 'return' ';'
|
||||
public Alternatives getAlternatives() { return cAlternatives; }
|
||||
|
||||
//AssignmentStatement
|
||||
public RuleCall getAssignmentStatementParserRuleCall_0() { return cAssignmentStatementParserRuleCall_0; }
|
||||
|
||||
//{Return} 'return' ';'
|
||||
public Group getGroup_1() { return cGroup_1; }
|
||||
|
||||
//{Return}
|
||||
public Action getReturnAction_1_0() { return cReturnAction_1_0; }
|
||||
|
||||
//'return'
|
||||
public Keyword getReturnKeyword_1_1() { return cReturnKeyword_1_1; }
|
||||
|
||||
//';'
|
||||
public Keyword getSemicolonKeyword_1_2() { return cSemicolonKeyword_1_2; }
|
||||
}
|
||||
public class AssignmentStatementElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.AssignmentStatement");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final RuleCall cFeatureCallParserRuleCall_0 = (RuleCall)cGroup.eContents().get(0);
|
||||
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
|
||||
private final Action cAssignmentFeatureAction_1_0 = (Action)cGroup_1.eContents().get(0);
|
||||
private final Keyword cEqualsSignKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1);
|
||||
private final Assignment cRhsAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2);
|
||||
private final RuleCall cRhsINTTerminalRuleCall_1_2_0 = (RuleCall)cRhsAssignment_1_2.eContents().get(0);
|
||||
private final Keyword cSemicolonKeyword_2 = (Keyword)cGroup.eContents().get(2);
|
||||
|
||||
//AssignmentStatement:
|
||||
// FeatureCall ({Assignment.feature=current} '=' rhs=INT)? ';';
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//FeatureCall ({Assignment.feature=current} '=' rhs=INT)? ';'
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//FeatureCall
|
||||
public RuleCall getFeatureCallParserRuleCall_0() { return cFeatureCallParserRuleCall_0; }
|
||||
|
||||
//({Assignment.feature=current} '=' rhs=INT)?
|
||||
public Group getGroup_1() { return cGroup_1; }
|
||||
|
||||
//{Assignment.feature=current}
|
||||
public Action getAssignmentFeatureAction_1_0() { return cAssignmentFeatureAction_1_0; }
|
||||
|
||||
//'='
|
||||
public Keyword getEqualsSignKeyword_1_1() { return cEqualsSignKeyword_1_1; }
|
||||
|
||||
//rhs=INT
|
||||
public Assignment getRhsAssignment_1_2() { return cRhsAssignment_1_2; }
|
||||
|
||||
//INT
|
||||
public RuleCall getRhsINTTerminalRuleCall_1_2_0() { return cRhsINTTerminalRuleCall_1_2_0; }
|
||||
|
||||
//';'
|
||||
public Keyword getSemicolonKeyword_2() { return cSemicolonKeyword_2; }
|
||||
}
|
||||
public class FeatureCallElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.FeatureCall");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Assignment cFeatureAssignment_0 = (Assignment)cGroup.eContents().get(0);
|
||||
private final CrossReference cFeatureMemberCrossReference_0_0 = (CrossReference)cFeatureAssignment_0.eContents().get(0);
|
||||
private final RuleCall cFeatureMemberIDTerminalRuleCall_0_0_1 = (RuleCall)cFeatureMemberCrossReference_0_0.eContents().get(1);
|
||||
private final Group cGroup_1 = (Group)cGroup.eContents().get(1);
|
||||
private final Action cMemberCallOwnerAction_1_0 = (Action)cGroup_1.eContents().get(0);
|
||||
private final Keyword cFullStopKeyword_1_1 = (Keyword)cGroup_1.eContents().get(1);
|
||||
private final Assignment cMemberAssignment_1_2 = (Assignment)cGroup_1.eContents().get(2);
|
||||
private final CrossReference cMemberMemberCrossReference_1_2_0 = (CrossReference)cMemberAssignment_1_2.eContents().get(0);
|
||||
private final RuleCall cMemberMemberIDTerminalRuleCall_1_2_0_1 = (RuleCall)cMemberMemberCrossReference_1_2_0.eContents().get(1);
|
||||
|
||||
//FeatureCall:
|
||||
// feature=[Member] ({MemberCall.owner=current} -> "." member=[Member])*;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//feature=[Member] ({MemberCall.owner=current} -> "." member=[Member])*
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//feature=[Member]
|
||||
public Assignment getFeatureAssignment_0() { return cFeatureAssignment_0; }
|
||||
|
||||
//[Member]
|
||||
public CrossReference getFeatureMemberCrossReference_0_0() { return cFeatureMemberCrossReference_0_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getFeatureMemberIDTerminalRuleCall_0_0_1() { return cFeatureMemberIDTerminalRuleCall_0_0_1; }
|
||||
|
||||
//({MemberCall.owner=current} -> "." member=[Member])*
|
||||
public Group getGroup_1() { return cGroup_1; }
|
||||
|
||||
//{MemberCall.owner=current}
|
||||
public Action getMemberCallOwnerAction_1_0() { return cMemberCallOwnerAction_1_0; }
|
||||
|
||||
//-> "."
|
||||
public Keyword getFullStopKeyword_1_1() { return cFullStopKeyword_1_1; }
|
||||
|
||||
//member=[Member]
|
||||
public Assignment getMemberAssignment_1_2() { return cMemberAssignment_1_2; }
|
||||
|
||||
//[Member]
|
||||
public CrossReference getMemberMemberCrossReference_1_2_0() { return cMemberMemberCrossReference_1_2_0; }
|
||||
|
||||
//ID
|
||||
public RuleCall getMemberMemberIDTerminalRuleCall_1_2_0_1() { return cMemberMemberIDTerminalRuleCall_1_2_0_1; }
|
||||
}
|
||||
public class AnnotationElements extends AbstractParserRuleElementFinder {
|
||||
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage.Annotation");
|
||||
private final Group cGroup = (Group)rule.eContents().get(1);
|
||||
private final Keyword cCommercialAtKeyword_0 = (Keyword)cGroup.eContents().get(0);
|
||||
private final Assignment cKeyAssignment_1 = (Assignment)cGroup.eContents().get(1);
|
||||
private final RuleCall cKeyIDTerminalRuleCall_1_0 = (RuleCall)cKeyAssignment_1.eContents().get(0);
|
||||
private final Group cGroup_2 = (Group)cGroup.eContents().get(2);
|
||||
private final Keyword cLeftParenthesisKeyword_2_0 = (Keyword)cGroup_2.eContents().get(0);
|
||||
private final Assignment cValuesAssignment_2_1 = (Assignment)cGroup_2.eContents().get(1);
|
||||
private final RuleCall cValuesSTRINGTerminalRuleCall_2_1_0 = (RuleCall)cValuesAssignment_2_1.eContents().get(0);
|
||||
private final Group cGroup_2_2 = (Group)cGroup_2.eContents().get(2);
|
||||
private final Keyword cCommaKeyword_2_2_0 = (Keyword)cGroup_2_2.eContents().get(0);
|
||||
private final Assignment cValuesAssignment_2_2_1 = (Assignment)cGroup_2_2.eContents().get(1);
|
||||
private final RuleCall cValuesSTRINGTerminalRuleCall_2_2_1_0 = (RuleCall)cValuesAssignment_2_2_1.eContents().get(0);
|
||||
private final Keyword cRightParenthesisKeyword_2_3 = (Keyword)cGroup_2.eContents().get(3);
|
||||
|
||||
//Annotation:
|
||||
// '@' key=ID ('(' values+=STRING (',' values+=STRING)* ')')?;
|
||||
@Override public ParserRule getRule() { return rule; }
|
||||
|
||||
//'@' key=ID ('(' values+=STRING (',' values+=STRING)* ')')?
|
||||
public Group getGroup() { return cGroup; }
|
||||
|
||||
//'@'
|
||||
public Keyword getCommercialAtKeyword_0() { return cCommercialAtKeyword_0; }
|
||||
|
||||
//key=ID
|
||||
public Assignment getKeyAssignment_1() { return cKeyAssignment_1; }
|
||||
|
||||
//ID
|
||||
public RuleCall getKeyIDTerminalRuleCall_1_0() { return cKeyIDTerminalRuleCall_1_0; }
|
||||
|
||||
//('(' values+=STRING (',' values+=STRING)* ')')?
|
||||
public Group getGroup_2() { return cGroup_2; }
|
||||
|
||||
//'('
|
||||
public Keyword getLeftParenthesisKeyword_2_0() { return cLeftParenthesisKeyword_2_0; }
|
||||
|
||||
//values+=STRING
|
||||
public Assignment getValuesAssignment_2_1() { return cValuesAssignment_2_1; }
|
||||
|
||||
//STRING
|
||||
public RuleCall getValuesSTRINGTerminalRuleCall_2_1_0() { return cValuesSTRINGTerminalRuleCall_2_1_0; }
|
||||
|
||||
//(',' values+=STRING)*
|
||||
public Group getGroup_2_2() { return cGroup_2_2; }
|
||||
|
||||
//','
|
||||
public Keyword getCommaKeyword_2_2_0() { return cCommaKeyword_2_2_0; }
|
||||
|
||||
//values+=STRING
|
||||
public Assignment getValuesAssignment_2_2_1() { return cValuesAssignment_2_2_1; }
|
||||
|
||||
//STRING
|
||||
public RuleCall getValuesSTRINGTerminalRuleCall_2_2_1_0() { return cValuesSTRINGTerminalRuleCall_2_2_1_0; }
|
||||
|
||||
//')'
|
||||
public Keyword getRightParenthesisKeyword_2_3() { return cRightParenthesisKeyword_2_3; }
|
||||
}
|
||||
|
||||
|
||||
private final MemberElements pMember;
|
||||
private final FieldDeclElements pFieldDecl;
|
||||
private final MethodDeclElements pMethodDecl;
|
||||
private final TypeElements pType;
|
||||
private final QualifiedNameElements pQualifiedName;
|
||||
private final StatementElements pStatement;
|
||||
private final AssignmentStatementElements pAssignmentStatement;
|
||||
private final FeatureCallElements pFeatureCall;
|
||||
private final AnnotationElements pAnnotation;
|
||||
|
||||
private final Grammar grammar;
|
||||
|
||||
private final TerminalsGrammarAccess gaTerminals;
|
||||
|
||||
@Inject
|
||||
public Core861_ContentAssistLookAheadTestLanguageGrammarAccess(GrammarProvider grammarProvider,
|
||||
TerminalsGrammarAccess gaTerminals) {
|
||||
this.grammar = internalFindGrammar(grammarProvider);
|
||||
this.gaTerminals = gaTerminals;
|
||||
this.pMember = new MemberElements();
|
||||
this.pFieldDecl = new FieldDeclElements();
|
||||
this.pMethodDecl = new MethodDeclElements();
|
||||
this.pType = new TypeElements();
|
||||
this.pQualifiedName = new QualifiedNameElements();
|
||||
this.pStatement = new StatementElements();
|
||||
this.pAssignmentStatement = new AssignmentStatementElements();
|
||||
this.pFeatureCall = new FeatureCallElements();
|
||||
this.pAnnotation = new AnnotationElements();
|
||||
}
|
||||
|
||||
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
|
||||
Grammar grammar = grammarProvider.getGrammar(this);
|
||||
while (grammar != null) {
|
||||
if ("org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage".equals(grammar.getName())) {
|
||||
return grammar;
|
||||
}
|
||||
List<Grammar> grammars = grammar.getUsedGrammars();
|
||||
if (!grammars.isEmpty()) {
|
||||
grammar = grammars.iterator().next();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return grammar;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Grammar getGrammar() {
|
||||
return grammar;
|
||||
}
|
||||
|
||||
|
||||
public TerminalsGrammarAccess getTerminalsGrammarAccess() {
|
||||
return gaTerminals;
|
||||
}
|
||||
|
||||
|
||||
//Member:
|
||||
// FieldDecl | MethodDecl;
|
||||
public MemberElements getMemberAccess() {
|
||||
return pMember;
|
||||
}
|
||||
|
||||
public ParserRule getMemberRule() {
|
||||
return getMemberAccess().getRule();
|
||||
}
|
||||
|
||||
//FieldDecl:
|
||||
// annotations+=Annotation* modifier=('private' | 'public')? type=Type name=ID ('=' initVal=INT)? ';';
|
||||
public FieldDeclElements getFieldDeclAccess() {
|
||||
return pFieldDecl;
|
||||
}
|
||||
|
||||
public ParserRule getFieldDeclRule() {
|
||||
return getFieldDeclAccess().getRule();
|
||||
}
|
||||
|
||||
//MethodDecl:
|
||||
// annotations+=Annotation* modifier=('private' | 'public')? type=Type name=ID '(' ')' '{'
|
||||
// decls+=FieldDecl*
|
||||
// statements+=Statement*
|
||||
// '}';
|
||||
public MethodDeclElements getMethodDeclAccess() {
|
||||
return pMethodDecl;
|
||||
}
|
||||
|
||||
public ParserRule getMethodDeclRule() {
|
||||
return getMethodDeclAccess().getRule();
|
||||
}
|
||||
|
||||
//Type:
|
||||
// {IntType} "int" | {TypeRef} type=[Type|QualifiedName];
|
||||
public TypeElements getTypeAccess() {
|
||||
return pType;
|
||||
}
|
||||
|
||||
public ParserRule getTypeRule() {
|
||||
return getTypeAccess().getRule();
|
||||
}
|
||||
|
||||
//QualifiedName:
|
||||
// ID ('.' ID)*;
|
||||
public QualifiedNameElements getQualifiedNameAccess() {
|
||||
return pQualifiedName;
|
||||
}
|
||||
|
||||
public ParserRule getQualifiedNameRule() {
|
||||
return getQualifiedNameAccess().getRule();
|
||||
}
|
||||
|
||||
//Statement:
|
||||
// AssignmentStatement
|
||||
// | {Return} 'return' ';';
|
||||
public StatementElements getStatementAccess() {
|
||||
return pStatement;
|
||||
}
|
||||
|
||||
public ParserRule getStatementRule() {
|
||||
return getStatementAccess().getRule();
|
||||
}
|
||||
|
||||
//AssignmentStatement:
|
||||
// FeatureCall ({Assignment.feature=current} '=' rhs=INT)? ';';
|
||||
public AssignmentStatementElements getAssignmentStatementAccess() {
|
||||
return pAssignmentStatement;
|
||||
}
|
||||
|
||||
public ParserRule getAssignmentStatementRule() {
|
||||
return getAssignmentStatementAccess().getRule();
|
||||
}
|
||||
|
||||
//FeatureCall:
|
||||
// feature=[Member] ({MemberCall.owner=current} -> "." member=[Member])*;
|
||||
public FeatureCallElements getFeatureCallAccess() {
|
||||
return pFeatureCall;
|
||||
}
|
||||
|
||||
public ParserRule getFeatureCallRule() {
|
||||
return getFeatureCallAccess().getRule();
|
||||
}
|
||||
|
||||
//Annotation:
|
||||
// '@' key=ID ('(' values+=STRING (',' values+=STRING)* ')')?;
|
||||
public AnnotationElements getAnnotationAccess() {
|
||||
return pAnnotation;
|
||||
}
|
||||
|
||||
public ParserRule getAnnotationRule() {
|
||||
return getAnnotationAccess().getRule();
|
||||
}
|
||||
|
||||
//terminal ID:
|
||||
// '^'? ('a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9')*;
|
||||
public TerminalRule getIDRule() {
|
||||
return gaTerminals.getIDRule();
|
||||
}
|
||||
|
||||
//terminal INT returns ecore::EInt:
|
||||
// '0'..'9'+;
|
||||
public TerminalRule getINTRule() {
|
||||
return gaTerminals.getINTRule();
|
||||
}
|
||||
|
||||
//terminal STRING:
|
||||
// '"' ('\\' . | !('\\' | '"'))* '"' |
|
||||
// "'" ('\\' . | !('\\' | "'"))* "'";
|
||||
public TerminalRule getSTRINGRule() {
|
||||
return gaTerminals.getSTRINGRule();
|
||||
}
|
||||
|
||||
//terminal ML_COMMENT:
|
||||
// '/*'->'*/';
|
||||
public TerminalRule getML_COMMENTRule() {
|
||||
return gaTerminals.getML_COMMENTRule();
|
||||
}
|
||||
|
||||
//terminal SL_COMMENT:
|
||||
// '//' !('\n' | '\r')* ('\r'? '\n')?;
|
||||
public TerminalRule getSL_COMMENTRule() {
|
||||
return gaTerminals.getSL_COMMENTRule();
|
||||
}
|
||||
|
||||
//terminal WS:
|
||||
// ' ' | '\t' | '\r' | '\n'+;
|
||||
public TerminalRule getWSRule() {
|
||||
return gaTerminals.getWSRule();
|
||||
}
|
||||
|
||||
//terminal ANY_OTHER:
|
||||
// .;
|
||||
public TerminalRule getANY_OTHERRule() {
|
||||
return gaTerminals.getANY_OTHERRule();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
/*
|
||||
* 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.tests;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageRuntimeModule;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageStandaloneSetup;
|
||||
import org.eclipse.xtext.testing.GlobalRegistries;
|
||||
import org.eclipse.xtext.testing.GlobalRegistries.GlobalStateMemento;
|
||||
import org.eclipse.xtext.testing.IInjectorProvider;
|
||||
import org.eclipse.xtext.testing.IRegistryConfigurator;
|
||||
|
||||
public class Core861_ContentAssistLookAheadTestLanguageInjectorProvider implements IInjectorProvider, IRegistryConfigurator {
|
||||
|
||||
protected GlobalStateMemento stateBeforeInjectorCreation;
|
||||
protected GlobalStateMemento stateAfterInjectorCreation;
|
||||
protected Injector injector;
|
||||
|
||||
static {
|
||||
GlobalRegistries.initializeDefaults();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Injector getInjector() {
|
||||
if (injector == null) {
|
||||
stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
this.injector = internalCreateInjector();
|
||||
stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState();
|
||||
}
|
||||
return injector;
|
||||
}
|
||||
|
||||
protected Injector internalCreateInjector() {
|
||||
return new Core861_ContentAssistLookAheadTestLanguageStandaloneSetup() {
|
||||
@Override
|
||||
public Injector createInjector() {
|
||||
return Guice.createInjector(createRuntimeModule());
|
||||
}
|
||||
}.createInjectorAndDoEMFRegistration();
|
||||
}
|
||||
|
||||
protected Core861_ContentAssistLookAheadTestLanguageRuntimeModule createRuntimeModule() {
|
||||
// make it work also with Maven/Tycho and OSGI
|
||||
// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672
|
||||
return new Core861_ContentAssistLookAheadTestLanguageRuntimeModule() {
|
||||
@Override
|
||||
public ClassLoader bindClassLoaderToInstance() {
|
||||
return Core861_ContentAssistLookAheadTestLanguageInjectorProvider.class
|
||||
.getClassLoader();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreRegistry() {
|
||||
stateBeforeInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setupRegistry() {
|
||||
getInjector();
|
||||
stateAfterInjectorCreation.restoreGlobalState();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* 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.validation;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.eclipse.emf.ecore.EPackage;
|
||||
import org.eclipse.xtext.validation.AbstractDeclarativeValidator;
|
||||
|
||||
public abstract class AbstractCore861_ContentAssistLookAheadTestLanguageValidator extends AbstractDeclarativeValidator {
|
||||
|
||||
@Override
|
||||
protected List<EPackage> getEPackages() {
|
||||
List<EPackage> result = new ArrayList<EPackage>();
|
||||
result.add(org.eclipse.xtext.ide.tests.testlanguage.core861_contentAssistLookAheadTestLanguage.Core861_contentAssistLookAheadTestLanguagePackage.eINSTANCE);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* 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.validation;
|
||||
|
||||
import org.eclipse.xtext.preferences.PreferenceKey;
|
||||
import org.eclipse.xtext.util.IAcceptor;
|
||||
import org.eclipse.xtext.validation.ConfigurableIssueCodesProvider;
|
||||
import org.eclipse.xtext.validation.SeverityConverter;
|
||||
|
||||
@SuppressWarnings("restriction")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageConfigurableIssueCodesProvider extends ConfigurableIssueCodesProvider {
|
||||
protected static final String ISSUE_CODE_PREFIX = "org.eclipse.xtext.ide.tests.testlanguage.";
|
||||
|
||||
public static final String DEPRECATED_MODEL_PART = ISSUE_CODE_PREFIX + "deprecatedModelPart";
|
||||
|
||||
@Override
|
||||
protected void initialize(IAcceptor<PreferenceKey> acceptor) {
|
||||
super.initialize(acceptor);
|
||||
acceptor.accept(create(DEPRECATED_MODEL_PART, SeverityConverter.SEVERITY_WARNING));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright (c) 2018 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
|
||||
*/
|
||||
grammar org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage with org.eclipse.xtext.common.Terminals
|
||||
|
||||
generate core861_contentAssistLookAheadTestLanguage "http://www.eclipse.org/xtext/ide/tests/testlanguage/Core861_ContentAssistLookAheadTestLanguage"
|
||||
|
||||
Member:
|
||||
FieldDecl | MethodDecl
|
||||
;
|
||||
|
||||
FieldDecl:
|
||||
annotations+=Annotation* modifier = ('private' | 'public')? type = Type name = ID ('=' initVal = INT)? ';'
|
||||
;
|
||||
|
||||
MethodDecl:
|
||||
annotations+=Annotation* modifier = ('private' | 'public')? type = Type name = ID '(' ')' '{'
|
||||
(decls += FieldDecl)*
|
||||
(statements += Statement)*
|
||||
'}'
|
||||
;
|
||||
|
||||
Type:
|
||||
{IntType} "int" | ({TypeRef} type = [Type | QualifiedName])
|
||||
;
|
||||
|
||||
QualifiedName:
|
||||
ID ('.' ID)*
|
||||
;
|
||||
|
||||
Statement:
|
||||
AssignmentStatement
|
||||
| {Return} 'return' ';'
|
||||
;
|
||||
|
||||
AssignmentStatement:
|
||||
FeatureCall ({Assignment.feature = current} '=' rhs = INT)? ';'
|
||||
;
|
||||
|
||||
FeatureCall:
|
||||
feature = [ Member | ID]
|
||||
(
|
||||
{MemberCall.owner=current} ->"." member = [ Member | ID]
|
||||
)*;
|
||||
|
||||
Annotation:
|
||||
'@' key=ID ('(' values+=STRING(',' values+=STRING)* ')')?
|
||||
;
|
|
@ -0,0 +1,31 @@
|
|||
/*******************************************************************************
|
||||
* 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;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.ide.Core861_ContentAssistLookAheadTestLanguageIdeModule;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.tests.Core861_ContentAssistLookAheadTestLanguageInjectorProvider;
|
||||
import org.eclipse.xtext.util.Modules2;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
|
||||
/**
|
||||
* @author Christian Schneider - Initial contribution and API
|
||||
*/
|
||||
public class Core861_ContentAssistLookAheadTestLanguageIdeInjectorProvider extends Core861_ContentAssistLookAheadTestLanguageInjectorProvider {
|
||||
@Override
|
||||
protected Injector internalCreateInjector() {
|
||||
return new Core861_ContentAssistLookAheadTestLanguageStandaloneSetup() {
|
||||
@Override
|
||||
public Injector createInjector() {
|
||||
return Guice.createInjector(Modules2.mixin(createRuntimeModule(), new Core861_ContentAssistLookAheadTestLanguageIdeModule()));
|
||||
}
|
||||
}.createInjectorAndDoEMFRegistration();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
class Core861_ContentAssistLookAheadTestLanguageRuntimeModule extends AbstractCore861_ContentAssistLookAheadTestLanguageRuntimeModule {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages without Equinox extension registry.
|
||||
*/
|
||||
class Core861_ContentAssistLookAheadTestLanguageStandaloneSetup extends Core861_ContentAssistLookAheadTestLanguageStandaloneSetupGenerated {
|
||||
|
||||
def static void doSetup() {
|
||||
new Core861_ContentAssistLookAheadTestLanguageStandaloneSetup().createInjectorAndDoEMFRegistration()
|
||||
}
|
||||
}
|
|
@ -115,5 +115,22 @@ Workflow {
|
|||
generateStub = true
|
||||
}
|
||||
}
|
||||
language = StandardLanguage {
|
||||
name = "org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguage"
|
||||
fileExtensions = "contentAssistLookAheadTestLanguage"
|
||||
|
||||
generator = {
|
||||
generateStub = false
|
||||
}
|
||||
serializer = {
|
||||
generateStub = false
|
||||
}
|
||||
validator = {
|
||||
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
|
||||
}
|
||||
junitSupport = {
|
||||
generateStub = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
* 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.ide
|
||||
|
||||
|
||||
/**
|
||||
* Use this class to register ide components.
|
||||
*/
|
||||
class Core861_ContentAssistLookAheadTestLanguageIdeModule extends AbstractCore861_ContentAssistLookAheadTestLanguageIdeModule {
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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.ide
|
||||
|
||||
import com.google.inject.Guice
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageRuntimeModule
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageStandaloneSetup
|
||||
import org.eclipse.xtext.util.Modules2
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages as language servers.
|
||||
*/
|
||||
class Core861_ContentAssistLookAheadTestLanguageIdeSetup extends Core861_ContentAssistLookAheadTestLanguageStandaloneSetup {
|
||||
|
||||
override createInjector() {
|
||||
Guice.createInjector(Modules2.mixin(new Core861_ContentAssistLookAheadTestLanguageRuntimeModule, new Core861_ContentAssistLookAheadTestLanguageIdeModule))
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* 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.scoping
|
||||
|
||||
|
||||
/**
|
||||
* This class contains custom scoping description.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping
|
||||
* on how and when to use it.
|
||||
*/
|
||||
class Core861_ContentAssistLookAheadTestLanguageScopeProvider extends AbstractCore861_ContentAssistLookAheadTestLanguageScopeProvider {
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* 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.validation
|
||||
|
||||
|
||||
/**
|
||||
* This class contains custom validation rules.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
|
||||
*/
|
||||
class Core861_ContentAssistLookAheadTestLanguageValidator extends AbstractCore861_ContentAssistLookAheadTestLanguageValidator {
|
||||
|
||||
// public static val INVALID_NAME = 'invalidName'
|
||||
//
|
||||
// @Check
|
||||
// def checkGreetingStartsWithCapital(Greeting greeting) {
|
||||
// if (!Character.isUpperCase(greeting.name.charAt(0))) {
|
||||
// warning('Name should start with a capital',
|
||||
// Core861_ContentAssistLookAheadTestLanguagePackage.Literals.GREETING__NAME,
|
||||
// INVALID_NAME)
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
/**
|
||||
* Copyright (c) 2018 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.editor.contentassist;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.inject.Inject;
|
||||
import java.util.concurrent.Executors;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.xtend2.lib.StringConcatenation;
|
||||
import org.eclipse.xtext.AbstractElement;
|
||||
import org.eclipse.xtext.grammaranalysis.impl.GrammarElementTitleSwitch;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.ContentAssistContext;
|
||||
import org.eclipse.xtext.ide.editor.contentassist.antlr.ContentAssistContextFactory;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageIdeInjectorProvider;
|
||||
import org.eclipse.xtext.resource.FileExtensionProvider;
|
||||
import org.eclipse.xtext.resource.IResourceFactory;
|
||||
import org.eclipse.xtext.resource.XtextResource;
|
||||
import org.eclipse.xtext.resource.XtextResourceSet;
|
||||
import org.eclipse.xtext.testing.InjectWith;
|
||||
import org.eclipse.xtext.testing.XtextRunner;
|
||||
import org.eclipse.xtext.util.StringInputStream;
|
||||
import org.eclipse.xtext.util.TextRegion;
|
||||
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
|
||||
import org.eclipse.xtext.xbase.lib.Conversions;
|
||||
import org.eclipse.xtext.xbase.lib.Exceptions;
|
||||
import org.eclipse.xtext.xbase.lib.IterableExtensions;
|
||||
import org.eclipse.xtext.xbase.lib.Pair;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* @author Christian Schneider - Initial contribution and API
|
||||
*/
|
||||
@RunWith(XtextRunner.class)
|
||||
@InjectWith(Core861_ContentAssistLookAheadTestLanguageIdeInjectorProvider.class)
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTest {
|
||||
@Test
|
||||
public void test() {
|
||||
StringConcatenation _builder = new StringConcatenation();
|
||||
_builder.append("int y() {");
|
||||
_builder.newLine();
|
||||
_builder.append("\t");
|
||||
_builder.append("bar<|>");
|
||||
_builder.newLine();
|
||||
_builder.append("}");
|
||||
_builder.newLine();
|
||||
final String good1 = this.firstSetGrammarElementsToString(_builder.toString());
|
||||
StringConcatenation _builder_1 = new StringConcatenation();
|
||||
_builder_1.append("public int y () {");
|
||||
_builder_1.newLine();
|
||||
_builder_1.append("\t");
|
||||
_builder_1.append("bar<|>");
|
||||
_builder_1.newLine();
|
||||
_builder_1.append("}");
|
||||
_builder_1.newLine();
|
||||
final String good2 = this.firstSetGrammarElementsToString(_builder_1.toString());
|
||||
StringConcatenation _builder_2 = new StringConcatenation();
|
||||
_builder_2.append("public int y() {");
|
||||
_builder_2.newLine();
|
||||
_builder_2.append("\t");
|
||||
_builder_2.append("bar<|>");
|
||||
_builder_2.newLine();
|
||||
_builder_2.append("}");
|
||||
_builder_2.newLine();
|
||||
final String bad = this.firstSetGrammarElementsToString(_builder_2.toString());
|
||||
Assert.assertEquals(good1, good2);
|
||||
Assert.assertEquals(good2, bad);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private ContentAssistContextFactory factory;
|
||||
|
||||
private final String cursor = "<|>";
|
||||
|
||||
public String firstSetGrammarElementsToString(final String input) {
|
||||
final int offset = input.indexOf(this.cursor);
|
||||
Preconditions.checkArgument((offset >= 0), "you forgot to provide a cursor");
|
||||
final String doc = input.replace(this.cursor, "");
|
||||
final XtextResource res = this.parse(doc);
|
||||
this.factory.setPool(Executors.newSingleThreadExecutor());
|
||||
TextRegion _textRegion = new TextRegion(0, 0);
|
||||
final ContentAssistContext[] ctxs = this.factory.create(doc, _textRegion, offset, res);
|
||||
final GrammarElementTitleSwitch f = new GrammarElementTitleSwitch().showAssignments().showQualified().showRule();
|
||||
StringConcatenation _builder = new StringConcatenation();
|
||||
{
|
||||
Iterable<Pair<Integer, ContentAssistContext>> _indexed = IterableExtensions.<ContentAssistContext>indexed(((Iterable<? extends ContentAssistContext>)Conversions.doWrapArray(ctxs)));
|
||||
for(final Pair<Integer, ContentAssistContext> ctx : _indexed) {
|
||||
_builder.append("context");
|
||||
Integer _key = ctx.getKey();
|
||||
_builder.append(_key);
|
||||
_builder.append(" {");
|
||||
_builder.newLineIfNotEmpty();
|
||||
{
|
||||
ImmutableList<AbstractElement> _firstSetGrammarElements = ctx.getValue().getFirstSetGrammarElements();
|
||||
for(final AbstractElement ele : _firstSetGrammarElements) {
|
||||
_builder.append("\t");
|
||||
String _name = ele.eClass().getName();
|
||||
_builder.append(_name, "\t");
|
||||
_builder.append(": ");
|
||||
String _apply = f.apply(ele);
|
||||
_builder.append(_apply, "\t");
|
||||
_builder.newLineIfNotEmpty();
|
||||
}
|
||||
}
|
||||
_builder.append("}");
|
||||
_builder.newLine();
|
||||
}
|
||||
}
|
||||
return _builder.toString();
|
||||
}
|
||||
|
||||
@Inject
|
||||
private FileExtensionProvider fileExtension;
|
||||
|
||||
@Inject
|
||||
private IResourceFactory resFactory;
|
||||
|
||||
private XtextResource parse(final String doc) {
|
||||
try {
|
||||
String _primaryFileExtension = this.fileExtension.getPrimaryFileExtension();
|
||||
String _plus = ("dummy." + _primaryFileExtension);
|
||||
final URI uri = URI.createURI(_plus);
|
||||
Resource _createResource = this.resFactory.createResource(uri);
|
||||
final XtextResource res = ((XtextResource) _createResource);
|
||||
EList<Resource> _resources = new XtextResourceSet().getResources();
|
||||
_resources.add(res);
|
||||
StringInputStream _stringInputStream = new StringInputStream(doc);
|
||||
res.load(_stringInputStream, CollectionLiterals.<Object, Object>emptyMap());
|
||||
return res;
|
||||
} catch (Throwable _e) {
|
||||
throw Exceptions.sneakyThrow(_e);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.AbstractCore861_ContentAssistLookAheadTestLanguageRuntimeModule;
|
||||
|
||||
/**
|
||||
* Use this class to register components to be used at runtime / without the Equinox extension registry.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageRuntimeModule extends AbstractCore861_ContentAssistLookAheadTestLanguageRuntimeModule {
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* 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;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageStandaloneSetupGenerated;
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages without Equinox extension registry.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageStandaloneSetup extends Core861_ContentAssistLookAheadTestLanguageStandaloneSetupGenerated {
|
||||
public static void doSetup() {
|
||||
new Core861_ContentAssistLookAheadTestLanguageStandaloneSetup().createInjectorAndDoEMFRegistration();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/**
|
||||
* 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.ide;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.ide.AbstractCore861_ContentAssistLookAheadTestLanguageIdeModule;
|
||||
|
||||
/**
|
||||
* Use this class to register ide components.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageIdeModule extends AbstractCore861_ContentAssistLookAheadTestLanguageIdeModule {
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/**
|
||||
* 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.ide;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import com.google.inject.Injector;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageRuntimeModule;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.Core861_ContentAssistLookAheadTestLanguageStandaloneSetup;
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.ide.Core861_ContentAssistLookAheadTestLanguageIdeModule;
|
||||
import org.eclipse.xtext.util.Modules2;
|
||||
|
||||
/**
|
||||
* Initialization support for running Xtext languages as language servers.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageIdeSetup extends Core861_ContentAssistLookAheadTestLanguageStandaloneSetup {
|
||||
@Override
|
||||
public Injector createInjector() {
|
||||
Core861_ContentAssistLookAheadTestLanguageRuntimeModule _core861_ContentAssistLookAheadTestLanguageRuntimeModule = new Core861_ContentAssistLookAheadTestLanguageRuntimeModule();
|
||||
Core861_ContentAssistLookAheadTestLanguageIdeModule _core861_ContentAssistLookAheadTestLanguageIdeModule = new Core861_ContentAssistLookAheadTestLanguageIdeModule();
|
||||
return Guice.createInjector(Modules2.mixin(_core861_ContentAssistLookAheadTestLanguageRuntimeModule, _core861_ContentAssistLookAheadTestLanguageIdeModule));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* 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.scoping;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.scoping.AbstractCore861_ContentAssistLookAheadTestLanguageScopeProvider;
|
||||
|
||||
/**
|
||||
* This class contains custom scoping description.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#scoping
|
||||
* on how and when to use it.
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageScopeProvider extends AbstractCore861_ContentAssistLookAheadTestLanguageScopeProvider {
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* 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.validation;
|
||||
|
||||
import org.eclipse.xtext.ide.tests.testlanguage.validation.AbstractCore861_ContentAssistLookAheadTestLanguageValidator;
|
||||
|
||||
/**
|
||||
* This class contains custom validation rules.
|
||||
*
|
||||
* See https://www.eclipse.org/Xtext/documentation/303_runtime_concepts.html#validation
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
public class Core861_ContentAssistLookAheadTestLanguageValidator extends AbstractCore861_ContentAssistLookAheadTestLanguageValidator {
|
||||
}
|
Loading…
Reference in a new issue