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.
|Summary:||Ability to remove node-related navigator panels|
|Product:||platform||Reporter:||David Simonek <dsimonek>|
|Severity:||blocker||CC:||anebuzelsky, dkaspar, jglick, jlahoda, mfukala, pzavadsky, tzezula|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
|Bug Depends on:|
|Attachments:||diff of implementation and API documentation|
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() - and constants LOOKUP_HINTS_ONLY, DEFAULT 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/NavigatorController.java; /cvs/core/navigator/src/org/netbeans/modules/navigator/NavigatorController.java,v <-- NavigatorController.java new revision: 1.19; previous revision: 1.18 done RCS file: /cvs/core/navigator/src/org/netbeans/spi/navigator/NavigatorLookupPanelsPolicy.java,v done Checking in src/org/netbeans/spi/navigator/NavigatorLookupPanelsPolicy.java; /cvs/core/navigator/src/org/netbeans/spi/navigator/NavigatorLookupPanelsPolicy.java,v <-- NavigatorLookupPanelsPolicy.java initial revision: 1.1 done Checking in apichanges.xml; /cvs/core/navigator/apichanges.xml,v <-- apichanges.xml new revision: 1.6; previous revision: 1.5 done Checking in arch.xml; /cvs/core/navigator/arch.xml,v <-- arch.xml new revision: 1.13; previous revision: 1.12 done Checking in test/unit/src/org/netbeans/modules/navigator/NavigatorControllerTest.java; /cvs/core/navigator/test/unit/src/org/netbeans/modules/navigator/NavigatorControllerTest.java,v <-- NavigatorControllerTest.java new revision: 1.4; previous revision: 1.3 done Checking in test/unit/src/org/netbeans/modules/navigator/NavigatorTCTest.java; /cvs/core/navigator/test/unit/src/org/netbeans/modules/navigator/NavigatorTCTest.java,v <-- NavigatorTCTest.java new revision: 1.9; previous revision: 1.8 done Checking in test/unit/src/org/netbeans/modules/navigator/resources/NavigatorControllerTestProvider.xml; /cvs/core/navigator/test/unit/src/org/netbeans/modules/navigator/resources/NavigatorControllerTestProvider.xml,v <-- NavigatorControllerTestProvider.xml new revision: 1.3; previous revision: 1.2 done