How to get StatusLineManager...my plug-in does not have a ViewPart [message #326018] |
Wed, 05 March 2008 21:45 |
Eclipse User |
|
|
|
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();
}
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03812 seconds