e4 compat layer and programmatic Action contributions. [message #1106568] |
Wed, 11 September 2013 05:06  |
Eclipse User |
|
|
|
Hi,
I am migrating an RCP to build against Kepler. I include the
org.eclipse.rcp feature, which I understand includes the e4 compat.
layer. The RCP works, plugin.xml like perspectives and views come-up
nicely. However, I have some code in an ActionBarAdvisor which calls
fillActionBars() where I register
.....
register(ActionFactory.INTRO.create(window));
The IntroAction's constructor calls this:
IntroDescriptor introDescriptor = ((Workbench) workbenchWindow
.getWorkbench()).getIntroDescriptor();
which returns null and leads to an NPE subsequently.
Now, I presume this is all very old style and I guess not supported by
the e4 compat. layer. I am just seeking confirmation for this.
Also, I would like to hear about the alternatives for migrating the
actions[1] or better make these Actions work with a Kepler RCP .
Thank You,
Christophe
[1] See my makeActions(...) method for all the registered actions:
prefAction = ActionFactory.PREFERENCES.create(window);
aboutAction = ActionFactory.ABOUT.create(window);
helpAction = ActionFactory.HELP_CONTENTS.create(window);
saveAction = ActionFactory.SAVE.create(window);
perspectivesMenu = ContributionItemFactory.PERSPECTIVES_SHORTLIST
.create(window);
viewsMenu = ContributionItemFactory.VIEWS_SHORTLIST.create(window);
getAction(ActionFactory.SAVE.getId());
register(prefAction);
register(aboutAction);
register(helpAction);
register(ActionFactory.INTRO.create(window));
register(ActionFactory.EDIT_ACTION_SETS.create(window));
register(ActionFactory.NEW.create(window));
register(ActionFactory.SAVE.create(window));
register(ActionFactory.SAVE_AS.create(window));
register(ActionFactory.SAVE_ALL.create(window));
register(ActionFactory.UNDO.create(window));
register(ActionFactory.REDO.create(window));
register(ActionFactory.CUT.create(window));
register(ActionFactory.COPY.create(window));
register(ActionFactory.PASTE.create(window));
register(ActionFactory.DELETE.create(window));
register(ActionFactory.SELECT_ALL.create(window));
// register(ActionFactory.PRINT.create(window));
register(ActionFactory.IMPORT.create(window));
register(ActionFactory.EXPORT.create(window));
register(ActionFactory.CLOSE.create(window));
register(ActionFactory.CLOSE_ALL.create(window));
register(ActionFactory.QUIT.create(window));
|
|
|
|
|
Re: [Solved]Re: e4 compat layer and programmatic Action contributions. [message #1117251 is a reply to message #1115933] |
Thu, 26 September 2013 04:40  |
Eclipse User |
|
|
|
On 24-09-13 21:48, Eric Moffatt wrote:
> Christophe, thanks for the input. For me the deciding factor of whether
> to open a defect is whether this code would work in 3.8 (my guess is
> 'yes'...;) and if it does then please open a defect stating that this is
> a regression...
>
Well, I went from 3.7 to 4.3 (Yep, quiet a hop), so I don't know about
3.8. For 3.7 it did work, but that was pre-e4.
|
|
|
Powered by
FUDForum. Page generated in 0.03564 seconds