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 41332 - Interoperability with rest of NetBeans
Summary: Interoperability with rest of NetBeans
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks: 27194
  Show dependency tree
 
Reported: 2004-03-25 09:03 UTC by Jaroslav Tulach
Modified: 2006-03-24 10:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2004-03-25 09:03:58 UTC
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.
Comment 1 Jan Jancura 2004-03-29 13:10:57 UTC
fixed in debugger_newAPI branch.
Comment 2 Jaroslav Tulach 2004-08-12 17:01:26 UTC
I have to remind you that the interoperability still does not work as
delete breakpoints using Edit/Delete is not possible.
Comment 3 Jan Jancura 2004-08-16 08:32:13 UTC
BTW. This is definitely not a P2!

*** This issue has been marked as a duplicate of 44993 ***
Comment 4 Jaroslav Tulach 2004-08-23 15:00:01 UTC
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. 

Comment 5 Jan Jancura 2004-08-24 09:22:51 UTC
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.
Comment 6 Jaroslav Tulach 2004-08-26 09:15:32 UTC
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.