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
39460e97b8
commit
84d12bc501
16 changed files with 291 additions and 4 deletions
|
@ -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