This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build 20050816-0450 1) Create new Web Application 2) Open JSP 3) Toggle breakpoint (Ctrl-F8 or click in left editor margin) 4) NPE
Created attachment 23882 [details] java.lang.NullPointerException at org.netbeans.modules.ant.debugger.breakpoints.AntBreakpointActionProvider.doAction(AntBreakpointActionProvider.java:56)
NPE in AntBreakpointActionProvider, thus reassigning to ant debugger
Ant debugger team, could you please look at it? It seems like line.getLookup() in AntBreakpointActionProvider.java:56 returns null...?
The problem with AntBreakpointActionProvider is that getCurrentLine() can return null (and it does) and doAction() does not handle this case. But there is another problem. When JSP is opened then toggle breakpoint action should be enabled on JspToggleBreakpointActionProvider. But setEnabled is called with enabled=false!
Toggle bp action is disabled on JspToggleBreakpointActionProvider because EditorContextImpl.getCurrentURL() returns empty string and then we are not able to recognize the JSP. BTW, this getCurrentURL() method is very similar to AntBreakpointActionProvider.getCurrentLine(). It obtains the nodes by calling TopComponent.getRegistry ().getCurrentNodes () which returns empty array of nodes. going to explore why...
Fixed. Checking in BaseJspEditorSupport.java; /cvs/web/core/src/org/netbeans/modules/web/core/jsploader/BaseJspEditorSupport.java,v <-- BaseJspEditorSupport.java new revision: 1.49; previous revision: 1.48 done
Verified.