Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » problem with platform filters
problem with platform filters [message #500601] Fri, 27 November 2009 01:29 Go to next message
Del Myers is currently offline Del MyersFriend
Messages: 82
Registered: July 2009
Member
Hello,

I have a plug-in that needs to load a native library from a fragment. It isn't
JNI stuff, it's a library that has to be searched for and loaded. Anyway, I'm
having trouble finding it, and I think the problem is with my platform filter.
The basic logic of the program is this:

URL libUrl = null;
if (os is windows) {
libUrl = MyPlugin.getDefault().getBundle().getResource(winLib);
} else if (os is linux) {
libUrl = MyPlugin.getDefault().getBundle().getResource(linuxLib);
}

However, both calls return null even though I know the libraries exist in my
fragment. I think that my platform filter for the fragment is wrong. It looks
like this:

(&(|(&(osgi.os=win32)(osgi.ws=win32))(&(osgi.os= linux)(|(osg.ws=gtk)(osgi.ws=motif)))))

Can someone please help? Thanks.

Del
Re: problem with platform filters [message #500672 is a reply to message #500601] Fri, 27 November 2009 13:11 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Quote:

(&(|(&(osgi.os=win32)(osgi.ws=win32))(&(osgi.os= linux)(|(osg.ws=gtk)(osgi.ws=motif)))))



Don't you have one to many &? i.e. shouldn't the outer filter look like (|(win32)(linux)) ? Otherwise it won't be linux and win32

PW


Re: problem with platform filters [message #501030 is a reply to message #500672] Mon, 30 November 2009 18:09 Go to previous messageGo to next message
Del Myers is currently offline Del MyersFriend
Messages: 82
Registered: July 2009
Member
Hmm... that could be a problem :-).

Personally, I find the platform filters a little confusing because there is no
tool support for this kind of thing. I wonder if it would be possible to just
have a "check-box" based approach that could automatically produce the platform
filter for you. It seems like it should be possible.

Del

Paul Webster wrote:
> Quote:
>> (&(|(&(osgi.os=win32)(osgi.ws=win32))(&(osgi.os=
>> linux)(|(osg.ws=gtk)(osgi.ws=motif)))))
>
>
> Don't you have one to many &? i.e. shouldn't the outer filter look like
> (|(win32)(linux)) ? Otherwise it won't be linux and win32
>
> PW
>
Re: problem with platform filters [message #501044 is a reply to message #501030] Mon, 30 November 2009 19:25 Go to previous messageGo to next message
Del Myers is currently offline Del MyersFriend
Messages: 82
Registered: July 2009
Member
OK, I got it to find the library. That's fine for now. I've still got some
things to figure out, though.

Del Myers wrote:
> Hmm... that could be a problem :-).
>
> Personally, I find the platform filters a little confusing because there
> is no tool support for this kind of thing. I wonder if it would be
> possible to just have a "check-box" based approach that could
> automatically produce the platform filter for you. It seems like it
> should be possible.
>
> Del
>
> Paul Webster wrote:
>> Quote:
>>> (&(|(&(osgi.os=win32)(osgi.ws=win32))(&(osgi.os=
>>> linux)(|(osg.ws=gtk)(osgi.ws=motif)))))
>>
>>
>> Don't you have one to many &? i.e. shouldn't the outer filter look
>> like (|(win32)(linux)) ? Otherwise it won't be linux and win32
>>
>> PW
>>
Re: problem with platform filters [message #501109 is a reply to message #501030] Tue, 01 December 2009 04:44 Go to previous message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
Del Myers wrote:
> Personally, I find the platform filters a little confusing because there
> is no tool support for this kind of thing. I wonder if it would be
> possible to just have a "check-box" based approach that could
> automatically produce the platform filter for you. It seems like it
> should be possible.

Sounds like a good enhancement. You can file a bug against PDE

- Prakash

Platform UI Team, IBM

Blog <http://blog.eclipse-tips.com>
Twitter <http://www.twitter.com/Eclipse_Tips>
Previous Topic:Eclipse does not run on x84 system
Next Topic:How to access the ProjectionViewer of a JavaEditor ...
Goto Forum:
  


Current Time: Fri Mar 29 07:59:53 GMT 2024

Powered by FUDForum. Page generated in 0.04267 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top