From owner-freebsd-eclipse@FreeBSD.ORG Thu Aug 13 19:18:56 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 7E6BD10656D1 for ; Thu, 13 Aug 2009 19:18:56 +0000 (UTC) (envelope-from sepotvin@FreeBSD.org) Received: from gatekeeper1.zerofail.com (gatekeeper1.zerofail.com [208.71.11.38]) by mx1.freebsd.org (Postfix) with ESMTP id 1CF418FC45 for ; Thu, 13 Aug 2009 19:18:55 +0000 (UTC) Received: from telcobridges.com by freebsd.org (gatekeeper1.zerofail.com) (SecurityGateway 2.0.1a) with SMTP id SG006838733.MSG for ; Thu, 13 Aug 2009 15:18:39 -0400 Received: from leia.telcobridges.lan ([208.94.105.59]) by telcobridges.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 13 Aug 2009 15:18:53 -0400 Message-ID: <4A84671D.9050405@FreeBSD.org> Date: Thu, 13 Aug 2009 15:18:53 -0400 From: "Stephane E. Potvin" Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.22 (X11/20090723) MIME-Version: 1.0 To: Boris Hollas References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 13 Aug 2009 19:18:53.0924 (UTC) FILETIME=[E5A20A40:01CA1C4A] X-SGHeloLookup-Result: hardfail smtp.helo=telcobridges.com (does not match 208.71.8.41) X-SGOP-RefID: str=0001.0A020207.4A84671E.0074,ss=1,fgs=0 (_st=1 _vt=0 _iwf=0) Cc: freebsd-eclipse@freebsd.org Subject: Re: 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 19:18:56 -0000 -----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-----