Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to get StatusLineManager...my plug-in does not have a ViewPart
How to get StatusLineManager...my plug-in does not have a ViewPart [message #326018] Wed, 05 March 2008 21:45 Go to next message
Eclipse UserFriend
Originally posted by: james.towers.siemens.com

Hello all,

I would like to contribute to the StatusLine. I would like my StatusLine
contribution to be seen in all views. So I need to contribute to the
StatusLineManager. Is there an easy way to get the StatusLineManager? My
plug-in is a utility plug-in. It does not have a ViewPart.

I have tried the code below. I get the desired behavior but I think there
should be a better way.

Thanks,
Jim

IStatusLineManager slMan =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getViewReferences()[0].getView(false).getViewSite() .getActionBars().getStatusLineManager();



if (slMan instanceof SubStatusLineManager )

{

SubStatusLineManager sub = (SubStatusLineManager) slMan;

slMan = (IStatusLineManager)sub.getParent();

}
Re: How to get StatusLineManager...my plug-in does not have a ViewPart [message #326076 is a reply to message #326018] Fri, 07 March 2008 00:18 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

James Towers wrote:
> Hello all,
>
> I would like to contribute to the StatusLine. I would like my StatusLine
> contribution to be seen in all views. So I need to contribute to the
> StatusLineManager. Is there an easy way to get the StatusLineManager? My
> plug-in is a utility plug-in. It does not have a ViewPart.

The status line manager in eclipse is specifically designed to show each
active part's status (which means global access is not available).

In 3.3.x you can use org.eclipse.ui.menus to contribute a control, where
you can provide your own status line/label/icon/control.

Later,
PW


--
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


Re: How to get StatusLineManager...my plug-in does not have a ViewPart [message #326235 is a reply to message #326076] Wed, 12 March 2008 14:25 Go to previous message
Eclipse UserFriend
Originally posted by: james.towers.siemens.com

Thanks Paul.

"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:fqq1dn$asp$2@build.eclipse.org...
> James Towers wrote:
>> Hello all,
>>
>> I would like to contribute to the StatusLine. I would like my StatusLine
>> contribution to be seen in all views. So I need to contribute to the
>> StatusLineManager. Is there an easy way to get the StatusLineManager?
>> My plug-in is a utility plug-in. It does not have a ViewPart.
>
> The status line manager in eclipse is specifically designed to show each
> active part's status (which means global access is not available).
>
> In 3.3.x you can use org.eclipse.ui.menus to contribute a control, where
> you can provide your own status line/label/icon/control.
>
> Later,
> PW
>
>
> --
> 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:JUnit and Plugins
Next Topic:non-blinking cursor
Goto Forum:
  


Current Time: Sat Nov 09 03:29:42 GMT 2024

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

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

Back to the top