Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 283402 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java (-6 / +6 lines)
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);
(-)src/org/eclipse/cdt/ui/wizards/CDTCommonProjectWizard.java (-2 / +2 lines)
Lines 52-59 Link Here
52
import org.eclipse.cdt.ui.CUIPlugin;
52
import org.eclipse.cdt.ui.CUIPlugin;
53
import org.eclipse.cdt.ui.newui.UIMessages;
53
import org.eclipse.cdt.ui.newui.UIMessages;
54
54
55
public abstract class CDTCommonProjectWizard extends BasicNewResourceWizard 
55
public abstract class CDTCommonProjectWizard extends BasicNewResourceWizard
56
implements IExecutableExtension, IWizardWithMemory  
56
implements IExecutableExtension, IWizardWithMemory, ICDTCommonProjectWizard
57
{
57
{
58
	private static final String PREFIX= "CProjectWizard"; //$NON-NLS-1$
58
	private static final String PREFIX= "CProjectWizard"; //$NON-NLS-1$
59
	private static final String OP_ERROR= "CProjectWizard.op_error"; //$NON-NLS-1$
59
	private static final String OP_ERROR= "CProjectWizard.op_error"; //$NON-NLS-1$
(-)src/org/eclipse/cdt/ui/wizards/ICDTCommonProjectWizard.java (+53 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2002, 2008 Rational Software Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 * IBM Rational Software - Initial API and implementation
10
 * Intel corp - rework for New Project Model
11
 *******************************************************************************/
12
package org.eclipse.cdt.ui.wizards;
13
14
15
import java.net.URI;
16
17
import org.eclipse.core.resources.IProject;
18
import org.eclipse.core.runtime.CoreException;
19
import org.eclipse.core.runtime.IConfigurationElement;
20
import org.eclipse.core.runtime.IProgressMonitor;
21
import org.eclipse.jface.wizard.IWizard;
22
23
public interface ICDTCommonProjectWizard extends IWizard {
24
	public IProject getProject(boolean defaults);
25
26
	public IProject getProject(boolean defaults, boolean onFinish);
27
	
28
	public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException ;
29
30
	public IProject createIProject(final String name, final URI location) throws CoreException;
31
32
	public IProject createIProject(final String name, final URI location, IProgressMonitor monitor) throws CoreException;
33
		
34
	public String[] getNatures();
35
36
    /**
37
     * Returns last project name used for creation
38
     */
39
	public String getLastProjectName();
40
41
	public URI getLastProjectLocation();
42
43
	public IProject getLastProject();
44
	
45
	// Methods below should provide data for language check
46
	
47
	public String[] getLanguageIDs ();
48
	
49
	public String[] getContentTypeIDs ();
50
	
51
	public String[] getExtensions ();
52
	
53
}

Return to bug 283402