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.
There are two editor modes, each has a view of the JUinit test under debug. Did a run and sitting at a breakpoint, can only set breakpoint by clicking in the gutter in one of the views. Not able to submit breakpoint LineBreakpoint InGeneralTest.java : -1, reason: The breakpoint is set outside of any class. Invalid LineBreakpoint InGeneralTest.java : -1 and in the log WARNING [org.netbeans.modules.debugger.jpda.breakpoints]: Class name not defined for breakpoint LineBreakpoint InGeneralTest.java : -1 These messages only show up once. Repeated attempts to set a breakpoint produce no output (or breakpoint). Going to the other window can set/clear breakpoints at will. Closed the view that was doing breakpoints OK, and then could do breakpoints in the other view. Cloned that view and the clone was unable to set breakpoints. There are no exceptions in the log, there is the following occasionally WARNING [org.netbeans.modules.parsing.impl.TaskProcessor]: ParserManager.parse called in AWT event thread by: org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getClassName(EditorContextImpl.java:1102) Note there have been around 6 upates download in last two days. Product Version: NetBeans IDE Dev (Build 200910160201) Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb) Userdir: C:\Documents and Settings\erra\.netbeans\dev
Changing subcomponent from UI to code.
Product Version: NetBeans IDE 6.8 Beta (Build 200910171337) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01 System: Linux version 2.6.31-14-generic running on amd64; UTF-8; en_US (nb) Hmm, I am not able to reproduce the warning in the log, but if I clone a document I cannot add breakpoints in it by clicking into the gutter and the "toggle breakpoint" in popup menu is disabled. The only way that works is by invoking Debug-> New breakpoint, but it takes the line number where the cursor last was in the original document no matter where you are in the cloned document. However at a few occasions using this method crashed the IDE (http://www.netbeans.org/issues/show_bug.cgi?id=175036).
Ok, now I got also the following warnings in the log: WARNING: No enclosing class for /home/sigi/NetBeansProjects/MemoryView/src/examples/advanced/MemoryView.java, offset = 587 WARNING [org.netbeans.modules.debugger.jpda.breakpoints]: Class name not defined for breakpoint LineBreakpoint MemoryView.java : 19
I do not get the warning in the log, but can reproduce this issue. It seems to be a regression, I guess it worked several weeks ago...
Looks like a defect of NbDocument.findRecentEditorPane() again! It returns null for the cloned document. Investigating...
Works fine after this change: diff -r c97ee7f5d8da openide.text/src/org/openide/text/CloneableEditorSupport.java --- a/openide.text/src/org/openide/text/CloneableEditorSupport.java Wed Oct 21 16:42:39 2009 +0200 +++ b/openide.text/src/org/openide/text/CloneableEditorSupport.java Wed Oct 21 17:26:53 2009 +0200 @@ -1154,7 +1154,9 @@ p = ed.getEditorPane(); } } - return p; + if (p != null) { + return p; + } } else { throw new IllegalStateException("No reference to Pane. Please file a bug against openide/text"); } Please evaluate if this is the right way to fix it.
Martin how to reproduce this? Is it enough just to clone editor with Java source? Or is it more specific?
I can reproduce on cloned editor. I am investigating what happens and if patch is correct. Thanks.
Patch was correct. I also added test. core-main #84dc47b76100
Thanks. Yes, I've reproduced it just by cloning the editor document.
Integrated into 'main-golden', will be available in build *200911030222* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/84dc47b76100 User: Marek Slama <mslama@netbeans.org> Log: #175016: Fix CloneableEditorSupport.getRecentPane for cloned editors.