|
|
Re: Status line will not update [message #465513 is a reply to message #465510] |
Fri, 30 March 2007 18:10 |
Eclipse User |
|
|
|
Originally posted by: lamont_gilbert.rigidsoftware.com
On Fri, 30 Mar 2007 17:53:09 +0000, Ian Leslie wrote:
> I am trying for the first time to display information on my RCP
> application's status line. The status line is visible (at least there is
> space for it an I see a vertical separator in the space) but when I try to
> set a message nothing happens. I am using Eclipse 3.2
>
> Here is the code from my WorkbenchWindowAdvisor that turns it on:
>
> public void preWindowOpen () {
> super.preWindowOpen ();
>
> IWorkbenchWindowConfigurer configurer = getWindowConfigurer ();
> configurer.setInitialSize (new Point (820, 680));
> configurer.setShowCoolBar (true);
> configurer.setShowStatusLine (true);
> configurer.setShowPerspectiveBar (true);
> configurer.setShowMenuBar (true);
> configurer.setShowProgressIndicator (true);
> configurer.setTitle (Messages.getString
> ("ApplicationWorkbenchWindowAdvisor.ApplicationName")); //$NON-NLS-1$
> }
>
>
> Then in my editor I have code that updates the status line when properties
> change. The code that does this looks like this:
> getEditorSite ().getActionBars ().getStatusLineManager ().setMessage
> (message);
>
> When I step into the setMessage method I see in the debugger that the
> isVisible call always returns false. But but but I see the status line.
>
> public void setMessage(String message) {
> this.messageImage = null;
> this.message = message;
> if (isVisible()) {
> getParentStatusLineManager().setMessage(message);
> }
> }
>
> Any advice or guidance would be appreciated.
>
> Thanks,
>
> Ian
It was all pretty confusing to me. in FillStatusLine of the
actionbaradvisor I add a contribution item like so
statusLine.insertBefore(StatusLineManager.END_GROUP, new
StatusLineContributionItem("MYID"));
statusLine.update(true);
then when I want to add data I get the status line manager and get the
contribution item
StatusLineSontributionItem si = manager.find("MYID");
si.setText("data");
hopefully you can fill in the blanks.
|
|
|
Powered by
FUDForum. Page generated in 0.03313 seconds