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 100457 - Ability to remove node-related navigator panels
Summary: Ability to remove node-related navigator panels
Alias: None
Product: platform
Classification: Unclassified
Component: Navigator (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: apireviews
Depends on:
Blocks: 97325
  Show dependency tree
Reported: 2007-04-10 12:50 UTC by David Simonek
Modified: 2008-12-22 11:38 UTC (History)
7 users (show)

See Also:
Exception Reporter:

diff of implementation and API documentation (18.51 KB, application/octet-stream)
2007-04-12 14:47 UTC, David Simonek

Note You need to log in before you can comment on or make changes to this bug.
Description David Simonek 2007-04-10 12:50:07 UTC
This is follow-up of enh 97325, quoting:

"After discussion with David we have find a conclusion that for NetBeans Mobility
Pack it would be enough to have ability to disable searching for
NavigatorPanels in data-objects."
Comment 1 David Simonek 2007-04-10 13:01:07 UTC
Actually, situation is as follows:

In Mobility several top components define their activated node as node
representing java data object -> so Navigator panels for java will appear in
Navigator -> but this is not desired, java navigation panels shouldn't be
visible. Moreover model used by Mobility top components is not propagated into
java data object model, resulting in incorrect (old) data shown in java
navigation panels.

I propose following solution:

- add SPI interface NavigatorLookupContentType
- with method getContentType()

When instance of NavigatorLookupContentType is found in TopComponent's lookup
and method getContentType returns LOOKUP_HINTS_ONLY, then navigator panels
resulting from current activated node (and data object) will not appear in
navigator panel list.

I'll start API review soon when I'll have the materials ready.
Comment 2 David Simonek 2007-04-12 14:42:41 UTC
I'm adding promised materials and starting API review. I just changed name of
new interface to NavigatorLookupPanelsPolicy to better reflect its purpose and
only constant LOOKUP_HINTS_ONLY, others are not needed now.

I'm filing this as fast track API review, but I must integrate on Monday next
week, there is business reason. So I'm going to break week's time rule, please
would you review today or tomorrow, change is trivial, thank you very much.

Comment 3 David Simonek 2007-04-12 14:47:46 UTC
Created attachment 40825 [details]
diff of implementation and API documentation
Comment 4 David Kaspar 2007-04-12 16:05:21 UTC
The patch exactly covers requirements of Mobility Pack.

Small comment: the patch does not cover a situation when there are more
NavigatorLookupPanelsPolicy instances in the lookup. It should take the hardest
restriction of them all. It is ok in current implementation, since there is a
single restriction level only.
Comment 5 David Simonek 2007-04-16 18:08:23 UTC
OK, that's for comment. I decided to not cover situation that david described,
it's edge case which is not needed AFAIK now. Javadoc says that this case is not
supported now, we can always add it later if there will be a need.

integrated into main trunk with all the tests and stuff around new API:

Checking in src/org/netbeans/modules/navigator/;
new revision: 1.19; previous revision: 1.18
RCS file:
Checking in src/org/netbeans/spi/navigator/;
initial revision: 1.1
Checking in apichanges.xml;
/cvs/core/navigator/apichanges.xml,v  <--  apichanges.xml
new revision: 1.6; previous revision: 1.5
Checking in arch.xml;
/cvs/core/navigator/arch.xml,v  <--  arch.xml
new revision: 1.13; previous revision: 1.12
Checking in
new revision: 1.4; previous revision: 1.3
Checking in test/unit/src/org/netbeans/modules/navigator/;
new revision: 1.9; previous revision: 1.8
Checking in
 <--  NavigatorControllerTestProvider.xml
new revision: 1.3; previous revision: 1.2