|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tu_berlin.cs.tfs.muvitorkit.ui.IDUtil
public final class IDUtil
This purely static utility class encapsulates and manages the access to
EObject models via their unique IDs (assigned by their XMLResource) and keeps
track of the MuvitorTreeEditor
s showing those models. It is used
properly by MuvitorTreeEditor
s and should not be needed elsewhere,
except for getIDForModel(EObject)
and possibly
getRealURIFragment(EObject)
.
Constructor Summary | |
---|---|
IDUtil()
|
Method Summary | |
---|---|
static MuvitorTreeEditor |
getHostEditor(EObject model)
Method for getting the editor that hosts an EObject model (or rather its root container). |
static String |
getIDForModel(EObject model)
Convenience method for retrieving the unique ID this model has in its XMLResource . |
static EObject |
getModelForID(String id)
This method resolves an ID to an EObject model searching the models of all running MuvitorTreeEditor s. |
static String |
getRealURIFragment(EObject model)
Convenience method the get the real URI fragment for an EObject model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IDUtil()
Method Detail |
---|
public static final String getIDForModel(EObject model)
XMLResource
.
model
- The model to get an ID for
getModelForID(String)
public static final String getRealURIFragment(EObject model)
EMFModelManager
) it will return these IDs if asked for the
URIFragment. To get the real URIFragment we have to set the ID to null
temporarily, which does this method.
model
- the model element to get the URI fragment from
public static final EObject getModelForID(String id)
MuvitorTreeEditor
s.
id
- an ID that has been retrieved before
public static final MuvitorTreeEditor getHostEditor(EObject model)
model
- the model to find the hosting editor for
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |