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.
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.
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?
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.
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.
x
This was implemented in 3.3.