Class ResourceDiagnosticFeedback
- java.lang.Object
-
- org.eclipse.viatra.query.patternlanguage.emf.util.ResourceDiagnosticFeedback
-
- All Implemented Interfaces:
IErrorFeedback
public final class ResourceDiagnosticFeedback extends java.lang.Object implements IErrorFeedback
An error feedback implementation that creates diagnostics in EMF resources.- Since:
- 1.2
-
-
Field Summary
-
Fields inherited from interface org.eclipse.viatra.query.patternlanguage.emf.util.IErrorFeedback
FRAGMENT_ERROR_TYPE, JVMINFERENCE_ERROR_TYPE
-
-
Constructor Summary
Constructors Constructor Description ResourceDiagnosticFeedback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearMarkers(org.eclipse.emf.ecore.resource.Resource resource, java.lang.String markerType)
Clears all problem markers from the resource and all its descendants.void
reportError(org.eclipse.emf.ecore.EObject ctx, java.lang.String message, java.lang.String errorCode, org.eclipse.xtext.diagnostics.Severity severity, java.lang.String markerType)
Reports an error in a context object.void
reportError(org.eclipse.emf.ecore.resource.Resource file, java.lang.String message, java.lang.String errorCode, org.eclipse.xtext.diagnostics.Severity severity, java.lang.String markerType)
Reports an error in a file, but is not associated to any specific line.void
reportErrorNoLocation(org.eclipse.emf.ecore.EObject ctx, java.lang.String message, java.lang.String errorCode, org.eclipse.xtext.diagnostics.Severity severity, java.lang.String markerType)
Reports an error in a context object.
-
-
-
Method Detail
-
clearMarkers
public void clearMarkers(org.eclipse.emf.ecore.resource.Resource resource, java.lang.String markerType)
Description copied from interface:IErrorFeedback
Clears all problem markers from the resource and all its descendants.- Specified by:
clearMarkers
in interfaceIErrorFeedback
- Parameters:
resource
- a file, folder or project to clean all markers frommarkerType
-IErrorFeedback.JVMINFERENCE_ERROR_TYPE
andIErrorFeedback.FRAGMENT_ERROR_TYPE
are supported
-
reportError
public void reportError(org.eclipse.emf.ecore.EObject ctx, java.lang.String message, java.lang.String errorCode, org.eclipse.xtext.diagnostics.Severity severity, java.lang.String markerType)
Description copied from interface:IErrorFeedback
Reports an error in a context object. The error marker only appears if the context object is contained in a workspace resource, and then it is associated with the location of the context object in the textual file. All runtime errors related to the creation of the marker are logged.- Specified by:
reportError
in interfaceIErrorFeedback
errorCode
- an arbitrary error codemarkerType
-IErrorFeedback.JVMINFERENCE_ERROR_TYPE
andIErrorFeedback.FRAGMENT_ERROR_TYPE
are supported
-
reportErrorNoLocation
public void reportErrorNoLocation(org.eclipse.emf.ecore.EObject ctx, java.lang.String message, java.lang.String errorCode, org.eclipse.xtext.diagnostics.Severity severity, java.lang.String markerType)
Description copied from interface:IErrorFeedback
Reports an error in a context object. The error marker only appears if the context object is contained in a workspace resource, but it is NOT associated with the location of the context object in the textual file. All runtime errors related to the creation of the marker are logged.- Specified by:
reportErrorNoLocation
in interfaceIErrorFeedback
errorCode
- an arbitrary error codemarkerType
-IErrorFeedback.JVMINFERENCE_ERROR_TYPE
andIErrorFeedback.FRAGMENT_ERROR_TYPE
are supported
-
reportError
public void reportError(org.eclipse.emf.ecore.resource.Resource file, java.lang.String message, java.lang.String errorCode, org.eclipse.xtext.diagnostics.Severity severity, java.lang.String markerType)
Description copied from interface:IErrorFeedback
Reports an error in a file, but is not associated to any specific line. All runtime errors related to the creation of the marker are logged.- Specified by:
reportError
in interfaceIErrorFeedback
errorCode
- an arbitrary error codemarkerType
-IErrorFeedback.JVMINFERENCE_ERROR_TYPE
andIErrorFeedback.FRAGMENT_ERROR_TYPE
are supported
-
-