[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Direct Reference CrossReferencer?

Hello,


I am wondering if there's a way to determine if a reference is direct or indirect.
Example if I have 3 objects, A which references B, which references C:


A->B->C


If I use any of the CrossReferencers to get the references held by A, I will not only get B but also C. In the case that I am looking (implementing a builder and refactoring), I would like to obtain only direct references, so A will report 'B' as its only reference and 'B' will report 'C' as its only reference.


Is there a way of doing this, I naively to filter things based on the source's uri, but that doesn't seem to do the trick.

protected boolean crossReference(EObject object, EReference reference,
			EObject crossReferencedEObject)
{
	boolean isInternal = me.equals(object.eResource().getURI());
	return isInternal;
}

protected boolean resolve()
{
   	return false;
}

Any help appreciated.

Thanks,

/a