Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to dynamically change a comboboxpropertydescriptor values ?
How to dynamically change a comboboxpropertydescriptor values ? [message #170477] Fri, 04 March 2005 17:44 Go to next message
Eclipse UserFriend
Originally posted by: no.mail.please

Hi !

I use a model class in my gef editor which wrapps a SWT.LIST

I have a problem adding items to this list from the propertysheet (I add
them from a TextPropertyDescriptor) : the items are added OK to the
SWT.LIST, the changes are reflected in the view, but the changes are not
reflected in the property descriptor that reflects the SWT.LIST items.
This property descriptor is a simple ComboBoxPropertyDescriptor which
takes as parameter the list returned by SWT.LIST#getItems(). I
initialize it whith an empty array, and then I change this array to
SWT.LIST#getItems() when items are added.

It seems to me that the ComboBox is ReadOnly so the changes are not
reflected, instead of TextPropertyDescriptor that reflects changes in
the model.

Am I right ?

What is the solution for a ComboBoxPropertyDescriptor, as I don't want
to make it "not READ_ONLY" ?

TIA

--
Arnaud
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170584 is a reply to message #170477] Sat, 05 March 2005 14:32 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Try the platform newsgroup.

"Arnaud" <no@mail.please> wrote in message
news:d0a6pf$rrn$1@www.eclipse.org...
> Hi !
>
> I use a model class in my gef editor which wrapps a SWT.LIST
>
> I have a problem adding items to this list from the propertysheet (I add
> them from a TextPropertyDescriptor) : the items are added OK to the
> SWT.LIST, the changes are reflected in the view, but the changes are not
> reflected in the property descriptor that reflects the SWT.LIST items.
> This property descriptor is a simple ComboBoxPropertyDescriptor which
> takes as parameter the list returned by SWT.LIST#getItems(). I
> initialize it whith an empty array, and then I change this array to
> SWT.LIST#getItems() when items are added.
>
> It seems to me that the ComboBox is ReadOnly so the changes are not
> reflected, instead of TextPropertyDescriptor that reflects changes in
> the model.
>
> Am I right ?
>
> What is the solution for a ComboBoxPropertyDescriptor, as I don't want
> to make it "not READ_ONLY" ?
>
> TIA
>
> --
> Arnaud
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170612 is a reply to message #170477] Sun, 06 March 2005 04:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

BTW, I think out propertysheetentry refreshes on all command stack events.

"Arnaud" <no@mail.please> wrote in message
news:d0a6pf$rrn$1@www.eclipse.org...
> Hi !
>
> I use a model class in my gef editor which wrapps a SWT.LIST
>
> I have a problem adding items to this list from the propertysheet (I add
> them from a TextPropertyDescriptor) : the items are added OK to the
> SWT.LIST, the changes are reflected in the view, but the changes are not
> reflected in the property descriptor that reflects the SWT.LIST items.
> This property descriptor is a simple ComboBoxPropertyDescriptor which
> takes as parameter the list returned by SWT.LIST#getItems(). I initialize
> it whith an empty array, and then I change this array to
> SWT.LIST#getItems() when items are added.
>
> It seems to me that the ComboBox is ReadOnly so the changes are not
> reflected, instead of TextPropertyDescriptor that reflects changes in the
> model.
>
> Am I right ?
>
> What is the solution for a ComboBoxPropertyDescriptor, as I don't want to
> make it "not READ_ONLY" ?
>
> TIA
>
> --
> Arnaud
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170673 is a reply to message #170477] Sun, 06 March 2005 05:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: huangjun.cs.umb.edu

And, do you write your own ComboBoxPropertyDescriptor instread?
Otherwise, your modification to the array parameter will not reflect into
the combox of coz...

"Arnaud" <no@mail.please> wrote in message
news:d0a6pf$rrn$1@www.eclipse.org...
> Hi !
>
> I use a model class in my gef editor which wrapps a SWT.LIST
>
> I have a problem adding items to this list from the propertysheet (I add
> them from a TextPropertyDescriptor) : the items are added OK to the
> SWT.LIST, the changes are reflected in the view, but the changes are not
> reflected in the property descriptor that reflects the SWT.LIST items.
> This property descriptor is a simple ComboBoxPropertyDescriptor which
> takes as parameter the list returned by SWT.LIST#getItems(). I
> initialize it whith an empty array, and then I change this array to
> SWT.LIST#getItems() when items are added.
>
> It seems to me that the ComboBox is ReadOnly so the changes are not
> reflected, instead of TextPropertyDescriptor that reflects changes in
> the model.
>
> Am I right ?
>
> What is the solution for a ComboBoxPropertyDescriptor, as I don't want
> to make it "not READ_ONLY" ?
>
> TIA
>
> --
> Arnaud
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170728 is a reply to message #170673] Mon, 07 March 2005 07:47 Go to previous message
Eclipse UserFriend
Originally posted by: no.mail.please

hunj a écrit :
> And, do you write your own ComboBoxPropertyDescriptor instread?
> Otherwise, your modification to the array parameter will not reflect into
> the combox of coz...

Yes, I wrote my own combobox actually, that reflects changes in the
array and as two buttons for other actions.

I'll try to restart this piece of code from the beginning, I certainly
missed something.

--
Arnaud
Previous Topic:Clipboard Copy and printing to PDF file
Next Topic:Show/Hide Properties
Goto Forum:
  


Current Time: Thu Apr 25 17:11:55 GMT 2024

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

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

Back to the top