Package org.eclipse.ui.views.markers
Class MarkerViewUtil
java.lang.Object
org.eclipse.ui.views.markers.MarkerViewUtil
Utility class for showing markers in the marker views.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe NAME_ATTRIBUTE is the tag for the attribute on a marker that can be used to supply the String for the name rather than using the name of the underlying resource.static final StringThe PATH_ATTRIBUTE is the tag for the attribute on a marker that can be used to supply the String for the path rather than using the path of the underlying resource. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the id of the view used to show markers of the same type as the given marker.static booleanshowMarker(IWorkbenchPage page, IMarker marker, boolean showView) Shows the given marker in the appropriate view in the given page.static booleanshowMarkers(IWorkbenchPage page, IMarker[] markers, boolean showView) Shows the given markers in the appropriate view for the first marker in the given page.
-
Field Details
-
PATH_ATTRIBUTE
The PATH_ATTRIBUTE is the tag for the attribute on a marker that can be used to supply the String for the path rather than using the path of the underlying resource.- Since:
- 3.2
- See Also:
-
NAME_ATTRIBUTE
The NAME_ATTRIBUTE is the tag for the attribute on a marker that can be used to supply the String for the name rather than using the name of the underlying resource.- Since:
- 3.2
- See Also:
-
-
Constructor Details
-
MarkerViewUtil
public MarkerViewUtil()
-
-
Method Details
-
getViewId
Returns the id of the view used to show markers of the same type as the given marker.- Parameters:
marker- the marker- Returns:
- the view id or
nullif no appropriate view could be determined - Throws:
CoreException- if an exception occurs testing the type of the marker- Since:
- 3.0
-
showMarker
Shows the given marker in the appropriate view in the given page. This must be called from the UI thread.- Parameters:
page- the workbench page in which to show the markermarker- the marker to showshowView-trueif the view should be shown firstfalseto only show the marker if the view is already showing- Returns:
trueif the marker was successfully shown,falseif not- Since:
- 3.0
-
showMarkers
Shows the given markers in the appropriate view for the first marker in the given page. If following markers do not belong to this view, they would not be shown. This must be called from the UI thread.- Parameters:
page- the workbench page in which to show the markersmarkers- the markers to showshowView-trueif the view should be shown firstfalseto only show the markers if the view is already showing- Returns:
trueif the markers were successfully shown,falseif not- Since:
- 3.13
-