well, at the very least we can have a quick look in /usr/lib/eclipse
and see if there's an eclipse.ini there, and use it.
The much bigger concern is how the LSB view (of splitting files for a
given app across a bunch of directories, such as in this case, across /
usr/bin, and /usr/lib) is totally different from how the downloadable
eclipse package (from
eclipse.org) works, which bundles all files into
a single directory.
The installer needs to do this:
1. It needs to find eclipse.ini, and edit references to lombok.jar
into it.
2. It needs to put lombok.jar in a suitable place.
3. It needs to hide these details from the end user, who probably
doesn't even know there's such a thing as eclipse.ini, and that it
might be hidden somewhere in the insides of the eclipse install.
Right now, the installer accomplishes these goals by looking for the
eclipse executable, knowing that it can go from there to eclipse.ini
easily: It's either right there in the same dir, or it's in
Eclipse.app/MacOS/Resources relative to the directory that the
executable is in. It then drops lombok.jar in the same directory as
eclipse.ini and makes the edit. Furthermore, to fully hide this
process, whenever the user tries to add an eclipse by hand using the
'add eclipse...' button, the user is supposed to navigate to either
the executable or a directory containing the executable. The installer
then translates the path to the executable to a path to the ini, which
is what the installer actually works with.
This entire process is just going to fail on an apt-getted eclipse,
because eclipse.ini isn't anywhere near eclipse the executable. Also,
the act of pointing the installer at a custom eclipse is going to be
similarly complex. Fortunately, the text in the "what do I do?" link
in the installer should be obvious enough to a seasoned linux user,
but this is clearly not an optimum solution for installing lombok on
apt-getted eclipse installs.
I'm a bit stuck about how to figure out a better way. How's this:
1. We accept that this unclustered installation process is unique to
package managers, which will ALWAYS stick both the eclipse executable
and the eclipse.ini file in a single, unchanging location. Therefore,
either (A) the installer knows how to handle this situation and can
thus detect these files and pre-populate the eclipse installations
list with them, or (B) it doesn't know how to install there at all, so
trying to point it out by hand with the 'add eclipse...' button is
never going to work right.
Conclusion: The 'add eclipse...' button will never have to deal with
this situation. I could, for completeness' sake, let the add eclipse
feature be compatible with pointing at your actual eclipse.ini file
(or, in fact, at any file named 'eclipse.ini'). The installer doesn't
actually need to know or care about the executable, as it doesn't
modify that.
2. We hardcode the notion that if /usr/bin/eclipse is a lone
executable that ISNT a softlink, then eclipse.ini needs to be at /usr/
lib/eclipse/eclipse.ini, and if it isn't there, /usr/bin/eclipse can
be discarded as a fixable eclipse. If it IS a softlink, we follow the
softlink and continue as if that's a non-aptget style eclipse install
(with all files bundled into one dir instead of smeared across the LSB
dirs).
In order to make this scheme sufficiently robust, we'll have to check
the exact installation directories of every major linux distro around.
Presumably all debianesque distros will all be using the debian
package, and thus will put the executable in /usr/bin, and the ini
file in /usr/lib/eclipse, but then we still have to check yum-based
distros (redhat, CentOS, Fedora, Mandriva?, olpc [though I doubt
eclipse runs on an XO-1!]), YaST/Zypper (SUSE), whatever slackware
does, and whatever Gentoo does.
For a standards project, the LSB sure is a pain in my ass that I wish
would just go away or actually, you know, standardize on something.
Could be I don't get it, but the only proper LSB distribution model
for eclipse that I can see is to dump the entire eclipse install into /
usr/share/eclipse, then softlink /usr/share/eclipse/eclipse into /usr/
bin, and that's that.
I've got various debian variants to test out at home, but I don't have
any other distro, so it's going to take quite a bit of trouble
collating all this data. Ugh.