Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Force Eclipse to update Status Bar
Force Eclipse to update Status Bar [message #1700515] Fri, 03 July 2015 07:50
Pawel Nowak is currently offline Pawel NowakFriend
Messages: 2
Registered: July 2015
Junior Member
I'm working on Eclipse plugin and I add an action to the statusbar by
ToolBarManager manager = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL); 
manager.add(updatingNewsAction);


However I've got problem with removing the updatingNewsAction from the toolbar. It's removed, but I can see that only when something updates the statusbar - for example minimazing/maximazing the borderline views. Then after reading some blog post I've wrote:

PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
        @Override
        public void run() {

            IWorkbench wb = PlatformUI.getWorkbench();
            IWorkbenchWindow win = wb.getActiveWorkbenchWindow();

            IWorkbenchPage page = win.getActivePage();

            IWorkbenchPart part = page.getActivePart();
            IWorkbenchPartSite site = part.getSite();

            IViewSite vSite = (IViewSite) site;

            IActionBars actionBars = vSite.getActionBars();

            if (actionBars == null) {
                return;
            }
            IStatusLineManager statusLineManager = actionBars.getStatusLineManager();

            if (statusLineManager == null) {
                return;
            }
            statusLineManager.update(true);
        }
    });


Which is a step forward, because it gets updated when switching focus between views, but still it doesn't happen immediately and without user interactions. How to update the status bar programmatically immediately?
Previous Topic:Need help
Next Topic:getting started
Goto Forum:
  


Current Time: Wed Sep 18 05:43:34 GMT 2019

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

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

Back to the top