Package com.iizigo.prop
Class PropMarker
java.lang.Object
com.iizigo.prop.PropMarker
- All Implemented Interfaces:
- Runnable
The property marker is a class that holds error/warning/information about a property that is stored in a file.
- Author:
- Christopher Mindus
- Field SummaryFieldsModifier and TypeFieldDescription- final StringThe name of child property in error.- final intIndex for property reference error, -1 when not set.- final intThe character length of the marker, -1 when not position based.- final StringThe location.- static final StringAttribute in Property problem marker for Property Reference to a child name.- static final StringAttribute in Property problem marker for Property Reference with an indexed multi-property, assigns an Integer value (equal or greater than zero), otherwise not set.- static final StringAttribute in Property problem marker for Property Reference.- static final StringThe Property problem marker ID.- final StringThe Eclipse-registered marker ID.- final StringThe message.- final String[]Array of registered quick-fixes for the problem (all must be registered in QuickFixer), never null.- final StringProperty reference of the error, null when not a property error.- final intMarker severity: IMarker.SEVERITY_ERROR=2, IMarker.SEVERITY_WARNING=1 or IMarker.SEVERITY_INFO=0.- final intThe character start position of the marker, -1 when not position based.
- Constructor SummaryConstructorsConstructorDescription- PropMarker- (PropErrorItemOrigin errorItemOrigin) Creates a new property marker for a property error item.- PropMarker- (String markerID, boolean isError, String message, int start, int length, String... quickFixIDs) Creates a new property marker for a property, specialized to text file position, e.g for Java source file.- PropMarker- (String markerID, boolean isError, String message, String location, String... quickFixIDs) Creates a new property marker for a property, typically used for general errors.
- Method SummaryModifier and TypeMethodDescription- boolean- createMarker- (IResource resource) Creates the marker.- static void- deleteAllMarkers- (IResource resource) Removes all markers for a resource directly or in a job if it fails.- static void- deleteAllMarkers- (IResource resource, String type, boolean includeSubtypes, int depth, Runnable completed) Removes all markers for a resource directly or in a job if it fails.- static void- deleteMarkers- (IResource resource, String markerID) Removes all markers of the IIZI Module type and any file errors associated with an attached property.- voidDisposes of a marker.- static GProp<?>- getProperty- (IMarker marker) Gets the property from the reference in the marker.- static void- registerMarker- (String markerID, boolean isPersistent) Registers a marker for a plug-in.- void- run()Performs the adding of the marker in a job.- toString()The string representation.
- Field Details- MARKER_ID_PROPERTYThe Property problem marker ID.- See Also:
 
- MARKER_ATTRIBUTE_PROPERTY_REFERENCEAttribute in Property problem marker for Property Reference.- See Also:
 
- MARKER_ATTRIBUTE_CHILD_NAMEAttribute in Property problem marker for Property Reference to a child name.- See Also:
 
- MARKER_ATTRIBUTE_PROPERTY_INDEXAttribute in Property problem marker for Property Reference with an indexed multi-property, assigns an Integer value (equal or greater than zero), otherwise not set.- See Also:
 
- markerIDThe Eclipse-registered marker ID.
- severitypublic final int severityMarker severity: IMarker.SEVERITY_ERROR=2, IMarker.SEVERITY_WARNING=1 or IMarker.SEVERITY_INFO=0.
- messageThe message.
- locationThe location.
- referenceProperty reference of the error, null when not a property error.
- indexpublic final int indexIndex for property reference error, -1 when not set.
- startpublic final int startThe character start position of the marker, -1 when not position based.
- lengthpublic final int lengthThe character length of the marker, -1 when not position based.
- quickFixIDsArray of registered quick-fixes for the problem (all must be registered in QuickFixer), never null.
- childErrorThe name of child property in error.
 
- Constructor Details- PropMarkerpublic PropMarker- (String markerID, boolean isError, String message, String location, String... quickFixIDs) Creates a new property marker for a property, typically used for general errors.- Parameters:
- markerID- The Eclipse-registered marker ID.
- isError- Flag for error, false = warning.
- message- The message.
- location- The location.
- quickFixIDs- List of registered quick-fixes for the problem (all must be registered in QuickFixer)-
 
- PropMarkerpublic PropMarker- (String markerID, boolean isError, String message, int start, int length, String... quickFixIDs) Creates a new property marker for a property, specialized to text file position, e.g for Java source file.- Parameters:
- markerID- The Eclipse-registered marker ID.
- isError- Flag for error, false = warning.
- message- The message.
- start- The (character) start location in the file.
- length- The length of the marker.
- quickFixIDs- List of registered quick-fixes for the problem (all must be registered in QuickFixer)-
 
- PropMarkerCreates a new property marker for a property error item.- Parameters:
- errorItemOrigin- The error item including origin.
 
 
- Method Details- getPropertyGets the property from the reference in the marker.
- registerMarkerRegisters a marker for a plug-in.
- deleteMarkersRemoves all markers of the IIZI Module type and any file errors associated with an attached property.- Parameters:
- resource- The resource.
- markerID- The marker ID to remove or null for all.
- Throws:
- CoreException- If a marker cannot be deleted.
 
- deleteAllMarkersRemoves all markers for a resource directly or in a job if it fails.- Parameters:
- resource- The resource.
 
- deleteAllMarkerspublic static void deleteAllMarkers- (IResource resource, String type, boolean includeSubtypes, int depth, Runnable completed) Removes all markers for a resource directly or in a job if it fails.- Parameters:
- resource- The resource.
- type- The type of marker to consider, or- nullto indicate all types.
- includeSubtypes- Whether or not to consider sub-types of the given type.
- depth- How far to recurse (see- IResource.DEPTH_*).
- completed- A runnable that is called when it completes, null for none.
 
- createMarkerCreates the marker.- Returns:
- false if the marker cannot be created due to resource inaccessibility, true otherwise.
 
- runpublic void run()Performs the adding of the marker in a job.
- disposeDisposes of a marker.- Parameters:
- resource- The resource, or null for no marker removal on the resource.
 
- toStringThe string representation.