Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Update Status Line from Perspective
Update Status Line from Perspective [message #117210] Wed, 27 August 2003 09:27 Go to next message
Eclipse UserFriend
Originally posted by: adamh.us.ibm.com

I would like my default perspective to open without any views and a
message set in the status line. Can someone help me with how I would
update the status line from my perspective class?

Thanks!
Re: Update Status Line from Perspective [message #117522 is a reply to message #117210] Wed, 27 August 2003 15:01 Go to previous message
Eclipse UserFriend
Writing to the status line can done by any view as follows:


myView.getViewSite().getActionBars().getStatusLineManager(). setMessage( "Hell
o");

Note that the status lines is shared by all views.
If focus changes to another view, its message is
posted on the status line. If the user returns to
myView, the message "Hello" is shown again.

Furthermore, read the documentation for setMessage for
the intricacies of combining it with calls to setErrorMessage.

If you have a long running process, you should use a progressMonitor:

public void workWithProgress() {
IActionBars actionBars = getViewSite().getActionBars();
IStatusLineManager statusLine = actionBars.getStatusLineManager();
IProgressMonitor progressMonitor = statusLine.getProgressMonitor();
progressMonitor.beginTask("Hello, here is my message",
IProgressMonitor.UNKNOWN);
progressMonitor.worked(1);
.... the actual work is done here...
progressMonitor.done();
}

If the amount of work to be done can be estimated ahead
of time, a more intelligent value can be passed to
beginTask and calls to worked can be used to provide
better progress feedback than a continues animation.

Chris Laffra

"Adam Hoover" <adamh@us.ibm.com> wrote in message
news:biibkm$fv7$1@eclipse.org...
> I would like my default perspective to open without any views and a
> message set in the status line. Can someone help me with how I would
> update the status line from my perspective class?
>
> Thanks!
>
Previous Topic:Wizard
Next Topic:"Device is disposed".. Where could I ask help
Goto Forum:
  


Current Time: Tue Jul 22 14:53:17 EDT 2025

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

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

Back to the top