|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.common.notify.impl.AdapterImpl
com.ibm.xtools.uml.msl.internal.resources.LogicalUMLResourceAdapter
public class LogicalUMLResourceAdapter
Represents the provider of a logical UML resource. It manages groupings of UML resources into logical resources.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.emf.common.notify.Adapter |
|---|
Adapter.Internal |
| Field Summary |
|---|
| Fields inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
|---|
target |
| Constructor Summary | |
|---|---|
LogicalUMLResourceAdapter()
Public constructor |
|
| Method Summary | |
|---|---|
protected ILogicalUMLResource |
buildLogicalResource(Resource resource)
Builds the logical resource for the specified root resource |
void |
dispose()
Disconnect this adapter |
ILogicalUMLResource |
findLogicalResource(Resource resource)
Returns a logical UML resource for a resource even if no part of that logical resource is loaded. |
ILogicalUMLResource |
findLogicalUMLResouce(Resource resource)
Returns a logical UML resource for a resource even if no part of that logical resource is loaded. |
static List<EObject> |
getAllContainedLoadedFragmentRoots(EObject eObj)
Returns the list of all fragments contained in the model branch rooted at the specified object. |
static List<EObject> |
getContainedFragments(EObject eObj,
boolean selfIncluded,
boolean resolve)
Returns the list of fragments contained in the model branch rooted at the specified object. |
static Resource |
getContainerResource(Resource resource)
Gets the resource referred to by a resources fragment container annotation. |
static EObject |
getFragmentDirectContainer(EModelElement fragmentRoot)
Returns the direct container of the fragment. |
static List<EObject> |
getFragments(EModelElement resourceRoot)
Returns fragments of the resource. |
ILogicalUMLResource |
getLogicalResource(Resource resource)
Returns the logical UML resource of the specified resource. |
ILogicalUMLResource |
getLogicalResource(Resource resource,
boolean trackUnknowns)
Returns the logical UML resource of the specified resource. |
static EObject |
getRootContainerInResource(EObject eObject)
Finds the root container in the same resource. |
void |
installAdapter(ResourceSet resourceSet)
Installs logical resource support on to the provided resource set. |
static boolean |
isFragmentRoot(EObject eObj)
Tests if the specified object is a fragment root. |
static boolean |
isLogicalResourceRoot(EObject eObj)
Tests if the specified object is a logical resource root. |
void |
notifyChanged(Notification msg)
|
protected void |
processResourceUnloaded(Resource resource)
Processes the RESOURCE UNLOADED event. |
static void |
registerFragmentExtension(String fragmentExtension)
Registers the file extension with the provider to be considered as a logical resource fragment. |
static void |
registerRootExtension(String rootExtension)
Registers the file extension with the provider to be considered as a logical resource root. |
void |
reset(ILogicalUMLResource lResource)
|
static void |
resolveNestedFragments(Resource fragment)
Resolves specified fragment's first level nested fragments. |
| Methods inherited from class org.eclipse.emf.common.notify.impl.AdapterImpl |
|---|
getTarget, isAdapterForType, setTarget, unsetTarget |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LogicalUMLResourceAdapter()
| Method Detail |
|---|
public void dispose()
public ILogicalUMLResource findLogicalResource(Resource resource)
ILogicalUMLResourceAdapterUnloadedLogicalUMLResource is returned.
findLogicalResource in interface ILogicalUMLResourceAdapterresource - The resource whose logical resource is returned
public ILogicalUMLResource findLogicalUMLResouce(Resource resource)
LogicalUMLResourceProvider is returned.
resource - The resource whose logical resource is returned
public static Resource getContainerResource(Resource resource)
resource -
public ILogicalUMLResource getLogicalResource(Resource resource,
boolean trackUnknowns)
ILogicalUMLResourceAdapter
getLogicalResource in interface ILogicalUMLResourceAdapterresource - The resource whose logical resource is returned. If the
resource is not loaded the fragment list is not built and the
returned logical resource can be used only as the wrapper.
Subsequent invocations for the same resource will return in
that case different instance of the logical resource.
public ILogicalUMLResource getLogicalResource(Resource resource)
ILogicalUMLResourceAdapter
getLogicalResource in interface ILogicalUMLResourceAdapterresource - The resource whose logical resource is returned. If the
resource is not loaded the fragment list is not built and the
returned logical resource can be used only as the wrapper.
Subsequent invocations for the same resource will return in
that case different instance of the logical resource.
public void installAdapter(ResourceSet resourceSet)
public void notifyChanged(Notification msg)
notifyChanged in interface AdapternotifyChanged in class AdapterImplprotected ILogicalUMLResource buildLogicalResource(Resource resource)
resource - The root resourceprotected void processResourceUnloaded(Resource resource)
resource - The unloaded resourcepublic void reset(ILogicalUMLResource lResource)
public static boolean isLogicalResourceRoot(EObject eObj)
eObj - Object to be tested
public static boolean isFragmentRoot(EObject eObj)
eObj - Object to be tested
public static EObject getFragmentDirectContainer(EModelElement fragmentRoot)
fragmentRoot - The fragment root
public static List<EObject> getFragments(EModelElement resourceRoot)
resourceRoot - The resource root
public static EObject getRootContainerInResource(EObject eObject)
eObject - Object whose root container is returned
public static List<EObject> getAllContainedLoadedFragmentRoots(EObject eObj)
eObj - The root of the model branch to be queried.
public static List<EObject> getContainedFragments(EObject eObj,
boolean selfIncluded,
boolean resolve)
eObj - The root of the model branch to be queried.selfIncluded - Indicates how the specified object should be considered. If
the flag is set to true and this object is a fragment root
then it is considered to be the only contained fragment root -
it is the only item in the returned list. If the flag is set
to false then there is no special behavior when the specified
element is fragment root.resolve - Indicates if the objects in the returned list should be
resolved or not. Even if it is set to 'true' the objects might
still be proxies - if they cannot be resolved.
public static void resolveNestedFragments(Resource fragment)
fragment - Fragment whose nested fragments are resolvedpublic static void registerRootExtension(String rootExtension)
rootExtension - The file extensionpublic static void registerFragmentExtension(String fragmentExtension)
fragmentExtension - The file extension
|
UML Modeling Layer | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||