plugins/org.symbian.tools.tmw.ui/src/org/symbian/tools/tmw/ui/project/NewApplicationWizard.java
equal
deleted
inserted
replaced
50 import org.symbian.tools.tmw.internal.ui.wizard.PageContributions; |
50 import org.symbian.tools.tmw.internal.ui.wizard.PageContributions; |
51 import org.symbian.tools.tmw.internal.ui.wizard.WizardContext; |
51 import org.symbian.tools.tmw.internal.ui.wizard.WizardContext; |
52 |
52 |
53 /** |
53 /** |
54 * This is the wizard that guides through new mobile application project creation. |
54 * This is the wizard that guides through new mobile application project creation. |
55 * |
55 * |
56 * @author Eugene Ostroukhov (eugeneo@symbian.org) |
56 * @author Eugene Ostroukhov (eugeneo@symbian.org) |
57 */ |
57 */ |
58 public final class NewApplicationWizard extends ModifyFacetedProjectWizard implements INewWizard { |
58 public final class NewApplicationWizard extends ModifyFacetedProjectWizard implements INewWizard { |
59 public static final String ID = "org.symbian.tools.tmw.newproject"; |
59 public static final String ID = "org.symbian.tools.tmw.newproject"; |
60 |
60 |
82 } |
82 } |
83 final IWizardPage facetsPage = new NewApplicationFacetsWizardPage(facets, getFacetedProjectWorkingCopy()); |
83 final IWizardPage facetsPage = new NewApplicationFacetsWizardPage(facets, getFacetedProjectWorkingCopy()); |
84 addPage(facetsPage); |
84 addPage(facetsPage); |
85 final IWizardPage templatesPage = new NewApplicationTemplateWizardPage(wizardContext, databindingContext); |
85 final IWizardPage templatesPage = new NewApplicationTemplateWizardPage(wizardContext, databindingContext); |
86 addPage(templatesPage); |
86 addPage(templatesPage); |
87 staticPages = new IWizardPage[3]; |
87 staticPages = new IWizardPage[] { firstPage, templatesPage, facetsPage }; |
88 staticPages[0] = firstPage; |
|
89 staticPages[1] = templatesPage; |
|
90 staticPages[2] = facetsPage; |
|
91 super.addPages(); |
88 super.addPages(); |
92 } |
89 } |
93 |
90 |
94 public boolean canFinish() { |
91 public boolean canFinish() { |
95 return getNextPage(getContainer().getCurrentPage()) == null && this.firstPage.isPageComplete() |
92 return getNextPage(getContainer().getCurrentPage()) == null && this.firstPage.isPageComplete() |
184 } |
181 } |
185 } |
182 } |
186 } |
183 } |
187 final IWizardPage[] base = super.getPages(); |
184 final IWizardPage[] base = super.getPages(); |
188 final IWizardPage[] pages = new IWizardPage[staticPages.length + templatePages.length]; |
185 final IWizardPage[] pages = new IWizardPage[staticPages.length + templatePages.length]; |
189 System.arraycopy(staticPages, 0, pages, 0, 3); |
186 System.arraycopy(staticPages, 0, pages, 0, staticPages.length); |
190 if (templatePages.length > 0) { |
187 if (templatePages.length > 0) { |
191 System.arraycopy(templatePages, 0, pages, 3, templatePages.length); |
188 System.arraycopy(templatePages, 0, pages, staticPages.length, templatePages.length); |
192 } |
189 } |
193 System.arraycopy(base, 0, pages, 2, base.length); |
190 System.arraycopy(base, 0, pages, 2, base.length); |
194 |
191 |
195 return pages; |
192 return pages; |
196 } |
193 } |