Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to update the property view when properties change
How to update the property view when properties change [message #632503] Wed, 13 October 2010 09:02
VincentL is currently offline VincentLFriend
Messages: 88
Registered: July 2009

I have an object that use IAdapterFactory to provide the IPropertySource interface. The
IPropertySource instances are used by the standard property view when selection change in
the Project Explorer view. It works correctly but I need to know what is the best way to
update the content of the property view when object properties change.

For example, imagine that the object is a file, and one of the property shown by the
property view is its file's size. When I detect that the file size change, I would like to
update the property view, but only if the view display this object.

1- I didn't find any method to know which item are selected in the property view, so it is
difficult to update the property view at the good time...

2- My first approach was to add listeners to the IPropertySource instance and refresh the
property view when my listener receive event but It doesn't work because I didn't find a
good way to unregister my listener when the property view change its input selection.

3- Also note that I found another way to do it using the AdapterFactory but it doesn't
work well for multiple selection or multiple property view instance. My idea was to keep a
reference to the adaptObject that was passed to the AdapterFactory when the getAdapter
method is called, and register and unregister my listeners at this point when a new
IProperySource is requested (and supposing that there is only one IPropertySource instance
used at a time.

Any help will be appreciate.



Previous Topic:Bug? IPartListener no event when moving editor
Next Topic:Eclipse 3.6, exporting a product: Where is the "Export to multiple platforms" option?
Goto Forum:

Current Time: Wed Jan 27 19:59:13 GMT 2021

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

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

Back to the top