Class ConcreteMarker
java.lang.Object
org.eclipse.ui.views.markers.internal.MarkerNode
org.eclipse.ui.views.markers.internal.ConcreteMarker
- Direct Known Subclasses:
ProblemMarker
,TaskMarker
This is a concrete class that stores the same type of information as the IMarkers
used by the IDE. This class exists as an optimization. The various get* methods
on IMarker are extremely slow, which makes it very slow to sort markers (for example,
in the problems view). This marker class stores the fields in the most efficient form
for sorting and display, but necessarily removes some generality from IMarker.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears any cached information.boolean
Get the children of the node.Get a concrete marker from the receiver.long
Return the description of the receiver.getGroup()
Get the group for the receiver.long
getId()
The underlying marker ID value.int
getLine()
Get the location string.Return the parent node ornull
if this is a top level element.Return the short name for the folder.getType()
int
hashCode()
boolean
Return whether or not this is a concrete nodevoid
refresh()
Refresh the properties of this marker from the underlying IMarker instancevoid
setCategory
(MarkerNode category) Set the category the receiver is in.void
Set the group name.
-
Constructor Details
-
ConcreteMarker
-
-
Method Details
-
clearCache
public void clearCache()Clears any cached information. This frees up some memory, but will slow down the next comparison operation. It is a good idea to call this on a set of markers after sorting them, in order to reduce their memory cost. -
refresh
public void refresh()Refresh the properties of this marker from the underlying IMarker instance -
getResource
-
getType
-
getDescription
Description copied from class:MarkerNode
Return the description of the receiver.- Specified by:
getDescription
in classMarkerNode
- Returns:
- String
-
getDescriptionKey
-
getResourceName
-
getResourceNameKey
-
getLine
public int getLine() -
getFolder
-
getCreationTime
public long getCreationTime() -
getId
public long getId()The underlying marker ID value.- Returns:
- the marker's ID.
-
getMarker
-
equals
-
hashCode
public int hashCode() -
setCategory
Set the category the receiver is in. -
getChildren
Description copied from class:MarkerNode
Get the children of the node.- Specified by:
getChildren
in classMarkerNode
- Returns:
- MarkerNode[]
-
getParent
Description copied from class:MarkerNode
Return the parent node ornull
if this is a top level element.- Specified by:
getParent
in classMarkerNode
- Returns:
- MarkerNode
-
isConcrete
public boolean isConcrete()Description copied from class:MarkerNode
Return whether or not this is a concrete node- Specified by:
isConcrete
in classMarkerNode
- Returns:
- boolean
-
getShortFolder
Return the short name for the folder.- Returns:
- String
-
getLocationString
Get the location string. If theIMarker.LOCATION
attribute was not set then return an empty String.- Returns:
- String
-
getGroup
Get the group for the receiver.- Returns:
- Returns the group.
-
setGroup
Set the group name.- Parameters:
group
- the group name
-
getConcreteRepresentative
Description copied from class:MarkerNode
Get a concrete marker from the receiver. If the receiver is concrete return the receiver otherwise return one of the concrete markers it contains.- Specified by:
getConcreteRepresentative
in classMarkerNode
- Returns:
- ConcreteMarker
-