Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » contribute to status line
contribute to status line [message #328127] Wed, 14 May 2008 15:55 Go to next message
Eclipse UserFriend
Hi there,

I try to contribute some simple text to the status line.
I wrote a little plugin without any view, it shall simply write the
current mouse cursor position to the status line.

I tried to get some valid StatusLineManager but the only way I can get
it seems to be via a view. I don't have a view, so I try to search for
any resp. all ones:

IViewReference views[] =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getViewReferences();
for (int i = 0; i < views.length; i++) {
IStatusLineManager line =
views[i].getView(false).getViewSite().getActionBars().getSta tusLineManager();
line.setMessage(msg);
line.update(true);
}

This is really ugly. Is there no straight forward way to contribute to
the status line without access to a certain view?

Best regards,
Hauke
Re: contribute to status line [message #328915 is a reply to message #328127] Fri, 06 June 2008 13:27 Go to previous message
Eclipse UserFriend
Hauke Fuhrmann wrote:
>
> This is really ugly. Is there no straight forward way to contribute to
> the status line without access to a certain view?


No. The active part will set the status line (i.e. whatever you have
done will be overwritten the next time the active part changes).

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

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Previous Topic:Confused with actions
Next Topic:Getting Key Bindings to work with Text Widget in Coolbar
Goto Forum:
  


Current Time: Wed Apr 16 10:07:24 EDT 2025

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

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

Back to the top