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 70127 - Cannot add dependency to Java Support APIs
Summary: Cannot add dependency to Java Support APIs
Status: VERIFIED INVALID
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-09 08:31 UTC by tboerkel
Modified: 2005-12-12 12:01 UTC (History)
1 user (show)

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 tboerkel 2005-12-09 08:31:45 UTC
NetBeans module project. Trying to use the class "ClassPath" and add dependency
to "Java Support APIs". 
In the "Add dependency dialog" type "ClassPath" into the filter field. "Java
Support APIs" is not being displayed.
This works in NB 5.0 Beta 1, but not in Beta 2 and not in current q-build
(netbeans-5_0-qbuild-bin-200512011057-1_Dec_2005_1057.zip).
Adding the dependency in Beta 1 and then working with it in Beta 2 works.
Using JDK 5.0_06.
Comment 1 Jan Lahoda 2005-12-09 09:35:03 UTC
apisupport/project?
Comment 2 Martin Krauskopf 2005-12-09 09:59:16 UTC
We already discussed this on nbdev. It works for me. Tomasi (musilt2) can you
try to reproduce on Windows. I'm not able to reproduce on Linux with neither
beta2 nor latest builds. tboerkel ensure that the module is also in your target
platform or that it (or its cluster) is enabled in the suite in the case of
suite-compoent. Thanks.
Comment 3 tboerkel 2005-12-09 10:12:19 UTC
The module is in a suite project. And there, "Java Support APIs" has a grey
checkmark in Libraries/Platform modules/ide6.
And as I said, it works with the same project in Beta 1. To workaround, I have
now added the dependency using Beta 1 and continued the work with Beta 2.
Comment 4 Martin Krauskopf 2005-12-09 10:45:56 UTC
Grayed checkbox means that the module is disabled. It means "remembered" value
when you disable whole ide6 cluster. So when you enable again the whole ide6
cluster the module with grayed checkboxes becomes enabled again (this will help
you a little bit when you choose some modules from some cluster, than disable
whole cluster and later reenable it again).
So if you want to make "Java Support APIs" dependency in your suite-component
you have to check (enable) ide6 cluster checkbox and subsequently "Java Support
APIs" in it. Maybe there are some inconsitency in this area between beta1 and beta2.
Feel free to reopen if this is not your case.
Comment 5 tboerkel 2005-12-09 11:04:25 UTC
You are right. When I really enable it, then it works. So, Beta 1 must have had
a bug, allowing it to be chosen without enabling.
One remark: Isn't it too complicated to first have to enable the modules to see
them in "Add dependency dialog"? This dialog is being intended to quickly find
the needed library by typing a class name, right? But if I first have to know,
which library to enable...
Comment 6 Martin Krauskopf 2005-12-09 11:27:29 UTC
This dialog is intended to help you add a dependency on some module in _target
platform_ of your module you are developing. If you would be allowed to add a
dependency on a module which is not in your target platform, a lot of things
would break (code completion, compilation, building, ...).
Probably the best would be to have a tool for searching module which belongs
some class to. 
You might also be interested in Tom Ball's simple tool jfind which is in
NB_CVS/contrib/jfind. Or to have dummy plugin with all deps enable
(Ctrl+Shift+N, NB module, Enter, Enter) for doing this. Or I'm just using linux
'locate' utility if you have whole NB sources, or.... ;)
Any ideas for enhancement are welcomed. Feel free to file them under
apisupport/project.
Comment 7 tboerkel 2005-12-09 11:45:00 UTC
Well, this is a suite project, but only because I needed a wrapper for an
existing library. The resulting nbm is being installed in normal NetBeans IDE,
not platform-only. And I think this is the reason, it worked without enabling
"Java Support APIs" in the suite.
Comment 8 Martin Krauskopf 2005-12-09 13:10:12 UTC
Then just enable all clusters in the suite's customizer and you are done (the
same behaviour as with one module).
Comment 9 Tomas Danek 2005-12-09 15:06:45 UTC
yes,this works perfectly.. that's the way it's designed, you can add dependency
only to enabled modules. And in fact, this makes sense to me. Enabling modules
tells "i may be interested to use functionality of this module somewhere in my
project" and by adding dependency you tell "i'm definitely using it"..
Comment 10 Jesse Glick 2005-12-10 21:15:40 UTC
BTW just a terminology point to avoid future confusion: you are all misusing the
term "enable" a bit - you mean "include in the target platform" or something
like that. Usually "enable" with modules refers to its actual runtime
enabled/disabled state (which can be toggled in the Module Manager, for
example); only installed modules can be enabled and disabled. If you have a
dependency on a module, your module can be enabled only if that module is both
installed and enabled.

Anyway there is a reasonable RFE here for standalone app authors: have a
checkbox in the Add Module Dependency dialog labelled something to the effect of
"Display Excluded Modules" (default unchecked, and disabled if there are no
excluded modules/clusters in the target platform). If checked, modules (and
filter matches) even from modules currently excluded from the target platform
would be shown; if you tried to add a dep on such a module, you would first be
prompted to include that module in the app. (If it was disabled because its
whole cluster was excluded, the cluster would be un-excluded but all modules in
it except the new module would be excluded.)

Similarly, if we can get a hook in the Fix Imports dialog to offer imports from
modules on which you do not currently have a dependency, we would want to have
that also offer to include a module that was previously excluded from the platform.
Comment 11 tboerkel 2005-12-12 07:31:09 UTC
That RFE sounds good, if I unterstand it correctly. What's its issue number, so
that I can vote for it? :-)
Comment 12 Tomas Danek 2005-12-12 11:39:19 UTC
I understood that such a RFE is reasonable to be filed;-)
Comment 13 Tomas Danek 2005-12-12 12:01:30 UTC
Filed RFE -> issue 70258.
Closing this one.