Interface IMarkerManager
-
- All Superinterfaces:
IManagedService
public interface IMarkerManager extends IManagedService
A marker manager service.
It provides operations with DT markers.Behind the scene the DT marker is associated with some
EObject
. From this point of view the DT marker is equivalent to Eclipse marker which is associated with someIResource
.The marker manager manipulates with markers by the specified
IProject
, the givenobjectId
and the givensource
.
The objectId is an object of type string or long. It is caused as already mentioned by marker association withEObject
.
The marker-underlyingEObject
can be of typeIBmObject
or 'native'EObject
.
So we have twoobjectId
types:- The
Long
objectId is the BM object identifier. - The
String
objectId is the string representaion of the URI of a resource.
- See Also:
Marker
-
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_NAME
The name of the marker manager as managed service.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addListener(org.eclipse.core.resources.IProject project, IMarkerManagerListener listener)
Adds the specified listener for the given {code project}.IMarkerInfo
getMarkerInfo(org.eclipse.core.resources.IProject project)
Returns marker info for the specifiedproject
.Marker[]
getMarkers(org.eclipse.core.resources.IProject project, Object objectId)
Gets markers for the specifiedobjectId
and associated with the givenproject
.Collection<Marker>
getMarkers(org.eclipse.core.resources.IProject project, Collection<String> checkIds)
Gets all markers that are produced by provided checksMarkerSeverity
getMaxSeverity(org.eclipse.core.resources.IProject project, Object objectId)
Finds and returns a maximum severity for the givenobjectId
.Marker[]
getNestedMarkers(org.eclipse.core.resources.IProject project, Object objectId)
Returns markers of the specifiedobjectId
and its children.Iterator<Marker>
iterator(org.eclipse.core.resources.IProject project)
Returns an iterator over all the markers of the givenproject
.void
removeContainmentMarkers(IDtProject dtProject, Long topObjectId, Set<Long> removedContainmentIds)
TODO javadoc.void
removeListener(org.eclipse.core.resources.IProject project, IMarkerManagerListener listener)
Removes the specified listener.void
removeMarkers(org.eclipse.core.resources.IProject project, Object objectId)
Removes markers for the specifiedobjectId
associated with the givenproject
.void
removeMarkers(org.eclipse.core.resources.IProject project, Object objectId, long sourceObjectId, String checkId)
Removes markers for the specifiedobjectId
andsource
associated with the givenproject
.void
removeMarkers(org.eclipse.core.resources.IProject project, String checkId)
Removes all markers generated by the provided check for all applicable target objectsvoid
setMarkers(org.eclipse.core.resources.IProject project, Object objectId, Marker[] markers)
Sets markers for the specifiedobjectId
associated with the givenproject
.void
setMarkers(org.eclipse.core.resources.IProject project, Object objectId, Object sourceObjectId, String checkId, Marker[] markers)
Sets markers for the specifiedobjectId
andcheckId
associated with the givenproject
.Iterator<Object>
topObjectIdIterator(org.eclipse.core.resources.IProject project)
Returns an iterator over all top identifiers for objects with markers of the givenproject
.void
updateSeverity(org.eclipse.core.resources.IProject project, String checkId, MarkerSeverity newSeverity)
Updates severity of markers generated by the provided checkId, if any-
Methods inherited from interface com._1c.g5.wiring.IManagedService
activate, deactivate
-
-
-
-
Field Detail
-
SERVICE_NAME
static final String SERVICE_NAME
The name of the marker manager as managed service.- See Also:
- Constant Field Values
-
-
Method Detail
-
addListener
void addListener(org.eclipse.core.resources.IProject project, IMarkerManagerListener listener)
Adds the specified listener for the given {code project}.- Parameters:
project
- the project to associate with the listener, cannot benull
.listener
- the listener to add, cannot benull
.- See Also:
IMarkerManagerListener
-
removeListener
void removeListener(org.eclipse.core.resources.IProject project, IMarkerManagerListener listener)
Removes the specified listener.- Parameters:
project
- the project, cannot benull
.listener
- the listener to remove, cannot benull
.- See Also:
IMarkerManagerListener
-
setMarkers
void setMarkers(org.eclipse.core.resources.IProject project, Object objectId, Marker[] markers)
Sets markers for the specifiedobjectId
associated with the givenproject
.If the specified
objectId
is of Long type then it is supposed thatmarkers
array contains all markers including contained objects.If some markers already exist for the specified
objectId
andsource
they will be replaced by a new one.
If the given markers array isnull
or empty, the existing markers for the specifiedobjectId
andsource
will be removed.
-
setMarkers
void setMarkers(org.eclipse.core.resources.IProject project, Object objectId, Object sourceObjectId, String checkId, Marker[] markers)
Sets markers for the specifiedobjectId
andcheckId
associated with the givenproject
.If the specified
objectId
is of Long type then it is supposed thatmarkers
array contains all markers including contained objects.If some markers already exist for the specified
objectId
andsource
they will be replaced by a new one.
If the given markers array isnull
or empty, the existing markers for the specifiedobjectId
andsource
will be removed.- Parameters:
project
- the project, cannot benull
.objectId
- the object identifier. It can be of typeString
orLong
only.sourceObjectId
- The identifier of the source object which validation resulted in those markers. Used to clear previous markers being generated for the same source. Use -1 to specify situations when no identifiable source object is present (e.g. module markers, etc)checkId
- the checkId, cannot benull
.markers
- the array of markers.
-
removeMarkers
void removeMarkers(org.eclipse.core.resources.IProject project, Object objectId)
Removes markers for the specifiedobjectId
associated with the givenproject
. The removal automatically cleans all markers that were created for this object as well as all markers that were created in association with this object (e.g. context of checks, etc)
-
removeMarkers
void removeMarkers(org.eclipse.core.resources.IProject project, Object objectId, long sourceObjectId, String checkId)
Removes markers for the specifiedobjectId
andsource
associated with the givenproject
.- Parameters:
project
- the project, cannot benull
.objectId
- the object identifier. It can be of typeString
orLong
only. The identifier cannot benull
.sourceObjectId
- The identifier of the source object which validation resulted in those markers. Used to clear previous markers being generated for the same source. Use -1 to specify situations when no identifiable source object is present (e.g. module markers, etc) and markers should be removed completellycheckId
- the checkId, cannot benull
.
-
removeMarkers
void removeMarkers(org.eclipse.core.resources.IProject project, String checkId)
Removes all markers generated by the provided check for all applicable target objects- Parameters:
project
- The project to update markers for. May not benull
checkId
- The check identifier. May not benull
-
updateSeverity
void updateSeverity(org.eclipse.core.resources.IProject project, String checkId, MarkerSeverity newSeverity)
Updates severity of markers generated by the provided checkId, if any- Parameters:
project
- The project to update markers for. May not benull
checkId
- The check identifier. May not benull
newSeverity
- New severity to set. May not benull
-
getMarkers
Marker[] getMarkers(org.eclipse.core.resources.IProject project, Object objectId)
Gets markers for the specifiedobjectId
and associated with the givenproject
.It retrieves markers without filtering by 'source'. The client can filter if manually if needed.
-
getMarkers
Collection<Marker> getMarkers(org.eclipse.core.resources.IProject project, Collection<String> checkIds)
Gets all markers that are produced by provided checks- Parameters:
project
- the project, cannot benull
.checkIds
- Identifiers of checks, may not benull
- Returns:
- The collection of matching markers, never
null
-
getNestedMarkers
Marker[] getNestedMarkers(org.eclipse.core.resources.IProject project, Object objectId)
Returns markers of the specifiedobjectId
and its children.
-
getMaxSeverity
MarkerSeverity getMaxSeverity(org.eclipse.core.resources.IProject project, Object objectId)
Finds and returns a maximum severity for the givenobjectId
.
-
iterator
Iterator<Marker> iterator(org.eclipse.core.resources.IProject project)
Returns an iterator over all the markers of the givenproject
.- Parameters:
project
- the project, cannot benull
.- Returns:
- iterator over all the markers, never
null
.
-
topObjectIdIterator
Iterator<Object> topObjectIdIterator(org.eclipse.core.resources.IProject project)
Returns an iterator over all top identifiers for objects with markers of the givenproject
.- Parameters:
project
- the project, cannot benull
.- Returns:
- iterator over all the source ids for objects with markers, never
null
.
-
getMarkerInfo
IMarkerInfo getMarkerInfo(org.eclipse.core.resources.IProject project)
Returns marker info for the specifiedproject
.- Parameters:
project
- the project to get the marker info associated with, cannot benull
.- Returns:
- the marker info, never
null
. - See Also:
IMarkerInfo
-
removeContainmentMarkers
void removeContainmentMarkers(IDtProject dtProject, Long topObjectId, Set<Long> removedContainmentIds)
TODO javadoc. Only model containments are supported (that's for sure). Only model top object id is supported (as this call is only for the model changes)- Parameters:
dtProject
-objectId
-removedContainmentIds
-
-
-