|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.ui.editor.DefaultMarkerBehavior
public class DefaultMarkerBehavior
The default implementation for the DiagramEditor
behavior extension
that controls how markers are handled in the editor. Clients may subclass to
change the marker behavior; use DiagramEditor.createMarkerBehavior()
to return the instance that shall be used.
Note that there is always a 1:1 relation with a DiagramEditor
.
Field Summary | |
---|---|
protected DiagramEditor |
diagramEditor
The associated DiagramEditor |
private MarkerHelper |
markerHelper
The marker helper instance is responsible for creating workspace resource markers presented in Eclipse's Problems View. |
private EContentAdapter |
problemIndicationAdapter
Adapter used to update the problem indication when resources are demanded loaded. |
private java.util.Map<Resource,Diagnostic> |
resourceToDiagnosticMap
Map to store the diagnostic associated with a resource. |
private boolean |
updateProblemIndication
Controls whether the problem indication should be updated. |
Constructor Summary | |
---|---|
DefaultMarkerBehavior(DiagramEditor diagramEditor)
Creates a new instance of DefaultMarkerBehavior that is
associated with the given DiagramEditor . |
Method Summary | |
---|---|
Diagnostic |
analyzeResourceProblems(Resource resource,
java.lang.Exception exception)
Returns a diagnostic describing the errors and warnings listed in the resource and the specified exception (if any). |
void |
disableProblemIndicationUpdate()
Can be called to (temporarily) disable the marker update adapter, so that mass changes do not result in a bunch of notifications and cause performance penalties. |
void |
dispose()
Called to dispose this instance when the editor is closed. |
void |
enableProblemIndicationUpdate()
Can be called to enable the marker update adapter again after it has been disabled with disableProblemIndicationUpdate() . |
EContentAdapter |
getProblemIndicationAdapter()
Returns the adapter that is installed for updating the markers. |
void |
initialize()
Initializes this marker behavior extension. |
(package private) void |
updateProblemIndication()
Updates the problems indication markers in the editor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected DiagramEditor diagramEditor
DiagramEditor
private MarkerHelper markerHelper
private java.util.Map<Resource,Diagnostic> resourceToDiagnosticMap
private boolean updateProblemIndication
private EContentAdapter problemIndicationAdapter
Constructor Detail |
---|
public DefaultMarkerBehavior(DiagramEditor diagramEditor)
DefaultMarkerBehavior
that is
associated with the given DiagramEditor
.
diagramEditor
- the associated DiagramEditor
Method Detail |
---|
public void initialize()
public EContentAdapter getProblemIndicationAdapter()
public void disableProblemIndicationUpdate()
enableProblemIndicationUpdate()
public void enableProblemIndicationUpdate()
disableProblemIndicationUpdate()
. The default
implementation also triggers an update of the markers.
void updateProblemIndication()
BasicDiagnostic
to do the checks and
EditUIMarkerHelper
to check and set markers for EObject
s.
public Diagnostic analyzeResourceProblems(Resource resource, java.lang.Exception exception)
resource
- the resource to analyzeexception
- forwarded as data object to the BasicDiagnostic
Diagnostic
for the given resourcepublic void dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |