Reputation: 403
I am currently developing plug-ins for an eclipse RCP application. One of the plug-ins needs OS-specific implementations.
It seems that plugin fragments would meet my needs (see e.g. 1, 2, 3).
I think I understand how fragments work now, but apart from the sparse documentation of fragments, there doesn't seem to be any documentation of the Eclipse-PlatformFilter
header in the manifest file.
According to 4, it has to be a valid LDAP filter string, but that doesn't explain any more than the two examples I found on the internet (the MacOS cocoa one and the windows 32bit one).
So my question is:
Is there any documentation of the Eclipse-PlatformFilter header?
(If there isn't, can anybody tell me the valid values for the header?)
Upvotes: 0
Views: 695
Reputation: 1442
The following is an example of the Eclipse-PlatformFilter header:
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))
Here are possible values for each osqi.* property
Operating system - osgi.os: win32, linux, macosx, aix, solaris, hpux, qnx
Windowing system - osgi.ws: win32, motif, gtk, photon, cocoa
Processor architecture osgi.arch: x86, x86_64, ia64, ia64_32, ppc, PA_RISC, sparc
Example above would activate fragment only when Eclipse is running on Windows 32bit.
If you want to activate when running on Windows 64bit you would use:
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86_64))
on linux 32bit
Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86))
on linux 64bit
Eclipse-PlatformFilter: (& (osgi.ws=gtk) (osgi.os=linux) (osgi.arch=x86_64))
on macOS 64bit and PowerPC
Eclipse-PlatformFilter: (& (osgi.ws=cocoa) (osgi.os=macosx) (|(osgi.arch=x86_64)(osgi.arch=ppc)))
You can pick at eclipse fragments to figure out filers for all supported platforms.
Upvotes: 4