Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Persistent StatusLine
Persistent StatusLine [message #314727] Fri, 20 April 2007 13:45 Go to next message
Eclipse UserFriend
Originally posted by: michael.corr.sri.com

I have a simple RCP application with only 2 views. One has control buttons
(ControlView), the other is a console to display information. When a user
clicks on one of the control buttons, i'd like some summary state
information to be displayed in the StatusLine at the bottom of the
application.

However, I can only seem to get the statusline to appear when the view
with control buttons is in focus. If a user clicks on the other view, the
statusline disappears.

How can I get a text string to stay displayed in the StatusLine until I
explicitly clear it - regardless of which view is in focus?

I'm using the following code in my ControlView:

IStatusLineManager slm =
getViewSite().getActionBars().getStatusLineManager();
slm.setMessage("Process State: "+process.getState());

thanks,
Michael
Re: Persistent StatusLine [message #318727 is a reply to message #314727] Fri, 03 August 2007 03:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: elca.ch.spam.businger.ch

Hi,

I've got pretty much the same problem (only in my case it's 5 views and
x editors).

Michael Corr wrote:
> I have a simple RCP application with only 2 views. One has control
> buttons (ControlView), the other is a console to display information.
> When a user clicks on one of the control buttons, i'd like some summary
> state information to be displayed in the StatusLine at the bottom of the
> application.

Did you ever find a solution? Could you please share it with me/us?

So far my workarround would be to register every singel view/editor and
to set the message for every one of them, which would be realy ugly.

Thanx for your answer.
Dominik
Re: Persistent StatusLine [message #318916 is a reply to message #318727] Thu, 09 August 2007 04:22 Go to previous message
Eclipse UserFriend
Originally posted by: elca.ch.spam.businger.ch

Hi,

I didn't get any answer, but here's the solution I came up with:

I'm now adding a custom contribution item to the statusLineManager of
the workbenchWindow. This item is shown no matter which view, editor or
perspective is active in my application.

#### pseudo-code #######
// get the statusLineManager
window=((WorkbenchWindow)PlatformUI.getWorkbench().getActive WorkbenchWindow());
manager=window.getStatusLineManager();

// create the contributionItem with an id != null
item = createMyContributionItem(uniqueContributionItemId);

// add the item
manager.appendToGroup(manager.MIDDLE_GROUP,item);

....more code...

// replace the item
newItem = createOtherContributionItem(uniqueContributionItemId);
manager.replaceItem(uniqueContributionItemId,newItem);

....more code...

// get access to the item
manager.find(uniqueContributionItemId);

....more code...

// remove the item
manager.remove(uniqueContributionItemId);

....more code....

// refresh the statusLine after you're done making the changes.
manager.markDirty();
manager.update(true);
#### end pseudo-code #######

I hope this is useful for people with the same problem in the future.
Previous Topic:Highlight text in Editor
Next Topic:ProgressMonitorDialog error in 3.3
Goto Forum:
  


Current Time: Tue Jul 01 06:19:57 EDT 2025

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

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

Back to the top