Package org.eclipse.xtext.validation
Class DiagnosticConverterImpl
- java.lang.Object
-
- org.eclipse.xtext.validation.DiagnosticConverterImpl
-
- All Implemented Interfaces:
IDiagnosticConverter
- Direct Known Subclasses:
XtextDiagnosticConverter
public class DiagnosticConverterImpl extends java.lang.Object implements IDiagnosticConverter
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
DiagnosticConverterImpl.IssueLocation
-
Constructor Summary
Constructors Constructor Description DiagnosticConverterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convertResourceDiagnostic(org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic, Severity severity, org.eclipse.xtext.util.IAcceptor<Issue> acceptor)
Convert a resource diagnostic to zero, one or more markers.void
convertValidatorDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic, org.eclipse.xtext.util.IAcceptor<Issue> acceptor)
Convert a validation diagnostic to zero, one or more markers.protected org.eclipse.emf.ecore.EObject
getCauser(org.eclipse.emf.common.util.Diagnostic diagnostic)
protected java.lang.String
getIssueCode(org.eclipse.emf.common.util.Diagnostic diagnostic)
protected java.lang.String[]
getIssueData(org.eclipse.emf.common.util.Diagnostic diagnostic)
protected CheckType
getIssueType(org.eclipse.emf.common.util.Diagnostic diagnostic)
protected DiagnosticConverterImpl.IssueLocation
getLocationData(org.eclipse.emf.common.util.Diagnostic diagnostic)
protected DiagnosticConverterImpl.IssueLocation
getLocationData(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
protected DiagnosticConverterImpl.IssueLocation
getLocationData(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature structuralFeature, int index)
protected DiagnosticConverterImpl.IssueLocation
getLocationForNode(INode node)
ComputesDiagnosticConverterImpl.IssueLocation
for the given node.protected DiagnosticConverterImpl.IssueLocation
getLocationForNode(INode node, int offset, int length)
ComputesDiagnosticConverterImpl.IssueLocation
for the given offset and length in the given node.protected Severity
getSeverity(org.eclipse.emf.common.util.Diagnostic diagnostic)
protected org.eclipse.emf.ecore.EStructuralFeature
resolveStructuralFeature(org.eclipse.emf.ecore.EObject ele, java.lang.Object feature)
-
-
-
Method Detail
-
convertResourceDiagnostic
public void convertResourceDiagnostic(org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic, Severity severity, org.eclipse.xtext.util.IAcceptor<Issue> acceptor)
Description copied from interface:IDiagnosticConverter
Convert a resource diagnostic to zero, one or more markers.- Specified by:
convertResourceDiagnostic
in interfaceIDiagnosticConverter
-
convertValidatorDiagnostic
public void convertValidatorDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic, org.eclipse.xtext.util.IAcceptor<Issue> acceptor)
Description copied from interface:IDiagnosticConverter
Convert a validation diagnostic to zero, one or more markers.- Specified by:
convertValidatorDiagnostic
in interfaceIDiagnosticConverter
-
getIssueType
protected CheckType getIssueType(org.eclipse.emf.common.util.Diagnostic diagnostic)
- Since:
- 2.4
-
getIssueData
protected java.lang.String[] getIssueData(org.eclipse.emf.common.util.Diagnostic diagnostic)
- Since:
- 2.4
-
getIssueCode
protected java.lang.String getIssueCode(org.eclipse.emf.common.util.Diagnostic diagnostic)
- Since:
- 2.4
-
getSeverity
protected Severity getSeverity(org.eclipse.emf.common.util.Diagnostic diagnostic)
- Since:
- 2.4
-
getCauser
protected org.eclipse.emf.ecore.EObject getCauser(org.eclipse.emf.common.util.Diagnostic diagnostic)
-
getLocationData
protected DiagnosticConverterImpl.IssueLocation getLocationData(org.eclipse.emf.common.util.Diagnostic diagnostic)
- Returns:
- the location data for the given diagnostic.
- First: line number,
- Second: Offset of first char (inclusive), and
- Third: Offset of last char (exclusive).
-
getLocationData
protected DiagnosticConverterImpl.IssueLocation getLocationData(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)
-
getLocationData
protected DiagnosticConverterImpl.IssueLocation getLocationData(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature structuralFeature, int index)
- Returns:
- the location data for the given diagnostic.
-
getLocationForNode
protected DiagnosticConverterImpl.IssueLocation getLocationForNode(INode node)
ComputesDiagnosticConverterImpl.IssueLocation
for the given node.
-
getLocationForNode
protected DiagnosticConverterImpl.IssueLocation getLocationForNode(INode node, int offset, int length)
ComputesDiagnosticConverterImpl.IssueLocation
for the given offset and length in the given node.- Since:
- 2.21
-
resolveStructuralFeature
protected org.eclipse.emf.ecore.EStructuralFeature resolveStructuralFeature(org.eclipse.emf.ecore.EObject ele, java.lang.Object feature)
-
-