|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.emf.ecore.util.ECrossReferenceAdapter
org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter
An adapter that maintains itself as an adapter for all contained objects. It
can be installed for an EObject, a Resource, or a
ResourceSet.
This adapter maintain information on inverse references, resource imports, and resource exports.
| Nested Class Summary |
| Nested classes inherited from class org.eclipse.emf.ecore.util.ECrossReferenceAdapter |
ECrossReferenceAdapter.InverseCrossReferencer |
| Nested classes inherited from class org.eclipse.emf.common.notify.Adapter |
Adapter.Internal |
| Field Summary |
| Fields inherited from class org.eclipse.emf.ecore.util.ECrossReferenceAdapter |
inverseCrossReferencer, unloadedResources |
| Constructor Summary | |
CrossReferenceAdapter()
Initializes me. |
|
CrossReferenceAdapter(boolean resolve)
Initializes me. |
|
| Method Summary | |
protected void |
exportAdded(Resource referenced,
Resource referencer)
Hook to be implemented by subclasses upon the establishment of a new export of the referenced resource to the
referencer. |
protected void |
exportRemoved(Resource referenced,
Resource referencer)
Hook to be implemented by subclasses upon the elimination of an export of the referenced resource to the referencer.
|
static CrossReferenceAdapter |
getCrossReferenceAdapter(ResourceSet resourceSet)
Obtains the cross-reference adapter for the specified resource set, if necessary creating it and attaching it. |
static CrossReferenceAdapter |
getExistingCrossReferenceAdapter(Notifier notifier)
Searches the adapter list of the given Notifier for a CrossReferenceAdapter. |
java.util.Set |
getExports(Resource referenced)
Gets the exports of a resource. |
java.util.Set |
getImports(Resource referencer)
Gets the imports of a resource. |
java.util.Set |
getInverseReferencers(EObject referenced,
EReference reference,
EClass type)
Returns a Set of EObjects that reference the given EObject. |
java.util.Collection |
getInverseReferences(EObject eObject,
boolean resolve)
|
java.util.Set |
getNonNavigableInverseReferencers(EObject referenced,
EReference reference,
EClass type)
Returns a Set of EObjects that reference the given EObject through a uni directional EReferences. |
protected void |
handleContainment(Notification notification)
Extends the superclass method to handle the removal cases of containment, to tear down aggregate (resource-level) cross-references. |
protected void |
importAdded(Resource referencer,
Resource referenced)
Hook to be implemented by subclasses upon the establishment of a new import of the referenced resource by the
referencer. |
protected void |
importRemoved(Resource referencer,
Resource referenced)
Hook to be implemented by subclasses upon the elimination of an import of the referenced resource by the referencer.
|
protected boolean |
resolve()
|
void |
selfAdapt(Notification notification)
Updates imports and exports maps. |
void |
setTarget(Notifier target)
|
void |
unsetTarget(Notifier notifier)
|
void |
updateImportsAndExports(Resource resource,
EObject value,
boolean register)
Updates the imports and exports map for the specified eObject |
void |
updateImportsAndExportsForContents(Resource resource,
EObject value,
boolean register)
Updates the imports and exports map for the contents of the specified eObject |
| Methods inherited from class org.eclipse.emf.ecore.util.ECrossReferenceAdapter |
addAdapter, createInverseCrossReferencer, dump, getCrossReferenceAdapter, getInverseReferences, getNonNavigableInverseReferences, getNonNavigableInverseReferences, getTarget, handleCrossReference, isAdapterForType, isIncluded, notifyChanged, removeAdapter, resolveAll, setTarget, setTarget, setTarget, unsetTarget, unsetTarget, unsetTarget |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CrossReferenceAdapter()
public CrossReferenceAdapter(boolean resolve)
resolve - flag to determine if the proxies need to be resolved| Method Detail |
public void selfAdapt(Notification notification)
notification - the event notificationprotected void handleContainment(Notification notification)
public void updateImportsAndExports(Resource resource,
EObject value,
boolean register)
resource - a resourceregister - boolean flag to indicate whether to register imports or
unregister imports
public void updateImportsAndExportsForContents(Resource resource,
EObject value,
boolean register)
resource - a resourceregister - boolean flag to indicate whether to register imports or
unregister importspublic void setTarget(Notifier target)
ECrossReferenceAdapter.setTarget(org.eclipse.emf.common.notify.Notifier)public void unsetTarget(Notifier notifier)
ECrossReferenceAdapter.unsetTarget(org.eclipse.emf.common.notify.Notifier)public java.util.Set getImports(Resource referencer)
referencer - the resource to retrieve imports for
public java.util.Set getExports(Resource referenced)
referenced - the resource to retrieve exports for
protected void importAdded(Resource referencer,
Resource referenced)
referenced resource by the
referencer. This implementation does nothing; subclasses
need not call super.
referencer - the referencing resource (doing the importing)referenced - the resource that it references
protected void importRemoved(Resource referencer,
Resource referenced)
referenced resource by the referencer.
This implementation does nothing; subclasses need not call
super.
referencer - the formerly referencing resource (doing the importing)referenced - the resource that it had referenced
protected void exportAdded(Resource referenced,
Resource referencer)
referenced resource to the
referencer. This implementation does nothing; subclasses
need not call super.
referenced - the resource being referenced (doing the exporting)referencer - the referencing resource
protected void exportRemoved(Resource referenced,
Resource referencer)
referenced resource to the referencer.
This implementation does nothing; subclasses need not call
super.
referenced - the resource formerly being referenced (doing the exporting)referencer - the formerly referencing resource
public java.util.Set getInverseReferencers(EObject referenced,
EReference reference,
EClass type)
referenced - the referenced EObjectreference - the reference to find referencers on, null for any referencetype - the type of the referencers, use null for any type
public java.util.Set getNonNavigableInverseReferencers(EObject referenced,
EReference reference,
EClass type)
referenced - the referenced EObjectreference - the reference to find referencers on, null for any referencetype - the type of the referencers, use null for any type
public static CrossReferenceAdapter getExistingCrossReferenceAdapter(Notifier notifier)
notifier - the notifier to search
public static CrossReferenceAdapter getCrossReferenceAdapter(ResourceSet resourceSet)
resourceSet - the resource set
protected boolean resolve()
public java.util.Collection getInverseReferences(EObject eObject,
boolean resolve)
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.