Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 316303 - [Compatibility] turn actionSets into MenuContributions
Summary: [Compatibility] turn actionSets into MenuContributions
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.0 RC1   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 316304
  Show dependency tree
 
Reported: 2010-06-09 10:06 EDT by Paul Webster CLA
Modified: 2019-07-12 17:36 EDT (History)
3 users (show)

See Also:


Attachments
ActionSets v01 (draft) (34.17 KB, patch)
2010-06-14 20:30 EDT, Paul Webster CLA
no flags Details | Diff
ActionSets v02 (draft) (22.00 KB, patch)
2010-06-15 19:11 EDT, Paul Webster CLA
no flags Details | Diff
actionSet visibleWhen v02 (draft) (14.12 KB, patch)
2010-06-17 20:51 EDT, Paul Webster CLA
no flags Details | Diff
actionSet visibleWhen v03 (15.62 KB, text/plain)
2010-06-24 14:50 EDT, Paul Webster CLA
no flags Details
actionSet visibleWhen v04 (draft) (11.62 KB, patch)
2010-06-25 16:07 EDT, Paul Webster CLA
no flags Details | Diff
actionSet visibleWhen v05 (28.65 KB, patch)
2010-06-27 10:55 EDT, Paul Webster CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Webster CLA 2010-06-09 10:06:35 EDT
We need to read in actionSets and create one or more e4 MenuContributions per actionSet.

Then hook up actionSet management (by using the EContextService and IDs).

Figure out a way to update the main menu bar when an actionSet becomes visible/invisible.

PW
Comment 1 Paul Webster CLA 2010-06-14 20:30:42 EDT
Created attachment 171886 [details]
ActionSets v01 (draft)

I can see the actionSet EP now, and generate my internal objects ... translating them into MenuContributions will be more ... uh, difficult.

PW
Comment 2 Paul Webster CLA 2010-06-15 19:11:48 EDT
Created attachment 172005 [details]
ActionSets v02 (draft)

work in progress.

This turns the menuContributions with popup: or menu: and the actionSets into MMenuContributions.

Then it applies a merging algorithm to them to condense them down from a large number.

PW
Comment 3 Paul Webster CLA 2010-06-17 20:50:08 EDT
(In reply to comment #2)
> Created an attachment (id=172005) [details]
> ActionSets v02 (draft)

Committed.

PW
Comment 4 Paul Webster CLA 2010-06-17 20:51:42 EDT
Created attachment 172179 [details]
actionSet visibleWhen v02 (draft)

This applies the visibleWhen logic to actionSets.  The perspective needs to activate contexts equivalent to the actionSet IDs.  Then the menu items should appear while in that perspective.

They're not quite there yet.

PW
Comment 5 Remy Suen CLA 2010-06-18 10:00:33 EDT
actionSet contributions to a window's menu bar should now be visible on the first startup with no deltas.xml.
Comment 6 Paul Webster CLA 2010-06-21 13:36:31 EDT
Action sets aren't fully supported until perspectives can specify which actionSets they support.

3 options come to mind:

1) tag it: require tags like "actionSet:the.id" and scan them, parse them, activate them.

2) model it: Add something to MPerspective to hold the IDs

3) activate binding contexts, which also manage actionSet visibility.

PW
Comment 7 Paul Webster CLA 2010-06-24 14:50:28 EDT
Created attachment 172665 [details]
actionSet visibleWhen v03
Comment 8 Paul Webster CLA 2010-06-25 16:07:01 EDT
Created attachment 172806 [details]
actionSet visibleWhen v04 (draft)

The is working on the main menu bar (and toolbar contributions).  Work in progress.

PW
Comment 9 Paul Webster CLA 2010-06-27 10:55:44 EDT
Created attachment 172855 [details]
actionSet visibleWhen v05

The main menu bar is now filled on startup.  all of its contributions have RATs that try and update their visibility.  The initial visibility seems good.  But switching to the CVS Repo perspective doesn't make Run disappear or CVS menu suddenly show up yet.

Released.


PW
Comment 10 Paul Webster CLA 2010-06-27 15:59:43 EDT
toolbar contributions now work the same way as menu contributions.

trim contributions will need a little more thought.  I believe they simply need to be broken up ... i.e. TrimContribution contributes empty MToolBars, and the toolbar contents come from MToolBarContributions.  The trim renderer will fill in trim children (i.e. toolbars) and the toolbar renderer will fill in toolbar children (tool items, for the most part).

PW
Comment 11 Paul Webster CLA 2010-06-28 13:34:44 EDT
Each area is now simpler: Trim contributions to contribute to the trim, toolbar contributions to contribute to toolbars in the trim or parts.

I have 2 presentation toolbars that need to resolve to one.

I also don't have a CVS menu when I switch to the CVS Repo perspective.

PW
Comment 12 Paul Webster CLA 2010-07-05 07:51:00 EDT
.