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.
The viewmodel is a rather separated package and that is why a great attention should be payed to its interoperability with rest of NetBeans. The reviewers requested JPDABreakpoint class in TopComponent.getLookup() when a breakpoint in the component showing the model is selected (of course this works for applies to all other classes as well). The goal is to allow creation of actions that will react to selection and might enhance the debugger functionality (like suspend "for ever" on a thread, etc.) The reviewers suggests to include ToolsAction in the popup menu of viewmodel component as that is now standard way how to extend popup menu in NetBeans.
fixed in debugger_newAPI branch.
I have to remind you that the interoperability still does not work as delete breakpoints using Edit/Delete is not possible.
BTW. This is definitely not a P2! *** This issue has been marked as a duplicate of 44993 ***
Of course this is not P2, this is P1. This is an architecture problem that we shall not incorporate into a release as it might cause us maintanence problems. Here is more info: I am feared that the interoperability with rest of NetBeans for someone coding against viewmodel apis is limited. That is why I am asking you: please point me to the documentation about writing actions for viewmodel and let me understand how to integrate them with rest of NetBeans. Swing actions in NetBeans contain various extensions, like Presenters and context awareness. NetBeans have a standard utility method to create popup menu. Tell me whether you use presenters, standard factory method, how you handle multiselection and contexts.
1) The reviewers requested JPDABreakpoint class in TopComponent.getLookup() => fixed 2) delete breakpoints using Edit/Delete is not possible => fixed 3) point me to the documentation about writing actions for viewmodel => see ViewModel JavaDoc please. There is nothing special to document. We use all standard NetBeans features here, nothink new or special. Our NodeActionsProvider.getActions () method simply delegates to Node.getActions () method. No magic code: public Action[] getActions (boolean context) { if (context) return treeModelRoot.getRootNode ().getActions (false); try { return model.getActions (object); } catch (UnknownTypeException e) { e.printStackTrace(); return new Action [0]; } } There is simply nothing to document. Documentation about how to create actions should be a part of OpenIde documentation. 4) Tell me whether you use presenters, Yes, of course. There is no other possibility, as I know. Presenters are create automatically for somple actions. And for more advanced actions we are defining our owm presenters. 5) how you handle multiselection and contexts We are following openide rules. No magic. Concerning implementation we are typically using the same instances of swing actions to support multiselection. If you feel some lack of documentation for "how to use swing actions in NetBeans", feel free to fire issue on OpenIde module, please.
According to jjancura, the actual viewer is BeanTreeView. In such case I know that it uses Utilities.actionsToPopup, and handles ContextAwareAction, etc. I guess the delete problem was just in wrong usage of ExplorerUtils. I you have suggestions about specific parts of actions documentation, contact me in different IZ issue.