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 7278 - Need API to programmatically disable the module
Summary: Need API to programmatically disable the module
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-08-03 23:15 UTC by Sadhana Rau
Modified: 2008-12-23 11:53 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sadhana Rau 2000-08-03 23:15:17 UTC
There are situations when module installer detects that module
cannot be installed correctly. (e.g. when depending packages are
not present) In this case, it will be nice if module installer,
in addition to not
installing the module specific actions in the IDE , can disable
the module so that IDE user don;t accidently come across
incomplete functionality.

This is similar to action available through global options :

modules-> select a module and set enable to false.
Comment 1 Jaroslav Tulach 2000-09-05 16:02:59 UTC
ModuleInstall.install could be modified to throw an exception (backward
compatible change - nobody calls it except core) and ModuleInstaller would not
install (uninstall all its actions) the module throws it.

Jesse could you modify it in such way?
Comment 2 Jesse Glick 2000-09-05 16:50:59 UTC
This may be a good idea but I am marking it longer-term since it would not be
trivial. In particular, if there is a group installation of modules, and one
base one throws an exception from ModuleInstall.installed, the ModuleInstaller
needs to recognize that any dependent ones cannot then be installed. This will
complicate the module system somewhat.

Higher priority IMHO is proper handling of package dependencies (on my to-do
list, there is a Bugzilla item open) which should be the preferred way of doing
this in the case that you are only trying to ensure a library is present.
Comment 3 Jesse Glick 2000-09-21 11:29:59 UTC
I think the sandwich system will be the best way to handle this. E.g. in your
case I think you would want a filesystem disabled when it is not appropriate.
According to current plans (see http://core.netbeans.org/sandwich/ if you want
more info), there will be a fixed place on the system file system where
available types of new filesystems will be available--much like currently you
can control file templates by editing the contents of a folder. Normally the
contents of this filesystem-new-types folder will be autogenerated from the
module manifest, so in the common case you do not need to pay much attention to
how it is done. In your case you might want to turn the new type on and off
programmatically (rather than the entire module)--you will be able to do this
simply by deleting/adding the right file in the right place. I would rather have
this than a general API for turning the module as a whole on and off (hopefully
ModuleInstall will be used for fewer things in the future anyway), but there may
be other considerations.
Comment 4 Jesse Glick 2002-02-14 19:19:56 UTC
x
Comment 5 Jesse Glick 2002-02-14 19:20:26 UTC
This was implemented in 3.3.