From owner-freebsd-eclipse@FreeBSD.ORG Thu Aug 13 18:15:48 2009 Return-Path: Delivered-To: freebsd-eclipse@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E75CB106564A for ; Thu, 13 Aug 2009 18:15:48 +0000 (UTC) (envelope-from boris.hollas@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 3FA048FC15 for ; Thu, 13 Aug 2009 18:15:48 +0000 (UTC) Received: (qmail invoked by alias); 13 Aug 2009 17:49:05 -0000 Received: from p54A218F2.dip0.t-ipconnect.de (EHLO localhost) [84.162.24.242] by mail.gmx.net (mp011) with SMTP; 13 Aug 2009 19:49:05 +0200 X-Authenticated: #34156689 X-Provags-ID: V01U2FsdGVkX18jBelX5KkjFZ9iTmrMRN0RSCi/KmzNm4EI2WKrgx 5cF5fCoqyp2qKW Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-eclipse@freebsd.org Date: Thu, 13 Aug 2009 19:47:50 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Boris Hollas" Message-ID: User-Agent: Opera Mail/10.00 (FreeBSD) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.57 Subject: Platform.getOS() on FreeBSD X-BeenThere: freebsd-eclipse@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "FreeBSD users of eclipse EDI, tools, rich client apps & ports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 18:15:49 -0000 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