From: Jan P. <jp...@us...> - 2008-12-15 16:34:28
|
Update of /cvsroot/e-p-i-c/org.epic.debug/src/org/epic/debug/ui In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv539/src/org/epic/debug/ui Modified Files: ExpressionView.java Log Message: Fixed bug [ 2241882 ] NPE in Perl Expression View. Index: ExpressionView.java =================================================================== RCS file: /cvsroot/e-p-i-c/org.epic.debug/src/org/epic/debug/ui/ExpressionView.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ExpressionView.java 27 May 2007 14:30:36 -0000 1.6 +++ ExpressionView.java 15 Dec 2008 16:34:17 -0000 1.7 @@ -103,7 +103,7 @@ private void evaluateExpression() { IAdaptable a = DebugUITools.getDebugContext(); - StackFrame stackFrame = (StackFrame) a.getAdapter(StackFrame.class); + StackFrame stackFrame = a != null ? (StackFrame) a.getAdapter(StackFrame.class) : null; if (stackFrame != null) { try @@ -137,10 +137,14 @@ } } else + { MessageDialog.openInformation( - this.getViewSite().getShell(), - "Error", - "Choose Context/Stack Frame for executing Statement\n" + this.expressionInput.getText()); + this.getViewSite().getShell(), + "No stack frame selected", + "Before evaluating a Perl expression, first select a stack frame\n" + + "from a suspended debugger session in the Debug view to indicate\n" + + "the evaluation context.\n\n"); + } } private void setExpressionOutput(String text) { |