lishunli / projectlombok

Automatically exported from code.google.com/p/projectlombok
0 stars 0 forks source link

Installer seems to not recognize Eclipse on Mac OS X #196

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run installer on Mac OS X Snow Leopard
2. Look at list of the IDE that the installer suggests 

What is the expected output? What do you see instead?

On the list my two versions of Netbeans (6.7 and 6.9) show up as expected, 
while the five different versions of Eclipse I also have on the system were not 
shown. And when I tried to point the installer to the Eclipse.app manually it 
claims that it is not a recognized IDE.

What version of the product are you using? On what operating system?

This was done with 0.9.3 on Mac OS X Snow Leopard running on an iMac.

Please provide any additional information below.

I ran the same version on my Linux box and there it correctly identified my 
Eclipse installation, as well as the Netbeans one.

On my Mac I went into the application directory itself, copyied the Lombok.jar 
file there and added the lines to Eclipse.ini, and with this manual 
installation it works ok, so the problem seems to be in the way the installer 
searches for Eclipse installations. 

Perhaps it looks for the unix executable, which is hidden two levels down below 
the Eclipse.app?

Original issue reported on code.google.com by vers...@gmail.com on 19 Feb 2011 at 12:12

GoogleCodeExporter commented 9 years ago
I can confirm I also encountered this issue.

Original comment by benjamin...@gmail.com on 23 Mar 2011 at 11:17

GoogleCodeExporter commented 9 years ago
This isn't a case of "Oops, we accidentally forgot OS X" - I own a mac :)

Here's the general procedure of how we look for Eclipse on macs.

First, the automatic detection algo:

It'll check all files in both /Applications and your user home dir for either 
of 2 conditions:

(A) It contains a directory named "Eclipse.app" (Mac apps are, at the file 
system level, directories and not files).

(B) It contains a directory that contains "eclipse", case insensitive, anywhere 
in its name, and this directory contains a directory named "Eclipse.app".

If the auto-detector finds a hit, OR you manually specify one via the button, 
then the following algorithm determines if its actually a legit eclipse install 
that lombok's installer can work with. If it's not, then the entry won't appear 
on the list (so its entirely possible that the autodetector does find eclipse 
on your system, but its then discarded as an invalid location):

(A) It checks for "eclipse.app" in the found directory. named like that. That's 
a mistake, though out-of-the-box Macs are configured as a case-insensitive file 
system. Might this be the issue? This is something I'll fix either way. This 
part is only done if you specified a directory instead of Eclipse.app itself. 
(Though, this IS how the auto-detector always feeds its guesses to the location 
validator).

(B) If eclipse.app isn't there, it looks for eclipse.ini in that directory. 
(The true goal of the validator is to locate the eclipse.ini file, as that's 
what lombok has to edit).

(C) If the passed location is a file, it either has to be eclipse.app or 
eclipse.ini (this time case insensitive).

If the found location was eclipse.app, it'll go from there to the ini file by 
checking if eclipse.ini is a sibling (i.e. in the same dir as) the found 
eclipse executable. If it can't find eclipse.ini there, it'll look for 
"dir-of-executable/Eclipse.app/Contents/MacOS/eclipse.ini".

 If neither strategy works, the location is abandoned as invalid.

Finally, if the pointed-at app is a softlink, it'll follow it a few times and 
reruns the algorithm, with a limit in case you've got an endless loop in your 
softlinks.

Can you guys check your eclipse installs and run through this process by hand? 
If not, could you provide me with the following info:

 (A) fully qualified path of your Eclipse.app file
 (B) fully qualified path of your eclipse.ini file
 (C) Your OS version
 (D) Eclipse's version

For eclipse.ini, you may have to delve into Eclipse.app to find it. Easiest way 
to do so is from the command line, otherwise, right-click on Eclipse.app and 
select 'show package contents'.

Thanks!

Original comment by reini...@gmail.com on 24 Mar 2011 at 10:48

GoogleCodeExporter commented 9 years ago
I have the following setup

(A) /Users/kentdamgaard/Applications/eclipse/eclipse_jee
(B) 
/Users/kentdamgaard/Applications/eclipse/eclipse_jee/Eclipse.app/Contents/MacOS
(C) OS X 10.6.6
(D) Eclipse Java EE IDE for Web Developers.

Version: Helios Service Release 2
Build id: 20110301-1815

My setup differs a bit because I use several versions of Eclipse and several 
configurations of the same version (i.e. both the JEE and RCP version of Helios 
and so on).

I don't think that you can assume that Macs are configured for case insensitive 
file system out of the box both my previous and current Mac had case sensistive 
file system. I've only been on OS X since Leopard, so I'm not sure if there was 
a change there at some point. 

Anyway, it seems that the Eclipse zip file itself ships with an Eclipse.app in 
it, not an eclipse.app, because I basically just downloaded, unzipped and 
copied to the Applications directory in my home.

Original comment by vers...@gmail.com on 24 Mar 2011 at 6:14

GoogleCodeExporter commented 9 years ago
With 2 directories from /Applications before we get to Eclipse.app, the 
auto-discoverer is not designed to find it. Nevertheless, using the 'add' 
button and pointing at 
/Users/kentdamgaard/Applications/eclipse/eclipse_jee/Eclipse.app should work. 
Might be it's the EE thing but I doubt it. I'll investigate what happens when I 
sub-path and point at the .app.

Original comment by reini...@gmail.com on 25 Mar 2011 at 10:23

GoogleCodeExporter commented 9 years ago
I checked the other installations I have, and it is always /Contents/MacOS
, both with Helios, Galileo and the beta of Eclipse 4 I have.

Original comment by vers...@gmail.com on 26 Mar 2011 at 6:33

GoogleCodeExporter commented 9 years ago

Original comment by grootj...@gmail.com on 10 May 2011 at 9:13

GoogleCodeExporter commented 9 years ago
I've pushed a fix 8b2ee73cc46a8629d61a, this fixes the issue where manually 
selecting an eclipse installation under mac doesn't work (see initial comment). 
Also, fixes for issue #210 will probably lead to a better automatic detection 
of eclipse installations.

I'm closing this issue, if this still occurs after the 0.10.0 release, this 
issue should be reopened.

Original comment by grootj...@gmail.com on 16 May 2011 at 7:13

GoogleCodeExporter commented 9 years ago
OP hasn't gotten back to us, so we'll assume it's fixed.

Original comment by r.spilker on 25 Jul 2011 at 6:12

GoogleCodeExporter commented 9 years ago
version 1.1.26 seems to still have this problem. How should I solve this.

Original comment by anil1...@gmail.com on 27 May 2014 at 6:30

GoogleCodeExporter commented 9 years ago
Please read the top comment and manually go through the steps and provide 
answers to the 4 questions. If you're manually pointing the installer at your 
eclipse location, what file, exactly, are you pointing it at?

Original comment by reini...@gmail.com on 28 May 2014 at 12:18

GoogleCodeExporter commented 9 years ago
(Temporarily assigning as 'new'; will be returned back to 'verified' on or 
after June 10th 2014 without feedback).

Original comment by reini...@gmail.com on 28 May 2014 at 12:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Point it to Eclipse.ini file.

Original comment by zuba...@gmail.com on 28 Jun 2014 at 4:43

GoogleCodeExporter commented 9 years ago
OP hasn't gotten back to us, assuming it's fixed.

Original comment by reini...@gmail.com on 29 Jun 2014 at 1:32