Skip to main content



      Home
Home » Eclipse Projects » GEF » Multi selection and Properties View
Multi selection and Properties View [message #160774] Tue, 07 December 2004 09:19 Go to next message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

Hi all,

In short, in my graphic editor consider I've got 2 editparts with 1 color
property which is displayed in the Properties View. I use a color descriptor
to edit the color property of the editparts. Everything is okay when I
select each editpart independently. I can edit the color and make it change
into the corresponding figure .

When I select several editparts at a time, the Properties View displays the
properties of the first selected part. Ok, this can be very useful for
example to put the same color to all parts.
But if I decide to push the cancel button of the font dialog and I deselect
the editparts, the color property value of all the previous selected parts
is set to the value of the first one.

Into the code, I saw that because of the deselection , the property sheet
page calls the method selectionChanged and make the viewer call
applyEditorValue which propagate the same value to all the IPropertySource
objects. Each model is then updated and it is the reason why I finally have
a modified color for a part even if I decided to cancel the modification
operation.

Is there something I missed? A workaround would be to prevent
multiselection. How?

Thanks for your help,

Alain
Re: Multi selection and Properties View [message #160782 is a reply to message #160774] Tue, 07 December 2004 09:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

No sorry, I need the multi selection feature. But maybe there's a way to
prevent the Properties View to display properties if there are more than one
parts selected?

Thanks

"Alain Origlia" <alain.origlia@impika.com> a
Re: Multi selection and Properties View [message #160818 is a reply to message #160782] Tue, 07 December 2004 11:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"Alain Origlia" <alain.origlia@impika.com> wrote in message
news:cp4ela$onp$1@www.eclipse.org...
> No sorry, I need the multi selection feature. But maybe there's a way to
> prevent the Properties View to display properties if there are more than
one
> parts selected?
>
See PropertyDescriptor.isCompatibleWith(...)

BTW, what does the Font dialog have to do with this? When you change
selection, uncommitted edits are committed. But, did you actually edit the
color in the propertysheet, or was it simply displayed? It sounds like a
bug in the calculation of whether the cell editor is dirty.


> Thanks
>
> "Alain Origlia" <alain.origlia@impika.com> a
Re: Multi selection and Properties View [message #160865 is a reply to message #160818] Tue, 07 December 2004 12:01 Go to previous message
Eclipse UserFriend
Originally posted by: alain.origlia.impika.com

Ooooops, I'm the king of the post! FontDialog was a ColorDialog... of
course.

Ok, thank you so much, setting the property descriptor incompatibilty to
always true works fine for me and is a good workaround to my problem.
But in fact, I actually edit the color with the ColorPropertyDescriptor
class of the platform in the Properties View. I use the default cell editor
provided with this class.
I just wrote the implementation of the interface IPropertySource for my
model and added the color descriptor. Do I need to do something else?
Thanks.



"Randy Hudson" <none@us.ibm.com> a
Previous Topic:Inter-communication Between Plugins
Next Topic:NPE in CreationTool
Goto Forum:
  


Current Time: Sat Jul 12 20:59:55 EDT 2025

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

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

Back to the top