| Summary: | [Linking] Resource#getWarnings not cleared before linking | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sebastian Zarnekow <sebastian.zarnekow> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | Flags: | sebastian.zarnekow:
helios+
|
| Version: | 1.0.0 | ||
| Target Milestone: | SR1 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
Fixed in HEAD. Closing bug which were set to RESOLVED before Eclipse Neon.0. |
I tried to change the unresolved reference diagnostic severity from error to warning. Therefore I've overridden LinkingDiagnosticMessageProvider so that the created DiagnosticMessage's severity will be WARNING: public class MyLinkingDiagnosticMessageProvider extends LinkingDiagnosticMessageProvider { public DiagnosticMessage getUnresolvedProxyMessage(ILinkingDiagnosticContext context) { EClass referenceType = context.getReference().getEReferenceType(); String msg = "Couldn't resolve reference to " + referenceType.getName() + " '" + context.getLinkText() + "'."; // only change ERROR to WARNING //return new DiagnosticMessage(msg, DiagnosticSeverity.ERROR, Diagnostic.LINKING_DIAGNOSTIC); return new DiagnosticMessage(msg, DiagnosticSeverity.WARNING, Diagnostic.LINKING_DIAGNOSTIC); } } This works well except that the warning won't be removed anymore. When closing and reopening the file, all warnings are removed properly but not at "runtime". With severity level ERROR everything works fine.