Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » PropertyTester on list of objects
PropertyTester on list of objects [message #535779] Tue, 25 May 2010 15:18 Go to next message
Eclipse UserFriend
Originally posted by: luzi.anderegg.ergon.ch

I would like to implement a property tester based on the elements in the
structured selection. The type of the elements is one of my classes. Is
that possible? What do I have to specify as type in the extension point?

Thanks for any information,
Luzi
Re: PropertyTester on list of objects [message #535984 is a reply to message #535779] Wed, 26 May 2010 14:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: luzi.anderegg.ergon.ch

Luzi Anderegg schrieb:
> I would like to implement a property tester based on the elements in the
> structured selection. The type of the elements is one of my classes. Is
> that possible? What do I have to specify as type in the extension point?
>
> Thanks for any information,
> Luzi
or should i implement an own sourceprovider for this case?

Luzi
Re: PropertyTester on list of objects [message #535986 is a reply to message #535779] Wed, 26 May 2010 14:50 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Luzi Anderegg wrote:
> I would like to implement a property tester based on the elements in the
> structured selection. The type of the elements is one of my classes. Is
> that possible? What do I have to specify as type in the extension point?

You can either test each element within an IStructuredSelection using
the iterate element, in which case your property tester would probably
be applicable to the Type of objects you expect to find in the
selection. Or you can test the entire selection yourself, in which case
the property tester would probably have the target type
IStructuredSelection.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: PropertyTester on list of objects [message #535987 is a reply to message #535984] Wed, 26 May 2010 14:51 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Luzi Anderegg wrote:
> or should i implement an own sourceprovider for this case?
>

You would write a source provider if some part of your system is
providing information that you need to access in the core expressions.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: PropertyTester on list of objects [message #535995 is a reply to message #535986] Wed, 26 May 2010 15:26 Go to previous message
Eclipse UserFriend
Originally posted by: luzi.anderegg.ergon.ch

Paul Webster schrieb:
> Luzi Anderegg wrote:
>> I would like to implement a property tester based on the elements in
>> the structured selection. The type of the elements is one of my
>> classes. Is that possible? What do I have to specify as type in the
>> extension point?
>
> You can either test each element within an IStructuredSelection using
> the iterate element, in which case your property tester would probably
> be applicable to the Type of objects you expect to find in the
> selection. Or you can test the entire selection yourself, in which case
> the property tester would probably have the target type
> IStructuredSelection.
>
> PW
>
>
Thanks for the information. As the test needs simultaneous access to the
whole selection (it has to compare the elements within the selection), I
will go for the second option with the IStructuredSelection as target type.

Luzi
Previous Topic:PageBookView.getAdapter produces StackOverflowError
Next Topic:info ...
Goto Forum:
  


Current Time: Fri Nov 28 22:17:29 GMT 2014

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

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