|
Lines 48-57
Link Here
|
| 48 |
import org.eclipse.cdt.ui.templateengine.TemplateEngineUI; |
48 |
import org.eclipse.cdt.ui.templateengine.TemplateEngineUI; |
| 49 |
import org.eclipse.cdt.ui.templateengine.TemplateEngineUIUtil; |
49 |
import org.eclipse.cdt.ui.templateengine.TemplateEngineUIUtil; |
| 50 |
import org.eclipse.cdt.ui.templateengine.pages.UIWizardPage; |
50 |
import org.eclipse.cdt.ui.templateengine.pages.UIWizardPage; |
| 51 |
import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard; |
|
|
| 52 |
import org.eclipse.cdt.ui.wizards.CDTMainWizardPage; |
51 |
import org.eclipse.cdt.ui.wizards.CDTMainWizardPage; |
| 53 |
import org.eclipse.cdt.ui.wizards.CWizardHandler; |
52 |
import org.eclipse.cdt.ui.wizards.CWizardHandler; |
| 54 |
import org.eclipse.cdt.ui.wizards.EntryDescriptor; |
53 |
import org.eclipse.cdt.ui.wizards.EntryDescriptor; |
|
|
54 |
import org.eclipse.cdt.ui.wizards.ICDTCommonProjectWizard; |
| 55 |
import org.eclipse.cdt.ui.wizards.IWizardItemsListListener; |
55 |
import org.eclipse.cdt.ui.wizards.IWizardItemsListListener; |
| 56 |
import org.eclipse.core.resources.IProject; |
56 |
import org.eclipse.core.resources.IProject; |
| 57 |
import org.eclipse.core.runtime.CoreException; |
57 |
import org.eclipse.core.runtime.CoreException; |
|
Lines 166-173
Link Here
|
| 166 |
path.length > 1 && (!path[0].equals(ManagedBuildWizard.OTHERS_LABEL))){ |
166 |
path.length > 1 && (!path[0].equals(ManagedBuildWizard.OTHERS_LABEL))){ |
| 167 |
templateId = path[path.length - 1]; |
167 |
templateId = path[path.length - 1]; |
| 168 |
Template templates[] = null; |
168 |
Template templates[] = null; |
| 169 |
if(wizard instanceof CDTCommonProjectWizard) { |
169 |
if(wizard instanceof ICDTCommonProjectWizard) { |
| 170 |
CDTCommonProjectWizard wz = (CDTCommonProjectWizard)wizard; |
170 |
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard)wizard; |
| 171 |
String[] langIDs = wz.getLanguageIDs(); |
171 |
String[] langIDs = wz.getLanguageIDs(); |
| 172 |
if(langIDs.length > 0) { |
172 |
if(langIDs.length > 0) { |
| 173 |
List<Template> lstTemplates = new ArrayList<Template>(); |
173 |
List<Template> lstTemplates = new ArrayList<Template>(); |
|
Lines 421-430
Link Here
|
| 421 |
} |
421 |
} |
| 422 |
|
422 |
|
| 423 |
private void loadCustomPages() { |
423 |
private void loadCustomPages() { |
| 424 |
if (! (getWizard() instanceof CDTCommonProjectWizard)) |
424 |
if (! (getWizard() instanceof ICDTCommonProjectWizard)) |
| 425 |
return; // not probable |
425 |
return; // not probable |
| 426 |
|
426 |
|
| 427 |
CDTCommonProjectWizard wz = (CDTCommonProjectWizard)getWizard(); |
427 |
ICDTCommonProjectWizard wz = (ICDTCommonProjectWizard)getWizard(); |
| 428 |
|
428 |
|
| 429 |
if (customPages == null) { |
429 |
if (customPages == null) { |
| 430 |
MBSCustomPageManager.init(); |
430 |
MBSCustomPageManager.init(); |
|
Lines 447-453
Link Here
|
| 447 |
setCustomPagesFilter(wz); |
447 |
setCustomPagesFilter(wz); |
| 448 |
} |
448 |
} |
| 449 |
|
449 |
|
| 450 |
private void setCustomPagesFilter(CDTCommonProjectWizard wz) { |
450 |
private void setCustomPagesFilter(ICDTCommonProjectWizard wz) { |
| 451 |
String[] natures = wz.getNatures(); |
451 |
String[] natures = wz.getNatures(); |
| 452 |
if (natures == null || natures.length == 0) |
452 |
if (natures == null || natures.length == 0) |
| 453 |
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, null); |
453 |
MBSCustomPageManager.addPageProperty(MBSCustomPageManager.PAGE_ID, MBSCustomPageManager.NATURE, null); |