IJavaProject project = ((IJavaElement) fEditor.getJavaSourceReferenceAt(fSelection.getOffset())).getJavaProject(); try { String eval= fSelection.getText(); adapter.evaluate(eval, this, project);  } catch (DebugException e) { e.printStackTrace();
IJavaElement javaElement= (IJavaElement) fEditor.getJavaSourceReferenceAt(fSelection.getOffset()); if (javaElement != null) { IJavaProject project = javaElement.getJavaProject(); try { String eval= fSelection.getText(); adapter.evaluate(eval, this, project); } catch (DebugException e) { ErrorDialog.openError(getShell(), getErrorResourceString("errorevaluating"), null, e.getStatus()); } } else { reportError(getErrorResourceString("nosrccontext"));
	public void run() {		IStackFrame stackFrame= getContext();		if (stackFrame == null) {			System.out.println("No stack frame context");			return;		}				IJavaStackFrame adapter= (IJavaStackFrame) stackFrame.getAdapter(IJavaStackFrame.class);		if (adapter != null) {			fSelection = (ITextSelection) fEditor.getSelectionProvider().getSelection();			IJavaProject project = ((IJavaElement) fEditor.getJavaSourceReferenceAt(fSelection.getOffset())).getJavaProject();			try {				String eval= fSelection.getText();				adapter.evaluate(eval, this, project);			} catch (DebugException e) {				e.printStackTrace();			}		} else {			System.out.println("No evaluation adapter");		}	}