|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.common.ui.MarkerHelper
public class MarkerHelper
Provides methods to simplify the work with IMarker
s. The main goal is to
simplify the creation of markers using the information described in
Diagnostic
s.
Constructor Summary | |
---|---|
MarkerHelper()
|
Method Summary | |
---|---|
protected void |
adjustMarker(IMarker marker,
Diagnostic diagnostic,
Diagnostic parentDiagnostic)
Clients should override this method to update the marker associated with the diagnostic. |
protected java.lang.String |
composeMessage(Diagnostic diagnostic,
Diagnostic parentDiagnostic)
Returns the message that will be used with the marker associated with the given diagnostic. |
void |
createMarkers(Diagnostic diagnostic)
Creates a marker based on the information available in the specified diagnostic. |
protected void |
createMarkers(IResource resource,
Diagnostic diagnostic,
Diagnostic parentDiagnostic)
|
protected void |
deleteMarkers(IResource resource,
boolean includeSubtypes,
int depth)
|
void |
deleteMarkers(java.lang.Object object)
Deletes a maker with id equals to the return of getMarkerID()
from the IResource computed from the specified object. |
void |
deleteMarkers(java.lang.Object object,
boolean includeSubtypes,
int depth)
|
IEditorInput |
getEditorInput(java.lang.Object object)
|
protected IFile |
getFile(Diagnostic diagnostic)
|
protected IFile |
getFile(java.lang.Object datum)
|
protected IFile |
getFile(URI uri)
|
protected java.lang.String |
getMarkerID()
|
java.util.List<?> |
getTargetObjects(java.lang.Object object,
IMarker marker)
|
protected boolean |
hasMarkers(IResource resource,
boolean includeSubtypes,
int depth)
|
boolean |
hasMarkers(java.lang.Object object)
Returns whether the a maker with id equals to the return of getMarkerID()
is available in the IResource computed from the specified object. |
boolean |
hasMarkers(java.lang.Object object,
boolean includeSubtypes,
int depth)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MarkerHelper()
Method Detail |
---|
protected java.lang.String getMarkerID()
protected IFile getFile(java.lang.Object datum)
protected IFile getFile(Diagnostic diagnostic)
protected IFile getFile(URI uri)
public void createMarkers(Diagnostic diagnostic) throws CoreException
Creates a marker based on the information available in the specified
diagnostic. The marker's id is defined by getMarkerID()
.
The default implementation looks in the diagnostic's data array for objects that would allow an IFile to be computed
diagnostic
-
CoreException
protected void createMarkers(IResource resource, Diagnostic diagnostic, Diagnostic parentDiagnostic) throws CoreException
CoreException
protected void adjustMarker(IMarker marker, Diagnostic diagnostic, Diagnostic parentDiagnostic) throws CoreException
marker
- the marker to be updated.diagnostic
- the diagnostic associated with the marker.parentDiagnostic
- the parent of the diagnostic, if any.
CoreException
protected java.lang.String composeMessage(Diagnostic diagnostic, Diagnostic parentDiagnostic)
diagnostic
- the diagnostic.parentDiagnostic
- the parent of the diagnostic, if any.
public boolean hasMarkers(java.lang.Object object)
getMarkerID()
is available in the IResource computed from the specified object.
object
-
public boolean hasMarkers(java.lang.Object object, boolean includeSubtypes, int depth)
protected boolean hasMarkers(IResource resource, boolean includeSubtypes, int depth)
public void deleteMarkers(java.lang.Object object)
getMarkerID()
from the IResource computed from the specified object.
object
- public void deleteMarkers(java.lang.Object object, boolean includeSubtypes, int depth)
protected void deleteMarkers(IResource resource, boolean includeSubtypes, int depth)
public IEditorInput getEditorInput(java.lang.Object object)
public java.util.List<?> getTargetObjects(java.lang.Object object, IMarker marker)
|
Copyright 2001-2012 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |