|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.ptp.pldt.common.ArtifactMarkingVisitor
public class ArtifactMarkingVisitor
Processes an IResource or an IResourceDelta to set Artifact Markers on the files
and populate the data model used for the Artifact view(s).
| Field Summary | |
|---|---|
protected ArtifactManager |
artifactManager_
|
protected java.lang.String |
markerID_
|
| Constructor Summary | |
|---|---|
ArtifactMarkingVisitor(java.lang.String markerID)
Constructor that uses the default behavior that WILL remove old markers on the resource before creating new ones. |
|
ArtifactMarkingVisitor(java.lang.String markerId,
boolean removeMarkers)
Construction that allows specification of whether or not to removed old markers on this resource before creating new ones |
|
| Method Summary | |
|---|---|
protected void |
createArtifactMarker(org.eclipse.core.resources.IResource resource,
Artifact artifact,
java.lang.String fn)
create the marker for the artifact, and add it to the repository (ArtifactManager) |
protected java.util.Map<java.lang.String,java.lang.Object> |
createCommonMarkerAttrs(org.eclipse.core.resources.IResource resource,
Artifact artifact,
java.lang.String fn)
Create marker attributes with common information shared by everyone |
protected void |
createMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String fn,
Artifact[] artifacts)
Create markers for a file. |
static Artifact[] |
getPIs(org.eclipse.core.resources.IResource r)
Get Artifacts for a given resource. e.g. could reads XML file that is presumed to be in same folder as resource file. |
static void |
showArtifact(Artifact artifact)
Show an artifact object - print for debugging/tracing purposes |
boolean |
visit(org.eclipse.core.resources.IResource resource)
|
boolean |
visit(org.eclipse.core.resources.IResourceDelta delta)
Implemented for IResourceDeltaVisitor Required implementation of the visit method. |
boolean |
visitFile(org.eclipse.core.resources.IResource resource)
Generic visiting of a file, to presumably add markers. |
boolean |
visitFile(org.eclipse.core.resources.IResource resource,
Artifact[] artifacts)
Generic version to put markers on a file, given the file(resource) and the list of artifacts |
boolean |
visitFile(org.eclipse.core.resources.IResource resource,
java.util.List<Artifact> artifacts)
Put markers on a file where list of artifacts is a List |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String markerID_
protected ArtifactManager artifactManager_
| Constructor Detail |
|---|
public ArtifactMarkingVisitor(java.lang.String markerId,
boolean removeMarkers)
markerId - removeMarkers - public ArtifactMarkingVisitor(java.lang.String markerID)
markerID - | Method Detail |
|---|
public boolean visitFile(org.eclipse.core.resources.IResource resource)
resource -
public boolean visitFile(org.eclipse.core.resources.IResource resource,
Artifact[] artifacts)
resource - artifacts - list of artifact objects
public boolean visitFile(org.eclipse.core.resources.IResource resource,
java.util.List<Artifact> artifacts)
resource - the resource, presumably a file, in which the artifacts (e.g. MPI calls) were foundartifacts - found in the file, with type and location (line number etc.)
protected void createMarkers(org.eclipse.core.resources.IResource resource,
java.lang.String fn,
Artifact[] artifacts)
throws org.eclipse.core.runtime.CoreException
resource - assumed to be a file, resource upon which to place the marker(s)fn - - filenameartifacts - - array of Artifact objects for which to create markers.
org.eclipse.core.runtime.CoreException
protected void createArtifactMarker(org.eclipse.core.resources.IResource resource,
Artifact artifact,
java.lang.String fn)
throws org.eclipse.core.runtime.CoreException
resource - artifact - fn -
org.eclipse.core.runtime.CoreException
protected java.util.Map<java.lang.String,java.lang.Object> createCommonMarkerAttrs(org.eclipse.core.resources.IResource resource,
Artifact artifact,
java.lang.String fn)
resource - File on which analysis was runartifact - the artifact objectfn - project relative path of the resource
public static Artifact[] getPIs(org.eclipse.core.resources.IResource r)
r - The resource (file assumed) for which to look for artifacts
public boolean visit(org.eclipse.core.resources.IResourceDelta delta)
throws org.eclipse.core.runtime.CoreException
IResourceDelta is
processed by providing it a visitor using the accept() method and
using this method in the visitor to process any events of interest.
Processing continues as long as this method returns true or when the end of the IResourceDelta has
been reached.
visit in interface org.eclipse.core.resources.IResourceDeltaVisitororg.eclipse.core.runtime.CoreExceptionpublic boolean visit(org.eclipse.core.resources.IResource resource)
visit in interface org.eclipse.core.resources.IResourceVisitorpublic static void showArtifact(Artifact artifact)
artifact - the Artifact Object
|
PTP Release 7.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||