Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » contribute to status line
contribute to status line [message #328127] Wed, 14 May 2008 19:55 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
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 17:27 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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: Sat Dec 21 12:38:14 GMT 2024

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

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

Back to the top