Retrieve EditPart by EObject and Diagram [message #225796] |
Tue, 14 April 2009 12:31 |
Eclipse User |
|
|
|
Originally posted by: ralph.schreder.gmx.de
Hi All!
Is there a possiblity to retrieve the EditPart that "represents" an EObject
in a diagram from the EObject itself?
I haven't found a solution for that problem! Any help appreciated!!!
protected EContentsEList.FeatureIterator<EObject>
getCrossReferences(EObject eObject)
{
EContentsEList.FeatureIterator<EObject> iter =
(EContentsEList.FeatureIterator<EObject>)
((InternalEList<EObject>)eObject.eCrossReferences()).basicIterator();
return iter;
}
I found an answer (2008), but I can´t understand it. I get null elements
for
CrossReferencer-Iterator.
The answer to the question in the email:
(Use CrossReferencer or traverse Notation model manually to find
corresponding notation model element. Then using
EditPartViewer.getEditPartRegistry() you can get EditPart associated
with this View.)
Thanks in advance,
Ralph
|
|
|
|
Powered by
FUDForum. Page generated in 0.02361 seconds