if (primaryParent instanceof JavaElement) {
JavaElement ancestor = (JavaElement) primaryParent;
StringBuffer buffer = new StringBuffer(32);
getHandleMemento(buffer, false, true);
String memento = buffer.toString();
return ancestor.getHandleFromMemento(new MementoTokenizer(memento), DefaultWorkingCopyOwner.PRIMARY).getParent();
}
return this;
}