Home » Eclipse Projects » GEF » Properties view using a generated EMF model..
Properties view using a generated EMF model.. [message #242370] |
Mon, 14 April 2008 09:22 |
Eclipse User |
|
|
|
Originally posted by: j4r0d.hotmail.com
Hi everybody,
I've got a problem regarding the eclipse properties view using a generated
EMF model. I've built a working graphical editor (gef), and from now I'm
able to see the properties of a selected object. But, I still have some
questions..
1. I've noticed that when I'm dragging/moving an editpart, the properties
view is not refreshing (x, y coordinates). So I took a look at the mailling
list and found several mails relating this issue. In the end, I have placed
something like a propertySheetPage.refresh() in my GEF stack
commandStackChanged(). Still, I'm not sure this is the best thing to do
(I've never seen this in the GEF examples).
First, what do you guys think about my implementation?
Second, how is this "refresh issue" working in the GEF examples, is this
because of the IPropertySource interface ? (different behavior than the
IItemPropertySource with the properties view maybe..)
2. My big issue at the moment is that there is no way my properties view can
handle multiple selections at a time. I can display properties for one
selected editpart but no more! (the properties view simply goes empty) How
this can be possible? Should I implement something more for this feature to
work?
As I am using an EMF model, my model objects are implementing the
IItemPropertySource interface. So what I did is implementing
IItemPropertySource for my editparts. Then I wrap the IItemPropertySource of
the model using IItemPropertySource of my editpart. The
getPropertyDescriptor() & getPropertyDescriptors() method return a
ConvertPropertyDescriptor (which implements IItemPropertyDescriptor and
keeps a reference to the IItemPropertyDescriptor of the generated model
object).
Is my implementation wrong?
Please help me,
Thanks.
--
J.
"Music for a while"
|
|
|
Re: Properties view using a generated EMF model.. [message #242375 is a reply to message #242370] |
Mon, 14 April 2008 11:10 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Jarod,
Comments below.
Jarod Mills wrote:
> Hi everybody,
>
> I've got a problem regarding the eclipse properties view using a generated
> EMF model. I've built a working graphical editor (gef), and from now I'm
> able to see the properties of a selected object. But, I still have some
> questions..
>
> 1. I've noticed that when I'm dragging/moving an editpart, the properties
> view is not refreshing (x, y coordinates). So I took a look at the mailling
> list and found several mails relating this issue. In the end, I have placed
> something like a propertySheetPage.refresh() in my GEF stack
> commandStackChanged(). Still, I'm not sure this is the best thing to do
> (I've never seen this in the GEF examples).
> First, what do you guys think about my implementation?
> Second, how is this "refresh issue" working in the GEF examples, is this
> because of the IPropertySource interface ? (different behavior than the
> IItemPropertySource with the properties view maybe..)
>
In the EMF editor, that's how the properties view is refresh too. The
properties view doesn't handle fine-grained notifications, so refreshing
it anytime it might have changed (any time a command is executed) is a
brute force but reasonable way.
> 2. My big issue at the moment is that there is no way my properties view can
> handle multiple selections at a time. I can display properties for one
> selected editpart but no more! (the properties view simply goes empty) How
> this can be possible? Should I implement something more for this feature to
> work?
>
This sounds like the request in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=217280. There's a patch
for how to enable that.
> As I am using an EMF model, my model objects are implementing the
> IItemPropertySource interface. So what I did is implementing
> IItemPropertySource for my editparts. Then I wrap the IItemPropertySource of
> the model using IItemPropertySource of my editpart. The
> getPropertyDescriptor() & getPropertyDescriptors() method return a
> ConvertPropertyDescriptor (which implements IItemPropertyDescriptor and
> keeps a reference to the IItemPropertyDescriptor of the generated model
> object).
> Is my implementation wrong?
>
> Please help me,
>
> Thanks.
>
> --
> J.
> "Music for a while"
>
>
>
|
|
|
Re: Properties view using a generated EMF model.. [message #242399 is a reply to message #242375] |
Mon, 14 April 2008 15:02 |
Eclipse User |
|
|
|
Originally posted by: j4r0d.hotmail.com
Your patch works like a charm Ed, thanks again!
Regards,
> Jarod,
>
> Comments below.
>
> Jarod Mills wrote:
>> Hi everybody,
>>
>> I've got a problem regarding the eclipse properties view using a
>> generated EMF model. I've built a working graphical editor (gef), and
>> from now I'm able to see the properties of a selected object. But, I
>> still have some questions..
>>
>> 1. I've noticed that when I'm dragging/moving an editpart, the properties
>> view is not refreshing (x, y coordinates). So I took a look at the
>> mailling list and found several mails relating this issue. In the end, I
>> have placed something like a propertySheetPage.refresh() in my GEF stack
>> commandStackChanged(). Still, I'm not sure this is the best thing to do
>> (I've never seen this in the GEF examples).
>> First, what do you guys think about my implementation?
>> Second, how is this "refresh issue" working in the GEF examples, is this
>> because of the IPropertySource interface ? (different behavior than the
>> IItemPropertySource with the properties view maybe..)
>>
> In the EMF editor, that's how the properties view is refresh too. The
> properties view doesn't handle fine-grained notifications, so refreshing
> it anytime it might have changed (any time a command is executed) is a
> brute force but reasonable way.
>> 2. My big issue at the moment is that there is no way my properties view
>> can handle multiple selections at a time. I can display properties for
>> one selected editpart but no more! (the properties view simply goes
>> empty) How this can be possible? Should I implement something more for
>> this feature to work?
>>
> This sounds like the request in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=217280. There's a patch for
> how to enable that.
>> As I am using an EMF model, my model objects are implementing the
>> IItemPropertySource interface. So what I did is implementing
>> IItemPropertySource for my editparts. Then I wrap the IItemPropertySource
>> of the model using IItemPropertySource of my editpart. The
>> getPropertyDescriptor() & getPropertyDescriptors() method return a
>> ConvertPropertyDescriptor (which implements IItemPropertyDescriptor and
>> keeps a reference to the IItemPropertyDescriptor of the generated model
>> object).
>> Is my implementation wrong?
>>
>> Please help me,
>>
>> Thanks.
>>
>> --
>> J.
>> "Music for a while"
>>
>>
>>
|
|
|
Goto Forum:
Current Time: Fri Apr 19 03:05:27 GMT 2024
Powered by FUDForum. Page generated in 0.02427 seconds
|