public class ArtifactManager extends Object
Note that there can be more than one ArtifactManager, distinguished by an ID, probably a markerID. That is, all artifacts of the same markerID (probably shown in the same view) are managed by the same (distinct) ArtifactManager. TODO Question: why can't we just store the objects in an attribute??
Modifier and Type | Field and Description |
---|---|
static HashMap |
registry
Registry of artifact managers.
|
Constructor and Description |
---|
ArtifactManager(String id)
Create ArtifactManager from id
|
Modifier and Type | Method and Description |
---|---|
void |
addArtifactToHash(IArtifact a)
Add an artifact to the hashtable for future lookup
|
void |
clear()
Remove all the artifacts
|
static IArtifact |
getArtifact(IMarker marker)
return the artifact for a marker; involves looking up the
Artifact Manager, then the Artifact within that.
|
HashMap |
getArtifactMap()
get hashtable of artifact map
|
Object[] |
getArtifacts() |
static ArtifactManager |
getManager(String id)
return the ArtifactManager used for managing artifacts of type "id"
(probably a marker id)
|
boolean |
removeArtifact(IArtifact a)
Remove artifact by artifact object
|
boolean |
removeArtifact(String key)
Remove artifact by key
|
String |
toString() |
public static HashMap registry
public ArtifactManager(String id)
id
- public static ArtifactManager getManager(String id)
id
- public static IArtifact getArtifact(IMarker marker) throws CoreException
marker
- CoreException
public void addArtifactToHash(IArtifact a)
artifact
- public Object[] getArtifacts()
public HashMap getArtifactMap()
public boolean removeArtifact(IArtifact a)
a
- the artifact to removepublic boolean removeArtifact(String key)
key
- public void clear()
Copyright (c) 2011 IBM Corporation and others. All Rights Reserved.