Bug 36485 call hierarchy: location of menu entry
'Open Call Hierarchy' menu entry should be located right below 'Open Type Hierarchy'
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/CallHierarchyUI.java
"CallHierarchyUI.open_in_editor.error.messageProblems"), 
                e.getStatus());
        } catch (PartInitException x) {
            String name = callLocation.getCalledMember().getElementName();
            MessageDialog.openError(shell,
                CallHierarchyMessages.getString(
                    "CallHierarchyUI.open_in_editor.error.messageProblems"), 
                CallHierarchyMessages.getFormattedString(
                    "CallHierarchyUI.open_in_editor.error.messageArgs", 
                    new String[] { name, x.getMessage() }));
        }
    }
    /**
     * @param elem
     * @return
     */
    public static IEditorPart isOpenInEditor(Object elem) {
        IJavaElement javaElement= null;
        if (elem instanceof MethodWrapper) {
            javaElement= ((MethodWrapper) elem).getMember();
        } else if (elem instanceof CallLocation) {
            javaElement= ((CallLocation) elem).getCalledMember();
        }
        if (javaElement != null) {
            return EditorUtility.isOpenInEditor(javaElement);
        }
        return null;
    }
}