Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Using property Sheet
Using property Sheet [message #153986] Thu, 14 October 2004 07:26 Go to next message
Eclipse UserFriend
Originally posted by: ranjit.notMyId.com

Is there a small example which would help me understand how to use a
property sheet for models?
All the tutorials talk about it but none have a bit of code or
explanation on the working.

Thanks
Re: Using property Sheet [message #153996 is a reply to message #153986] Thu, 14 October 2004 09:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ranjit.notMyId.com

Ranjit wrote:
> Is there a small example which would help me understand how to use a
> property sheet for models?
> All the tutorials talk about it but none have a bit of code or
> explanation on the working.
>

Sorry for a bit ambiguous question.
I thought I would correct myself before any replies.
I wanted to know if there was a way that the property sheets could be
populated with a specific data and the change getting reflected in the
view if the particular view item is selected.
e.g. creating a drop down of possible/allowable values (amy be taken
from information from other models).

Thanks
Re: Using property Sheet [message #154004 is a reply to message #153996] Thu, 14 October 2004 13:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

It should be pretty simple. Just return a descriptor which populates hte
celleditor with the choices you want. There is a propertysheet example by
the platform team/

You might want to check out EMF. I know that an EAttribute has a Type
attribute of EClass. They may allow you to choose from declared types in
your metamodel.

This is a model question. GEF doesn't know anything about a given
application's model.

"Ranjit" <ranjit@notMyId.com> wrote in message
news:cklf8l$rng$1@eclipse.org...
> Ranjit wrote:
> > Is there a small example which would help me understand how to use a
> > property sheet for models?
> > All the tutorials talk about it but none have a bit of code or
> > explanation on the working.
> >
>
> Sorry for a bit ambiguous question.
> I thought I would correct myself before any replies.
> I wanted to know if there was a way that the property sheets could be
> populated with a specific data and the change getting reflected in the
> view if the particular view item is selected.
> e.g. creating a drop down of possible/allowable values (amy be taken
> from information from other models).
>
> Thanks
>
Re: Using property Sheet [message #154027 is a reply to message #154004] Thu, 14 October 2004 14:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ranjit.notMyId.com

Randy Hudson wrote:
> It should be pretty simple. Just return a descriptor which populates hte
> celleditor with the choices you want. There is a propertysheet example by
> the platform team/
>
> You might want to check out EMF. I know that an EAttribute has a Type
> attribute of EClass. They may allow you to choose from declared types in
> your metamodel.
>
> This is a model question. GEF doesn't know anything about a given
> application's model.

Hi Andy,

Thanks for the help, I would look into the example you mentioned.
But now I am a bit confused.
If the property sheet is not handled by the GEF how come I can change
the model by clicking on the view corresponding to it and then changing
the values in the property sheet. I thought that the property sheet
changes too are handled by the GEF part and passed on to the model.

Would I be correct to say the following with the working of the
propertySheets?
when a particular view object is selected on the canvas corresponding
Edit part gets the PropertyDescriptors for the model and shows them in
the property sheet. Any changes done to the values are directly sent to
the model via the setPropertyValue method. The model then can make sure
that the changes get back to the view using the fireProperty calls.

Regards,
- Ranjit


>
> "Ranjit" <ranjit@notMyId.com> wrote in message
> news:cklf8l$rng$1@eclipse.org...
>
>>Ranjit wrote:
>>
>>>Is there a small example which would help me understand how to use a
>>>property sheet for models?
>>>All the tutorials talk about it but none have a bit of code or
>>>explanation on the working.
>>>
>>
>>Sorry for a bit ambiguous question.
>>I thought I would correct myself before any replies.
>>I wanted to know if there was a way that the property sheets could be
>>populated with a specific data and the change getting reflected in the
>>view if the particular view item is selected.
>>e.g. creating a drop down of possible/allowable values (amy be taken
>>from information from other models).
>>
>>Thanks
>>
>
>
>
Re: Using property Sheet [message #154042 is a reply to message #154027] Thu, 14 October 2004 15:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> Would I be correct to say the following with the working of the
> propertySheets?
> when a particular view object is selected on the canvas corresponding
> Edit part gets the PropertyDescriptors for the model and shows them in
> the property sheet. Any changes done to the values are directly sent to

No, the EditPart checks to see if either it or the model implements
IPropertySource. Generally, the model will implement IPropertySource, and
from that point on the property sheet is not dealing with anything in GEF.

> the model via the setPropertyValue method. The model then can make sure
> that the changes get back to the view using the fireProperty calls.
Re: Using property Sheet [message #154050 is a reply to message #154042] Thu, 14 October 2004 15:53 Go to previous message
Eclipse UserFriend
Originally posted by: ranjit.notMyId.com

"Randy Hudson" <none@us.ibm.com> wrote in message
news:ckm6b6$chl$1@eclipse.org...
>> Would I be correct to say the following with the working of the
>> propertySheets?
>> when a particular view object is selected on the canvas corresponding
>> Edit part gets the PropertyDescriptors for the model and shows them in
>> the property sheet. Any changes done to the values are directly sent to
>
> No, the EditPart checks to see if either it or the model implements
> IPropertySource. Generally, the model will implement IPropertySource, and
> from that point on the property sheet is not dealing with anything in GEF.
>
>> the model via the setPropertyValue method. The model then can make sure
>> that the changes get back to the view using the fireProperty calls.
>
>

Thanks Randy, that clears all my doubts.
Also, that solves a big problem I had :).
Previous Topic:MidpointLocator and scrollbar
Next Topic:Image on Tool Bar
Goto Forum:
  


Current Time: Wed Jan 22 09:10:48 GMT 2025

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

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

Back to the top