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 classDiagnosticConverterImpl.IssueLocation
-
Constructor Summary
Constructors Constructor Description DiagnosticConverterImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconvertResourceDiagnostic(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.voidconvertValidatorDiagnostic(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.EObjectgetCauser(org.eclipse.emf.common.util.Diagnostic diagnostic)protected java.lang.StringgetIssueCode(org.eclipse.emf.common.util.Diagnostic diagnostic)protected java.lang.String[]getIssueData(org.eclipse.emf.common.util.Diagnostic diagnostic)protected CheckTypegetIssueType(org.eclipse.emf.common.util.Diagnostic diagnostic)protected DiagnosticConverterImpl.IssueLocationgetLocationData(org.eclipse.emf.common.util.Diagnostic diagnostic)protected DiagnosticConverterImpl.IssueLocationgetLocationData(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature structuralFeature)protected DiagnosticConverterImpl.IssueLocationgetLocationData(org.eclipse.emf.ecore.EObject obj, org.eclipse.emf.ecore.EStructuralFeature structuralFeature, int index)protected DiagnosticConverterImpl.IssueLocationgetLocationForNode(INode node)ComputesDiagnosticConverterImpl.IssueLocationfor the given node.protected DiagnosticConverterImpl.IssueLocationgetLocationForNode(INode node, int offset, int length)ComputesDiagnosticConverterImpl.IssueLocationfor the given offset and length in the given node.protected SeveritygetSeverity(org.eclipse.emf.common.util.Diagnostic diagnostic)protected org.eclipse.emf.ecore.EStructuralFeatureresolveStructuralFeature(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:IDiagnosticConverterConvert a resource diagnostic to zero, one or more markers.- Specified by:
convertResourceDiagnosticin interfaceIDiagnosticConverter
-
convertValidatorDiagnostic
public void convertValidatorDiagnostic(org.eclipse.emf.common.util.Diagnostic diagnostic, org.eclipse.xtext.util.IAcceptor<Issue> acceptor)Description copied from interface:IDiagnosticConverterConvert a validation diagnostic to zero, one or more markers.- Specified by:
convertValidatorDiagnosticin 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.IssueLocationfor the given node.
-
getLocationForNode
protected DiagnosticConverterImpl.IssueLocation getLocationForNode(INode node, int offset, int length)
ComputesDiagnosticConverterImpl.IssueLocationfor 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)
-
-