org.eclipse.xtext.validation.IssueSeveritiesProvider Java Examples
The following examples show how to use
org.eclipse.xtext.validation.IssueSeveritiesProvider.
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: DerivedResourceMarkerCopier.java From xtext-eclipse with Eclipse Public License 2.0 | 6 votes |
private int getMaxSeverity(IFile srcFile) { URI resourceURI = URI.createPlatformResourceURI(srcFile.getFullPath().toString(), true); IResourceServiceProvider serviceProvider = serviceProviderRegistry.getResourceServiceProvider(resourceURI); if (serviceProvider == null) return Integer.MAX_VALUE; IssueSeveritiesProvider severitiesProvider = serviceProvider.get(IssueSeveritiesProvider.class); Severity severity = severitiesProvider.getIssueSeverities(new ResourceImpl(resourceURI)).getSeverity( COPY_JAVA_PROBLEMS_ISSUECODE); switch (severity) { case WARNING: return IMarker.SEVERITY_WARNING; case ERROR: return IMarker.SEVERITY_ERROR; case INFO: case IGNORE: return Integer.MAX_VALUE; default: break; } return Integer.MAX_VALUE; }
Example #2
Source File: SARLUiModule.java From sarl with Apache License 2.0 | 5 votes |
@Override public void configure(Binder binder) { super.configure(binder); // Configure the automatic auto-completion on specific characters: "." and ":" // binder.bind(String.class).annotatedWith(com.google.inject.name.Names.named( // XtextContentAssistProcessor.COMPLETION_AUTO_ACTIVATION_CHARS)) // .toInstance("."); // Configure a system singleton for issue severities provider final UIConfigurableIssueSeveritiesProviderProvider provider = new UIConfigurableIssueSeveritiesProviderProvider(); binder.bind(UIConfigurableIssueSeveritiesProvider.class).toProvider(provider); binder.bind(IssueSeveritiesProvider.class).toProvider(provider); binder.bind(IConfigurableIssueSeveritiesProvider.class).toProvider(provider); }
Example #3
Source File: SARLRuntimeModule.java From sarl with Apache License 2.0 | 5 votes |
@Override public void configure(Binder binder) { super.configure(binder); binder.bind(boolean.class).annotatedWith(Names.named(CompositeEValidator.USE_EOBJECT_VALIDATOR)) .toInstance(false); // Configure a system singleton for issue severities provider final ConfigurableIssueSeveritiesProviderProvider provider = new ConfigurableIssueSeveritiesProviderProvider(); binder.bind(ConfigurableIssueSeveritiesProvider.class).toProvider(provider); binder.bind(IssueSeveritiesProvider.class).toProvider(provider); binder.bind(IConfigurableIssueSeveritiesProvider.class).toProvider(provider); }
Example #4
Source File: SemverRuntimeModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
/** Bind custom SEMVER issue severities provider that operates based on {@link SemverIssueCodes}. */ public Class<? extends IssueSeveritiesProvider> bindIssueSeveritiesProvider() { return SemverIssueSeveritiesProvider.class; }
Example #5
Source File: JSONRuntimeModule.java From n4js with Eclipse Public License 1.0 | 4 votes |
/** Bind custom JSON issue severities provider that operates based on {@link JSONIssueCodes}. */ public Class<? extends IssueSeveritiesProvider> bindIssueSeveritiesProvider() { return JSONIssueSeveritiesProvider.class; }
Example #6
Source File: XbaseUiModule.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IssueSeveritiesProvider> bindIssueSeverityServiceProvider() { return XbaseIssueSeveritiesProvider.class; }
Example #7
Source File: XtendUiModule.java From xtext-xtend with Eclipse Public License 2.0 | 4 votes |
public Class<? extends IssueSeveritiesProvider> bindIssueSeverityServiceProvider() { return XbaseIssueSeveritiesProvider.class; }
Example #8
Source File: N4JSRuntimeModule.java From n4js with Eclipse Public License 1.0 | 2 votes |
/** * Bind an implementation that use custom issue severities, that uses the default severity provided in * org.eclipse.n4js/validation/messages.properties for a given issue code, when there is no other severity * configured by the {@link ConfigurableIssueCodesProvider}. */ public Class<? extends IssueSeveritiesProvider> bindIssueSeveritiesProvider() { return N4JSIssueSeveritiesProvider.class; }