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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears any cached information.booleanGet the children of the node.Get a concrete marker from the receiver.longReturn the description of the receiver.getGroup()Get the group for the receiver.longgetId()The underlying marker ID value.intgetLine()Get the location string.Return the parent node ornullif this is a top level element.Return the short name for the folder.getType()inthashCode()booleanReturn whether or not this is a concrete nodevoidrefresh()Refresh the properties of this marker from the underlying IMarker instancevoidsetCategory(MarkerNode category) Set the category the receiver is in.voidSet 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:MarkerNodeReturn the description of the receiver.- Specified by:
getDescriptionin 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:MarkerNodeGet the children of the node.- Specified by:
getChildrenin classMarkerNode- Returns:
- MarkerNode[]
-
getParent
Description copied from class:MarkerNodeReturn the parent node ornullif this is a top level element.- Specified by:
getParentin classMarkerNode- Returns:
- MarkerNode
-
isConcrete
public boolean isConcrete()Description copied from class:MarkerNodeReturn whether or not this is a concrete node- Specified by:
isConcretein classMarkerNode- Returns:
- boolean
-
getShortFolder
Return the short name for the folder.- Returns:
- String
-
getLocationString
Get the location string. If theIMarker.LOCATIONattribute 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:MarkerNodeGet 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:
getConcreteRepresentativein classMarkerNode- Returns:
- ConcreteMarker
-