Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Global IStatusLineManager.setMessage(...)
Global IStatusLineManager.setMessage(...) [message #753670] Fri, 28 October 2011 09:49 Go to next message
thomasr Missing name is currently offline thomasr Missing nameFriend
Messages: 6
Registered: December 2010
Junior Member

I know this topic has been discussed several times now, but I'm not able to find any satisfying solution.
The question is : how can I put Eclipse Statusline messages to the UI without losing them by switching between views ?

In fact I'm using the statusline to display some main log entries (like 'loading of document blabla complete') which mostly are done by asynchronous actions in my application. So I really dont wanna to tie the Statusline to any view or editor. Messages in the statusline should be set from somewhere and should stay as long they aint overwritten. Actually a simple request, istnt it ?

Well, since thats not the reality with IStatusLineManager.setMessage(...) I've currently developed the following really really ugly workaround...

I've created a singleton class called MyStatusLineManager, which manages the actual IStatusLineManager. It provides the me with the methodes sendMessage(String) and sendErrorMessage(String), both methode cache the last String I sent to the Statusline, additionally there's a resendLastMessage() which re-sents the last Status String. Then in any view/editor, I'm utilizing the setFocus() methodes and trigger the MyStatusLineManager.getInstance().resendLastMessage().
Looks like the opposite of being smart, doesnt it? But since IStatusLineManager is unnecessarily tied to a view, this was the only option I found. But it has weeknesses, since on some occasions I see old status messages even if new should have been written. Might be related to the setFocus behaviour of editors, I havent done problem determination in detail yet. So this approach is not only ugly, its unreliable too.

Adding a Label to the Statusline and use this also doesnt help. I want to place it to the very bottom-left of the Statusline, but that space is reserved for the actual StatusMessages.

So I really like to use IStatusLineManager, but I wanna keep its contents when views/editors are changed.

Is there a way to do what I'm looking for ?

Thanks a lot in advance
Re: Global IStatusLineManager.setMessage(...) [message #753672 is a reply to message #753670] Fri, 28 October 2011 09:54 Go to previous message
thomasr Missing name is currently offline thomasr Missing nameFriend
Messages: 6
Registered: December 2010
Junior Member

I've found the following advice here:

"You can put your own status label in the trim using the
org.eclipse.ui.menus extension point, however, available from 3.3 onwards."

Can someone explain what to do exactly ?
Is that an approach to re-utilize the StatusMessage area in the StatusBar ?
Previous Topic:How to add parameters to CommandContributionItemParameter
Next Topic:ECLIPSE linked mode
Goto Forum:

Current Time: Sun Sep 27 17:44:11 GMT 2020

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

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

Back to the top