Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 2009 15:18:53 -0400
From:      "Stephane E. Potvin" <sepotvin@FreeBSD.org>
To:        Boris Hollas <boris.hollas@gmx.de>
Cc:        freebsd-eclipse@freebsd.org
Subject:   Re: Platform.getOS() on FreeBSD
Message-ID:  <4A84671D.9050405@FreeBSD.org>
In-Reply-To: <op.uyl3pyhyk2i85h@localhost>
References:  <op.uyl3pyhyk2i85h@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Boris Hollas wrote:
> Hi,
> 
> I had big trouble running the OcaIDE plugin on FreeBSD 7.2 with Eclipse
> 3.4.1 from ports until I discovered these lines in the plugin source
> 
> public static boolean runningOnLinuxCompatibleSystem() {
> String os = Platform.getOS();
> return (os.equals(Platform.OS_LINUX) || os.equals(Platform.OS_MACOSX));
> }
> 
> and replaced them with
> 
> public static boolean runningOnLinuxCompatibleSystem() {
> String os = Platform.getOS();
> return (os.equals(Platform.OS_LINUX) || os.equals(Platform.OS_MACOSX) ||
> os.equals(Platform.OS_FREEBSD));
> }
> 
> (see http://ocaml.eclipse.free.fr/forum/viewtopic.php?f=3&t=216).
> 
> Now everything seems to work.
> 
> My questions:
> - Does Platform.OS_FREEBSD return Platform.getOS() only in the Eclipse
> version created by the FreeBSD-Eclipse team
>   or is this built into Eclipse by default?
> - If the former is true, is os.equals(Platform.OS_FREEBSD) portable code
> or will it produce a compiler error on non-FreeBSD systems?
> - Do the Eclipse developers know about the problem?
> - What should I suggest to the OcaIDE developers to ensure portability
> of the plugin's code?
> 

Hi Boris,

- - Platform.OS_FREEBSD is defined only on the FreeBSD version of Eclipse available from the ports tree, it is not built into the
default eclipse distribution so it can't safely be used by plugins outside of the ports tree at this time.
- - I don't expect a lot of people in the Eclipse community to be aware of this issue (but I would be agreeably surprised if I was to
be proven wrong). There were tentative in the past to get FreeBSD support within Eclipse without success. I still hope to be able to
do something about that in the future but there are yet issues I must fix before I'll try to bug the Eclipse releng team.
- - As for OcaIDE, they could turn the test around and check if they were not running on a windows compatible system. You'll have to
discuss that with them as it might or not apply to what they're trying to achieve.

Hope this helps.

Steph

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqEZx0ACgkQmdOXtTCX/ns02ACgjKTUOZz1H86acJtBqRvuFMV1
JJEAnA2EGQ9ajEfv1RqpMhPqyVVzsTmJ
=DROS
-----END PGP SIGNATURE-----




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A84671D.9050405>