Package com._1c.g5.v8.dt.ui.validation
Class AbstractMarkerWrapper
- java.lang.Object
-
- com._1c.g5.v8.dt.ui.validation.AbstractMarkerWrapper
-
- All Implemented Interfaces:
IMarkerWrapper
,Comparable<AbstractMarkerWrapper>
- Direct Known Subclasses:
AbstractTextMarkerWrapper
,BmMarkerWrapper
public abstract class AbstractMarkerWrapper extends Object implements IMarkerWrapper, 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 Deprecated Methods Modifier and Type Method Description int
compareTo(AbstractMarkerWrapper other)
Deprecated.boolean
equals(Object obj)
String
getCheckId()
Returns check id.Date
getCreationDate()
Gets the marker's creation date.String
getLocation()
Get problem location.Marker
getMarker()
Gets wrapped marker.String
getMarkerId()
Gets marker id.String
getMessage()
Gets the marker's message.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.int
hashCode()
boolean
isCustom()
Indicates that the marker contains check IDabstract void
showMarker()
Opens editor (or activate navigator) corresponding to the object fromIMarkerWrapper.getObject()
.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.v8.dt.validation.marker.IMarkerWrapper
getObject, getStringPresentation, isModelCheck
-
-
-
-
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
-
showMarker
public abstract void showMarker()
Opens editor (or activate navigator) corresponding to the object fromIMarkerWrapper.getObject()
.
-
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
.
-
getLocation
public String getLocation()
Get problem location.- Returns:
- the problem location, or
"Unknown"
string value
-
getCreationDate
public Date getCreationDate()
Gets the marker's creation date.- Returns:
- the marker's creation date, never
null
.
-
getMarker
public Marker getMarker()
Description copied from interface:IMarkerWrapper
Gets wrapped marker.- Specified by:
getMarker
in interfaceIMarkerWrapper
- Returns:
- wrapped marker, never
null
.
-
getMarkerId
public String getMarkerId()
Description copied from interface:IMarkerWrapper
Gets marker id. Id should be unique for project- Specified by:
getMarkerId
in interfaceIMarkerWrapper
- Returns:
- marker id, never
null
-
getProject
public final org.eclipse.core.resources.IProject getProject()
Description copied from interface:IMarkerWrapper
Gets corresponding to the markerIProject
.- Specified by:
getProject
in interfaceIMarkerWrapper
- Returns:
- corresponding to the marker
IProject
, nevernull
.
-
getMessage
public String getMessage()
Description copied from interface:IMarkerWrapper
Gets the marker's message.- Specified by:
getMessage
in interfaceIMarkerWrapper
- Returns:
- the marker's message, never
null
.
-
getSeverity
public MarkerSeverity getSeverity()
Description copied from interface:IMarkerWrapper
Gets the marker's severity.- Specified by:
getSeverity
in interfaceIMarkerWrapper
- Returns:
- the marker's severity, never
null
.
-
getCheckId
public String getCheckId()
Description copied from interface:IMarkerWrapper
Returns check id.- Specified by:
getCheckId
in interfaceIMarkerWrapper
- Returns:
- check id, not
null
-
isCustom
public boolean isCustom()
Description copied from interface:IMarkerWrapper
Indicates that the marker contains check ID- Specified by:
isCustom
in interfaceIMarkerWrapper
- Returns:
true
if the marker contains check ID
-
compareTo
@Deprecated public int compareTo(AbstractMarkerWrapper other)
Deprecated.TODO remove in G5V8DT-22403- Specified by:
compareTo
in interfaceComparable<AbstractMarkerWrapper>
-
-