|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.validation.marker.MarkerUtil
public final class MarkerUtil
This class provides utility methods that aid in the creation of IResource
markers
(IMarker
). Markers created by this utility will have the
ValidationMarkerResolution
registered as a resolution that simply disables the constraint unless they are using a
marker subtype. In that case they will have to explicitly register the ValidationMarkerResolution
against their marker type.
Field Summary | |
---|---|
static String |
RULE_ATTRIBUTE
|
static String |
VALIDATION_MARKER_TYPE
|
Constructor Summary | |
---|---|
MarkerUtil()
|
Method Summary | |
---|---|
static void |
createMarkers(IStatus validationStatus)
Creates markers with default validation marker type for all resources that had validation failures or warnings. |
static void |
createMarkers(IStatus validationStatus,
int severityMask)
Creates markers with default validation marker type for all resources that had validation failures or warnings. |
static void |
createMarkers(IStatus validationStatus,
int severityMask,
String markerType,
IMarkerConfigurator configurator)
Creates markers with the provided marker type for all resources that had validation failures or warnings. |
static void |
createMarkers(IStatus validationStatus,
String markerType,
IMarkerConfigurator configurator)
Creates markers with the provided marker type for all resources that had validation failures or warnings. |
static void |
updateMarkers(IStatus validationStatus)
Creates or updates markers with default validation marker type for all resources that had validation failures or warnings. |
static void |
updateMarkers(IStatus validationStatus,
int severityMask)
Creates markers with default validation marker type for all resources that had validation failures or warnings. |
static void |
updateMarkers(IStatus validationStatus,
int severityMask,
String markerType,
IMarkerConfigurator configurator)
Creates markers with the provided marker type for all resources that had validation failures or warnings. |
static void |
updateMarkers(IStatus validationStatus,
String markerType,
IMarkerConfigurator configurator)
Creates markers with the provided marker type for all resources that had validation failures or warnings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VALIDATION_MARKER_TYPE
public static final String RULE_ATTRIBUTE
Constructor Detail |
---|
public MarkerUtil()
Method Detail |
---|
public static void createMarkers(IStatus validationStatus) throws CoreException
Creates markers with default validation marker type for all resources that had
validation failures or warnings.
The status provided is the status returned by one of the IValidator.validate(Object)
methods.
To update the markers on a resource that already has markers, use the
updateMarkers(IStatus)
method.
validationStatus
- A status object returned by a validator's validate method.
CoreException
- A core exception is thrown if there were any problems interacting
with the workspace to attach/delete markers on resources.updateMarkers(IStatus)
public static void createMarkers(IStatus validationStatus, int severityMask) throws CoreException
Creates markers with default validation marker type for all resources that had
validation failures or warnings.
The status provided is the status returned by one of the IValidator.validate(Object)
methods.
To update the markers on a resource that already has markers, use the
updateMarkers(IStatus, int)
method.
validationStatus
- A status object returned by a validator's validate method.severityMask
- mask selecting which severities to create markers for
CoreException
- A core exception is thrown if there were any problems interacting
with the workspace to attach/delete markers on resources.updateMarkers(IStatus, int)
public static void createMarkers(IStatus validationStatus, String markerType, IMarkerConfigurator configurator) throws CoreException
Creates markers with the provided marker type for all resources that had validation failures or warnings. An options marker configurator is provided in order to populate the marker with additional information.
To update the markers on a resource that already has markers, use the
updateMarkers(IStatus, String, IMarkerConfigurator)
method.
validationStatus
- A status object returned by a validator's validate method.markerType
- A marker type that is a subtype of the validationProblem marker type.configurator
- An optional configurator to populate marker subtype specific attributes.
CoreException
- A core exception is thrown if there were any problems interacting
with the workspace to attach/delete markers on resources.IValidator.validate(Object)
,
IValidator.validate(java.util.Collection)
,
IMarkerConfigurator
,
updateMarkers(IStatus, String, IMarkerConfigurator)
public static void createMarkers(IStatus validationStatus, int severityMask, String markerType, IMarkerConfigurator configurator) throws CoreException
Creates markers with the provided marker type for all resources that had validation failures or warnings. An options marker configurator is provided in order to populate the marker with additional information.
To update the markers on a resource that already has markers, use the
updateMarkers(IStatus, int, String, IMarkerConfigurator)
method.
validationStatus
- A status object returned by a validator's validate method.severityMask
- mask selecting which severities to create markers formarkerType
- A marker type that is a subtype of the validationProblem marker type.configurator
- An optional configurator to populate marker subtype specific attributes.
CoreException
- A core exception is thrown if there were any problems interacting
with the workspace to attach/delete markers on resources.IValidator.validate(Object)
,
IValidator.validate(java.util.Collection)
,
IMarkerConfigurator
,
updateMarkers(IStatus, int, String, IMarkerConfigurator)
public static void updateMarkers(IStatus validationStatus) throws CoreException
Creates or updates markers with default validation marker type for all
resources that had validation failures or warnings. If there is no failed
validation on a given resource, its previously attached markers are
deleted. If a resource has validation failures or warnings, its
previously attached markers are deleted and new ones are created. The
status provided is the status returned by one of the
IValidator.validate(Object)
methods.
Note that, in order to correctly update the markers for resources
that reported no problems, the validation operation must have been
performed with the IBatchValidator.OPTION_TRACK_RESOURCES
option
enabled.
validationStatus
- A status object returned by a validator's validate method.
CoreException
- A core exception is thrown if there were any problems
interacting with the workspace to attach/delete markers on
resources.public static void updateMarkers(IStatus validationStatus, int severityMask) throws CoreException
Creates markers with default validation marker type for all resources
that had validation failures or warnings. If there is no failed
validation on a given resource, its previously attached markers are
deleted. If a resource has validation failures or warnings, its
previously attached markers are deleted and new ones are created. The
status provided is the status returned by one of the
IValidator.validate(Object)
methods.
Note that, in order to correctly update the markers for resources
that reported no problems, the validation operation must have been
performed with the IBatchValidator.OPTION_TRACK_RESOURCES
option
enabled.
validationStatus
- A status object returned by a validator's validate method.severityMask
- mask selecting which severities to create markers for
CoreException
- A core exception is thrown if there were any problems
interacting with the workspace to attach/delete markers on
resources.public static void updateMarkers(IStatus validationStatus, String markerType, IMarkerConfigurator configurator) throws CoreException
Creates markers with the provided marker type for all resources that had validation failures or warnings. If there is no failed validation on a given resource, its previously attached markers are deleted. If a resource has validation failures or warnings, its previously attached markers are deleted and new ones are created. An optional marker configurator is provided in order to populate the marker with additional information.
that reported no problems, the validation operation must have been
performed with the IBatchValidator.OPTION_TRACK_RESOURCES
option
enabled.
validationStatus
- A status object returned by a validator's validate method.markerType
- A marker type that is a subtype of the validationProblem
marker type.configurator
- An optional configurator to populate marker subtype specific
attributes.
CoreException
- A core exception is thrown if there were any problems
interacting with the workspace to attach/delete markers on
resources.IValidator.validate(Object)
,
IValidator.validate(java.util.Collection)
,
IMarkerConfigurator
public static void updateMarkers(IStatus validationStatus, int severityMask, String markerType, IMarkerConfigurator configurator) throws CoreException
Creates markers with the provided marker type for all resources that had validation failures or warnings. If there is no failed validation on a given resource, its previously attached markers are deleted. If a resource has validation failures or warnings, its previously attached markers are deleted and new ones are created. An optional marker configurator is provided in order to populate the marker with additional
Note that, in order to correctly update the markers for resources
that reported no problems, the validation operation must have been
performed with the IBatchValidator.OPTION_TRACK_RESOURCES
option
enabled.
validationStatus
- A status object returned by a validator's validate method.severityMask
- mask selecting which severities to create markers formarkerType
- A marker type that is a subtype of the validationProblem
marker type.configurator
- An optional configurator to populate marker subtype specific
attributes.
CoreException
- A core exception is thrown if there were any problems
interacting with the workspace to attach/delete markers on
resources.IValidator.validate(Object)
,
IValidator.validate(java.util.Collection)
,
IMarkerConfigurator
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |