Added check for null TestRunner before invoking.
authorLou Dasaro <mr_lou_d@netbeans.org>
Thu, 24 Sep 2015 16:04:25 -0500
changeset 18325e7dec3cc5053
parent 18324 6f6ffb3eeef2
child 18326 b193ea00889f
Added check for null TestRunner before invoking.
Also, disabled "Test" menu item until TestRunner is working again
Changes should be available in development build on 24 or 25-Sep-2015
Please leave bug open until 8.1 FCS (in case others with previous build report it).
Task #255406 - NullPointerException at org.netbeans.modules.python.project.ui.actions.RunCommand.invokeAction
python.project/src/org/netbeans/modules/python/project/PythonLogicalView.java
python.project/src/org/netbeans/modules/python/project/ui/actions/RunCommand.java
     1.1 --- a/python.project/src/org/netbeans/modules/python/project/PythonLogicalView.java	Thu Sep 24 08:31:58 2015 +0200
     1.2 +++ b/python.project/src/org/netbeans/modules/python/project/PythonLogicalView.java	Thu Sep 24 16:04:25 2015 -0500
     1.3 @@ -156,7 +156,9 @@
     1.4  //            actions.add(null);
     1.5              actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_RUN, NbBundle.getMessage(PythonLogicalView.class, "LBL_RunAction_Name"), null)); // NOI18N
     1.6              actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_DEBUG, NbBundle.getMessage(PythonLogicalView.class, "LBL_DebugAction_Name"), null)); // NOI18N
     1.7 +/* until it is working again, remove test from Python Ant Project menu             
     1.8              actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_TEST, NbBundle.getMessage(PythonLogicalView.class, "LBL_TestAction_Name"), null)); // NOI18N
     1.9 +*/        
    1.10              actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_BUILD, NbBundle.getMessage(PythonLogicalView.class, "LBL_BuildAction_Name"), null)); // NOI18N
    1.11              actions.add(ProjectSensitiveActions.projectCommandAction(ActionProvider.COMMAND_REBUILD, NbBundle.getMessage(PythonLogicalView.class, "LBL_CleanBuildAction_Name"), null)); // NOI18N
    1.12  
     2.1 --- a/python.project/src/org/netbeans/modules/python/project/ui/actions/RunCommand.java	Thu Sep 24 08:31:58 2015 +0200
     2.2 +++ b/python.project/src/org/netbeans/modules/python/project/ui/actions/RunCommand.java	Thu Sep 24 16:04:25 2015 -0500
     2.3 @@ -46,10 +46,9 @@
     2.4              //    runner.showWarnings(true);
     2.5              //    runner.setDebug(COMMAND_DEBUG_SINGLE.equals(command));
     2.6              //    runner.run(TEST_TASK_NAME);
     2.7 -            //} else if (testRunner != null) {
     2.8 -                testRunner.getInstance().runAllTests(getProject(), false);
     2.9 -            //}
    2.10 -            return;
    2.11 +            /*} else */if (testRunner != null) { // don't invoke null.getInstance()...
    2.12 +                    testRunner.getInstance().runAllTests(getProject(), false);
    2.13 +                }
    2.14          }
    2.15  
    2.16          final PythonProject pyProject = getProject();