FitnessForeverAndInstaller
FitnessForever and Installer
Discussion about problem reported in IZ 157484.
Current state
Currently we have 6 distributions - javase, java, ruby, c/c++, php and full. From installer perspective each distribution consists of several "packs" (plus servers, if applicable):
| Distribution | Packs |
|---|---|
| Java SE | Base IDE + Java SE |
| Java | Base IDE + Java SE + Java Web and EE + Java ME + servers |
| Ruby | Base IDE + Ruby |
| C/C++ | Base IDE + C/C++ |
| PHP | Base IDE + PHP |
| All | Base IDE + Java SE + Java Web and EE + Java ME + Ruby + C/C++ + PHP + SOA + servers |
Each pack is a set of one or several clusters and, since cluster have dependencies, the packs has also has the dependencies between them.
So far when user installs the particular distribution he actually installs one or more packs (and thus one or more clusters). In Java and All distribution user has the ability to install not all packs, but only those that he need.
In other words, if user downloads "All"/Java distribution then he have to ability to install not all but only the desired packs, e.g.
- Base IDE + Common Web Components + Java SE + Java Web and EE + Ruby + GlassFish V3
- Base IDE + Common Web Components + Ruby + PHP
- Base IDE + C/C++
- Base IDE + Java SE + Java ME
- Base IDE + Common Web Components + Java SE + Java Web and EE + SOA + GlassFish V2 + OpenESB
- ...
When ergonomics shall be enabled?
So the main question is : what pack should 'ergonomics' cluster be in and when it should be installed? Here is end user view:
| Distribution | Ergonomics? | Comment |
|---|---|---|
| Java SE | No | |
| Java | File:NB67PerfPlan/yes.png | Only if fully installed. Java SE shall be enabled by default. |
| Ruby | No | |
| C/C++ | No | |
| PHP | No | |
| All | File:NB67PerfPlan/yes.png | Only if fully installed. |
We can include it in any of the existing packs (e.g. to Java Web && EE) or create a new one.
Additional installs
#1 Please note that the user has the ability to install additional packs after the first installation i.e. run installer again and add (install) packs which were not yet installed. In other words, user can do the following:
- run full installer and install Base IDE + Java SE + Java ME
- run full installer again and install Ruby + Common Web Components + GlassFish V3
- run full installer again and install PHP + Java Web and EE
Another usage scenario which is also supported is that user can download one special distribution and then install it in the other existing one i.e. user can download e.g. Ruby distribution, install it and then download PHP distribution and install it in the existing installation. I.e. user would have Base IDE + PHP + Ruby + Common Web Components installed after that. At the end, user can download Java SE distribution and install it. As the result, he would have Base IDE + PHP + Ruby + Java SE + Common Web Components packs installed. At which step should ergonomics cluster be installed?
Alternative Solutions
There are various ways to reach the desirable behaviour. All of them have various drawbacks and advantages analyses in the next sections.
Can Installer Edit etc/netbeans.clusters file?
The solution depends whether the installer can be enhanced to understand and modify the etc/netbeans.clusters file. If so, then in case one chooses C/C++ to be installed, the installer needs to modify the etc/netbeans.clusters file so the cnd cluster and all clusters that it requires are before the ergonomics directory:
--- netbeans.clusters.orig 2009-01-13 17:26:55.000000000 +0100 +++ netbeans.clusters 2009-01-13 17:30:36.000000000 +0100 @@ -2,6 +2,8 @@ platform9 # application cluster second nb6.5 +# clusters to be enabled by default +cnd2 # ergonomics cluster if present ergonomics1 # and now the rest @@ -20,7 +22,6 @@ php1 visualweb2 soa2 -cnd2 identity2 uml6 harness
With this setup, the user gets C/C++ functionality enabled, while all the other functionality stays provided on demand. Can installer handle such re-arrangement of clusters in the netbeans.clusters file? Here is a simple utility method to change the order of clusters (see ErgonomicsInstallerAddClustersWithPivot_FitnessForeverAndInstaller.diff). Just use
addClusters(nbRoot, "ergonomics1", "cnd2"); addClusters(nbRoot, "ergonomics1", "java2", "gsf3", "apisupport4");
and the cnd2 cluster (or the java, gsf and apisupport ones) will be added before the ergonomics one.
- + flexible and IDE neutral (e.g. setup is done from outside)
- - installer needs to understand netbeans.clusters file and needs to know that ergonomicsX cluster is special
Shall ergonomics be own pack?
Alexander proposed an alternative solution, to include ergonomic cluster into its own pack and include this pack into full distribution and allow user to include/exclude this pack as any other packs. Dmitrij likes the idea to put ergonomics to the separate installable component and including it only in Java/Full distributions. That would mean that users could either install it (that would be the default behaviour) from that distributions together with all other packs or deselect it and thus have the IDE with all required modules activated.
- + The order of clusters in netbeans.clusters will not be changed.
- - The problem is that this works only for "Full" distribution
- In java "Java All" distribution, we want ergonomics to be present (by default) and yet javase be enabled (by default)
Can Installer edit netbeans.conf file?
An alternative to editing netbeans.clusters file is to change netbeans.conf one. This requires a little patch to ergonomics functionality (available here). The installer would need to add:
netbeans_default_options=-J-Dorg.netbeans.modules.ide.ergonomics.Always=org.netbeans.modules.java.kit # followed by the previously present values
to the netbeans.conf file when installing Java All edition. This would make sure that Java SE functionality is enabled as soon as the IDE starts. This solves the problem of previous Shall ergonomics be own pack:
- + Works for Full as well as Java All distros
- In java "Java All" distribution, we want ergonomics to be present (by default) and yet javase be enabled (by default)
- - Drawback is that this requires a lot of operations during first start and makes it slower
Different netbeans.cluster for each distribution
It is possible to alter the build in a way that the etc/netbeans.clusters file will have different content for Java All distribution - e.g. the standard clusters of Java SE distribution will be before ergonomicsX cluster. This would be installer neutral, if there were no 1. Those could be heavily affected by this proposal as the user could install Java All first and then install additional Full IDE. This would result in conflict between their two different etc/netbeans.clusters files. The installer would need to resolve it - as such it still would need to be aware of the structure of the netbeans.clusters file.
- '-' installer still needs to understand the cluster logic
UI Spec
The here-in described UI Spec is based on above analysis of various options and is designed to have as minimal impact on current installer infrastructure as possible. Various additional enhancements (like 3-state buttons) are possible and have been considered, however as the primary goal seems to be to eliminate existing bugs, they have been deferred for now.
The installer needs following changes:
- ergonomics cluster will be visible in the list of available packs and users will be allowed to disable it (as Alexander suggested).
- during install of Java All distribution (and if at least both ergonomics and Java SE packs are selected), the installer needs to rearrange the order of clusters and place the Java SE ones before the ergonomics cluster (possibly with help of this patch).
This UI Spec optimizes for users that do not do any modifications (they will be allowed to make a conscious decision of what functionality to use via the ergonomics system) and yet it gives enough control to powerusers that are wishing to fully control the behaviour of their NetBeans IDE (and even exclude ergonomics).

