Bug 84734 - [Contributions] [RCP] widgets: Status line should support contributions independent from parts
Summary: [Contributions] [RCP] widgets: Status line should support contributions indep...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement with 3 votes (vote)
Target Milestone: 3.3   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
: 47849 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-08 15:32 EST by Pascal Rapicault CLA
Modified: 2007-06-21 21:24 EDT (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2005-02-08 15:32:12 EST
 
Comment 1 Nick Edgar CLA 2005-02-09 15:51:21 EST
It's currently only possible to add to the status line from editors, views, and
the application's action bar advisor.

It should be possible to add to the status line independently from views and
editors, and without having to hardwire the contribution into the advisor.

The way action sets can add to the menus and toolbars provides a good model.
In fact, piggy-backing on the action set mechanism would afford a fair bit of
flexibility, since action sets can be associated with perspectives and parts,
filtered by activities, etc.
Comment 2 Nick Edgar CLA 2005-02-09 15:51:35 EST
*** Bug 47849 has been marked as a duplicate of this bug. ***
Comment 3 Nick Edgar CLA 2005-02-09 15:53:55 EST
(The RCP tag is there because RCP apps tend to push on this more than the IDE
use cases, though bug 47849 is a good example from the IDE stack.)

I know improvements here are being considered under the new commands support, so
piggybacking on action sets may not be the best choice, but whatever we do, we
shold allow the same kind of flexibility as action sets have.
Comment 4 B. Chen CLA 2005-02-09 16:29:36 EST
Is there a workaround at this point?
Comment 5 Nick Edgar CLA 2005-02-09 16:44:25 EST
One workaround would be for the app to roll its own extension point, and manage
contributions from the workbench advisor.  
Classes on the extension point could implement something like:
interface IStatusLineContributor {
  void fillStatusLine(IStatusLineManager);
}

The advisor could create a SubActionBars for each contributor, which wrappers
the main action bars.  activate() / deactivate() on the SubActionBars instance
can then be used to show/hide the contributions depending on context.

This approach means that all contributing plugins will be activated eagerly
though, but that's probably necessary in the case of status line contributions.
 They're more likely to be creating interesting controls, rather than just
actions that that can be described declaratively then activated for real later.
Comment 6 Ed Burnette CLA 2005-11-03 10:16:10 EST
Is this covered by bug 36968 ?
Comment 7 Michael Van Meekeren CLA 2006-04-21 13:56:49 EDT
Moving Dougs bugs
Comment 8 Paul Webster CLA 2007-04-05 19:03:58 EDT
Assigning to component owner
PW
Comment 9 Paul Webster CLA 2007-06-21 10:45:23 EDT
This item has been fixed/superceded by the menu contribution mechanism - bug 154130

Menu contributions allow controls to be contributed to trim and the status line.
PW
Comment 10 Ian Leslie CLA 2007-06-21 19:36:00 EDT
The bug referenced in comment #9 (bug 154130) is not fixed and also not scheduled to be fixed.  You spoke with authority that work has been done to address this - was it simply the wrong bug number?
Comment 11 Paul Webster CLA 2007-06-21 21:24:13 EDT
(In reply to comment #10)
> The bug referenced in comment #9 (bug 154130) is not fixed and also not
> scheduled to be fixed.  You spoke with authority that work has been done to
> address this - was it simply the wrong bug number?

Sorry, Ian, that bug (despite some of the rambling and randmo patches) the plan item for the menu contribution work (I know, not obvious).  It includes the new menus API as well as the work done in the org.eclipse.ui.menus extension point.  It covers the work that would allow an arbitrary control to be added to the status line that would not be tied to a view or editor.

There is more information available at http://wiki.eclipse.org/Menu_Contributions

PW