Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorChris Recoskie2008-09-11 15:48:14 +0000
committerChris Recoskie2008-09-11 15:48:14 +0000
commit91141bd40827b0753f91f938ee7ff6193e1dc9f7 (patch)
tree7eaae4bfbf4aba970447fcc93121462d7bc46fe8 /build
parent00a246114022d2a457623716d855b633f687c658 (diff)
downloadorg.eclipse.cdt-91141bd40827b0753f91f938ee7ff6193e1dc9f7.tar.gz
org.eclipse.cdt-91141bd40827b0753f91f938ee7ff6193e1dc9f7.tar.xz
org.eclipse.cdt-91141bd40827b0753f91f938ee7ff6193e1dc9f7.zip
RESOLVED - bug 234860: New Project Wizard using "folders" for project type selection is totally unintuitive
https://bugs.eclipse.org/bugs/show_bug.cgi?id=234860
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml8
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/messages.properties2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java3
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java9
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/StdBuildWizard.java10
5 files changed, 21 insertions, 11 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
index 3ea56602342..dd98aa0fe9a 100644
--- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
+++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
@@ -3779,13 +3779,7 @@
filterPattern=".*"
location="$nl$/templates/projecttemplates/HelloWorldCAnsiProject/template.xml"
projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
- </template>
- <template
- id="org.eclipse.cdt.build.core.templates.EmptyProject"
- filterPattern=".*"
- location="$nl$/templates/projecttemplates/EmptyProject/template.xml"
- projectType="org.eclipse.cdt.build.core.buildArtefactType.exe">
- </template>
+ </template>
<template
id="org.eclipse.cdt.build.core.templates.MakefileHelloWorldCCProject"
filterPattern=".*"
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/messages.properties b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/messages.properties
index ee4476e8911..caa2e950e73 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/messages.properties
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/messages.properties
@@ -119,3 +119,5 @@ MBSWizardHandler.0=At least one toolchain should be selected
MBSWizardHandler.1=At least one configuration should be selected. Please check needed configurations.
CMainWizardPage.1=Show project types and toolchains only if they are supported on the platform
CMainWizardPage.2=Edit properties after project creation
+AbstractCWizard.0=Empty Project
+
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
index ea481a3e87b..2641987acde 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/MBSWizardHandler.java
@@ -151,7 +151,8 @@ public class MBSWizardHandler extends CWizardHandler {
break;
projectTypeId = path[0];
- if(path.length > 1 && (!path[0].equals(ManagedBuildWizard.OTHERS_LABEL))){
+ if(!entryDescriptor.isDefaultForCategory() &&
+ path.length > 1 && (!path[0].equals(ManagedBuildWizard.OTHERS_LABEL))){
templateId = path[path.length - 1];
Template templates[] = TemplateEngineUI.getDefault().getTemplates(projectTypeId);
if(templates.length == 0)
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java
index 9b0f958093d..502ee32a039 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/ManagedBuildWizard.java
@@ -34,6 +34,7 @@ import org.eclipse.swt.graphics.Image;
public class ManagedBuildWizard extends AbstractCWizard {
private static final Image IMG = CPluginImages.get(CPluginImages.IMG_OBJS_CONTAINER);
public static final String OTHERS_LABEL = Messages.getString("CNewWizard.0"); //$NON-NLS-1$
+ public static final String EMPTY_PROJECT = Messages.getString("AbstractCWizard.0"); //$NON-NLS-1$
/**
* Creates and returns an array of items to be displayed
*/
@@ -54,7 +55,13 @@ public class ManagedBuildWizard extends AbstractCWizard {
h.addTc(tcs[j]);
}
if (h.getToolChainsCount() > 0) {
+ // The project category item.
items.add(new EntryDescriptor(vs[i].getId(), null, vs[i].getName(), true, h, null));
+ // A default project type for that category -- not using any template.
+ EntryDescriptor entryDescriptor = new EntryDescriptor(vs[i].getId() + ".default", vs[i].getId(),
+ EMPTY_PROJECT, false, h, null);
+ entryDescriptor.setDefaultForCategory(true);
+ items.add(entryDescriptor);
}
}
@@ -102,7 +109,7 @@ public class ManagedBuildWizard extends AbstractCWizard {
} else { // do not group to <Others>
pId = null;
}
- items.add(new EntryDescriptor(pt.getId(), pId, pt.getName(), true, h, IMG));
+ items.add(new EntryDescriptor(pt.getId(), pId, pt.getName(), false, h, IMG));
}
return (EntryDescriptor[])items.toArray(new EntryDescriptor[items.size()]);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/StdBuildWizard.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/StdBuildWizard.java
index a8b72a9dc9b..011589258ac 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/StdBuildWizard.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/StdBuildWizard.java
@@ -19,6 +19,7 @@ import org.eclipse.jface.wizard.IWizard;
public class StdBuildWizard extends AbstractCWizard {
private static final String NAME = Messages.getString("StdBuildWizard.0"); //$NON-NLS-1$
private static final String ID = "org.eclipse.cdt.build.makefile.projectType"; //$NON-NLS-1$
+ public static final String EMPTY_PROJECT = Messages.getString("AbstractCWizard.0"); //$NON-NLS-1$
public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard) {
STDWizardHandler h = new STDWizardHandler(parent, wizard);
@@ -27,8 +28,13 @@ public class StdBuildWizard extends AbstractCWizard {
for (int i=0; i<tcs.length; i++)
if (isValid(tcs[i], supportedOnly, wizard))
h.addTc(tcs[i]);
- EntryDescriptor wd = new EntryDescriptor(ID, null, NAME, true, h, null);
- return new EntryDescriptor[] {wd};
+ EntryDescriptor wd = new EntryDescriptor(ID, null, NAME, true, h, null);
+
+ EntryDescriptor wd2 = new EntryDescriptor(ID + ".default", ID,
+ EMPTY_PROJECT, false, h, null);
+ wd2.setDefaultForCategory(true);
+
+ return new EntryDescriptor[] {wd, wd2};
// test only: creating items like of Templates
/*

Back to the top