org.eclipse.xtext.xtext.generator.Issues Java Examples
The following examples show how to use
org.eclipse.xtext.xtext.generator.Issues.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: WebIntegrationFragment.java From xtext-core with Eclipse Public License 2.0 | 6 votes |
@Override public void checkConfiguration(final Issues issues) { super.checkConfiguration(issues); boolean _isSet = this.framework.isSet(); boolean _not = (!_isSet); if (_not) { issues.addError("The property \'framework\' is required."); } final Function1<String, Boolean> _function = (String it) -> { return Boolean.valueOf(this.suppressedPatterns.contains(it)); }; Iterable<String> _filter = IterableExtensions.<String>filter(this.enabledPatterns, _function); for (final String pattern : _filter) { issues.addError((("The pattern \'" + pattern) + "\' cannot be enabled and suppressed.")); } }
Example #2
Source File: AbstractSubCodeBuilderFragment.java From sarl with Apache License 2.0 | 6 votes |
@Override @Pure public void checkConfiguration(Issues issues) { super.checkConfiguration(issues); final CodeBuilderConfig config = getCodeBuilderConfig(); if (config == null) { issues.addError("No code builder configuration", this); //$NON-NLS-1$ } else { checkNoEmpty("scriptRuleName", config.getScriptRuleName(), issues); //$NON-NLS-1$ checkNoEmpty("topElementRuleName", config.getTopElementRuleName(), issues); //$NON-NLS-1$ checkNoEmpty("formalParameterContainerType", config.getFormalParameterContainerType(), issues); //$NON-NLS-1$ } if (this.subFragments == null) { issues.addError("Sub generators are not created"); //$NON-NLS-1$ } else { for (final IXtextGeneratorFragment subFragment : this.subFragments) { subFragment.checkConfiguration(issues); } } }
Example #3
Source File: FragmentAdapter.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(final Issues issues) { if ((this.naming == null)) { this.naming = this.createNaming(); } if ((this.fragment == null)) { issues.addError("The property \'fragment\' must be set.", this); } else { this.fragment.checkConfiguration(((MweIssues) issues).getDelegate()); } }
Example #4
Source File: ExternalAntlrLexerFragment.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(Issues issues) { super.checkConfiguration(issues); if (contentAssist && highlighting || runtime && highlighting || contentAssist && runtime) { issues.addError("Only one of those flags is allowed: contentAssist, runtime, highlighting flag"); } }
Example #5
Source File: BundleProjectConfig.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(Issues issues) { super.checkConfiguration(issues); if (manifest != null && getMetaInf() == null) { issues.addError("The 'metaInf' outlet must be configured for projects with a manifest", this); } if (pluginXml != null && getRoot() == null) { issues.addError("The 'root' outlet must be configured for projects with a plugin.xml", this); } }
Example #6
Source File: GeneratorFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(final Issues issues) { if ((this.generateJavaMain && this.generateXtendMain)) { issues.addWarning( "Options \'generateJavaMain\' and \'generateXtendMain\' are mutually exclusive. Generating Xtend only.", this); this.generateJavaMain = false; } }
Example #7
Source File: AbstractAntlrGeneratorFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(final Issues issues) { super.checkConfiguration(issues); boolean _isWorkable = this.antlrTool.isWorkable(); boolean _not = (!_isWorkable); if (_not) { issues.addError("\n\n*ATTENTION*\nIt is highly recommended to use ANTLR\'s parser generator (get it from \'http://xtext.itemis.com/\'). \nAs an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.\nTo do so use the generator fragment \'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment\' in your mwe2 file instead."); } }
Example #8
Source File: XtextAntlrGeneratorFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(final Issues issues) { super.checkConfiguration(issues); if ((this.getOptions().isBacktrackLexer() && this.isCombinedGrammar())) { issues.addError("A combined grammar cannot have a backtracking lexer"); } if ((this.getOptions().isIgnoreCase() && this.isCombinedGrammar())) { issues.addError("A combined grammar cannot have an ignorecase lexer"); } if ((this.getOptions().isBacktrackLexer() && this.getOptions().isIgnoreCase())) { issues.addError("Backtracking lexer and ignorecase cannot be combined for now."); } }
Example #9
Source File: StandardProjectConfig.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(final Issues issues) { super.checkConfiguration(issues); if ((this.rootPath == null)) { issues.addError("The property \'rootPath\' must be set", this); } if ((this.baseName == null)) { issues.addError("The property \'baseName\' must be set", this); } }
Example #10
Source File: RefactorElementNameFragment2.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override public void checkConfiguration(final Issues issues) { super.checkConfiguration(issues); if ((this.useJdtRefactoring.isSet() && this.useChangeSerializer.isSet())) { issues.addError("IChangeSerializer-based refactoring doesn\'t work with JDT"); } }
Example #11
Source File: CodeBuilderFragment2.java From sarl with Apache License 2.0 | 5 votes |
@Override public void checkConfiguration(Issues issues) { super.checkConfiguration(issues); if (this.subFragments == null) { issues.addError("Sub generators are not created"); //$NON-NLS-1$ } else { for (final IXtextGeneratorFragment subFragment : this.subFragments) { subFragment.checkConfiguration(issues); } } }
Example #12
Source File: XtextAntlrGeneratorComparisonFragment.java From xtext-extras with Eclipse Public License 2.0 | 4 votes |
/** * Deactivate the super class' initialization check. */ @Override public void checkConfiguration(final Issues issues) { }
Example #13
Source File: XtextProjectConfig.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public void checkConfiguration(Issues issues) { for (SubProjectConfig it : getEnabledProjects()) { it.checkConfiguration(issues); } }
Example #14
Source File: SubProjectConfig.java From xtext-core with Eclipse Public License 2.0 | 4 votes |
public void checkConfiguration(Issues issues) { }
Example #15
Source File: AbstractSubCodeBuilderFragment.java From sarl with Apache License 2.0 | 4 votes |
@Pure private void checkNoEmpty(String name, String value, Issues issues) { if (Strings.isEmpty(value)) { issues.addError(MessageFormat.format("the configuration entry ''{0}'' is not set", name), this); //$NON-NLS-1$ } }