How to contibute an item to the status line that's shared by all editors / views?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to contibute an item to the status line that's shared by all editors / views?

Nathan Ridge
Hi there,

I'm writing a plugin and I would like it to contribute an item (status field) to the status line that's "global", i.e. not specific to a particular editor or view.

The existing contributions to the status line that I could find are done via EditorActionBarContributor, but those are specific to an editor.

I was able to get it to work by using either WorkbenchPage.getActionBars().getStatusLineManager() or WorkbenchWindow.getStatusLineManager() to access the window's global status line manager, but neither of those is public API. Is there a supported, public-API way to contribute to the global status line?

Thanks,
Nate
_______________________________________________
platform-ui-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev
Reply | Threaded
Open this post in threaded view
|

Re: How to contibute an item to the status line that's shared by all editors / views?

Brian de Alwis-3
Hi Nate.

You can add a contribution to the org.eclipse.ui.trim.status area.  You can add a workbench control contribution too.

   <extension
         point="org.eclipse.ui.menus">
     <menuContribution
            locationURI="toolbar:org.eclipse.ui.trim.status?after=additions">
        <toolbar
               id="foo.bar">
           <command
                 commandId="random.command"
                 id="random.status.id">
           </command>
        </toolbar>
     </menuContribution>
   </extension>

Brian.

On 7-Jul-2018, at 11:43 PM, Nathan Ridge <[hidden email]> wrote:

Hi there,

I'm writing a plugin and I would like it to contribute an item (status field) to the status line that's "global", i.e. not specific to a particular editor or view.

The existing contributions to the status line that I could find are done via EditorActionBarContributor, but those are specific to an editor.

I was able to get it to work by using either WorkbenchPage.getActionBars().getStatusLineManager() or WorkbenchWindow.getStatusLineManager() to access the window's global status line manager, but neither of those is public API. Is there a supported, public-API way to contribute to the global status line?

Thanks,
Nate
_______________________________________________
platform-ui-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev


_______________________________________________
platform-ui-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-ui-dev