org.eclipse.xtext.validation.SeverityConverter Java Examples

The following examples show how to use org.eclipse.xtext.validation.SeverityConverter. 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: ConfigurableIssueSeveritiesProvider.java    From sarl with Apache License 2.0 6 votes vote down vote up
@Override
public String getPreference(PreferenceKey key) {
	if (key != null) {
		final Severity severity = this.overridingSeverities.get(key.getId());
		if (severity != null) {
			switch (severity) {
			case ERROR:
				return SeverityConverter.SEVERITY_ERROR;
			case IGNORE:
				return SeverityConverter.SEVERITY_IGNORE;
			case INFO:
				return SeverityConverter.SEVERITY_INFO;
			case WARNING:
				return SeverityConverter.SEVERITY_WARNING;
			default:
			}
		}
	}
	return this.original.getPreference(key);
}
 
Example #2
Source File: XtextConfigurableIssueCodes.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> acceptor) {
	acceptor.accept(create(INVALID_ACTION_USAGE, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(EMPTY_ENUM_LITERAL, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(EMPTY_KEYWORD, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(SPACES_IN_KEYWORD, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(INVALID_HIDDEN_TOKEN, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(INVALID_HIDDEN_TOKEN_FRAGMENT, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(INVALID_PACKAGE_REFERENCE_INHERITED, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(CROSS_REFERENCE_IN_ALTERNATIVES, SeverityConverter.SEVERITY_ERROR));
	acceptor.accept(create(INVALID_FRAGMENT_AS_FIRST_RULE, SeverityConverter.SEVERITY_ERROR));
	
	acceptor.accept(create(INVALID_METAMODEL_NAME, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(INVALID_PACKAGE_REFERENCE_EXTERNAL, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(INVALID_PACKAGE_REFERENCE_NOT_ON_CLASSPATH, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(INVALID_JAVAPACKAGE_NAME, SeverityConverter.SEVERITY_IGNORE));
	acceptor.accept(create(INVALID_TERMINALRULE_NAME, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(DUPLICATE_ENUM_LITERAL, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(BIDIRECTIONAL_REFERENCE, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(DISCOURAGED_RULE_NAME, SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(USAGE_OF_DEPRECATED_RULE, SeverityConverter.SEVERITY_WARNING));
	
}
 
Example #3
Source File: XbaseValidationConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
protected Combo addJavaDelegatingComboBox(String prefKey, String label, Composite parent, int indent) {
	PreferenceKey preferenceKey = issueCodeProvider.getConfigurableIssueCodes().get(prefKey);
	if (preferenceKey == null) {
		throw new IllegalArgumentException(prefKey
				+ " not registered in the corresponding ConfigurableIssueCodesProvider");
	}
	String javaIssueCode = preferenceKey.getDefaultValue();
	if (!javaIssueCode.startsWith(JavaCore.PLUGIN_ID)) {
		throw new IllegalArgumentException(prefKey + Messages.XbaseValidationConfigurationBlock_not_java_message);
	}
	String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING,
			SeverityConverter.SEVERITY_INFO, SeverityConverter.SEVERITY_IGNORE, javaIssueCode };
	String javaValue = javaValue(javaIssueCode);
	String[] valueLabels = new String[] { org.eclipse.xtext.ui.validation.Messages.ValidationConfigurationBlock_error,
			org.eclipse.xtext.ui.validation.Messages.ValidationConfigurationBlock_warning, org.eclipse.xtext.ui.validation.Messages.ValidationConfigurationBlock_info,
			org.eclipse.xtext.ui.validation.Messages.ValidationConfigurationBlock_ignore,
			NLS.bind(Messages.XbaseValidationConfigurationBlock_java_label, javaValue) };
	Combo comboBox = addComboBox(parent, label, prefKey, indent, values, valueLabels);
	return comboBox;
}
 
Example #4
Source File: XtendConfigurableIssueCodes.java    From xtext-xtend with Eclipse Public License 2.0 6 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
	super.initialize(iAcceptor);
	iAcceptor.accept(create(IssueCodes.SINGLE_DISPATCH_FUNCTION, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.DISPATCH_PLAIN_FUNCTION_NAME_CLASH, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.DISPATCH_FUNCTIONS_DIFFERENT_PRIMITIVE_ARGS, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.INVALID_OPERATOR_SIGNATURE, SeverityConverter.SEVERITY_ERROR));
	iAcceptor.accept(createDelegate(IssueCodes.UNUSED_PRIVATE_MEMBER, JavaCore.COMPILER_PB_UNUSED_PRIVATE_MEMBER));
	iAcceptor.accept(createDelegate(IssueCodes.JAVA_DOC_LINKING_DIAGNOSTIC, JavaCore.COMPILER_PB_INVALID_JAVADOC, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(create(IssueCodes.API_TYPE_INFERENCE, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(create(IssueCodes.IMPLICIT_RETURN, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(create(IssueCodes.ORPHAN_ELEMENT, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(create(IssueCodes.WRONG_FILE, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.UNNECESSARY_MODIFIER, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.MODIFIER_DOES_NOT_MATCH_TYPENAME, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.TERNARY_EXPRESSION_NOT_ALLOWED, SeverityConverter.SEVERITY_IGNORE));		
	// overwrite xbase default
	iAcceptor.accept(create(org.eclipse.xtext.validation.IssueCodes.COPY_JAVA_PROBLEMS, SeverityConverter.SEVERITY_ERROR));
}
 
Example #5
Source File: XbaseSeverityConverter.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * Returns decoded delegation key or <code>null</code> if encodedValue can not be parsed.
 * @return {@link Pair} where getFirst() is delegationKey and getSecond() is the defaultSeverity.
 * @see XbaseSeverityConverter#encodeDefaultSeverity(String, String)
 */
public static Pair<String, String> decodeDelegationKey(String encodedValue) {
	List<String> split = Strings.split(encodedValue, DEFAULT_SEVERITY_SEPARATOR);
	if (split.size() == 2) {
		return Tuples.create(split.get(0), split.get(1));
	} else if (split.size() == 1) {
		return Tuples.create(split.get(0), SeverityConverter.SEVERITY_WARNING);
	} else {
		return null;
	}
}
 
Example #6
Source File: XbaseConfigurableIssueCodes.java    From xtext-extras with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
	iAcceptor.accept(create(IssueCodes.NULL_SAFE_FEATURE_CALL_OF_PRIMITIVE_VALUED_FEATURE, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(createDelegate(IssueCodes.INSTANCE_ACCESS_TO_STATIC_MEMBER, COMPILER_PB_STATIC_ACCESS_RECEIVER));
	iAcceptor.accept(create(IssueCodes.UNHANDLED_EXCEPTION, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(create(IssueCodes.EQUALS_WITH_NULL, SeverityConverter.SEVERITY_WARNING));

	iAcceptor.accept(createDelegate(IssueCodes.FORBIDDEN_REFERENCE, COMPILER_PB_FORBIDDEN_REFERENCE));
	iAcceptor.accept(createDelegate(IssueCodes.DISCOURAGED_REFERENCE, COMPILER_PB_DISCOURAGED_REFERENCE));
	iAcceptor.accept(create(IssueCodes.IMPORT_WILDCARD_DEPRECATED, SeverityConverter.SEVERITY_WARNING));

	iAcceptor.accept(createDelegate(IssueCodes.OBSOLETE_INSTANCEOF, COMPILER_PB_UNNECESSARY_TYPE_CHECK));
	iAcceptor.accept(createDelegate(IssueCodes.OBSOLETE_CAST, COMPILER_PB_UNNECESSARY_TYPE_CHECK));
	iAcceptor.accept(createDelegate(IssueCodes.IMPORT_UNUSED, COMPILER_PB_UNUSED_IMPORT));
	iAcceptor.accept(createDelegate(IssueCodes.UNUSED_LOCAL_VARIABLE, COMPILER_PB_UNUSED_LOCAL));
	iAcceptor.accept(create(IssueCodes.IMPORT_DUPLICATE, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.VARIABLE_NAME_DISCOURAGED, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.IMPORT_UNRESOLVED, SeverityConverter.SEVERITY_ERROR));
	
	iAcceptor.accept(create(IssueCodes.JAVA_STYLE_TYPE_CAST, SeverityConverter.SEVERITY_ERROR));
	
	iAcceptor.accept(create(IssueCodes.SUSPICIOUSLY_OVERLOADED_FEATURE, SeverityConverter.SEVERITY_WARNING));
	
	iAcceptor.accept(create(IssueCodes.CONSTANT_BOOLEAN_CONDITION, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.UNREACHABLE_CASE, SeverityConverter.SEVERITY_ERROR));
	iAcceptor.accept(create(IssueCodes.UNREACHABLE_IF_BLOCK, SeverityConverter.SEVERITY_ERROR));
	iAcceptor.accept(create(IssueCodes.INCOMPLETE_CASES_ON_ENUM, SeverityConverter.SEVERITY_WARNING));
	iAcceptor.accept(create(IssueCodes.OPERATION_WITHOUT_PARENTHESES, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(create(IssueCodes.COPY_JAVA_PROBLEMS, SeverityConverter.SEVERITY_IGNORE));
	iAcceptor.accept(createDelegate(IssueCodes.DEPRECATED_MEMBER_REFERENCE, COMPILER_PB_DEPRECATION));
	
	iAcceptor.accept(create(IssueCodes.DUPLICATE_TYPE, SeverityConverter.SEVERITY_ERROR));
	
	iAcceptor.accept(create(IssueCodes.UNQUALIFIED_SUPER_CALL, getUnqualifiedSuperCallSeverity()));
	iAcceptor.accept(create(IssueCodes.ABSTRACT_METHOD_INVOCATION, getAbstractMethodInvocationSeverity()));
}
 
Example #7
Source File: HelloWorldValidatorConfigurationBlock.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
protected Combo addComboBox(String prefKey, String label, Composite parent, int indent) {
	String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING,
			SeverityConverter.SEVERITY_INFO, SeverityConverter.SEVERITY_IGNORE };
	String[] valueLabels = new String[] { "Error", "Warning", "Info", "Ignore" };
	Combo comboBox = addComboBox(parent, label, prefKey, indent, values, valueLabels);
	return comboBox;
}
 
Example #8
Source File: XtextValidatorConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected Combo addComboBox(String prefKey, String label, Composite parent, int indent) {
	String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING,
			SeverityConverter.SEVERITY_INFO, SeverityConverter.SEVERITY_IGNORE };
	String[] valueLabels = new String[] { Messages.XtextValidatorConfigurationBlock_8, Messages.XtextValidatorConfigurationBlock_9,
			Messages.XtextValidatorConfigurationBlock_16, Messages.XtextValidatorConfigurationBlock_10 };
	Combo comboBox = addComboBox(parent, label, prefKey, indent, values, valueLabels);
	return comboBox;
}
 
Example #9
Source File: AbstractValidatorConfigurationBlock.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * @since 2.15
 */
protected Combo addComboBox(String prefKey, String label, Composite parent, int indent) {
	String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING,
			SeverityConverter.SEVERITY_INFO, SeverityConverter.SEVERITY_IGNORE };
	String[] valueLabels = new String[] { Messages.ValidationConfigurationBlock_error,
			Messages.ValidationConfigurationBlock_warning, Messages.ValidationConfigurationBlock_info, Messages.ValidationConfigurationBlock_ignore };
	Combo comboBox = addComboBox(parent, label, prefKey, indent, values, valueLabels);
	return comboBox;
}
 
Example #10
Source File: XtendValidatorConfigurationBlock.java    From xtext-xtend with Eclipse Public License 2.0 5 votes vote down vote up
@Override
protected void addAdditionalComponentsToSettingsPage(Composite settingsPage, int nColumns, int defaultIndent) {
	super.addAdditionalComponentsToSettingsPage(settingsPage, nColumns, defaultIndent);
	createHorizontalLine(settingsPage, nColumns);
	String[] values = new String[] { SeverityConverter.SEVERITY_ERROR, SeverityConverter.SEVERITY_WARNING,
			SeverityConverter.SEVERITY_IGNORE };
	String[] valueLabels = new String[] { "Errors only", "All", "None" };
	Composite composite = new Composite(settingsPage, SWT.NONE);
	GridLayout layout = new GridLayout(nColumns, false);
	layout.marginHeight = 0;
	composite.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, nColumns, 1));
	composite.setLayout(layout);
	addComboBox(composite, "Display Java Problems in Xtend", IssueCodes.COPY_JAVA_PROBLEMS, defaultIndent, values,
			valueLabels);
}
 
Example #11
Source File: XbaseInjectorProvider.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
	super.initialize(iAcceptor);
	iAcceptor.accept(create(IssueCodes.SUSPICIOUSLY_OVERLOADED_FEATURE, SeverityConverter.SEVERITY_ERROR));
}
 
Example #12
Source File: StandardSarlConfigurableIssueCodesProvider.java    From sarl with Apache License 2.0 4 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> acceptor) {
	super.initialize(acceptor);

	// Override the Xbase configuration
	acceptor.accept(create(
			org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_SHADOWING,
			SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(
			org.eclipse.xtext.xbase.validation.IssueCodes.VARIABLE_NAME_DISCOURAGED,
			SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(
			org.eclipse.xtext.xbase.validation.IssueCodes.RAW_TYPE,
			SeverityConverter.SEVERITY_WARNING));

	// Override the Xtend configuration
	acceptor.accept(create(
			org.eclipse.xtend.core.validation.IssueCodes.WRONG_PACKAGE,
			SeverityConverter.SEVERITY_WARNING));
	acceptor.accept(create(
			org.eclipse.xtend.core.validation.IssueCodes.MISSING_OVERRIDE,
			SeverityConverter.SEVERITY_IGNORE));
	acceptor.accept(create(
			org.eclipse.xtend.core.validation.IssueCodes.MISSING_ABSTRACT,
			SeverityConverter.SEVERITY_WARNING));

	// Add warnings from SARL
	acceptor.accept(create(
			IssueCodes.REDUNDANT_INTERFACE_IMPLEMENTATION,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.DISCOURAGED_BOOLEAN_EXPRESSION,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.DISCOURAGED_CAPACITY_DEFINITION,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.DISCOURAGED_FUNCTION_NAME,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.UNREACHABLE_BEHAVIOR_UNIT,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.UNUSED_AGENT_CAPACITY,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.REDUNDANT_CAPACITY_USE,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.DISCOURAGED_OCCURRENCE_READONLY_USE,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.USED_RESERVED_SARL_ANNOTATION,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.MANUAL_INLINE_DEFINITION,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.DISCOURAGED_LOOP_BREAKING_KEYWORD_USE,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.POTENTIAL_FIELD_SYNCHRONIZATION_PROBLEM,
			SeverityConverter.SEVERITY_WARNING));

	acceptor.accept(create(
			IssueCodes.POTENTIAL_INEFFICIENT_VALUE_CONVERSION,
			SeverityConverter.SEVERITY_WARNING));
}
 
Example #13
Source File: HelloWorldConfigurableIssueCodesProvider.java    From dsl-devkit with Eclipse Public License 1.0 4 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> acceptor) {
	super.initialize(acceptor);
	acceptor.accept(create(DEPRECATED_MODEL_PART, SeverityConverter.SEVERITY_WARNING));
}
 
Example #14
Source File: ValidatorFragment2.java    From xtext-core with Eclipse Public License 2.0 4 votes vote down vote up
/**
 * @since 2.14
 */
protected GeneratedJavaFileAccess generateIssueProvider() {
  final GeneratedJavaFileAccess javaFile = this.fileAccessFactory.createGeneratedJavaFile(this.getConfigurableIssueCodesProviderClass());
  StringConcatenationClient _client = new StringConcatenationClient() {
    @Override
    protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
      _builder.append("@SuppressWarnings(\"restriction\")");
      _builder.newLine();
      _builder.append("public class ");
      TypeReference _configurableIssueCodesProviderClass = ValidatorFragment2.this.getConfigurableIssueCodesProviderClass();
      _builder.append(_configurableIssueCodesProviderClass);
      _builder.append(" extends ");
      TypeReference _superConfigurableIssueCodesProviderClass = ValidatorFragment2.this.getSuperConfigurableIssueCodesProviderClass();
      _builder.append(_superConfigurableIssueCodesProviderClass);
      _builder.append(" {");
      _builder.newLineIfNotEmpty();
      _builder.append("\t");
      _builder.append("protected static final String ISSUE_CODE_PREFIX = \"");
      String _runtimeBasePackage = ValidatorFragment2.this._xtextGeneratorNaming.getRuntimeBasePackage(ValidatorFragment2.this.getGrammar());
      _builder.append(_runtimeBasePackage, "\t");
      _builder.append(".\";");
      _builder.newLineIfNotEmpty();
      _builder.newLine();
      {
        if (ValidatorFragment2.this.generateDeprecationValidation) {
          _builder.append("\t");
          _builder.append("public static final String DEPRECATED_MODEL_PART = ISSUE_CODE_PREFIX + \"deprecatedModelPart\";");
          _builder.newLine();
        }
      }
      _builder.newLine();
      _builder.append("\t");
      _builder.append("@Override");
      _builder.newLine();
      _builder.append("\t");
      _builder.append("protected void initialize(");
      _builder.append(IAcceptor.class, "\t");
      _builder.append("<");
      _builder.append(PreferenceKey.class, "\t");
      _builder.append("> acceptor) {");
      _builder.newLineIfNotEmpty();
      _builder.append("\t\t");
      _builder.append("super.initialize(acceptor);");
      _builder.newLine();
      {
        if (ValidatorFragment2.this.generateDeprecationValidation) {
          _builder.append("\t\t");
          _builder.append("acceptor.accept(create(DEPRECATED_MODEL_PART, ");
          _builder.append(SeverityConverter.class, "\t\t");
          _builder.append(".SEVERITY_WARNING));");
          _builder.newLineIfNotEmpty();
        }
      }
      _builder.append("\t");
      _builder.append("}");
      _builder.newLine();
      _builder.append("}");
      _builder.newLine();
    }
  };
  javaFile.setContent(_client);
  return javaFile;
}
 
Example #15
Source File: XtendConfigurableIssueCodes.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected String getAbstractMethodInvocationSeverity() {
	return SeverityConverter.SEVERITY_ERROR;
}
 
Example #16
Source File: XtendConfigurableIssueCodes.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected String getUnqualifiedSuperCallSeverity() {
	return SeverityConverter.SEVERITY_ERROR;
}
 
Example #17
Source File: RuntimeTestSetup.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
	super.initialize(iAcceptor);
	iAcceptor.accept(create(IssueCodes.SUSPICIOUSLY_OVERLOADED_FEATURE, SeverityConverter.SEVERITY_ERROR));
	iAcceptor.accept(create(org.eclipse.xtend.core.validation.IssueCodes.ORPHAN_ELEMENT, SeverityConverter.SEVERITY_WARNING));
}
 
Example #18
Source File: RuntimeTestSetup.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
	super.initialize(iAcceptor);
	iAcceptor.accept(create(IssueCodes.SUSPICIOUSLY_OVERLOADED_FEATURE, SeverityConverter.SEVERITY_ERROR));
	iAcceptor.accept(create(org.eclipse.xtend.core.validation.IssueCodes.ORPHAN_ELEMENT, SeverityConverter.SEVERITY_WARNING));
}
 
Example #19
Source File: SemverIssueSeverities.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
@SuppressWarnings("javadoc")
public SemverIssueSeverities(IPreferenceValues preferenceValues, Map<String, PreferenceKey> configurableIssueCodes,
		SeverityConverter converter) {
	super(preferenceValues, configurableIssueCodes, converter);
	this.configurableIssueCodes = configurableIssueCodes;
}
 
Example #20
Source File: XbaseInjectorProvider.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected void initialize(IAcceptor<PreferenceKey> iAcceptor) {
	super.initialize(iAcceptor);
	iAcceptor.accept(create(IssueCodes.SUSPICIOUSLY_OVERLOADED_FEATURE, SeverityConverter.SEVERITY_ERROR));
}
 
Example #21
Source File: DefaultXbaseRuntimeModule.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
public Class<? extends SeverityConverter> bindSeverityConverter() {
	return XbaseSeverityConverter.class;
}
 
Example #22
Source File: XbaseConfigurableIssueCodes.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
protected PreferenceKey createDelegate(String id, String delegationKey) {
	return createDelegate(id, delegationKey, SeverityConverter.SEVERITY_WARNING);
}
 
Example #23
Source File: XbaseConfigurableIssueCodes.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
protected String getAbstractMethodInvocationSeverity() {
	return SeverityConverter.SEVERITY_IGNORE;
}
 
Example #24
Source File: XbaseConfigurableIssueCodes.java    From xtext-extras with Eclipse Public License 2.0 4 votes vote down vote up
protected String getUnqualifiedSuperCallSeverity() {
	return SeverityConverter.SEVERITY_IGNORE;
}
 
Example #25
Source File: JSONIssueSeverities.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
@SuppressWarnings("javadoc")
public JSONIssueSeverities(IPreferenceValues preferenceValues, Map<String, PreferenceKey> configurableIssueCodes,
		SeverityConverter converter) {
	super(preferenceValues, configurableIssueCodes, converter);
	this.configurableIssueCodes = configurableIssueCodes;
}
 
Example #26
Source File: N4JSIssueSeverities.java    From n4js with Eclipse Public License 1.0 4 votes vote down vote up
@SuppressWarnings("javadoc")
public N4JSIssueSeverities(IPreferenceValues preferenceValues, Map<String, PreferenceKey> configurableIssueCodes,
		SeverityConverter converter) {
	super(preferenceValues, configurableIssueCodes, converter);
	this.configurableIssueCodes = configurableIssueCodes;
}