Skip to content
Snippets Groups Projects
Commit 4c883045 authored by Simon Barner's avatar Simon Barner
Browse files

- Remove deprecated method KernelModelElementUtils.getParentElement(EObject,...

- Remove deprecated method KernelModelElementUtils.getParentElement(EObject, Class). Use KernelModelElementUtils.getParentElement(EObject, Class, boolean) instead.
parent 40f0ede1
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ public class ModelEditorBindingService extends
private void openInEditor(EObject element, int depth) {
Assert.isTrue(depth >= 0);
ILibraryElementReference libRefParent =
getParentElement(element, ILibraryElementReference.class);
getParentElement(element, ILibraryElementReference.class, true);
if(libRefParent != null) {
String uri = libRefParent.getURI();
ILibraryElement libElement = ILibraryService.INSTANCE.findLibraryElementByURI(uri);
......
......@@ -70,7 +70,8 @@ public class LibraryService extends EObjectAwareServiceBase<ILibraryElementHandl
/** {@inheritDoc} */
@Override
public boolean isLibraryElementShadow(EObject eobj) {
ILibraryElementReference parent = getParentElement(eobj, ILibraryElementReference.class);
ILibraryElementReference parent =
getParentElement(eobj, ILibraryElementReference.class, true);
// with "eobj.eContainer() != parent" we assume that the model elements are not directly
// contained in the reference
......
......@@ -102,23 +102,6 @@ public final class KernelModelElementUtils {
return root;
}
/**
* Returns the parent of an element with a certain type.
*
* @param element
* a model element.
* @param targetClass
* the class of the parent that is returned.
* @return instance of class <code>targetClass</code> or <code>null</code> if no such parent
* element was found.
*
* @deprecated use {@link #getParentElement(EObject, Class, boolean)} instead
*/
@Deprecated
public static <T extends EObject> T getParentElement(EObject element, Class<T> targetClass) {
return getParentElement(element, targetClass, true);
}
/**
* For a given element, returns the closest ancestor with a certain type.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment