mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-15 08:18:55 +00:00
[#1427] ditch idea generator from xtext generator
Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
parent
cc71631e8b
commit
92ce90d882
22 changed files with 3 additions and 444 deletions
|
@ -33,8 +33,6 @@ public interface IXtextGeneratorLanguage {
|
|||
|
||||
GuiceModuleAccess getEclipsePluginGenModule();
|
||||
|
||||
GuiceModuleAccess getIdeaGenModule();
|
||||
|
||||
GuiceModuleAccess getWebGenModule();
|
||||
|
||||
ResourceSet getResourceSet();
|
||||
|
|
|
@ -116,12 +116,6 @@ import org.eclipse.xtext.xtext.generator.xbase.XtypeGeneratorFragment2
|
|||
|
||||
CompareFragment2 compareEditor = new CompareFragment2
|
||||
|
||||
@Deprecated
|
||||
org.eclipse.xtext.xtext.generator.idea.parser.antlr.XtextAntlrIDEAGeneratorFragment ideaParser
|
||||
|
||||
@Deprecated
|
||||
org.eclipse.xtext.xtext.generator.idea.IdeaPluginGenerator ideaPlugin
|
||||
|
||||
WebIntegrationFragment webSupport = new WebIntegrationFragment
|
||||
|
||||
@Deprecated org.eclipse.xtext.xtext.generator.ui.projectWizard.SimpleProjectWizardFragment2 newProjectWizardForEclipse = new org.eclipse.xtext.xtext.generator.ui.projectWizard.SimpleProjectWizardFragment2
|
||||
|
@ -182,12 +176,6 @@ import org.eclipse.xtext.xtext.generator.xbase.XtypeGeneratorFragment2
|
|||
fragments += xtypeSupport
|
||||
fragments += codeTemplates
|
||||
fragments += compareEditor
|
||||
if(ideaParser !== null) {
|
||||
fragments += ideaParser
|
||||
}
|
||||
if(ideaPlugin !== null) {
|
||||
fragments += ideaPlugin
|
||||
}
|
||||
fragments += webSupport
|
||||
fragments += newProjectWizardForEclipse
|
||||
fragments += projectWizard
|
||||
|
|
|
@ -205,8 +205,6 @@ class XtextGenerator extends AbstractWorkflowComponent2 {
|
|||
templates.createIdeGenModule(language).writeTo(projectConfig.genericIde.srcGen)
|
||||
templates.createEclipsePluginGenModule(language).writeTo(projectConfig.eclipsePlugin.srcGen)
|
||||
templates.createEclipsePluginModule(language).writeTo(projectConfig.eclipsePlugin.src)
|
||||
templates.createIdeaGenModule(language).writeTo(projectConfig.ideaPlugin.srcGen)
|
||||
templates.createIdeaModule(language).writeTo(projectConfig.ideaPlugin.src)
|
||||
templates.createWebGenModule(language).writeTo(projectConfig.web.srcGen)
|
||||
templates.createWebModule(language).writeTo(projectConfig.web.src)
|
||||
}
|
||||
|
|
|
@ -94,9 +94,6 @@ class XtextGeneratorLanguage extends CompositeGeneratorFragment2 implements IXte
|
|||
@Accessors
|
||||
val eclipsePluginGenModule = new GuiceModuleAccess
|
||||
|
||||
@Accessors
|
||||
val ideaGenModule = new GuiceModuleAccess
|
||||
|
||||
@Accessors
|
||||
val webGenModule = new GuiceModuleAccess
|
||||
|
||||
|
|
|
@ -132,26 +132,6 @@ class XtextGeneratorNaming {
|
|||
new TypeReference(pluginName + '.internal', activatorName)
|
||||
}
|
||||
|
||||
def getIdeaBasePackage(Grammar grammar) {
|
||||
return getNamespace(grammar) + ".idea"
|
||||
}
|
||||
|
||||
def getIdeaModule(Grammar grammar) {
|
||||
new TypeReference(grammar.ideaBasePackage, getSimpleName(grammar) + 'IdeaModule')
|
||||
}
|
||||
|
||||
def getIdeaDefaultModule(Grammar grammar) {
|
||||
new TypeReference('org.eclipse.xtext.idea.DefaultIdeaModule')
|
||||
}
|
||||
|
||||
def getIdeaGenModule(Grammar grammar) {
|
||||
new TypeReference(grammar.ideaBasePackage, 'Abstract' + getSimpleName(grammar) + 'IdeaModule')
|
||||
}
|
||||
|
||||
def getIdeaStandaloneSetup(Grammar grammar) {
|
||||
new TypeReference(grammar.ideaBasePackage, getSimpleName(grammar) + "StandaloneSetupIdea")
|
||||
}
|
||||
|
||||
def getWebBasePackage(Grammar grammar) {
|
||||
return getNamespace(grammar) + ".web"
|
||||
}
|
||||
|
|
|
@ -374,51 +374,6 @@ class XtextGeneratorTemplates {
|
|||
return file
|
||||
}
|
||||
|
||||
def JavaFileAccess createIdeaModule(IXtextGeneratorLanguage langConfig) {
|
||||
val it = langConfig.grammar
|
||||
if (codeConfig.preferXtendStubs) {
|
||||
return fileAccessFactory.createXtendFile(ideaModule,'''
|
||||
/**
|
||||
* Use this class to register components to be used within IntelliJ IDEA.
|
||||
*/
|
||||
class «ideaModule.simpleName» extends «ideaGenModule» {
|
||||
}
|
||||
''')
|
||||
} else {
|
||||
return fileAccessFactory.createJavaFile(ideaModule,'''
|
||||
/**
|
||||
* Use this class to register components to be used within IntelliJ IDEA.
|
||||
*/
|
||||
public class «ideaModule.simpleName» extends «ideaGenModule» {
|
||||
}
|
||||
''')
|
||||
}
|
||||
}
|
||||
|
||||
def JavaFileAccess createIdeaGenModule(IXtextGeneratorLanguage langConfig) {
|
||||
val it = langConfig.grammar
|
||||
val superClass = langConfig.ideaGenModule.superClass ?: ideaDefaultModule
|
||||
val file = fileAccessFactory.createGeneratedJavaFile(ideaGenModule)
|
||||
file.importNestedTypeThreshold = JavaFileAccess.DONT_IMPORT_NESTED_TYPES
|
||||
|
||||
file.typeComment = '''
|
||||
/**
|
||||
* Manual modifications go to {@link «ideaModule.simpleName»}.
|
||||
*/
|
||||
'''
|
||||
file.annotations += new SuppressWarningsAnnotation
|
||||
file.content = '''
|
||||
public abstract class «ideaGenModule.simpleName» extends «superClass» {
|
||||
|
||||
«FOR binding : langConfig.ideaGenModule.bindings»
|
||||
«binding.createBindingMethod»
|
||||
|
||||
«ENDFOR»
|
||||
}
|
||||
'''
|
||||
return file
|
||||
}
|
||||
|
||||
def JavaFileAccess createWebModule(IXtextGeneratorLanguage langConfig) {
|
||||
val it = langConfig.grammar
|
||||
if (codeConfig.preferXtendStubs) {
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015, 2016 itemis AG (http://www.itemis.eu) and others.
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator.idea
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.AbstractStubGeneratingFragment
|
||||
|
||||
@Deprecated
|
||||
class IdeaPluginGenerator extends AbstractStubGeneratingFragment {
|
||||
|
||||
|
||||
override generate() {
|
||||
if (!projectConfig.ideaPlugin.enabled)
|
||||
return;
|
||||
System.err.println("The support for Idea has been removed!")
|
||||
}
|
||||
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others.
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator.idea.parser.antlr
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.parser.antlr.AbstractAntlrGrammarWithActionsGenerator
|
||||
|
||||
@Deprecated
|
||||
class PsiAntlrGrammarGenerator extends AbstractAntlrGrammarWithActionsGenerator {
|
||||
|
||||
override protected getGrammarNaming() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others.
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*******************************************************************************/
|
||||
package org.eclipse.xtext.xtext.generator.idea.parser.antlr
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment2
|
||||
|
||||
@Deprecated
|
||||
class XtextAntlrIDEAGeneratorFragment extends AbstractAntlrGeneratorFragment2 {
|
||||
|
||||
|
||||
override protected doGenerate() {
|
||||
if (!projectConfig.ideaPlugin.enabled)
|
||||
return;
|
||||
System.err.println("The support for Idea has been removed!")
|
||||
}
|
||||
}
|
|
@ -28,8 +28,6 @@ public interface IXtextProjectConfig extends IGuiceAwareGeneratorComponent {
|
|||
|
||||
IBundleProjectConfig getEclipsePluginTest();
|
||||
|
||||
ISubProjectConfig getIdeaPlugin();
|
||||
|
||||
IWebProjectConfig getWeb();
|
||||
|
||||
List<? extends ISubProjectConfig> getEnabledProjects();
|
||||
|
|
|
@ -92,7 +92,6 @@ class StandardProjectConfig extends XtextProjectConfig {
|
|||
case genericIde: baseName + '.ide'
|
||||
case eclipsePlugin: baseName + '.ui'
|
||||
case eclipsePluginTest: if (!mavenLayout) baseName + '.ui.tests' else baseName + '.ui'
|
||||
case ideaPlugin: baseName + '.idea'
|
||||
case web: baseName + '.web'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,6 @@ class XtextProjectConfig implements IXtextProjectConfig {
|
|||
|
||||
BundleProjectConfig eclipsePluginTest = new BundleProjectConfig
|
||||
|
||||
SubProjectConfig ideaPlugin = new SubProjectConfig
|
||||
|
||||
WebProjectConfig web = new WebProjectConfig
|
||||
|
||||
@Inject CodeConfig codeConfig
|
||||
|
@ -55,7 +53,6 @@ class XtextProjectConfig implements IXtextProjectConfig {
|
|||
genericIde,
|
||||
eclipsePlugin,
|
||||
eclipsePluginTest,
|
||||
ideaPlugin,
|
||||
web
|
||||
]
|
||||
allProjects
|
||||
|
@ -84,7 +81,7 @@ class XtextProjectConfig implements IXtextProjectConfig {
|
|||
|
||||
def setDefaults() {
|
||||
runtime.enabled = true
|
||||
if (#[eclipsePlugin, ideaPlugin, web].exists[enabled])
|
||||
if (#[eclipsePlugin, web].exists[enabled])
|
||||
genericIde.enabled = true
|
||||
}
|
||||
|
||||
|
|
|
@ -27,8 +27,6 @@ import org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2;
|
|||
import org.eclipse.xtext.xtext.generator.formatting.Formatter2Fragment2;
|
||||
import org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2;
|
||||
import org.eclipse.xtext.xtext.generator.grammarAccess.GrammarAccessFragment2;
|
||||
import org.eclipse.xtext.xtext.generator.idea.IdeaPluginGenerator;
|
||||
import org.eclipse.xtext.xtext.generator.idea.parser.antlr.XtextAntlrIDEAGeneratorFragment;
|
||||
import org.eclipse.xtext.xtext.generator.index.ResourceDescriptionStrategyFragment;
|
||||
import org.eclipse.xtext.xtext.generator.junit.JUnitFragment;
|
||||
import org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2;
|
||||
|
@ -129,12 +127,6 @@ public class StandardLanguage extends XtextGeneratorLanguage {
|
|||
|
||||
private CompareFragment2 compareEditor = new CompareFragment2();
|
||||
|
||||
@Deprecated
|
||||
private XtextAntlrIDEAGeneratorFragment ideaParser;
|
||||
|
||||
@Deprecated
|
||||
private IdeaPluginGenerator ideaPlugin;
|
||||
|
||||
private WebIntegrationFragment webSupport = new WebIntegrationFragment();
|
||||
|
||||
@Deprecated
|
||||
|
@ -223,12 +215,6 @@ public class StandardLanguage extends XtextGeneratorLanguage {
|
|||
this.operator_add(fragments, this.xtypeSupport);
|
||||
this.operator_add(fragments, this.codeTemplates);
|
||||
this.operator_add(fragments, this.compareEditor);
|
||||
if ((this.ideaParser != null)) {
|
||||
this.operator_add(fragments, this.ideaParser);
|
||||
}
|
||||
if ((this.ideaPlugin != null)) {
|
||||
this.operator_add(fragments, this.ideaPlugin);
|
||||
}
|
||||
this.operator_add(fragments, this.webSupport);
|
||||
this.operator_add(fragments, this.newProjectWizardForEclipse);
|
||||
this.operator_add(fragments, this.projectWizard);
|
||||
|
@ -486,24 +472,6 @@ public class StandardLanguage extends XtextGeneratorLanguage {
|
|||
this.compareEditor = compareEditor;
|
||||
}
|
||||
|
||||
@Pure
|
||||
protected XtextAntlrIDEAGeneratorFragment getIdeaParser() {
|
||||
return this.ideaParser;
|
||||
}
|
||||
|
||||
public void setIdeaParser(final XtextAntlrIDEAGeneratorFragment ideaParser) {
|
||||
this.ideaParser = ideaParser;
|
||||
}
|
||||
|
||||
@Pure
|
||||
protected IdeaPluginGenerator getIdeaPlugin() {
|
||||
return this.ideaPlugin;
|
||||
}
|
||||
|
||||
public void setIdeaPlugin(final IdeaPluginGenerator ideaPlugin) {
|
||||
this.ideaPlugin = ideaPlugin;
|
||||
}
|
||||
|
||||
@Pure
|
||||
protected WebIntegrationFragment getWebSupport() {
|
||||
return this.webSupport;
|
||||
|
|
|
@ -281,8 +281,6 @@ public class XtextGenerator extends AbstractWorkflowComponent2 {
|
|||
this.templates.createIdeGenModule(language).writeTo(this.projectConfig.getGenericIde().getSrcGen());
|
||||
this.templates.createEclipsePluginGenModule(language).writeTo(this.projectConfig.getEclipsePlugin().getSrcGen());
|
||||
this.templates.createEclipsePluginModule(language).writeTo(this.projectConfig.getEclipsePlugin().getSrc());
|
||||
this.templates.createIdeaGenModule(language).writeTo(this.projectConfig.getIdeaPlugin().getSrcGen());
|
||||
this.templates.createIdeaModule(language).writeTo(this.projectConfig.getIdeaPlugin().getSrc());
|
||||
this.templates.createWebGenModule(language).writeTo(this.projectConfig.getWeb().getSrcGen());
|
||||
this.templates.createWebModule(language).writeTo(this.projectConfig.getWeb().getSrc());
|
||||
}
|
||||
|
|
|
@ -114,9 +114,6 @@ public class XtextGeneratorLanguage extends CompositeGeneratorFragment2 implemen
|
|||
@Accessors
|
||||
private final GuiceModuleAccess eclipsePluginGenModule = new GuiceModuleAccess();
|
||||
|
||||
@Accessors
|
||||
private final GuiceModuleAccess ideaGenModule = new GuiceModuleAccess();
|
||||
|
||||
@Accessors
|
||||
private final GuiceModuleAccess webGenModule = new GuiceModuleAccess();
|
||||
|
||||
|
@ -448,11 +445,6 @@ public class XtextGeneratorLanguage extends CompositeGeneratorFragment2 implemen
|
|||
return this.eclipsePluginGenModule;
|
||||
}
|
||||
|
||||
@Pure
|
||||
public GuiceModuleAccess getIdeaGenModule() {
|
||||
return this.ideaGenModule;
|
||||
}
|
||||
|
||||
@Pure
|
||||
public GuiceModuleAccess getWebGenModule() {
|
||||
return this.webGenModule;
|
||||
|
|
|
@ -175,37 +175,6 @@ public class XtextGeneratorNaming {
|
|||
return _xblockexpression;
|
||||
}
|
||||
|
||||
public String getIdeaBasePackage(final Grammar grammar) {
|
||||
String _namespace = GrammarUtil.getNamespace(grammar);
|
||||
return (_namespace + ".idea");
|
||||
}
|
||||
|
||||
public TypeReference getIdeaModule(final Grammar grammar) {
|
||||
String _ideaBasePackage = this.getIdeaBasePackage(grammar);
|
||||
String _simpleName = GrammarUtil.getSimpleName(grammar);
|
||||
String _plus = (_simpleName + "IdeaModule");
|
||||
return new TypeReference(_ideaBasePackage, _plus);
|
||||
}
|
||||
|
||||
public TypeReference getIdeaDefaultModule(final Grammar grammar) {
|
||||
return new TypeReference("org.eclipse.xtext.idea.DefaultIdeaModule");
|
||||
}
|
||||
|
||||
public TypeReference getIdeaGenModule(final Grammar grammar) {
|
||||
String _ideaBasePackage = this.getIdeaBasePackage(grammar);
|
||||
String _simpleName = GrammarUtil.getSimpleName(grammar);
|
||||
String _plus = ("Abstract" + _simpleName);
|
||||
String _plus_1 = (_plus + "IdeaModule");
|
||||
return new TypeReference(_ideaBasePackage, _plus_1);
|
||||
}
|
||||
|
||||
public TypeReference getIdeaStandaloneSetup(final Grammar grammar) {
|
||||
String _ideaBasePackage = this.getIdeaBasePackage(grammar);
|
||||
String _simpleName = GrammarUtil.getSimpleName(grammar);
|
||||
String _plus = (_simpleName + "StandaloneSetupIdea");
|
||||
return new TypeReference(_ideaBasePackage, _plus);
|
||||
}
|
||||
|
||||
public String getWebBasePackage(final Grammar grammar) {
|
||||
String _namespace = GrammarUtil.getNamespace(grammar);
|
||||
return (_namespace + ".web");
|
||||
|
|
|
@ -1109,128 +1109,6 @@ public class XtextGeneratorTemplates {
|
|||
return file;
|
||||
}
|
||||
|
||||
public JavaFileAccess createIdeaModule(final IXtextGeneratorLanguage langConfig) {
|
||||
final Grammar it = langConfig.getGrammar();
|
||||
boolean _isPreferXtendStubs = this.codeConfig.isPreferXtendStubs();
|
||||
if (_isPreferXtendStubs) {
|
||||
TypeReference _ideaModule = this.naming.getIdeaModule(it);
|
||||
StringConcatenationClient _client = new StringConcatenationClient() {
|
||||
@Override
|
||||
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
|
||||
_builder.append("/**");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("* Use this class to register components to be used within IntelliJ IDEA.");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("*/");
|
||||
_builder.newLine();
|
||||
_builder.append("class ");
|
||||
String _simpleName = XtextGeneratorTemplates.this.naming.getIdeaModule(it).getSimpleName();
|
||||
_builder.append(_simpleName);
|
||||
_builder.append(" extends ");
|
||||
TypeReference _ideaGenModule = XtextGeneratorTemplates.this.naming.getIdeaGenModule(it);
|
||||
_builder.append(_ideaGenModule);
|
||||
_builder.append(" {");
|
||||
_builder.newLineIfNotEmpty();
|
||||
_builder.append("}");
|
||||
_builder.newLine();
|
||||
}
|
||||
};
|
||||
return this.fileAccessFactory.createXtendFile(_ideaModule, _client);
|
||||
} else {
|
||||
TypeReference _ideaModule_1 = this.naming.getIdeaModule(it);
|
||||
StringConcatenationClient _client_1 = new StringConcatenationClient() {
|
||||
@Override
|
||||
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
|
||||
_builder.append("/**");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("* Use this class to register components to be used within IntelliJ IDEA.");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("*/");
|
||||
_builder.newLine();
|
||||
_builder.append("public class ");
|
||||
String _simpleName = XtextGeneratorTemplates.this.naming.getIdeaModule(it).getSimpleName();
|
||||
_builder.append(_simpleName);
|
||||
_builder.append(" extends ");
|
||||
TypeReference _ideaGenModule = XtextGeneratorTemplates.this.naming.getIdeaGenModule(it);
|
||||
_builder.append(_ideaGenModule);
|
||||
_builder.append(" {");
|
||||
_builder.newLineIfNotEmpty();
|
||||
_builder.append("}");
|
||||
_builder.newLine();
|
||||
}
|
||||
};
|
||||
return this.fileAccessFactory.createJavaFile(_ideaModule_1, _client_1);
|
||||
}
|
||||
}
|
||||
|
||||
public JavaFileAccess createIdeaGenModule(final IXtextGeneratorLanguage langConfig) {
|
||||
final Grammar it = langConfig.getGrammar();
|
||||
TypeReference _elvis = null;
|
||||
TypeReference _superClass = langConfig.getIdeaGenModule().getSuperClass();
|
||||
if (_superClass != null) {
|
||||
_elvis = _superClass;
|
||||
} else {
|
||||
TypeReference _ideaDefaultModule = this.naming.getIdeaDefaultModule(it);
|
||||
_elvis = _ideaDefaultModule;
|
||||
}
|
||||
final TypeReference superClass = _elvis;
|
||||
final GeneratedJavaFileAccess file = this.fileAccessFactory.createGeneratedJavaFile(this.naming.getIdeaGenModule(it));
|
||||
file.setImportNestedTypeThreshold(JavaFileAccess.DONT_IMPORT_NESTED_TYPES);
|
||||
StringConcatenationClient _client = new StringConcatenationClient() {
|
||||
@Override
|
||||
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
|
||||
_builder.append("/**");
|
||||
_builder.newLine();
|
||||
_builder.append(" ");
|
||||
_builder.append("* Manual modifications go to {@link ");
|
||||
String _simpleName = XtextGeneratorTemplates.this.naming.getIdeaModule(it).getSimpleName();
|
||||
_builder.append(_simpleName, " ");
|
||||
_builder.append("}.");
|
||||
_builder.newLineIfNotEmpty();
|
||||
_builder.append(" ");
|
||||
_builder.append("*/");
|
||||
_builder.newLine();
|
||||
}
|
||||
};
|
||||
file.setTypeComment(_client);
|
||||
List<IClassAnnotation> _annotations = file.getAnnotations();
|
||||
SuppressWarningsAnnotation _suppressWarningsAnnotation = new SuppressWarningsAnnotation();
|
||||
_annotations.add(_suppressWarningsAnnotation);
|
||||
StringConcatenationClient _client_1 = new StringConcatenationClient() {
|
||||
@Override
|
||||
protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
|
||||
_builder.append("public abstract class ");
|
||||
String _simpleName = XtextGeneratorTemplates.this.naming.getIdeaGenModule(it).getSimpleName();
|
||||
_builder.append(_simpleName);
|
||||
_builder.append(" extends ");
|
||||
_builder.append(superClass);
|
||||
_builder.append(" {");
|
||||
_builder.newLineIfNotEmpty();
|
||||
_builder.append("\t");
|
||||
_builder.newLine();
|
||||
{
|
||||
Set<GuiceModuleAccess.Binding> _bindings = langConfig.getIdeaGenModule().getBindings();
|
||||
for(final GuiceModuleAccess.Binding binding : _bindings) {
|
||||
_builder.append("\t");
|
||||
StringConcatenationClient _createBindingMethod = XtextGeneratorTemplates.this.createBindingMethod(binding);
|
||||
_builder.append(_createBindingMethod, "\t");
|
||||
_builder.newLineIfNotEmpty();
|
||||
_builder.append("\t");
|
||||
_builder.newLine();
|
||||
}
|
||||
}
|
||||
_builder.append("}");
|
||||
_builder.newLine();
|
||||
}
|
||||
};
|
||||
file.setContent(_client_1);
|
||||
return file;
|
||||
}
|
||||
|
||||
public JavaFileAccess createWebModule(final IXtextGeneratorLanguage langConfig) {
|
||||
final Grammar it = langConfig.getGrammar();
|
||||
boolean _isPreferXtendStubs = this.codeConfig.isPreferXtendStubs();
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2015, 2016 itemis AG (http://www.itemis.eu) and others.
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.xtext.xtext.generator.idea;
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.AbstractStubGeneratingFragment;
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("all")
|
||||
public class IdeaPluginGenerator extends AbstractStubGeneratingFragment {
|
||||
@Override
|
||||
public void generate() {
|
||||
boolean _isEnabled = this.getProjectConfig().getIdeaPlugin().isEnabled();
|
||||
boolean _not = (!_isEnabled);
|
||||
if (_not) {
|
||||
return;
|
||||
}
|
||||
System.err.println("The support for Idea has been removed!");
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others.
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.xtext.xtext.generator.idea.parser.antlr;
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.parser.antlr.AbstractAntlrGrammarWithActionsGenerator;
|
||||
import org.eclipse.xtext.xtext.generator.parser.antlr.GrammarNaming;
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("all")
|
||||
public class PsiAntlrGrammarGenerator extends AbstractAntlrGrammarWithActionsGenerator {
|
||||
@Override
|
||||
protected GrammarNaming getGrammarNaming() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2015 itemis AG (http://www.itemis.eu) and others.
|
||||
* This program and the accompanying materials are made available under the
|
||||
* terms of the Eclipse Public License 2.0 which is available at
|
||||
* http://www.eclipse.org/legal/epl-2.0.
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.xtext.xtext.generator.idea.parser.antlr;
|
||||
|
||||
import org.eclipse.xtext.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment2;
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("all")
|
||||
public class XtextAntlrIDEAGeneratorFragment extends AbstractAntlrGeneratorFragment2 {
|
||||
@Override
|
||||
protected void doGenerate() {
|
||||
boolean _isEnabled = this.getProjectConfig().getIdeaPlugin().isEnabled();
|
||||
boolean _not = (!_isEnabled);
|
||||
if (_not) {
|
||||
return;
|
||||
}
|
||||
System.err.println("The support for Idea has been removed!");
|
||||
}
|
||||
}
|
|
@ -183,13 +183,6 @@ public class StandardProjectConfig extends XtextProjectConfig {
|
|||
_switchResult = _xifexpression_1;
|
||||
}
|
||||
}
|
||||
if (!_matched) {
|
||||
SubProjectConfig _ideaPlugin = this.getIdeaPlugin();
|
||||
if (Objects.equal(project, _ideaPlugin)) {
|
||||
_matched=true;
|
||||
_switchResult = (this.baseName + ".idea");
|
||||
}
|
||||
}
|
||||
if (!_matched) {
|
||||
WebProjectConfig _web = this.getWeb();
|
||||
if (Objects.equal(project, _web)) {
|
||||
|
|
|
@ -52,8 +52,6 @@ public class XtextProjectConfig implements IXtextProjectConfig {
|
|||
|
||||
private BundleProjectConfig eclipsePluginTest = new BundleProjectConfig();
|
||||
|
||||
private SubProjectConfig ideaPlugin = new SubProjectConfig();
|
||||
|
||||
private WebProjectConfig web = new WebProjectConfig();
|
||||
|
||||
@Inject
|
||||
|
@ -70,7 +68,7 @@ public class XtextProjectConfig implements IXtextProjectConfig {
|
|||
ArrayList<SubProjectConfig> _xblockexpression = null;
|
||||
{
|
||||
final ArrayList<SubProjectConfig> allProjects = CollectionLiterals.<SubProjectConfig>newArrayList();
|
||||
Iterables.<SubProjectConfig>addAll(allProjects, Collections.<SubProjectConfig>unmodifiableList(CollectionLiterals.<SubProjectConfig>newArrayList(this.runtime, this.runtimeTest, this.genericIde, this.eclipsePlugin, this.eclipsePluginTest, this.ideaPlugin, this.web)));
|
||||
Iterables.<SubProjectConfig>addAll(allProjects, Collections.<SubProjectConfig>unmodifiableList(CollectionLiterals.<SubProjectConfig>newArrayList(this.runtime, this.runtimeTest, this.genericIde, this.eclipsePlugin, this.eclipsePluginTest, this.web)));
|
||||
_xblockexpression = allProjects;
|
||||
}
|
||||
return _xblockexpression;
|
||||
|
@ -117,7 +115,7 @@ public class XtextProjectConfig implements IXtextProjectConfig {
|
|||
final Function1<SubProjectConfig, Boolean> _function = (SubProjectConfig it) -> {
|
||||
return Boolean.valueOf(it.isEnabled());
|
||||
};
|
||||
boolean _exists = IterableExtensions.exists(Collections.<SubProjectConfig>unmodifiableList(CollectionLiterals.<SubProjectConfig>newArrayList(this.eclipsePlugin, this.ideaPlugin, this.web)), _function);
|
||||
boolean _exists = IterableExtensions.exists(Collections.<SubProjectConfig>unmodifiableList(CollectionLiterals.<SubProjectConfig>newArrayList(this.eclipsePlugin, this.web)), _function);
|
||||
if (_exists) {
|
||||
this.genericIde.setEnabled(true);
|
||||
}
|
||||
|
@ -184,15 +182,6 @@ public class XtextProjectConfig implements IXtextProjectConfig {
|
|||
this.eclipsePluginTest = eclipsePluginTest;
|
||||
}
|
||||
|
||||
@Pure
|
||||
public SubProjectConfig getIdeaPlugin() {
|
||||
return this.ideaPlugin;
|
||||
}
|
||||
|
||||
public void setIdeaPlugin(final SubProjectConfig ideaPlugin) {
|
||||
this.ideaPlugin = ideaPlugin;
|
||||
}
|
||||
|
||||
@Pure
|
||||
public WebProjectConfig getWeb() {
|
||||
return this.web;
|
||||
|
|
Loading…
Reference in a new issue