From owner-freebsd-eclipse@FreeBSD.ORG Thu Aug 13 19:02:38 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 6CF97106564A for ; Thu, 13 Aug 2009 19:02:38 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from hamlet.setfilepointer.com (hamlet.SetFilePointer.com [63.224.10.2]) by mx1.freebsd.org (Postfix) with SMTP id 1C6EE8FC52 for ; Thu, 13 Aug 2009 19:02:37 +0000 (UTC) Received: (qmail 21984 invoked from network); 13 Aug 2009 14:02:37 -0500 Received: from keira.kiwi-computer.com (HELO kiwi-computer.com) (63.224.10.3) by hamlet.setfilepointer.com with SMTP; 13 Aug 2009 14:02:37 -0500 Received: (qmail 88330 invoked by uid 2001); 13 Aug 2009 19:02:36 -0000 Date: Thu, 13 Aug 2009 14:02:36 -0500 From: "Rick C. Petty" To: Boris Hollas Message-ID: <20090813190236.GB87807@keira.kiwi-computer.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i 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 Reply-To: rick-freebsd2008@kiwi-computer.com 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:02:38 -0000 On Thu, Aug 13, 2009 at 07:47:50PM +0200, Boris Hollas wrote: > > (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? I'll assume you mean: Does Platform.getOS() return Platform.OS_FREEBSD in which case I suspect so. > - If the former is true, is os.equals(Platform.OS_FREEBSD) portable code > or will it produce a compiler error on non-FreeBSD systems? Probably not, since FreeBSD's port patches /org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java to add OS_FREEBSD. > - Do the Eclipse developers know about the problem? Probably not. We should try to push our patches upstream, but no one seems to have time to do so. > - What should I suggest to the OcaIDE developers to ensure portability of > the plugin's code? Use reflection-- check if the field Platform.OS_FREEBSD exists, *or* scan through what Platform.knownOSValues() returns for the string "freebsd". -- Rick C. Petty