Bug 239494 - [api] [templates] allow another entry point for template wizards
Summary: [api] [templates] allow another entry point for template wizards
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M5   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks: 257949
  Show dependency tree
 
Reported: 2008-07-03 13:49 EDT by David Cummings CLA
Modified: 2009-01-30 08:05 EST (History)
8 users (show)

See Also:


Attachments
Work in Progress (19.85 KB, patch)
2008-12-19 15:29 EST, Curtis Windatt CLA
no flags Details | Diff
mylyn/context/zip (31.20 KB, application/octet-stream)
2008-12-19 15:30 EST, Curtis Windatt CLA
no flags Details
Fix (38.13 KB, patch)
2009-01-02 17:40 EST, Curtis Windatt CLA
no flags Details | Diff
mylyn/context/zip (136.32 KB, application/octet-stream)
2009-01-02 17:40 EST, Curtis Windatt CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Cummings CLA 2008-07-03 13:49:59 EDT
The new plug-in wizard provides the ability to contribute templates to aid the user when developing specific types of plug-ins.  This template selection is performed on the third page of the plug-in wizard, once the user has entered details regarding their plug-in.  The template contributes additional pages in which the user can enter additional details for their plug-in.  These details are incorporated into the plug-in by the template during the plug-in creation process.

In certain cases, the plug-in wizard isn't the desired entry point into this workflow.  In order to make a specific plug-in template more visible and discoverable, it is desirable to have the template appear in the new project wizard.

This can currently be accomplished by re-contributing the plug-in wizard class to the new project wizard extension point using a different label, description, icon etc.  This has its limitations though:
1) The contribution references an internal class (NewPluginProjectWizard)
2) The user is still forced to choose from a list of templates (e.g. the TemplateListSelectionPage still appears in the wizard)

It would be ideal if a mechanism could be provided to allow the contribution of a new wizard which provides the same capabilities as the new plug-in wizard, but with a specific template in mind.  In this workflow, the user wouldn't need to select a template from the list of templates, invoking the specific wizard would indicate which template is selected.

One considered approach would be to provide a plug-in wizard class that:
1) Is a non-internal implementation that can be extended by other wizards who wish to provide the same functionality of the new plug-in wizard
2) Provides a method which can be overriden to indicate which template(s) (by ID) are to be shown in the list of selected templates.  If a single template is provided, then the template selection page does not appear as the user navigates the wizard.
Comment 1 Chris Aniszczyk CLA 2008-09-22 11:57:35 EDT
If anyone is willing to work on this, the PDE team is glad to lend a helping hand in getting patches ready for inclusion.

This is a reasonable request.
Comment 2 Curtis Windatt CLA 2008-10-31 12:44:25 EDT
Will investigate for 3.5.
Comment 3 Curtis Windatt CLA 2008-12-19 15:29:55 EST
Created attachment 120976 [details]
Work in Progress
Comment 4 Curtis Windatt CLA 2008-12-19 15:30:00 EST
Created attachment 120977 [details]
mylyn/context/zip
Comment 5 Curtis Windatt CLA 2009-01-02 17:40:21 EST
Created attachment 121438 [details]
Fix
Comment 6 Curtis Windatt CLA 2009-01-02 17:40:27 EST
Created attachment 121439 [details]
mylyn/context/zip
Comment 7 Curtis Windatt CLA 2009-01-06 11:29:35 EST
Updated copyrights and applied the fix to HEAD.  The new API is a single abstract class, NewPluginProjectFromTemplateWizard.  By extending this class and implementing the abstract getTemplateID() method you will have a custom new project wizard.

Templates have flags specifying some requirements for the project (java projects, ui content, rcp, etc).  The wizard's pages will disable the UI options associated with the flags if the template has set them to true/false.

It would be very helpful to get some feedback on this API as soon as possible so we can make any modifications before API freeze.
Comment 8 Curtis Windatt CLA 2009-01-22 14:13:39 EST
Fixed for M5.

Still looking to get feedback on the API before the M6 freeze.
Comment 9 Anthony Hunter CLA 2009-01-29 12:15:44 EST
Hi Curtis, thanks for the API.

David Cummings is no longer with us. Michelle Crane is the developer in charge of adopting this API, but she does not have a Bugzilla account (yet).

We are adopting the API and will confirm it works for us. 
Comment 10 Michelle Crane CLA 2009-01-30 08:05:59 EST
The new Wizard API works as requested.  Thanks.