Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 412739 - [Wizards] newWizardShortcut extension point not contributing to e4 perspective.
Summary: [Wizards] newWizardShortcut extension point not contributing to e4 perspective.
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-11 06:02 EDT by Sumit Singh CLA
Modified: 2020-01-14 09:26 EST (History)
3 users (show)

See Also:


Attachments
plugin.xml (1.33 KB, text/xml)
2013-07-12 04:52 EDT, Sumit Singh CLA
no flags Details
Workaround (43.67 KB, image/png)
2013-11-13 08:37 EST, Sumit Singh CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sumit Singh CLA 2013-07-11 06:02:17 EDT
I'm working in e4 RCP application with compatibility.

I have lets say "TestE4Perspective" as pure e4 perspective and  debug perspective from platform.
 
I created one Wizard and through perspectiveExtensions extension point i'm contributing newWizardShortcut for my both the perspectives but
 wizard is only showing for debug perspective, its not showing for  "TestE4Perspective" perspective which is pure e4 perspective.
Comment 1 Eric Moffatt CLA 2013-07-11 15:52:19 EDT
Can you attach the XML for your perspective extension ? Don't need the code, I'll roll my own..;-).
Comment 2 Sumit Singh CLA 2013-07-12 04:52:38 EDT
Created attachment 233411 [details]
plugin.xml

@Eric Moffatt  yeah sure. :)
Please find the attachment.

This plugin.xml is responsible for creating wizard and adding newWizardShortcut into different-2 perspective.
Comment 3 Paul Webster CLA 2013-07-18 14:12:38 EDT
The legacy Perspective factory adds the new wizard shortcuts using org.eclipse.ui.internal.e4.compatibility.ModeledPageLayout.addNewWizardShortcut(String) from org.eclipse.ui.internal.PerspectiveExtensionReader.processWizardShortcut(IConfigurationElement)

If you create a perspective using Eclipse4 only (either your model or through fragments) it won't get the new wizard shortcuts applied.

PW
Comment 4 Sumit Singh CLA 2013-11-13 08:36:50 EST
Hi Paul Webster ,

Just for information may be you already know. 
If perspective is pure E4 then we can add our newWizardShortcut by adding 
 following in Tags of supplementary  option in .e4xmi.

   persp.newWizSC:your-wizard-id

please see the attached Image if any doubt. 

But I think its a workaround only.?
Comment 5 Sumit Singh CLA 2013-11-13 08:37:54 EST
Created attachment 237425 [details]
Workaround
Comment 6 Paul Webster CLA 2013-11-15 14:29:02 EST
(In reply to sumit singh from comment #4)
> 
>    persp.newWizSC:your-wizard-id
> 
> please see the attached Image if any doubt. 
> 
> But I think its a workaround only.?

Yes, that should work for now but it is only a workaround (since persp.newWizSC is an internal constant that might change in the future).

PW
Comment 7 Dmitry Spiridenok CLA 2014-04-01 15:09:32 EDT
I have the same problem when I want to add an existing Eclipse wizard to an existing Eclipse perspective (like Plugin Development Perspective). To me it looks like NewWizardShortcut extension point tag is broken in Luna...

Looking in the code I found something strange that I would like somebody to comment on. In WorkbenchPage::extendPerspectives() function only "actionSet" tag is set for the perspective reader. As the result of that PerspectiveExtensionReader::processExtension() ignores all extension point tags because they are not in the list of PerspectiveExtensionReader::includeTag() function. 

So it seems that the most of the tags (like TAG_NEW_WIZARD_SHORTCUT that is needed for the wizard shortcut tag to work) are just ignored.

If I change the code in WorkbenchPage.java, line 2742 from: reader.setIncludeOnlyTags(new String[] { IWorkbenchRegistryConstants.TAG_ACTION_SET });

to 

reader.setIncludeOnlyTags(new String[] { IWorkbenchRegistryConstants.TAG_ACTION_SET,
IWorkbenchRegistryConstants.TAG_NEW_WIZARD_SHORTCUT });

I do get my wizard shortcut in the required perspective.

Please comment whether it would make any sense to fix the problem in this way. If it would I'm ready to submit a patch for that.

Otherwise please explain why this fix is not desired and which other class should be changed for that.
Comment 8 Paul Webster CLA 2014-04-04 14:26:33 EDT
(In reply to Dmitry Spiridenok from comment #7)
> I have the same problem when I want to add an existing Eclipse wizard to an
> existing Eclipse perspective (like Plugin Development Perspective). To me it
> looks like NewWizardShortcut extension point tag is broken in Luna...

This is different (as this involves the compat layer) and the original bug is about no compat layer.

PW
Comment 9 Paul Webster CLA 2014-04-04 14:27:10 EDT
(In reply to Paul Webster from comment #8)
> (In reply to Dmitry Spiridenok from comment #7)
> > I have the same problem when I want to add an existing Eclipse wizard to an
> > existing Eclipse perspective (like Plugin Development Perspective). To me it
> > looks like NewWizardShortcut extension point tag is broken in Luna...
> 
> This is different (as this involves the compat layer) and the original bug
> is about no compat layer.

Sorry, and I should have included please open a new bug and we can look into it.

PW
Comment 10 Dmitry Spiridenok CLA 2014-04-22 10:27:45 EDT
(In reply to Paul Webster from comment #9)
> (In reply to Paul Webster from comment #8)
> 
> Sorry, and I should have included please open a new bug and we can look into
> it.
> 
> PW

Submitted a new bug for that: https://bugs.eclipse.org/433215
Comment 11 Dmitry Spiridenok CLA 2014-04-24 05:07:07 EDT
(In reply to sumit singh from comment #0)
> I'm working in e4 RCP application with compatibility.
> 
> I have lets say "TestE4Perspective" as pure e4 perspective and  debug
> perspective from platform.
>  
> I created one Wizard and through perspectiveExtensions extension point i'm
> contributing newWizardShortcut for my both the perspectives but
>  wizard is only showing for debug perspective, its not showing for 
> "TestE4Perspective" perspective which is pure e4 perspective.

Dear Sumit,

Would it be possible for you to create and upload a simple example project which would be just small enough to reproduce the problem? Such an example project does not need to have any proprietary information or real implementation, just to be good enough to reproduce the problem at hand.

Such a project would help me a lot in solving this problem.

Thanks in advance!
Comment 12 Eclipse Genie CLA 2020-01-14 09:26:02 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.