1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

bug 383032: C Project dialog project type tree is missing arrows to collapse expand

This commit is contained in:
Andrew Gvozdev 2012-07-07 07:52:10 -04:00
parent 976cf6659d
commit b4f9e7052e
3 changed files with 14 additions and 1 deletions

View file

@ -85,6 +85,8 @@ public class Messages extends NLS {
public static String CDTCommonProjectWizard_creatingProject;
public static String CDTMainWizardPage_0;
public static String CDTMainWizardPage_1;
public static String CDTMainWizardPage_DefaultProjectCategory;
public static String CDTMainWizardPage_DefaultProjectType;
public static String CLocationOutputTab_0;
public static String CLocationSourceTab_0;
public static String CLocationTab_0;

View file

@ -317,3 +317,6 @@ WorkingSetConfigAction_22=Build error
IncludeTab_export=Export Settings...
IncludeTab_import=Import Settings...
# These defaults must match with properties defined in managed build plugins
CDTMainWizardPage_DefaultProjectCategory=Executable
CDTMainWizardPage_DefaultProjectType=Empty Project

View file

@ -26,6 +26,7 @@ import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardPage;
@ -314,9 +315,16 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
if (tree.getItemCount() > 0) {
TreeItem target = null;
// try to search item which was selected before
if (savedLabel!=null) {
if (savedLabel != null) {
target = findItem(tree, savedLabel, savedParentLabel);
}
if (target == null) {
// Default selection associated with "org.eclipse.cdt.build.core.buildArtefactType.exe" project type
target = findItem(tree, Messages.CDTMainWizardPage_DefaultProjectType, Messages.CDTMainWizardPage_DefaultProjectCategory);
if (target == null) {
CUIPlugin.log(new Status(IStatus.WARNING, CUIPlugin.PLUGIN_ID, "Default project not found in New C/C++ Project Wizard")); //$NON-NLS-1$
}
}
if (target == null) {
target = tree.getItem(0);
if (target.getItemCount() != 0)