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

bug 303410: [API] cdt.make.ui.NewMakeProjectPreferencePage and friends are obsolete

This commit is contained in:
Andrew Gvozdev 2010-03-03 04:16:28 +00:00
parent 8868796244
commit ef1c9cc92b
18 changed files with 177 additions and 94 deletions

View file

@ -1,52 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension-point id="DiscoveryProfilePage" name="%discoveryProfilePage.name" schema="schema/DiscoveryProfilePage.exsd"/>
<!--extension
point="org.eclipse.ui.newWizards">
<wizard
name="%WizardNewCMakeProject.name"
icon="icons/etool16/newc_app.gif"
category="org.eclipse.cdt.ui.newCWizards"
class="org.eclipse.cdt.make.ui.wizards.NewMakeCProjectWizard"
project="true"
finalPerspective="org.eclipse.cdt.ui.CPerspective"
id="org.eclipse.cdt.ui.wizards.NewMakeCProjectWizard">
<description>
%WizardNewCMakeProject.description
</description>
</wizard>
<wizard
name="%WizardConvertMakeProject.name"
icon="icons/etool16/convert-normal.gif"
category="org.eclipse.cdt.ui.newCWizards"
class="org.eclipse.cdt.make.ui.wizards.ConvertToMakeProjectWizard"
finalPerspective="org.eclipse.cdt.ui.CPerspective"
id="org.eclipse.cdt.ui.wizards.ConvertToMakeWizard">
<description>
%WizardConvertMakeProject.description
</description>
<selection
class="org.eclipse.core.resources.IProject">
</selection>
</wizard-->
<!-- For C++ Wizards -->
<!--wizard
name="%WizardNewCCMakeProject.name"
icon="icons/etool16/newcc_app.gif"
category="org.eclipse.cdt.ui.newCWizards"
class="org.eclipse.cdt.make.ui.wizards.NewMakeCCProjectWizard"
project="true"
finalPerspective="org.eclipse.cdt.ui.CPerspective"
id="org.eclipse.cdt.make.ui.wizards.NewMakeCCProjectWizard">
<description>
%WizardNewCCMakeProject.description
</description>
</wizard>
</extension-->
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
@ -212,6 +168,12 @@
class="org.eclipse.cdt.make.internal.ui.preferences.MakePreferencePage"
id="org.eclipse.cdt.make.ui.preferences.MakePreferencePage">
</page>
<page
name="%PreferenceMakeProject.name"
category="org.eclipse.cdt.make.ui.preferences.MakePreferencePage"
class="org.eclipse.cdt.make.internal.ui.preferences.NewMakeProjectPreferencePage"
id="org.eclipse.cdt.make.ui.preferences.MakeProjectPreferencePage">
</page>
<page
name="%PreferenceMakefileEditor.name"
category="org.eclipse.cdt.make.ui.preferences.BuildSettings"

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2002, 2007 QNX Software Systems and others.
* Copyright (c) 2002, 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
@ -21,6 +21,11 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.swt.widgets.Composite;
/**
* @deprecated as of CDT 4.0. This tab was used to set preferences/properties
* for 3.X style projects.
*/
@Deprecated
public class ErrorParserBlock extends AbstractErrorParserBlock {
// make builder enabled

View file

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2004, 2007 QNX Software Systems and others.
* Copyright (c) 2004, 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
@ -13,6 +13,7 @@ package org.eclipse.cdt.make.internal.ui;
import com.ibm.icu.text.MessageFormat;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
@ -66,6 +67,14 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.dialogs.ListSelectionDialog;
/**
* @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 MakeEnvironmentBlock extends AbstractCOptionPage {
Preferences fPrefs;
@ -134,6 +143,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return getName();
}
@ -143,6 +153,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
boolean equal = false;
if (obj instanceof EnvironmentVariable) {
@ -156,6 +167,7 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return name.hashCode();
}
@ -169,13 +181,13 @@ public class MakeEnvironmentBlock extends AbstractCOptionPage {
public Object[] getElements(Object inputElement) {
EnvironmentVariable[] elements = new EnvironmentVariable[0];
IMakeCommonBuildInfo info = (IMakeCommonBuildInfo)inputElement;
Map m = info.getEnvironment();
Map<String, String> 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<String, String> map = new HashMap<String, String>(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<String, EnvironmentVariable> getNativeEnvironment() {
@SuppressWarnings({"unchecked", "rawtypes"})
Map<String, String> stringVars = (Hashtable)EnvironmentReader.getEnvVars();
HashMap<String, EnvironmentVariable> vars = new HashMap<String, EnvironmentVariable>();
for (Iterator<String> 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<String, EnvironmentVariable> 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<String> 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<String, EnvironmentVariable> envVars = new TreeMap<String, EnvironmentVariable>(comparator);
envVars.putAll((Map<String, EnvironmentVariable>)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<String> 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<EnvironmentVariable> 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();
}

View file

@ -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<ICOptionPage> optionPages = getOptionPages();
Iterator<ICOptionPage> 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 ){

View file

@ -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();

View file

@ -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();

View file

@ -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<String> 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<IPathEntry> newEntries = new ArrayList<IPathEntry>(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<IResource> changedResources = new ArrayList<IResource>();
// changedResources.add(project.getFullPath());
changedResources.add(project);
MakeCorePlugin.getDefault().getDiscoveryManager().changeDiscoveredContainer(

View file

@ -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$

View file

@ -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$

View file

@ -41,6 +41,9 @@ import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
* </pre>
* </p>
*
* @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.
*/

View file

@ -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.
* </p>
* <p>
* Example useage:
* Example usage:
* <pre>
* mainPage = new CProjectWizardPage("basicCProjectPage");
* mainPage.setTitle("Project");
@ -43,9 +43,13 @@ import org.eclipse.core.runtime.Preferences;
* </pre>
* </p>
*
* @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<ICOptionPage> pages = getOptionPages();
Iterator iter = pages.iterator();
Iterator<ICOptionPage> 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 ){

View file

@ -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$

View file

@ -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$

View file

@ -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;

View file

@ -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;

View file

@ -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() {

View file

@ -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() {

View file

@ -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() {