IWorkbenchPage page = JDIDebugUIPlugin.getActivePage();
IWorkbenchPage page = JavaPlugin.getActivePage();
	protected IJavaElement getContext() {		IWorkbenchPage page = JDIDebugUIPlugin.getActivePage();		if (page != null) {			ISelection selection = page.getSelection();			if (selection instanceof IStructuredSelection) {				IStructuredSelection ss = (IStructuredSelection)selection;				if (!ss.isEmpty()) {					Object obj = ss.getFirstElement();					if (obj instanceof IJavaElement) {						return (IJavaElement)obj;					}					if (obj instanceof IResource) {						IJavaElement je = JavaCore.create((IResource)obj);						if (je == null) {							IProject pro = ((IResource)obj).getProject();							je = JavaCore.create(pro);						}						if (je != null) {							return je;						}					}				}			}			IEditorPart part = page.getActiveEditor();			if (part != null) {				IEditorInput input = part.getEditorInput();				return (IJavaElement) input.getAdapter(IJavaElement.class);			}		}		return null;	}