From ef1c9cc92b555ff6b5994c584a7fd467f2524890 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Wed, 3 Mar 2010 04:16:28 +0000 Subject: [PATCH] bug 303410: [API] cdt.make.ui.NewMakeProjectPreferencePage and friends are obsolete --- build/org.eclipse.cdt.make.ui/plugin.xml | 50 ++---------- .../make/internal/ui/ErrorParserBlock.java | 7 +- .../internal/ui/MakeEnvironmentBlock.java | 81 ++++++++++++------- .../internal/ui/MakeProjectOptionBlock.java | 16 +++- .../NewMakeProjectPreferencePage.java | 19 ++++- .../ui/properties/MakePropertyPage.java | 15 +++- .../ui/dialogs/DiscoveryOptionsBlock.java | 15 ++-- .../cdt/make/ui/dialogs/SettingsBlock.java | 4 + .../wizards/ConvertToMakeProjectWizard.java | 7 ++ .../ConvertToMakeProjectWizardPage.java | 3 + .../wizards/MakeProjectWizardOptionPage.java | 12 ++- .../ui/wizards/NewMakeCCProjectWizard.java | 7 ++ .../ui/wizards/NewMakeCProjectWizard.java | 7 ++ .../make/ui/wizards/NewMakeProjectWizard.java | 9 +++ .../cdt/ui/dialogs/BinaryParserBlock.java | 6 +- .../cdt/ui/wizards/CCProjectWizard.java | 5 +- .../cdt/ui/wizards/CProjectWizard.java | 5 +- .../cdt/ui/wizards/NewCCProjectWizard.java | 3 +- 18 files changed, 177 insertions(+), 94 deletions(-) diff --git a/build/org.eclipse.cdt.make.ui/plugin.xml b/build/org.eclipse.cdt.make.ui/plugin.xml index eadee29f70a..a8c3e28e062 100644 --- a/build/org.eclipse.cdt.make.ui/plugin.xml +++ b/build/org.eclipse.cdt.make.ui/plugin.xml @@ -1,52 +1,8 @@ - - - - - + + m = info.getEnvironment(); if (m != null && !m.isEmpty()) { elements = new EnvironmentVariable[m.size()]; String[] varNames = new String[m.size()]; m.keySet().toArray(varNames); for (int i = 0; i < m.size(); i++) { - elements[i] = new EnvironmentVariable(varNames[i], (String)m.get(varNames[i])); + elements[i] = new EnvironmentVariable(varNames[i], m.get(varNames[i])); } } return elements; @@ -193,6 +205,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { } tableViewer.setSorter(new ViewerSorter() { + @Override public int compare(Viewer iviewer, Object e1, Object e2) { if (e1 == null) { return -1; @@ -242,6 +255,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { fBuilderID = builderID; } + @Override public void setContainer(ICOptionContainer container) { super.setContainer(container); if (getContainer().getProject() != null) { @@ -254,6 +268,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { } } + @Override public void performApply(IProgressMonitor monitor) throws CoreException { // Missing builder info if (fBuildInfo == null) { @@ -283,7 +298,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { // Convert the table's items into a Map so that this can be saved in the // configuration's attributes. TableItem[] items = environmentTable.getTable().getItems(); - Map map = new HashMap(items.length); + Map map = new HashMap(items.length); for (int i = 0; i < items.length; i++) { EnvironmentVariable var = (EnvironmentVariable) items[i].getData(); @@ -303,12 +318,13 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { /** * Updates the environment table for the given launch configuration * - * @param configuration + * @param info */ protected void updateEnvironment(IMakeCommonBuildInfo info) { environmentTable.setInput(info); } + @Override public void performDefaults() { // Missing builder info if (fBuildInfo == null) { @@ -333,6 +349,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { updateAppendReplace(); } + @Override public void createControl(Composite parent) { Composite composite = ControlFactory.createComposite(parent, 1); setControl(composite); @@ -436,6 +453,8 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { /** * Create some empty space. + * @param comp + * @param colSpan */ protected void createVerticalSpacer(Composite comp, int colSpan) { Label label = new Label(comp, SWT.NONE); @@ -468,6 +487,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { envAddButton = createPushButton(buttonComposite, MakeUIPlugin.getResourceString("MakeEnvironmentBlock.7"), null); //$NON-NLS-1$ envAddButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { handleEnvAddButtonSelected(); } @@ -475,6 +495,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { envSelectButton = createPushButton(buttonComposite, MakeUIPlugin.getResourceString("MakeEnvironmentBlock.8"), null); //$NON-NLS-1$ envSelectButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { handleEnvSelectButtonSelected(); } @@ -482,6 +503,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { envEditButton = createPushButton(buttonComposite, MakeUIPlugin.getResourceString("MakeEnvironmentBlock.9"), null); //$NON-NLS-1$ envEditButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { handleEnvEditButtonSelected(); } @@ -490,6 +512,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { envRemoveButton = createPushButton(buttonComposite, MakeUIPlugin.getResourceString("MakeEnvironmentBlock.10"), null); //$NON-NLS-1$ envRemoveButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent event) { handleEnvRemoveButtonSelected(); } @@ -563,12 +586,13 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { * @return Map of name - EnvironmentVariable pairs based on native * environment. */ - private Map getNativeEnvironment() { - Map stringVars = EnvironmentReader.getEnvVars(); - HashMap vars = new HashMap(); - for (Iterator i = stringVars.keySet().iterator(); i.hasNext();) { - String key = (String)i.next(); - String value = (String)stringVars.get(key); + private Map getNativeEnvironment() { + @SuppressWarnings({"unchecked", "rawtypes"}) + Map stringVars = (Hashtable)EnvironmentReader.getEnvVars(); + HashMap vars = new HashMap(); + for (Iterator i = stringVars.keySet().iterator(); i.hasNext();) { + String key = i.next(); + String value = stringVars.get(key); vars.put(key, new EnvironmentVariable(key, value)); } return vars; @@ -580,7 +604,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { */ protected void handleEnvSelectButtonSelected() { // get Environment Variables from the OS - Map envVariables = getNativeEnvironment(); + Map envVariables = getNativeEnvironment(); // get Environment Variables from the table TableItem[] items = environmentTable.getTable().getItems(); @@ -644,10 +668,11 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { private IStructuredContentProvider createSelectionDialogContentProvider() { return new IStructuredContentProvider() { + @SuppressWarnings({ "unchecked", "rawtypes" }) public Object[] getElements(Object inputElement) { EnvironmentVariable[] elements = null; - if (inputElement instanceof Map) { - Comparator comparator = new Comparator() { + if (inputElement instanceof Map) { + Comparator comparator = new Comparator() { public int compare(Object o1, Object o2) { String s1 = (String)o1; @@ -656,13 +681,13 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { } }; - TreeMap envVars = new TreeMap(comparator); - envVars.putAll((Map)inputElement); + TreeMap envVars = new TreeMap(comparator); + envVars.putAll((Map)inputElement); elements = new EnvironmentVariable[envVars.size()]; int index = 0; - for (Iterator iterator = envVars.keySet().iterator(); iterator.hasNext(); index++) { - Object key = iterator.next(); - elements[index] = (EnvironmentVariable)envVars.get(key); + for (Iterator iterator = envVars.keySet().iterator(); iterator.hasNext(); index++) { + String key = iterator.next(); + elements[index] = envVars.get(key); } } return elements; @@ -707,11 +732,12 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { /** * Removes the selected environment variable from the table. */ + @SuppressWarnings("unchecked") protected void handleEnvRemoveButtonSelected() { IStructuredSelection sel = (IStructuredSelection)environmentTable.getSelection(); environmentTable.getControl().setRedraw(false); - for (Iterator i = sel.iterator(); i.hasNext();) { - EnvironmentVariable var = (EnvironmentVariable)i.next(); + for (Iterator i = sel.iterator(); i.hasNext();) { + EnvironmentVariable var = i.next(); environmentTable.remove(var); } environmentTable.getControl().setRedraw(true); @@ -727,15 +753,6 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { setShellStyle(getShellStyle() | SWT.RESIZE); } - protected IDialogSettings getDialogSettings() { - IDialogSettings settings = MakeUIPlugin.getDefault().getDialogSettings(); - IDialogSettings section = settings.getSection(getDialogSettingsSectionName()); - if (section == null) { - section = settings.addNewSection(getDialogSettingsSectionName()); - } - return section; - } - /** * Returns the name of the section that this dialog stores its settings * in @@ -751,6 +768,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { * * @see org.eclipse.jface.window.Window#getInitialLocation(org.eclipse.swt.graphics.Point) */ + @Override protected Point getInitialLocation(Point initialSize) { Point initialLocation = DialogSettingsHelper.getInitialLocation(getDialogSettingsSectionName()); if (initialLocation != null) { @@ -764,6 +782,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { * * @see org.eclipse.jface.window.Window#getInitialSize() */ + @Override protected Point getInitialSize() { Point size = super.getInitialSize(); return DialogSettingsHelper.getInitialSize(getDialogSettingsSectionName(), size); @@ -774,6 +793,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { * * @see org.eclipse.jface.window.Window#close() */ + @Override public boolean close() { DialogSettingsHelper.persistShellGeometry(getShell(), getDialogSettingsSectionName()); return super.close(); @@ -800,6 +820,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage { appendEnvironment = createRadioButton(appendReplaceComposite, MakeUIPlugin.getResourceString("MakeEnvironmentBlock.17")); //$NON-NLS-1$ appendEnvironment.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { getContainer().updateContainer(); } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java index 08d01f65ffe..6b037558f33 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeProjectOptionBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 QNX Software Systems and others. + * Copyright (c) 2000, 2010 QNX Software Systems 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 @@ -27,6 +27,11 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.help.IWorkbenchHelpSystem; +/** + * @deprecated as of CDT 4.0. This option block was used to set preferences/properties + * for 3.X style projects. + */ +@Deprecated public class MakeProjectOptionBlock extends TabFolderOptionBlock { private ICOptionContainer optionContainer; public MakeProjectOptionBlock() { @@ -38,6 +43,7 @@ public class MakeProjectOptionBlock extends TabFolderOptionBlock { optionContainer = parent; } + @Override protected void addTabs() { addTab(new SettingsBlock(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID)); addTab(new MakeEnvironmentBlock(MakeCorePlugin.getDefault().getPluginPreferences(), MakeBuilder.BUILDER_ID)); @@ -46,17 +52,19 @@ public class MakeProjectOptionBlock extends TabFolderOptionBlock { addTab(new DiscoveryOptionsBlock()); } + @Override public void setOptionContainer(ICOptionContainer parent) { super.setOptionContainer( parent ); optionContainer = parent; } + @Override public Control createContents(Composite parent) { Control control = super.createContents( parent ); - List optionPages = getOptionPages(); - Iterator iter = optionPages.iterator(); + List optionPages = getOptionPages(); + Iterator iter = optionPages.iterator(); for( int i = 0; i < 4 && iter.hasNext(); i++ ){ - ICOptionPage page = (ICOptionPage) iter.next(); + ICOptionPage page = iter.next(); IWorkbenchHelpSystem helpSystem = MakeUIPlugin.getDefault().getWorkbench().getHelpSystem(); if( optionContainer != null && optionContainer instanceof MakePropertyPage ) switch( i ){ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/NewMakeProjectPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/NewMakeProjectPreferencePage.java index c1d3cebb7f0..f83e46e81bb 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/NewMakeProjectPreferencePage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/NewMakeProjectPreferencePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM 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 @@ -16,6 +16,7 @@ import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; import org.eclipse.cdt.ui.dialogs.ICOptionContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.Preferences; +import org.eclipse.jface.dialogs.DialogPage; import org.eclipse.jface.preference.IPreferencePageContainer; import org.eclipse.jface.preference.PreferencePage; import org.eclipse.swt.widgets.Composite; @@ -23,6 +24,15 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPreferencePage; +/** + * This preference page was used to set preferences "New Make Projects" for 3.X style projects. + * It is left here for compatibility reasons only. + * The page is superseded by "New CDT Project Wizard/Makefile Project" page, + * class {@code org.eclipse.cdt.managedbuilder.ui.preferences.PrefPage_NewCDTProject}. + * + * @deprecated as of CDT 4.0. + */ +@Deprecated public class NewMakeProjectPreferencePage extends PreferencePage implements IWorkbenchPreferencePage, ICOptionContainer { private MakeProjectOptionBlock fOptionBlock; @@ -34,6 +44,7 @@ public class NewMakeProjectPreferencePage extends PreferencePage implements IWor } + @Override public void setContainer(IPreferencePageContainer preferencePageContainer) { super.setContainer(preferencePageContainer); fOptionBlock.setOptionContainer(this); @@ -41,11 +52,13 @@ public class NewMakeProjectPreferencePage extends PreferencePage implements IWor /* * @see PreferencePage#createControl(Composite) */ + @Override public void createControl(Composite parent) { super.createControl(parent); // WorkbenchHelp.setHelp(parent, ICMakeHelpContextIds.PROJECT_PROPERTY_PAGE); } + @Override protected Control createContents(Composite parent) { return fOptionBlock.createContents(parent); } @@ -54,6 +67,7 @@ public class NewMakeProjectPreferencePage extends PreferencePage implements IWor public void init(IWorkbench workbench) { } + @Override public boolean performOk() { boolean ok = fOptionBlock.performApply(null); MakeCorePlugin.getDefault().savePluginPreferences(); @@ -63,6 +77,7 @@ public class NewMakeProjectPreferencePage extends PreferencePage implements IWor /** * @see DialogPage#setVisible(boolean) */ + @Override public void setVisible(boolean visible) { super.setVisible(visible); fOptionBlock.setVisible(visible); @@ -84,11 +99,13 @@ public class NewMakeProjectPreferencePage extends PreferencePage implements IWor return null; } + @Override public boolean isValid() { updateContainer(); return super.isValid(); } + @Override protected void performDefaults() { fOptionBlock.performDefaults(); super.performDefaults(); diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java index 055bec0d3c7..f2b2c569091 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/properties/MakePropertyPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM 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 @@ -29,6 +29,13 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.dialogs.PropertyPage; +/** + * @deprecated as of CDT 4.0. This property page was used to set properties + * "C/C++ Make Project" for 3.X style projects. + * This page lives dormant as of writing (CDT 7.0) but may get activated for + * {@code org.eclipse.cdt.make.core.makeNature} project (3.X style). + */ +@Deprecated public class MakePropertyPage extends PropertyPage implements ICOptionContainer { MakeProjectOptionBlock fOptionBlock; @@ -40,11 +47,13 @@ public class MakePropertyPage extends PropertyPage implements ICOptionContainer fOptionBlock = new MakeProjectOptionBlock(); } + @Override public void setContainer(IPreferencePageContainer preferencePageContainer) { super.setContainer(preferencePageContainer); fOptionBlock.setOptionContainer(this); } + @Override protected Control createContents(Composite parent) { Composite composite = new Composite(parent, SWT.NONE); composite.setLayout(new FillLayout()); @@ -72,6 +81,7 @@ public class MakePropertyPage extends PropertyPage implements ICOptionContainer noDefaultAndApplyButton(); } + @Override public boolean performOk() { IRunnableWithProgress runnable = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) { @@ -99,6 +109,7 @@ public class MakePropertyPage extends PropertyPage implements ICOptionContainer return null; } + @Override public void setVisible(boolean visible) { super.setVisible(visible); fOptionBlock.setVisible(visible); @@ -110,11 +121,13 @@ public class MakePropertyPage extends PropertyPage implements ICOptionContainer setErrorMessage(fOptionBlock.getErrorMessage()); } + @Override protected void performDefaults() { fOptionBlock.performDefaults(); super.performDefaults(); } + @Override public boolean isValid() { updateContainer(); return super.isValid(); diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java index fb99ac4a5e5..36913e2f6c4 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/DiscoveryOptionsBlock.java @@ -32,6 +32,7 @@ import org.eclipse.cdt.make.ui.IMakeHelpContextIds; import org.eclipse.cdt.ui.dialogs.ICOptionContainer; import org.eclipse.cdt.utils.ui.controls.ControlFactory; import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor; @@ -50,12 +51,16 @@ import org.eclipse.swt.widgets.Label; /** * A dialog to set scanner config discovery options. * + * @deprecated as of CDT 4.0. This tab was used to set preferences/properties + * for 3.X style projects. + * * @author vhirsl * @since 3.0 * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ +@Deprecated public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock { private static final String MISSING_BUILDER_MSG = "ScannerConfigOptionsDialog.label.missingBuilderInformation"; //$NON-NLS-1$ @@ -208,8 +213,8 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock { } }); // fill the combobox and set the initial value - for (Iterator items = getDiscoveryProfileIdList().iterator(); items.hasNext();) { - String profileId = (String)items.next(); + for (Iterator items = getDiscoveryProfileIdList().iterator(); items.hasNext();) { + String profileId = items.next(); String pageName = getDiscoveryProfileName(profileId); if (pageName != null) { profileComboBox.add(pageName); @@ -330,10 +335,10 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock { ICProject cProject = CoreModel.getDefault().create(project); if (cProject != null) { IPathEntry[] entries = cProject.getRawPathEntries(); - List newEntries = new ArrayList(Arrays.asList(entries)); + List newEntries = new ArrayList(Arrays.asList(entries)); if (!newEntries.contains(container)) { newEntries.add(container); - cProject.setRawPathEntries((IPathEntry[])newEntries.toArray(new IPathEntry[newEntries.size()]), monitor); + cProject.setRawPathEntries(newEntries.toArray(new IPathEntry[newEntries.size()]), monitor); } } // create a new discovered scanner config store @@ -347,7 +352,7 @@ public class DiscoveryOptionsBlock extends AbstractDiscoveryOptionsBlock { String profileId = getBuildInfo().getSelectedProfileId(); ScannerConfigScope profileScope = ScannerConfigProfileManager.getInstance(). getSCProfileConfiguration(profileId).getProfileScope(); - List changedResources = new ArrayList(); + List changedResources = new ArrayList(); // changedResources.add(project.getFullPath()); changedResources.add(project); MakeCorePlugin.getDefault().getDiscoveryManager().changeDiscoveredContainer( diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java index 18e3c15dda9..adb3a12fd5c 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/dialogs/SettingsBlock.java @@ -53,9 +53,13 @@ import org.eclipse.swt.widgets.Text; import org.eclipse.ui.dialogs.ContainerSelectionDialog; /** + * @deprecated as of CDT 4.0. This tab was used to set preferences/properties + * for 3.X style projects. + * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ +@Deprecated public class SettingsBlock extends AbstractCOptionPage { private static final String PREFIX = "SettingsBlock"; //$NON-NLS-1$ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java index 1f47e734ba6..d595f53de6d 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizard.java @@ -23,9 +23,16 @@ import org.eclipse.jface.wizard.Wizard; * This wizard provides a method by which the user can * add a C nature to a project that previously had no nature associated with it. * + * This wizard was used for 3.X style projects. It is left here for compatibility + * reasons only. The wizard is superseded by MBS Project Conversion Wizard, + * class {@code org.eclipse.cdt.managedbuilder.ui.wizards.ConvertToMakeWizard}. + * + * @deprecated as of CDT 4.0. + * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ +@Deprecated public class ConvertToMakeProjectWizard extends ConversionWizard { private static final String WZ_TITLE = "WizardMakeProjectConversion.title"; //$NON-NLS-1$ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizardPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizardPage.java index ed4805c8637..cdd11d2ca77 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizardPage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/ConvertToMakeProjectWizardPage.java @@ -41,6 +41,9 @@ import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; * *

* + * @deprecated as of CDT 4.0. This page was used for 3.X style projects. + * It is left here for compatibility reasons only. + * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java index adc3b20d42a..9e0ecbdab2d 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/MakeProjectWizardOptionPage.java @@ -35,7 +35,7 @@ import org.eclipse.core.runtime.Preferences; * This page may be used by clients as-is; it may be also be subclassed to suit. *

*

- * Example useage: + * Example usage: *

  * mainPage = new CProjectWizardPage("basicCProjectPage");
  * mainPage.setTitle("Project");
@@ -43,9 +43,13 @@ import org.eclipse.core.runtime.Preferences;
  * 
*

* + * @deprecated as of CDT 4.0. This option page was used for New Project Wizard + * for 3.X style projects. + * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ +@Deprecated public class MakeProjectWizardOptionPage extends NewCProjectWizardOptionPage { MakeWizardOptionBlock makeWizardBlock; @@ -64,11 +68,11 @@ public class MakeProjectWizardOptionPage extends NewCProjectWizardOptionPage { } public void setupHelpContextIds(){ - List pages = getOptionPages(); + List pages = getOptionPages(); - Iterator iter = pages.iterator(); + Iterator iter = pages.iterator(); for( int i = 0; i < 6 && iter.hasNext(); i++ ) { - ICOptionPage page = (ICOptionPage) iter.next(); + ICOptionPage page = iter.next(); String id = null; switch( i ){ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCCProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCCProjectWizard.java index 5276d5fa2c7..ef88f4287dc 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCCProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCCProjectWizard.java @@ -19,9 +19,16 @@ import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.SubProgressMonitor; /** + * This wizard was used for 3.X style projects. It is left here for compatibility + * reasons only. The wizard is superseded by MBS C++ Project Wizard, + * class {@link org.eclipse.cdt.ui.wizards.CCProjectWizard}. + * + * @deprecated as of CDT 4.0. + * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ +@Deprecated public class NewMakeCCProjectWizard extends NewMakeProjectWizard { private static final String WZ_TITLE = "MakeCCWizard.title"; //$NON-NLS-1$ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCProjectWizard.java index 8cf6cf8facc..b069f3ed416 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeCProjectWizard.java @@ -14,9 +14,16 @@ package org.eclipse.cdt.make.ui.wizards; import org.eclipse.cdt.make.internal.ui.MakeUIPlugin; /** + * This wizard was used for 3.X style projects. It is left here for compatibility + * reasons only. The wizard is superseded by MBS C Project Wizard, + * class {@link org.eclipse.cdt.ui.wizards.CProjectWizard}. + * + * @deprecated as of CDT 4.0. + * * @noextend This class is not intended to be subclassed by clients. * @noinstantiate This class is not intended to be instantiated by clients. */ +@Deprecated public class NewMakeCProjectWizard extends NewMakeProjectWizard { private static final String WZ_TITLE = "MakeCWizard.title"; //$NON-NLS-1$ diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java index df02d23bef0..60824caea70 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/wizards/NewMakeProjectWizard.java @@ -24,6 +24,15 @@ import org.eclipse.core.runtime.SubProgressMonitor; import org.eclipse.jface.wizard.IWizardPage; import org.eclipse.swt.widgets.Composite; +/** + * This abstract wizard was used for 3.X style projects. It is left here for compatibility + * reasons only. The wizards are superseded by MBS C++ Project Wizards. + * + * @deprecated as of CDT 4.0. + * + * @noextend This class is not intended to be subclassed by clients. + */ +@Deprecated public abstract class NewMakeProjectWizard extends NewCProjectWizard { protected MakeProjectWizardOptionPage fOptionPage; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java index fb8606d6558..0a0ee687dd2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/BinaryParserBlock.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2009 IBM Corporation and others. + * Copyright (c) 2003, 2010 IBM 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 @@ -51,8 +51,12 @@ import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField; /** + * @deprecated as of CDT 4.0. This tab was used to set preferences/properties + * for 3.X style projects. + * * @noextend This class is not intended to be subclassed by clients. */ +@Deprecated public class BinaryParserBlock extends AbstractBinaryParserPage { private static final int DEFAULT_HEIGHT = 160; diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java index 17d8f6728a6..e98c659a9c1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CCProjectWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Intel Corporation and others. + * Copyright (c) 2007, 2010 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 @@ -21,6 +21,9 @@ import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CProjectNature; import org.eclipse.cdt.ui.newui.UIMessages; +/** + * The wizard to create new MBS C++ Project. + */ public class CCProjectWizard extends CDTCommonProjectWizard { public CCProjectWizard() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CProjectWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CProjectWizard.java index 38b94132984..8b6833a6af3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CProjectWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CProjectWizard.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 Intel Corporation and others. + * Copyright (c) 2007, 2010 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 @@ -20,6 +20,9 @@ import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CProjectNature; import org.eclipse.cdt.ui.newui.UIMessages; +/** + * The wizard to create new MBS C Project. + */ public class CProjectWizard extends CDTCommonProjectWizard { public CProjectWizard() { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCCProjectWizard.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCCProjectWizard.java index b41e6586c33..bac56d4ca32 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCCProjectWizard.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewCCProjectWizard.java @@ -18,8 +18,9 @@ import org.eclipse.core.runtime.IProgressMonitor; /** - * C Project wizard that creates a new project resource in + * @deprecated as of CDT 4.0. Being kept here for API compatibility only. */ +@Deprecated public abstract class NewCCProjectWizard extends NewCProjectWizard { public NewCCProjectWizard() {