Package com._1c.g5.v8.dt.ui.validation
Class AbstractMarkerWrapper
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.validation.AbstractMarkerWrapper
-
- All Implemented Interfaces:
Comparable<AbstractMarkerWrapper>
- Direct Known Subclasses:
AbstractTextMarkerWrapper
,BmMarkerWrapper
public abstract class AbstractMarkerWrapper extends Object implements Comparable<AbstractMarkerWrapper>
Abstract class for wrappingMarker
. Provides helpful methods for content and label provider.
This class has a few advantages overMarker
. These are.- Awareness of the BM engine the corresponding marker is associated with. This allows to resolve the marker's BM object.
- Implemented
equals
method. Thus selection in the view is retained when re-validation happens.
-
-
Constructor Summary
Constructors Constructor Description AbstractMarkerWrapper(Marker marker, org.eclipse.core.resources.IProject project)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description int
compareTo(AbstractMarkerWrapper other)
boolean
equals(Object obj)
String
getCheckId()
Returns check id.Date
getCreationDate()
Gets the marker's creation date.String
getLocation()
Get problem location.protected Marker
getMarker()
Gets wrapped marker.String
getMarkerId()
Gets marker id.String
getMessage()
Gets the marker's message.abstract Object
getObject()
Gets the object the wrapped marker is associated with.org.eclipse.core.resources.IProject
getProject()
Gets corresponding to the markerIProject
.MarkerSeverity
getSeverity()
Gets the marker's severity.String
getSourceType()
Gets the marker's source - the unique id corresponding to the group of object linked with this marker.abstract String
getStringPresentation()
Gets string representation of the wrapped marker for view.int
hashCode()
abstract void
showMarker()
Opens editor (or activate navigator) corresponding to the object fromgetObject()
.
-
-
-
Constructor Detail
-
AbstractMarkerWrapper
public AbstractMarkerWrapper(Marker marker, org.eclipse.core.resources.IProject project)
Creates a new instance.- Parameters:
marker
- the wrapped marker, can't benull
project
- the project, can't benull
-
-
Method Detail
-
getStringPresentation
public abstract String getStringPresentation()
Gets string representation of the wrapped marker for view.- Returns:
- string representation of the wrapped marker for view,
never
null
.
-
getProject
public final org.eclipse.core.resources.IProject getProject()
Gets corresponding to the markerIProject
.- Returns:
- corresponding to the marker
IProject
, nevernull
.
-
getMarkerId
public String getMarkerId()
Gets marker id. Id should be unique for project- Returns:
- marker id, never
null
-
compareTo
public int compareTo(AbstractMarkerWrapper other)
- Specified by:
compareTo
in interfaceComparable<AbstractMarkerWrapper>
-
getCreationDate
public Date getCreationDate()
Gets the marker's creation date.- Returns:
- the marker's creation date, never
null
.
-
getMessage
public String getMessage()
Gets the marker's message.- Returns:
- the marker's message, never
null
.
-
getSeverity
public MarkerSeverity getSeverity()
Gets the marker's severity.- Returns:
- the marker's severity, never
null
.
-
getSourceType
public String getSourceType()
Gets the marker's source - the unique id corresponding to the group of object linked with this marker.- Returns:
- the marker's source, never
null
.
-
getObject
public abstract Object getObject()
Gets the object the wrapped marker is associated with.- Returns:
- the associated object, can be
null
when there is no linkedEObject
withMarker
.
-
showMarker
public abstract void showMarker()
Opens editor (or activate navigator) corresponding to the object fromgetObject()
.
-
getLocation
public String getLocation()
Get problem location.- Returns:
- the problem location, or
"Unknown"
string value
-
getCheckId
public String getCheckId()
Returns check id.- Returns:
- check id, not
null
-
getMarker
protected Marker getMarker()
Gets wrapped marker.- Returns:
- wrapped marker, never
null
.
-
-