public class MarkerViewUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
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.
|
static String |
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.
|
Constructor and Description |
---|
MarkerViewUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getViewId(IMarker marker)
Returns the id of the view used to show markers of the
same type as the given marker.
|
static boolean |
showMarker(IWorkbenchPage page,
IMarker marker,
boolean showView)
Shows the given marker in the appropriate view in the given page.
|
public static final String PATH_ATTRIBUTE
IMarker.getAttribute(java.lang.String)
,
Constant Field Valuespublic static final String NAME_ATTRIBUTE
IMarker.getAttribute(java.lang.String)
,
Constant Field Valuespublic static String getViewId(IMarker marker) throws CoreException
marker
- the markernull
if no appropriate view could be determinedCoreException
- if an exception occurs testing the type of the markerpublic static boolean showMarker(IWorkbenchPage page, IMarker marker, boolean showView)
page
- the workbench page in which to show the markermarker
- the marker to showshowView
- true
if the view should be shown first
false
to only show the marker if the view is already showingtrue
if the marker was successfully shown,
false
if notGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.