In the workbench help scenario, or infocenter
serving one type of content, the OS and windowing system is passed to Eclipse
from command line, or from eclipse.exe and can be obtained by calling Platform.getOS()
or Platform.getWS() methods.
For the infocenter serving content customized
to the user, the user agent needs to be used. The string sent by
the browser has information about operating system, for example:
netscape 4.5 =
Mozilla/4.51 [ja] (WinNT; I)
Safari =
Mozilla/5.0
(Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/64 (KHTML, like Gecko)
Safari/64
ie 6.0 =
Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.1; .NET CLR 1.0.3705)
netscape 7.0 =
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823
Netscape/7.0
So in all cases the OS can be determined
by the infocenter, There is no information about windowing system, but
in almost all cases it can be guessed from OS. The only case, I know,
where it would be a problem would be for motif and gtk users of Linux.
We will probably determine OS to be Linux, and guess WS to be gtk.
Another interesting option for the infocenter
is to serve images for a particular windowing system, but show content
for all of them, so a user can see all paragraphs, how something works
on Windows, Linux, Mac e.t.c. This can be controlled by CSS
when setting up the infocenter.
Konrad Kolosowski
platform-help-dev-admin@xxxxxxxxxxx wrote on 11/24/2004
01:54:43 PM:
> Hi, Konrad:
>
> platform-help-dev-admin@xxxxxxxxxxx wrote on 11/23/2004 11:31:02 PM:
>
> > Yes. Infocenter has not been mentioned yet. If the
proposal is
> > implemented and OS specific fragments are not installed on the
> > infocenter, it works as it used to. To let infocenter taking
> > advantage of OS specific content, all infocenter logic dealing
with
> > locales can be replicated and used for similarly detecting
> > overriding and using OS. In the simplest case, to address
your
> > example, a command line option can be used to override system
OS
> > with one provided on the command line when retrieving documents.
>
> Would it be possible to get the browser client platform from the
> user agent header?
>
> That is, the configuration might specify to get the platform from
> the server or from the browser client with the ability to override
> the configuration via the command-line or via an API invocation.
>
> But perhaps the browser client would require additional
> implementation. I gather, the server platform and graphics library
> are available from core Eclipse.
>
> platform-help-dev-admin@xxxxxxxxxxx wrote on 11/23/2004 11:49:58 PM:
>
> > I view the proposed changes are not breaking. If there
is not /ws
> > directory, no sentences marked with classes, or there is a single
> > CSS, the result will be exacly as today. If WS specific
content,
> > the result will be different. Are you suggesting there
needs to be
> > an option to disable all changes being proposed, or will overriding
> > WS from infocenter command line suffice?
>
> No, if the existing resource resolution still works as a default,
I
> wouldn't think there's a need to disable.
>
>
> Thanks,
>
>
> Erik Hennum
> ehennum AT us DOT ibm DOT com