mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Bug 433222 - Turn on Others category in New Proj Wizard by default.
With this preference off, the new project wizard is a mess. We need to have categories at the top level, especially as the number of categories grow. This also fixes an issue with the Autotools which tried to go into the Others category, but made a bit of a mess and doesn't really need to be there anyway. Change-Id: Idc67096756caa77087acabacb18ada41a43202b4 Reviewed-on: https://git.eclipse.org/r/25375 Tested-by: Hudson CI Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
parent
5a5caee142
commit
185074996d
3 changed files with 7 additions and 15 deletions
|
@ -25,7 +25,6 @@ import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
|||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.ui.wizards.AbstractCWizard;
|
||||
import org.eclipse.cdt.managedbuilder.ui.wizards.MBSWizardHandler;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.ui.wizards.EntryDescriptor;
|
||||
import org.eclipse.jface.wizard.IWizard;
|
||||
|
||||
|
@ -55,7 +54,6 @@ public class AutotoolsBuildWizard extends AbstractCWizard {
|
|||
// look for project types that have a toolchain based on the Autotools toolchain
|
||||
// and if so, add an entry for the project type.
|
||||
// Fix for bug#374026
|
||||
EntryDescriptor oldsRoot = null;
|
||||
SortedMap<String, IProjectType> sm = ManagedBuildManager.getExtensionProjectTypeMap();
|
||||
for (Map.Entry<String, IProjectType> e : sm.entrySet()) {
|
||||
IProjectType pt = e.getValue();
|
||||
|
@ -80,19 +78,8 @@ public class AutotoolsBuildWizard extends AbstractCWizard {
|
|||
h.addTc(t);
|
||||
}
|
||||
|
||||
String pId = null;
|
||||
if (CDTPrefUtil.getBool(CDTPrefUtil.KEY_OTHERS)) {
|
||||
if (oldsRoot == null) {
|
||||
oldsRoot = new EntryDescriptor(OTHERS_LABEL, null, OTHERS_LABEL, true, null, null);
|
||||
items.add(oldsRoot);
|
||||
}
|
||||
pId = oldsRoot.getId();
|
||||
} else { // do not group to <Others>
|
||||
pId = null;
|
||||
}
|
||||
|
||||
if (h.getToolChainsCount() > 0)
|
||||
items.add(new EntryDescriptor(pt.getId(), pId, pt.getName(), true, h, null));
|
||||
items.add(new EntryDescriptor(pt.getId(), null, pt.getName(), true, h, null));
|
||||
}
|
||||
|
||||
return (EntryDescriptor[])items.toArray(new EntryDescriptor[items.size()]);
|
||||
|
|
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.managedbuilder.ui.preferences;
|
|||
|
||||
import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||
import org.eclipse.cdt.managedbuilder.internal.ui.Messages;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.swt.SWT;
|
||||
|
@ -57,7 +58,7 @@ public class WizardDefaultsTab extends AbstractCPropertyTab {
|
|||
@Override
|
||||
protected void performDefaults() {
|
||||
show_sup.setSelection(true);
|
||||
show_oth.setSelection(false);
|
||||
show_oth.setSelection(CUIPlugin.getDefault().getPreferenceStore().getDefaultBoolean(CDTPrefUtil.KEY_OTHERS));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,8 @@ import org.eclipse.ui.editors.text.EditorsUI;
|
|||
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
||||
import org.eclipse.ui.texteditor.AbstractTextEditor;
|
||||
|
||||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
|
||||
import org.eclipse.cdt.internal.ui.ICThemeConstants;
|
||||
import org.eclipse.cdt.internal.ui.cview.CView;
|
||||
import org.eclipse.cdt.internal.ui.editor.SemanticHighlightings;
|
||||
|
@ -62,6 +64,8 @@ public class CUIPreferenceInitializer extends AbstractPreferenceInitializer {
|
|||
EditorsUI.useAnnotationsPreferencePage(store);
|
||||
EditorsUI.useQuickDiffPreferencePage(store);
|
||||
useTextEditorPreferencePage(store);
|
||||
|
||||
store.setDefault(CDTPrefUtil.KEY_OTHERS, true);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue