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.

Bug 172889 - REGRESSION: can't set a breakpoint in source
Summary: REGRESSION: can't set a breakpoint in source
Status: VERIFIED FIXED
Alias: None
Product: javame
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Petr Suchomel
URL:
Keywords:
Depends on:
Blocks: 173269
  Show dependency tree
 
Reported: 2009-09-23 14:35 UTC by Andrei Chistiakov
Modified: 2009-11-05 12:38 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Disabled breakpoint menu (30.18 KB, image/png)
2009-09-23 16:11 UTC, Petr Suchomel
Details
Patch for mobility to make sure CloneableEditor.componentActivated is called (1.39 KB, text/plain)
2009-09-29 13:47 UTC, mslama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2009-09-23 14:35:25 UTC
Product Version: NetBeans IDE Dev (Build 200909221401)
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
System: Windows XP version 5.1 running on x86; Cp1251; ru_RU (nb)

To reproduce:
- create a new mobile application with HelloMIDlet
- open the MIDlet in Editor
- switch to source
- press Ctrl+F8 to set breakpoint on a particular line. The action is disabled

Works fine with Java SE Project for me.
Comment 1 Petr Suchomel 2009-09-23 15:32:24 UTC
We are aware - this only affect VMD based source, plain java is not affected.
Comment 2 Petr Suchomel 2009-09-23 16:11:02 UTC
Created attachment 88209 [details]
Disabled breakpoint menu
Comment 3 Martin Entlicher 2009-09-24 15:38:50 UTC
Reproduced in current build.
Comment 4 Martin Entlicher 2009-09-24 15:48:22 UTC
NbDocument.findRecentEditorPane(org.netbeans.modules.vmd.io.javame.MEDesignEditorSupport) gives null.
This is a regression caused by issue #168415.
Comment 5 Martin Entlicher 2009-09-24 16:08:12 UTC
Fixed by workaround for cases when NbDocument.findRecentEditorPane() does not work in changeset:   146867:dc7b7eaa1878
http://hg.netbeans.org/main/rev/dc7b7eaa1878
Comment 6 mslama 2009-09-25 12:46:53 UTC
Problem is that CloneableEditorSupport expects that its TopComponent ie. CloneableEditor calls CES.setLastSelected(this);
in CloneableEditor.componentActivated. I do not see in code what TC is used as editor TC for MEDesignEditorSupport. I
assume it uses its own CloneableEditor subclass. If it is so it should call super.componentActivated in its
componentActivated method. Shall I file separate issue for this or will you reopen and fix this issue? Currently last
selected TC is not set in CloneableEditorSupport so CloneableEditorSupport.getRecentPane fails.

BTW Martin your 'workaround' is actually rollback of previous fix because NbDocument.findRecentEditorPane is allowed to
return null when editor initialization is not yet finished. So I recommend to rollback again my fix in
EditorContextDispatcher. Once problem is fixed in JavaME then my fix should get back.
Comment 7 Martin Entlicher 2009-09-25 13:44:12 UTC
O.K. In such case let me know when this is fixed properly and I'll remove the workaround.
Thanks.
Comment 8 Quality Engineering 2009-09-26 21:06:15 UTC
Integrated into 'main-golden', will be available in build *200909251401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dc7b7eaa1878
User: mentlicher@netbeans.org
Log: #172889 - Add old functionality as a workaround for cases when new API NbDocument.findRecentEditorPane() does not work.
Comment 9 Andrei Chistiakov 2009-09-28 14:29:23 UTC
Verified with NetBeans IDE 6.8 Beta (Build 200909272339)
Comment 10 Martin Entlicher 2009-09-29 13:42:08 UTC
Thanks for verification. But this issue needs to be fixed in a different way, because my workaround in fact opened issue
#168415 - the performance gain is gone.

Therefore I'm reopening this issue to fix J2ME components.
Comment 11 mslama 2009-09-29 13:47:13 UTC
Created attachment 88516 [details]
Patch for mobility to make sure CloneableEditor.componentActivated is called
Comment 12 Petr Suchomel 2009-10-01 15:52:34 UTC
Patch applied in CS e1988921227f
Comment 13 Martin Entlicher 2009-10-01 15:54:58 UTC
Then it's fixed?
Comment 14 Quality Engineering 2009-10-09 23:03:52 UTC
Integrated into 'main-golden', will be available in build *200910091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e1988921227f
User: psuchomel@netbeans.org
Log: Applied patch from #172889, REGRESSION: can't set a breakpoint in source
Comment 15 Andrei Chistiakov 2009-11-05 12:38:27 UTC
Verified with NetBeans IDE Dev (Build 200911050201).