forked from eclipse-archived/triquetrum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eclipse-archived#190 xtext new plugin generation
- Loading branch information
Rodolfo Totaro
committed
Dec 16, 2016
1 parent
290ca0d
commit d899c1c
Showing
51 changed files
with
11,752 additions
and
19 deletions.
There are no files selected for viewing
10 changes: 3 additions & 7 deletions
10
org.eclipse.triquetrum.commands.xtext.ide/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: org.eclipse.triquetrum.commands.xtext.ide | ||
Bundle-Vendor: My Company | ||
Bundle-Version: 1.0.0.qualifier | ||
Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext.ide; singleton:=true | ||
Bundle-SymbolicName: org.eclipse.triquetrum.commands.xtext.ide;singleton:=true | ||
Bundle-Version: 0.0.1.qualifier | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 | ||
Bundle-ActivationPolicy: lazy | ||
Require-Bundle: org.eclipse.triquetrum.commands.xtext, | ||
org.eclipse.xtext.ide, | ||
org.eclipse.xtext.xbase.ide | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
org.eclipse.triquetrum.commands.xtext/model/generated/Tqcl.genmodel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
194 changes: 194 additions & 0 deletions
194
...ds.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/AbstractTqclRuntimeModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
/* | ||
* generated by Xtext 2.10.0 | ||
*/ | ||
package org.eclipse.triquetrum.commands; | ||
|
||
import com.google.inject.Binder; | ||
import com.google.inject.Provider; | ||
import com.google.inject.name.Names; | ||
import java.util.Properties; | ||
import org.eclipse.triquetrum.commands.generator.TqclGenerator; | ||
import org.eclipse.triquetrum.commands.parser.antlr.TqclAntlrTokenFileProvider; | ||
import org.eclipse.triquetrum.commands.parser.antlr.TqclParser; | ||
import org.eclipse.triquetrum.commands.parser.antlr.internal.InternalTqclLexer; | ||
import org.eclipse.triquetrum.commands.scoping.TqclScopeProvider; | ||
import org.eclipse.triquetrum.commands.serializer.TqclSemanticSequencer; | ||
import org.eclipse.triquetrum.commands.serializer.TqclSyntacticSequencer; | ||
import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; | ||
import org.eclipse.triquetrum.commands.validation.TqclValidator; | ||
import org.eclipse.xtext.Constants; | ||
import org.eclipse.xtext.IGrammarAccess; | ||
import org.eclipse.xtext.common.types.DefaultCommonTypesRuntimeModule; | ||
import org.eclipse.xtext.common.types.xtext.TypesAwareDefaultGlobalScopeProvider; | ||
import org.eclipse.xtext.generator.IGenerator2; | ||
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.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.SingletonBinding; | ||
|
||
/** | ||
* Manual modifications go to {@link TqclRuntimeModule}. | ||
*/ | ||
@SuppressWarnings("all") | ||
public abstract class AbstractTqclRuntimeModule extends DefaultCommonTypesRuntimeModule { | ||
|
||
protected Properties properties = null; | ||
|
||
@Override | ||
public void configure(Binder binder) { | ||
properties = tryBindProperties(binder, "org/eclipse/triquetrum/commands/Tqcl.properties"); | ||
super.configure(binder); | ||
} | ||
|
||
public void configureLanguageName(Binder binder) { | ||
binder.bind(String.class).annotatedWith(Names.named(Constants.LANGUAGE_NAME)).toInstance("org.eclipse.triquetrum.commands.Tqcl"); | ||
} | ||
|
||
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("tdcl"); | ||
} | ||
|
||
// 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 TqclGrammarAccess.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 | ||
public Class<? extends ISemanticSequencer> bindISemanticSequencer() { | ||
return TqclSemanticSequencer.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.serializer.SerializerFragment2 | ||
public Class<? extends ISyntacticSequencer> bindISyntacticSequencer() { | ||
return TqclSyntacticSequencer.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 TqclParser.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 TqclAntlrTokenFileProvider.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
public Class<? extends Lexer> bindLexer() { | ||
return InternalTqclLexer.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<InternalTqclLexer> provideInternalTqclLexer() { | ||
return LexerProvider.create(InternalTqclLexer.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(InternalTqclLexer.class); | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2 | ||
@SingletonBinding(eager=true) | ||
public Class<? extends TqclValidator> bindTqclValidator() { | ||
return TqclValidator.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.scoping.ImportNamespacesScopingFragment2 | ||
public Class<? extends IScopeProvider> bindIScopeProvider() { | ||
return TqclScopeProvider.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 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); | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2 | ||
public Class<? extends IGenerator2> bindIGenerator2() { | ||
return TqclGenerator.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.types.TypesGeneratorFragment2 | ||
public Class<? extends IGlobalScopeProvider> bindIGlobalScopeProvider() { | ||
return TypesAwareDefaultGlobalScopeProvider.class; | ||
} | ||
|
||
} |
Binary file added
BIN
+4.7 KB
...triquetrum.commands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/Tqcl.xtextbin
Binary file not shown.
42 changes: 42 additions & 0 deletions
42
...xtext/src/main/java-gen/org/eclipse/triquetrum/commands/TqclStandaloneSetupGenerated.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* generated by Xtext 2.10.0 | ||
*/ | ||
package org.eclipse.triquetrum.commands; | ||
|
||
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.triquetrum.commands.tqcl.TqclPackage; | ||
import org.eclipse.xtext.ISetup; | ||
import org.eclipse.xtext.resource.IResourceFactory; | ||
import org.eclipse.xtext.resource.IResourceServiceProvider; | ||
import org.eclipse.xtext.xbase.XtypeStandaloneSetup; | ||
|
||
@SuppressWarnings("all") | ||
public class TqclStandaloneSetupGenerated implements ISetup { | ||
|
||
@Override | ||
public Injector createInjectorAndDoEMFRegistration() { | ||
XtypeStandaloneSetup.doSetup(); | ||
|
||
Injector injector = createInjector(); | ||
register(injector); | ||
return injector; | ||
} | ||
|
||
public Injector createInjector() { | ||
return Guice.createInjector(new TqclRuntimeModule()); | ||
} | ||
|
||
public void register(Injector injector) { | ||
if (!EPackage.Registry.INSTANCE.containsKey("http://www.eclipse.org/triquetrum/commands/Tqcl")) { | ||
EPackage.Registry.INSTANCE.put("http://www.eclipse.org/triquetrum/commands/Tqcl", TqclPackage.eINSTANCE); | ||
} | ||
IResourceFactory resourceFactory = injector.getInstance(IResourceFactory.class); | ||
IResourceServiceProvider serviceProvider = injector.getInstance(IResourceServiceProvider.class); | ||
|
||
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("tdcl", resourceFactory); | ||
IResourceServiceProvider.Registry.INSTANCE.getExtensionToFactoryMap().put("tdcl", serviceProvider); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...ain/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclAntlrTokenFileProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* generated by Xtext 2.10.0 | ||
*/ | ||
package org.eclipse.triquetrum.commands.parser.antlr; | ||
|
||
import java.io.InputStream; | ||
import org.eclipse.xtext.parser.antlr.IAntlrTokenFileProvider; | ||
|
||
public class TqclAntlrTokenFileProvider implements IAntlrTokenFileProvider { | ||
|
||
@Override | ||
public InputStream getAntlrTokenFile() { | ||
ClassLoader classLoader = getClass().getClassLoader(); | ||
return classLoader.getResourceAsStream("org/eclipse/triquetrum/commands/parser/antlr/internal/InternalTqcl.tokens"); | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...ands.xtext/src/main/java-gen/org/eclipse/triquetrum/commands/parser/antlr/TqclParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* generated by Xtext 2.10.0 | ||
*/ | ||
package org.eclipse.triquetrum.commands.parser.antlr; | ||
|
||
import com.google.inject.Inject; | ||
import org.eclipse.triquetrum.commands.parser.antlr.internal.InternalTqclParser; | ||
import org.eclipse.triquetrum.commands.services.TqclGrammarAccess; | ||
import org.eclipse.xtext.parser.antlr.AbstractAntlrParser; | ||
import org.eclipse.xtext.parser.antlr.XtextTokenStream; | ||
|
||
public class TqclParser extends AbstractAntlrParser { | ||
|
||
@Inject | ||
private TqclGrammarAccess grammarAccess; | ||
|
||
@Override | ||
protected void setInitialHiddenTokens(XtextTokenStream tokenStream) { | ||
tokenStream.setInitialHiddenTokens("RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT"); | ||
} | ||
|
||
|
||
@Override | ||
protected InternalTqclParser createParser(XtextTokenStream stream) { | ||
return new InternalTqclParser(stream, getGrammarAccess()); | ||
} | ||
|
||
@Override | ||
protected String getDefaultRuleName() { | ||
return "TriquetrumScript"; | ||
} | ||
|
||
public TqclGrammarAccess getGrammarAccess() { | ||
return this.grammarAccess; | ||
} | ||
|
||
public void setGrammarAccess(TqclGrammarAccess grammarAccess) { | ||
this.grammarAccess = grammarAccess; | ||
} | ||
} |
Oops, something went wrong.