mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 16:58:56 +00:00
Fixed service registration , and calls to generator facade.
Bootstrapped.
This commit is contained in:
parent
41f2a04118
commit
3dc5ef0173
19 changed files with 313 additions and 5 deletions
|
@ -4,4 +4,4 @@ log4j.appender.default=org.apache.log4j.ConsoleAppender
|
|||
log4j.appender.default.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.default.layout.ConversionPattern=%-4r [%t] %-5p %35.35c %x - %m%n
|
||||
|
||||
log4j.logger.org.eclipse.xtext=DEBUG
|
||||
log4j.logger.org.eclipse.xtext=INFO
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class XtextRuntimeConfig extends AbstractXtextRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ import org.eclipse.xtext.crossref.impl.XtextBuiltinFragmentProvider;
|
|||
import org.eclipse.xtext.crossref.impl.XtextBuiltinLinkProvider;
|
||||
import org.eclipse.xtext.crossref.internal.Linker;
|
||||
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
|
||||
import org.eclipse.xtext.parsetree.reconstr.impl.DefaultCrossReferenceSerializer;
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
|
@ -41,6 +42,7 @@ public class XtextBuiltinRuntimeConfig extends AbstractServiceRegistrationFactor
|
|||
.with(IURIChecker.class, DefaultRuntimeURIChecker.class)
|
||||
.with(IFragmentProvider.class, XtextBuiltinFragmentProvider.class)
|
||||
.with(AntlrTokenDefProvider.class)
|
||||
.with(DefaultCrossReferenceSerializer.class)
|
||||
.registrations();
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,8 @@ import org.eclipse.xtext.testlanguages.TestLanguage;
|
|||
*
|
||||
*/
|
||||
public class GenerateAllTestGrammars {
|
||||
private static String path = "./src-gen";
|
||||
private static String srcGenPath = "./src-gen";
|
||||
private static String srcPath= "./src";
|
||||
|
||||
private static Logger log = Logger.getLogger(GenerateAllTestGrammars.class);
|
||||
|
||||
|
@ -46,9 +47,10 @@ public class GenerateAllTestGrammars {
|
|||
public static void main(String[] args) throws Exception {
|
||||
XtextStandaloneSetup.doSetup();
|
||||
if (args.length > 0) {
|
||||
path = args[0] + "/" + path;
|
||||
srcGenPath = args[0] + "/" + srcGenPath;
|
||||
srcPath = args[0] + "/" + srcPath;
|
||||
}
|
||||
GeneratorFacade.cleanFolder(path);
|
||||
GeneratorFacade.cleanFolder(srcGenPath);
|
||||
for (Class<?> c : testclasses) {
|
||||
String filename = "classpath:/" + c.getName().replace('.', '/') + ".xtext";
|
||||
log.info("loading " + filename);
|
||||
|
@ -57,7 +59,7 @@ public class GenerateAllTestGrammars {
|
|||
Resource resource = rs.createResource(uri);
|
||||
resource.load(null);
|
||||
Grammar grammarModel = (Grammar) resource.getContents().iterator().next();
|
||||
GeneratorFacade.generate(grammarModel, path, null, c.getSimpleName().toLowerCase());
|
||||
GeneratorFacade.generate(grammarModel, srcGenPath, srcPath, null, c.getSimpleName().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class XtextGrammarTestRuntimeConfig extends AbstractXtextGrammarTestRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.crossrefs;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class LangARuntimeConfig extends AbstractLangARuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.dummy;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class DummyLanguageRuntimeConfig extends AbstractDummyLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.grammarinheritance;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class AbstractTestLanguageRuntimeConfig extends AbstractAbstractTestLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.grammarinheritance;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class ConcreteTestLanguageRuntimeConfig extends AbstractConcreteTestLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.metamodelreferencing.tests;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class MetamodelRefTestRuntimeConfig extends AbstractMetamodelRefTestRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.parsetree.reconstr;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class ComplexReconstrTestRuntimeConfig extends AbstractComplexReconstrTestRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.parsetree.reconstr;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class SimpleReconstrTestRuntimeConfig extends AbstractSimpleReconstrTestRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class ActionTestLanguageRuntimeConfig extends AbstractActionTestLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class LexerLanguageRuntimeConfig extends AbstractLexerLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class LookaheadLanguageRuntimeConfig extends AbstractLookaheadLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class OptionalEmptyLanguageRuntimeConfig extends AbstractOptionalEmptyLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class ReferenceGrammarRuntimeConfig extends AbstractReferenceGrammarRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class SimpleExpressionsRuntimeConfig extends AbstractSimpleExpressionsRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.eclipse.xtext.testlanguages;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.xtext.service.AbstractServiceRegistrationFactory;
|
||||
|
||||
/**
|
||||
* used to register components to be used at runtime.
|
||||
*/
|
||||
public class TestLanguageRuntimeConfig extends AbstractTestLanguageRuntimeConfig {
|
||||
|
||||
public Set<IServiceRegistration> registrations() {
|
||||
Set<IServiceRegistration> generated = super.registrations();
|
||||
// do stuff
|
||||
return generated;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in a new issue