Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Change Properties at runtime
Change Properties at runtime [message #429125] Thu, 09 April 2009 09:14 Go to next message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,
I have an project based on the EMF Model.
In my project is a property view created by the EMF Model.
So what I want is changing the Property View at runtime.

For example:
I Have 4 properties in the view.
The user changes property one form 'A' to 'B'
Now the Property View should be refreshed in the way that property three
and four should not be displayed anymore.

Is this possible?
Perhaps there is a way to tell EMF to reload the property view for the
current selected object an then make some constraints if property one
should be added to the list of property descriptors or not...?

Thanks for your help
Best regards
Alex
Re: Change Properties at runtime [message #429133 is a reply to message #429125] Thu, 09 April 2009 12:19 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Alex,

Comments below.

Alexander Mack wrote:
> Hello,
> I have an project based on the EMF Model.
> In my project is a property view created by the EMF Model.
> So what I want is changing the Property View at runtime.
>
> For example:
> I Have 4 properties in the view.
> The user changes property one form 'A' to 'B'
> Now the Property View should be refreshed in the way that property
> three and four should not be displayed anymore.
>
> Is this possible?
Yes. You'd need to fiddle with what's returned by
AbcItemProviderAdapter.getPropertyDescriptors. Note that normally the
list is cached so you'd need to force it to be recomputed each time its
called and then be sure to populate only the ones you want. The
property view should be refresh after you make a change and this method
should be called again...
> Perhaps there is a way to tell EMF to reload the property view for the
> current selected object an then make some constraints if property one
> should be added to the list of property descriptors or not...?
>
> Thanks for your help
> Best regards
> Alex
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Change Properties at runtime [message #429210 is a reply to message #429133] Tue, 14 April 2009 14:36 Go to previous messageGo to next message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,
first of all, thanks for your reply.

Thats the way I thought. But one problem is still left:
I can remove the itemPropertyDescriptor List if the user changes a
selection in the properties.
But how can I now force EMF to refresh the current property view?
If I leave the focus of the selected object an then focus it again the
properties will be refreshed. I want EMF to refresh the properties
instantly after changing for example a selection.

Thanks for your help
Best regards
Alex
Re: Change Properties at runtime [message #429211 is a reply to message #429210] Tue, 14 April 2009 14:49 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Alex,

Comments below.

Alexander Mack wrote:
> Hello,
> first of all, thanks for your reply.
>
> Thats the way I thought. But one problem is still left:
> I can remove the itemPropertyDescriptor List if the user changes a
> selection in the properties.
> But how can I now force EMF to refresh the current property view?
It will refresh the view each time a command is executed. You can see
in the generated editor where the command stack listener does that.
> If I leave the focus of the selected object an then focus it again the
> properties will be refreshed. I want EMF to refresh the properties
> instantly after changing for example a selection.
It sounds like you're making a change, but not using a command?
>
> Thanks for your help
> Best regards
> Alex
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Change Properties at runtime [message #429212 is a reply to message #429211] Tue, 14 April 2009 15:12 Go to previous message
Alexander Mack is currently offline Alexander MackFriend
Messages: 100
Registered: July 2009
Senior Member
Hello,
sorry, my fault, I did not persist the Action so the property view was not
refreshed :)

Thanks for your help.
Best regards
Alex
Previous Topic:Cannot run teneo + hibernate
Next Topic:[CDO] SpringSource jdbc not functioning with 3.5m6
Goto Forum:
  


Current Time: Thu Apr 25 16:19:00 GMT 2024

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

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

Back to the top