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.
Currently debugger actions (like step, continue, ...) are defined in debuggercore module, but registered into GUI in debuggerjpda/ui module. Therefore after JPDA module is uninstalled, other debugger implementations loose the GUI actions.
The whole management should likely be done by debuggercore module - it should create GUI elements for all actions which have at least one provider. That could not be done in a declarative way (therefore the impl. of that would be more complex), but it would provide better service IMHO.
Can we rely on this getting fixed for promo H (NB 6.0)? SunStudio intends to ship with all java functionality turned off and it would be odd to have the NewBreakpoint dialog to come up with a debugger combo-box that offers java.
I see. It's scheduled for "Dev" so far, what means 6.0. I'll mark it as STARTED so that I'll not forget to implement it.
IMHO the best solution is to declare the actions in the debuggercore's module layer, but do not make them visible in the menu until there is at least one provider for them. I've tried to achieve this with org.openide.awt.DynamicMenuContent, but there is a problem, which is described in issue #82800. I may try to use a workaround with invisible menu items till issue #82800 is fixed...
*** Issue 84359 has been marked as a duplicate of this issue. ***
Martine, do you plan to fix this soon?
Yes, issue #82800 is already fixed, so I'll look at this soon.
After I've studied the code and learned how the actions management is implemented, I've realized that this is not possible to fix. Every debugger implementation must declare the GUI actions it needs in it's layer XML file. The reason is, that the action providers are not known until the appropriate DebuggerEngineProvider is created, which contains the actions in it's lookup. Fixing this would cause that the appropriate menu items would be visible only after their DebuggerEngineProvider becomes active. This is not acceptable from the UI point of view - the actions must be there all the time and they should be either enabled or disabled, depending on the action providers. Since it's impossible to know which action providers are in the system before the relevant DebuggerEngineProvider is instantiated, the only solution is that every debugger module declares action it uses in it's module layer XML file. I've fixed this for ANT debugger, others needs to do it in a similar way. Have a look into debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml. /cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/Bundle.properties,v <-- Bundle.properties new revision: 1.5; previous revision: 1.4 /cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.9; previous revision: 1.8
The suggested solution has broken commit-validation. Even though it seems to work fine, I had to rollback the change: /cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.10; previous revision: 1.9 /cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/Bundle.properties,v <-- Bundle.properties new revision: 1.6; previous revision: 1.5 I negotiate the correct solution with the core team...
Gordon pointed out that the gdb ui implementation in CND gets around this by registering the actions in the mf-layers file just as debuggerjpda does, including "calls" to instanceCreate. This seems to work for dbxgui as well. Is this a good-enough solution? Is there is a down-side to this?
Yes, this is what I'm trying to do as well. The problem is, that one test in core prevents me from doing this. Now I've changed the test so that this is permitted: /cvs/core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java,v <-- ValidateLayerConsistencyTest.java new revision: 1.26; previous revision: 1.25 Also it's necessary to register all actions at one central place - debuggercore, other modules will have just shadow links to them. This is because of methodvalue attributes in XML, which generate different FileObject attributes. The identity comparison works well for shadows.
So, another attempt to fix this is there: /cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/Bundle.properties,v <-- Bundle.properties new revision: 1.7; previous revision: 1.6 /cvs/ant/debugger/src/org/netbeans/modules/ant/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.11; previous revision: 1.10 /cvs/debuggercore/src/org/netbeans/modules/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.76; previous revision: 1.75 /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.34; previous revision: 1.33 All debugger implementations are supposed to register appropriate shadow files into Run menu and toolbar, which point only to actions they support.
Changing prioroty to p2 making it a candidate for backporting to release55_mars.
Created attachment 35799 [details] The textual diff of this fix.
The fix is integrated in release55_mars branch: /shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/Bundle.properties,v <-- Bundle.properties new revision: 1.2.38.1.2.1.18.1; previous revision: 1.2.38.1.2.1 /shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.4.8.1.2.1.18.1; previous revision: 1.4.8.1.2.1 /shared/data/ccvs/repository/core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java,v <-- ValidateLayerConsistencyTest.java new revision: 1.17.42.2.2.2.18.1; previous revision: 1.17.42.2.2.2 /shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.69.46.2.2.1.18.1; previous revision: 1.69.46.2.2.1 /shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.27.4.2.2.1.18.1; previous revision: 1.27.4.2.2.1
The fix is merged into release551: /shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/Bundle.properties,v <-- Bundle.properties new revision: 1.2.38.1.2.1.22.1; previous revision: 1.2.38.1.2.1 /shared/data/ccvs/repository/ant/debugger/src/org/netbeans/modules/ant/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.4.8.1.2.1.22.1; previous revision: 1.4.8.1.2.1 /shared/data/ccvs/repository/core/test/unit/src/org/netbeans/core/projects/ValidateLayerConsistencyTest.java,v <-- ValidateLayerConsistencyTest.java new revision: 1.17.42.2.2.2.22.1; previous revision: 1.17.42.2.2.2 /shared/data/ccvs/repository/debuggercore/src/org/netbeans/modules/debugger/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.69.46.2.2.1.22.1; previous revision: 1.69.46.2.2.1 /shared/data/ccvs/repository/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/resources/mf-layer.xml,v <-- mf-layer.xml new revision: 1.27.4.2.2.1.22.1; previous revision: 1.27.4.2.2.1
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.