Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Aug 2009 19:47:50 +0200
From:      "Boris Hollas" <boris.hollas@gmx.de>
To:        freebsd-eclipse@freebsd.org
Subject:   Platform.getOS() on FreeBSD
Message-ID:  <op.uyl3pyhyk2i85h@localhost>

next in thread | raw e-mail | index | archive | help
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?

Best regards,
Boris



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