Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to refresh title bar
How to refresh title bar [message #171554] Tue, 05 February 2008 17:11 Go to next message
Eclipse UserFriend
Originally posted by: mcervera.integranova.com

Hello.

I've discovered that, when modifying the name of an element through the
properties tab, the title bar of the TabbedPropertySheetPage is not
refreshed (this is happening in all the editors that my group is
developing). Does anyone know how to refresh it? All the methods to do
so are private. Any help would be much appreciated.

Thanks in advance.

Mario
Re: How to refresh title bar [message #171700 is a reply to message #171554] Wed, 06 February 2008 20:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vinsarwate.rediffmail.com

Not sure if this is correct way of doing it or not but please have a look
at org.eclipse.gmf.runtime.common.ui.util.PropertySheetUtil class. The
getCurrentPropertySheetPage() method of this class will provide you code
to retrieve current property sheet page. Once you have this page, you can
refresh title bar in following way -

IPage page = getCurrentPropertySheetPage();
if(page instanceof TabbedPropertySheetPage){
((TabbedPropertySheetPage)page).labelProviderChanged( new
LabelProviderChangedEvent(new LabelProvider()));
}

Actually labelProviderChanged() of TabbedPropertySheetPage class simply
calls refreshTitleBar() method which refresh the title bar.

Hope this helps.
Vinay
Re: How to refresh title bar [message #171724 is a reply to message #171700] Thu, 07 February 2008 10:54 Go to previous message
Eclipse UserFriend
Originally posted by: mcervera.integranova.com

Thanks a lot! It's been really useful. It solved my problem :D


Vinay escribió:
> Not sure if this is correct way of doing it or not but please have a
> look at org.eclipse.gmf.runtime.common.ui.util.PropertySheetUtil class.
> The getCurrentPropertySheetPage() method of this class will provide you
> code to retrieve current property sheet page. Once you have this page,
> you can refresh title bar in following way -
>
> IPage page = getCurrentPropertySheetPage();
> if(page instanceof TabbedPropertySheetPage){
> ((TabbedPropertySheetPage)page).labelProviderChanged( new
> LabelProviderChangedEvent(new LabelProvider()));
> }
>
> Actually labelProviderChanged() of TabbedPropertySheetPage class simply
> calls refreshTitleBar() method which refresh the title bar.
>
> Hope this helps.
> Vinay
>
Previous Topic:Multiple editparts - How to do it ?
Next Topic:Cancelling a Dialog opened in a Command
Goto Forum:
  


Current Time: Fri Apr 26 07:28:51 GMT 2024

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

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

Back to the top