Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » properties view tab refresh
properties view tab refresh [message #461199] Sun, 02 August 2009 11:01 Go to next message
John is currently offline JohnFriend
Messages: 52
Registered: July 2009
Member
Hi,
I have added a new tab to the Propeties view by following the example
at
http://www.eclipse.org/articles/Article-Tabbed-Properties/ta bbed_properties_view.html.

The new tab displays the properties for my Stereotypes for the selected
model element(similar to the existing Stereotypes tab).
The propertySection filter for each section(field) will ensure that it
will appear in the propertyTab if the selected elemnt has the applied
stereotype.
If no sections are eligable for display then the new Tab will not appear
in the properties view, this is great. However, if I remove my stereotype
using the Stereotypes tab, the tab list of the Propeties view is not
refreshed.
The question is - how can I trigger a refresh of the Properties view tab
list when a model change occurs?
Re: properties view tab refresh [message #467902 is a reply to message #461199] Mon, 03 August 2009 10:57 Go to previous messageGo to next message
John is currently offline JohnFriend
Messages: 52
Registered: July 2009
Member
Hi, Have discovered from other discussion on this forum that the
Properties view tab list is only refreshed when an element is selected!!!!

So as a workaround for this, I listen for the event that I am interested
in and then try to force a selection using :

List elements =
UMLModeler.getUMLUIHelper().getSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ");
if(!elements.isEmpty()){
List selection = new ArrayList();
selection.add(elements.get(0));
UMLModeler.getUMLUIHelper().setSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ",
selection);

However this still does not trigger a refresh of the Properties view tab
list.
Any help would be gratefully received.
Re: properties view tab refresh [message #467914 is a reply to message #467902] Mon, 03 August 2009 11:26 Go to previous message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
John,

The reason why your workaround does not work is probably that you
programmatically select the exact same element that already _is_ selected.
This will not fire a selection event and thus will not update the properties
view.

I think I ran into the same problem a long time ago and filed this bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=202199 . This hasn't been
fixed, and I actually also have no working workaround :-(

Regards,
Achim

John wrote:

> Hi, Have discovered from other discussion on this forum that the
> Properties view tab list is only refreshed when an element is selected!!!!
>
> So as a workaround for this, I listen for the event that I am interested
> in and then try to force a selection using :
>
> List elements =
>
UMLModeler.getUMLUIHelper().getSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ");
> if(!elements.isEmpty()){
> List selection = new ArrayList();
> selection.add(elements.get(0));
>
UMLModeler.getUMLUIHelper().setSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ",
> selection);
>
> However this still does not trigger a refresh of the Properties view tab
> list.
> Any help would be gratefully received.
Re: properties view tab refresh [message #621294 is a reply to message #461199] Mon, 03 August 2009 10:57 Go to previous message
John  is currently offline John Friend
Messages: 10
Registered: August 2009
Junior Member
Hi, Have discovered from other discussion on this forum that the
Properties view tab list is only refreshed when an element is selected!!!!

So as a workaround for this, I listen for the event that I am interested
in and then try to force a selection using :

List elements =
UMLModeler.getUMLUIHelper().getSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ");
if(!elements.isEmpty()){
List selection = new ArrayList();
selection.add(elements.get(0));
UMLModeler.getUMLUIHelper().setSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ",
selection);

However this still does not trigger a refresh of the Properties view tab
list.
Any help would be gratefully received.
Re: properties view tab refresh [message #621295 is a reply to message #467902] Mon, 03 August 2009 11:26 Go to previous message
Achim Demelt is currently offline Achim DemeltFriend
Messages: 160
Registered: July 2009
Senior Member
John,

The reason why your workaround does not work is probably that you
programmatically select the exact same element that already _is_ selected.
This will not fire a selection event and thus will not update the properties
view.

I think I ran into the same problem a long time ago and filed this bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=202199 . This hasn't been
fixed, and I actually also have no working workaround :-(

Regards,
Achim

John wrote:

> Hi, Have discovered from other discussion on this forum that the
> Properties view tab list is only refreshed when an element is selected!!!!
>
> So as a workaround for this, I listen for the event that I am interested
> in and then try to force a selection using :
>
> List elements =
>
UMLModeler.getUMLUIHelper().getSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ");
> if(!elements.isEmpty()){
> List selection = new ArrayList();
> selection.add(elements.get(0));
>
UMLModeler.getUMLUIHelper().setSelectedElements("org.eclipse.ui.navigator.ProjectExplorer ",
> selection);
>
> However this still does not trigger a refresh of the Properties view tab
> list.
> Any help would be gratefully received.
Previous Topic:properties view tab refresh
Next Topic:MWE Interim Update issue
Goto Forum:
  


Current Time: Mon Feb 26 21:47:07 GMT 2024

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

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

Back to the top