mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 02:05:39 +02:00
Bug 335338 - Configurations from projectTypes are included in ManagedBuildManager#getExtensionConfigurations
This commit is contained in:
parent
64695227bf
commit
e7395929a9
2 changed files with 29 additions and 15 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Intel Corporation - initial API and implementation
|
||||
* James Blackbrun (Broadcom Corp.)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.managedbuilder.ui.wizards;
|
||||
|
||||
|
@ -17,9 +18,9 @@ import org.eclipse.cdt.internal.ui.wizards.ICDTCommonProjectWizard;
|
|||
import org.eclipse.cdt.managedbuilder.core.IProjectType;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIImages;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.jface.viewers.CheckStateChangedEvent;
|
||||
import org.eclipse.jface.viewers.CheckboxTableViewer;
|
||||
|
@ -211,7 +212,13 @@ public class CDTConfigWizardPage extends WizardPage {
|
|||
if (cfgs == null) return null;
|
||||
|
||||
for (int j=0; j<cfgs.length; j++) {
|
||||
if (cfgs[j].isSystem() || (handler.supportedOnly() && !cfgs[j].isSupported())) continue;
|
||||
if (cfgs[j].isSystem() || (handler.supportedOnly() && !cfgs[j].isSupported())
|
||||
// Bug 335338 don't include project type configurations if we're not creating a project-typed project
|
||||
// Project types are non-default if their nameAttribute != "" (see: ManagedBuildWizard: "old style project types")
|
||||
|| (pt == null && cfgs[j].getConfiguration() != null &&
|
||||
cfgs[j].getConfiguration().getProjectType() != null &&
|
||||
cfgs[j].getConfiguration().getProjectType().getNameAttribute().length() > 0))
|
||||
continue;
|
||||
out.add(cfgs[j]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2011 Intel Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -7,6 +7,7 @@
|
|||
*
|
||||
* Contributors:
|
||||
* Intel Corporation - initial API and implementation
|
||||
* James Blackburn (Broadcom Corp.)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.managedbuilder.ui.wizards;
|
||||
|
||||
|
@ -67,10 +68,9 @@ public class CfgHolder {
|
|||
/**
|
||||
* Checks whether names are unique
|
||||
*
|
||||
* @param its
|
||||
* @return
|
||||
* @param its array of CfgHolders
|
||||
* @return boolean if CfgHolder name appears more than once
|
||||
*/
|
||||
|
||||
public static boolean hasDoubles(CfgHolder[] its) {
|
||||
for (int i=0; i<its.length; i++) {
|
||||
String s = its[i].name;
|
||||
|
@ -84,11 +84,11 @@ public class CfgHolder {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates array of holders on a basis
|
||||
* of configurations array.
|
||||
* Creates array of {@link CfgHolder}s based on the passed in
|
||||
* {@link IConfiguration}s
|
||||
*
|
||||
* @param cfgs
|
||||
* @return
|
||||
* @param cfgs {@link IConfiguration}s to turn to CfgHolders
|
||||
* @return CfgHolder[]
|
||||
*/
|
||||
public static CfgHolder[] cfgs2items(IConfiguration[] cfgs) {
|
||||
CfgHolder[] its = new CfgHolder[cfgs.length];
|
||||
|
@ -216,9 +216,16 @@ public class CfgHolder {
|
|||
return tc.getParent();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public Object getConfiguration() { return cfg; }
|
||||
|
||||
/**
|
||||
* @return the IConfiguration stored in this holder.
|
||||
* @since 8.0
|
||||
*/
|
||||
public IConfiguration getConfiguration() { return cfg; }
|
||||
public String getName() { return name; }
|
||||
public Object getToolChain() { return tc; }
|
||||
/**
|
||||
* @return the IToolchain stored in this holder
|
||||
* @since 8.0
|
||||
*/
|
||||
public IToolChain getToolChain() { return tc; }
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue