1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 17:25:38 +02:00

Bug 564949 - Remove support for CDT 3.X style projects (partial)

Remove some Wizard classes that are not referenced anywhere anymore.
This commit is just a first of probably several commits but is already
a start. I already had very large commits in progress in the past but
it became big and hard to push so I'd rather do it step by step this
time and at least have some of it done for the next release.

Also moved some messages to its own message bundle in managedbuilder.ui
because it's the only place they are used now.

Change-Id: Ib4258684c91f205dc4af3b17169609b5ebcff253
Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
Marc-Andre Laperle 2020-07-05 22:54:07 -04:00 committed by Marc-André Laperle
parent 97e72c23cf
commit 97c1151f01
13 changed files with 78 additions and 629 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.make.ui; singleton:=true
Bundle-Version: 7.3.400.qualifier
Bundle-Version: 8.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.make.internal.ui.MakeUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin

View file

@ -15,8 +15,6 @@
# IBM Corporation
###############################################################################
MakeCWizard.title=C/Make Project
MakeCWizard.description=Create a New C Project using 'make' to build it
MakeEnvironmentBlock.10=&Remove
MakeEnvironmentBlock.11=New Environment Variable
MakeEnvironmentBlock.12=Overwrite variable?
@ -26,11 +24,7 @@ MakeEnvironmentBlock.15=Select Environment Variables
MakeEnvironmentBlock.16=Edit Environment Variable
MakeEnvironmentBlock.17=&Append environment to native environment
MakeEnvironmentBlock.18=Re&place native environment with specified environment
MakeCWizard.task_name=Creating C project with Make builder...
MakeCCWizard.title=C++/Make Project
MakeCCWizard.description=Create a New C++ Project using 'make' to build it
MakeCCWizard.task_name=Creating C++ project with Make builder...
MakeEnvironmentBlock.0=Variable
MakeEnvironmentBlock.1=Value
MakeEnvironmentBlock.2=&Name:
@ -42,15 +36,6 @@ MakeEnvironmentBlock.7=N&ew...
MakeEnvironmentBlock.8=Se&lect...
MakeEnvironmentBlock.9=E&dit...
MakeCWizardSettings.title=C/Make Project Settings
MakeCWizardSettings.description=Define the project and 'make' builder settings
MakeCCWizardSettings.title=C++/Make Project Settings
MakeCCWizardSettings.description=Define the project and 'make' builder settings
WizardMakeProjectConversion.title=Convert to a C/C++ project
WizardMakeProjectConversion.description=The wizard adds C/C++ Nature to the selected projects to enable C/C++ Tools Support for them.
WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting to C/C++ Project...
WizardMakeProjectConversion.projectOptions.title=Project options
WizardMakeProjectConversion.projectOptions.projectType=Specify project type
WizardMakeProjectConversion.projectOptions.projectTypeTable=Project type:

View file

@ -28,13 +28,6 @@ public interface IMakeHelpContextIds {
public static final String SCANNER_CONFIG_DISCOVERY_OPTIONS = PREFIX + "discovery_preferences"; //$NON-NLS-1$
public static final String MAKE_PROP_DISCOVERY = PREFIX + "std_prop_discovery"; //$NON-NLS-1$
public static final String MAKE_VIEW = PREFIX + "make_targets_view"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_NAME_PAGE = PREFIX + "new_proj_wiz_s_name"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_PROJECTS_TAB = PREFIX + "new_proj_wiz_s_proj"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_MAKEBUILDER_TAB = PREFIX + "new_proj_wiz_s_mbuilder"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_ERRORPARSER_TAB = PREFIX + "new_proj_wiz_s_errorp"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_BINARYPARSER_TAB = PREFIX + "new_proj_wiz_s_binary"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_DISCOVERY_TAB = PREFIX + "new_proj_wiz_s_discovery"; //$NON-NLS-1$
public static final String MAKE_PROJ_WIZ_INDEXER_TAB = PREFIX + "new_proj_wiz_s_cindexer"; //$NON-NLS-1$
public static final String MAKE_PROP_ERROR_PARSER = PREFIX + "std_prop_error"; //$NON-NLS-1$
public static final String MAKE_PROP_BINARY_PARSER = PREFIX + "std_prop_binary"; //$NON-NLS-1$

View file

@ -1,123 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.ui.wizards;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.ui.wizards.conversion.ConversionWizard;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
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$
private static final String WZ_DESC = "WizardMakeProjectConversion.description"; //$NON-NLS-1$
private static final String PREFIX = "WizardMakeConversion"; //$NON-NLS-1$
private static final String WINDOW_TITLE = "WizardMakeConversion.windowTitle"; //$NON-NLS-1$
/**
* ConvertToStdMakeConversionWizard Wizard constructor
*/
public ConvertToMakeProjectWizard() {
this(getWindowTitleResource(), getWzDescriptionResource());
}
/**
* ConvertToStdMakeConversionWizard Wizard constructor
*/
public ConvertToMakeProjectWizard(String title, String desc) {
super(title, desc);
}
/**
* Method getWzDescriptionResource, allows Wizard description label value
* to be changed by subclasses
*
* @return String
*/
protected static String getWzDescriptionResource() {
return MakeUIPlugin.getResourceString(WZ_DESC);
}
/**
* Method getWzTitleResource, allows Wizard description label value
* to be changed by subclasses
*
* @return String
*/
protected static String getWzTitleResource() {
return MakeUIPlugin.getResourceString(WZ_TITLE);
}
/**
* Method getWindowTitleResource, allows Wizard Title label value to be
* changed by subclasses
*
* @return String
*/
protected static String getWindowTitleResource() {
return MakeUIPlugin.getResourceString(WINDOW_TITLE);
}
/**
* Method getPrefix, allows prefix value to be changed by subclasses
*
* @return String
*/
protected static String getPrefix() {
return PREFIX;
}
/**
* Method addPages adds our Simple to C conversion Wizard page.
*
* @see Wizard#addPages
*/
@Override
public void addPages() {
addPage(mainPage = new ConvertToMakeProjectWizardPage(getPrefix()));
}
@Override
public String getProjectID() {
return MakeCorePlugin.MAKE_PROJECT_ID;
}
@Override
protected void doRun(IProgressMonitor monitor) throws CoreException {
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), //$NON-NLS-1$
2);
try {
super.doRun(new SubProgressMonitor(monitor, 1));
} finally {
monitor.done();
}
}
}

View file

@ -1,116 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.ui.wizards;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.make.core.MakeProjectNature;
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigNature;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.ui.wizards.conversion.ConvertProjectWizardPage;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
/**
*
* ConvertToStdMakeProjectWizardPage
* Standard main page for a wizard that adds a C project Nature to a project with no nature associated with it.
* This conversion is one way in that the project cannot be converted back (i.e have the nature removed).
*
* @author Judy N. Green
* @since Aug 6, 2002
*<p>
* Example useage:
* <pre>
* mainPage = new ConvertToStdMakeProjectWizardPage("ConvertProjectPage");
* mainPage.setTitle("Project Conversion");
* mainPage.setDescription("Add C or C++ a Nature to a project.");
* </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.
*/
@Deprecated
public class ConvertToMakeProjectWizardPage extends ConvertProjectWizardPage {
private static final String WZ_TITLE = "WizardMakeProjectConversion.title"; //$NON-NLS-1$
private static final String WZ_DESC = "WizardMakeProjectConversion.description"; //$NON-NLS-1$
/**
* Constructor for ConvertToStdMakeProjectWizardPage.
*/
public ConvertToMakeProjectWizardPage(String pageName) {
super(pageName);
}
/**
* Method getWzTitleResource returns the correct Title Label for this class
* overriding the default in the superclass.
*/
@Override
protected String getWzTitleResource() {
return MakeUIPlugin.getResourceString(WZ_TITLE);
}
/**
* Method getWzDescriptionResource returns the correct description
* Label for this class overriding the default in the superclass.
*/
@Override
protected String getWzDescriptionResource() {
return MakeUIPlugin.getResourceString(WZ_DESC);
}
/**
* Method isCandidate returns true for all projects.
*/
@Override
public boolean isCandidate(IProject project) {
return true; // all
}
@Override
public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException {
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), //$NON-NLS-1$
3);
try {
super.convertProject(project, new SubProgressMonitor(monitor, 1), projectID);
MakeProjectNature.addNature(project, new SubProgressMonitor(monitor, 1));
ScannerConfigNature.addScannerConfigNature(project);
ScannerConfigNature.initializeDiscoveryOptions(project);
CCorePlugin.getDefault().mapCProjectOwner(project, projectID, true);
} finally {
monitor.done();
}
}
@Override
public void createControl(Composite parent) {
super.createControl(parent);
IStructuredSelection sel = ((BasicNewResourceWizard) getWizard()).getSelection();
if (sel != null) {
tableViewer.setCheckedElements(sel.toArray());
setPageComplete(validatePage());
}
}
}

View file

@ -1,139 +0,0 @@
/*******************************************************************************
* Copyright (c) 2005, 2010 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
* QNX Software System
*******************************************************************************/
package org.eclipse.cdt.make.ui.wizards;
import java.util.Iterator;
import java.util.List;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.internal.ui.MakeProjectOptionBlock;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
import org.eclipse.cdt.ui.dialogs.ICOptionContainer;
import org.eclipse.cdt.ui.dialogs.ICOptionPage;
import org.eclipse.cdt.ui.dialogs.IndexerBlock;
import org.eclipse.cdt.ui.dialogs.ReferenceBlock;
import org.eclipse.cdt.ui.dialogs.TabFolderOptionBlock;
import org.eclipse.cdt.ui.wizards.NewCProjectWizard;
import org.eclipse.cdt.ui.wizards.NewCProjectWizardOptionPage;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.Preferences;
/**
* Standard main page for a wizard that is creates a project resource.
* <p>
* This page may be used by clients as-is; it may be also be subclassed to suit.
* </p>
* <p>
* Example usage:
* <pre>
* mainPage = new CProjectWizardPage("basicCProjectPage");
* mainPage.setTitle("Project");
* mainPage.setDescription("Create a new project resource.");
* </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;
public class MakeWizardOptionBlock extends MakeProjectOptionBlock {
IndexerBlock indexBlock;
public MakeWizardOptionBlock(ICOptionContainer parent) {
super(parent);
}
@Override
protected void addTabs() {
addTab(new ReferenceBlock());
super.addTabs();
addTab(indexBlock = new IndexerBlock());
}
public void setupHelpContextIds() {
List<ICOptionPage> pages = getOptionPages();
Iterator<ICOptionPage> iter = pages.iterator();
for (int i = 0; i < 6 && iter.hasNext(); i++) {
ICOptionPage page = iter.next();
String id = null;
switch (i) {
case 0:
id = IMakeHelpContextIds.MAKE_PROJ_WIZ_PROJECTS_TAB;
break;
case 1:
id = IMakeHelpContextIds.MAKE_PROJ_WIZ_MAKEBUILDER_TAB;
break;
case 2:
id = IMakeHelpContextIds.MAKE_PROJ_WIZ_ERRORPARSER_TAB;
break;
case 3:
id = IMakeHelpContextIds.MAKE_PROJ_WIZ_BINARYPARSER_TAB;
break;
case 4:
id = IMakeHelpContextIds.MAKE_PROJ_WIZ_DISCOVERY_TAB;
break;
case 5:
id = IMakeHelpContextIds.MAKE_PROJ_WIZ_INDEXER_TAB;
break;
}
MakeUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(page.getControl(), id);
}
}
}
public MakeProjectWizardOptionPage(String title, String description) {
super("MakeProjectSettingsPage"); //$NON-NLS-1$
setTitle(title);
setDescription(description);
}
@Override
protected TabFolderOptionBlock createOptionBlock() {
return (makeWizardBlock = new MakeWizardOptionBlock(this));
}
@Override
public IProject getProject() {
return ((NewCProjectWizard) getWizard()).getNewProject();
}
/* (non-Javadoc)
* @see org.eclipse.cdt.ui.dialogs.ICOptionContainer#getPreference()
*/
@Override
public Preferences getPreferences() {
return MakeCorePlugin.getDefault().getPluginPreferences();
}
public boolean isIndexerEnabled() {
// isIndexEnabled() * @deprecated always returns false
// return makeWizardBlock.indexBlock.isIndexEnabled();
return false;
}
public void setupHelpContextIds() {
makeWizardBlock.setupHelpContextIds();
}
}

View file

@ -1,67 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.ui.wizards;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
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$
private static final String WZ_DESC = "MakeCCWizard.description"; //$NON-NLS-1$
private static final String WZ_SETTINGS_TITLE = "MakeCCWizard.title"; //$NON-NLS-1$
private static final String WZ_SETTINGS_DESC = "MakeCCWizard.description"; //$NON-NLS-1$
public NewMakeCCProjectWizard() {
super(MakeUIPlugin.getResourceString(WZ_TITLE), MakeUIPlugin.getResourceString(WZ_DESC));
}
@Override
public void addPages() {
super.addPages();
addPage(fOptionPage = new MakeProjectWizardOptionPage(MakeUIPlugin.getResourceString(WZ_SETTINGS_TITLE),
MakeUIPlugin.getResourceString(WZ_SETTINGS_DESC)));
}
@Override
protected void doRun(IProgressMonitor monitor) throws CoreException {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
monitor.beginTask(MakeUIPlugin.getResourceString("MakeCCWizard.task_name"), 10); //$NON-NLS-1$
super.doRun(new SubProgressMonitor(monitor, 9));
// Add C++ Nature.
if (newProject != null) {
// Add C++ Nature to the newly created project.
CCorePlugin.getDefault().convertProjectFromCtoCC(newProject, new SubProgressMonitor(monitor, 1));
}
monitor.done();
}
}

View file

@ -1,52 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
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$
private static final String WZ_DESC = "MakeCWizard.description"; //$NON-NLS-1$'
private static final String WZ_SETTINGS_TITLE = "MakeCWizardSettings.title"; //$NON-NLS-1$
private static final String WZ_SETTINGS_DESC = "MakeCWizardSettings.description"; //$NON-NLS-1$'
public NewMakeCProjectWizard() {
this(MakeUIPlugin.getResourceString(WZ_TITLE), MakeUIPlugin.getResourceString(WZ_DESC));
}
public NewMakeCProjectWizard(String title, String desc) {
super(title, desc);
}
@Override
public void addPages() {
super.addPages();
addPage(fOptionPage = new MakeProjectWizardOptionPage(MakeUIPlugin.getResourceString(WZ_SETTINGS_TITLE),
MakeUIPlugin.getResourceString(WZ_SETTINGS_DESC)));
}
}

View file

@ -1,93 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.make.ui.wizards;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.MakeProjectNature;
import org.eclipse.cdt.make.core.scannerconfig.ScannerConfigNature;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.make.ui.IMakeHelpContextIds;
import org.eclipse.cdt.ui.wizards.NewCProjectWizard;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
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;
public NewMakeProjectWizard(String title, String desc) {
super(title, desc);
}
@Override
protected void doRunPrologue(IProgressMonitor monitor) {
}
@Override
protected void doRunEpilogue(IProgressMonitor monitor) {
}
@Override
protected void doRun(IProgressMonitor monitor) throws CoreException {
if (monitor == null) {
monitor = new NullProgressMonitor();
}
monitor.beginTask(MakeUIPlugin.getResourceString("MakeCWizard.task_name"), 10); //$NON-NLS-1$
// super.doRun() just creates the project and does not assign a builder to it.
super.doRun(new SubProgressMonitor(monitor, 5));
MakeProjectNature.addNature(getProjectHandle(), new SubProgressMonitor(monitor, 1));
ScannerConfigNature.addScannerConfigNature(getProjectHandle());
// Modify the project based on what the user has selected
if (newProject != null) {
fOptionPage.performApply(new SubProgressMonitor(monitor, 4));
monitor.done();
}
}
@Override
public String getProjectID() {
return MakeCorePlugin.MAKE_PROJECT_ID;
}
@Override
public void createPageControls(Composite pageContainer) {
super.createPageControls(pageContainer);
IWizardPage[] pages = getPages();
if (pages != null && pages.length == 2) {
MakeUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(pages[0].getControl(),
IMakeHelpContextIds.MAKE_PROJ_WIZ_NAME_PAGE);
MakeProjectWizardOptionPage optionPage = (MakeProjectWizardOptionPage) pages[1];
optionPage.setupHelpContextIds();
}
}
}

View file

@ -0,0 +1,33 @@
/*******************************************************************************
* Copyright (c) 2020 Marc-Andre Laperle.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.ui.wizards;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.internal.ui.wizards.messages"; //$NON-NLS-1$
public static String WizardMakeProjectConversion_title;
public static String WizardMakeProjectConversion_description;
public static String WizardMakeProjectConversion_monitor_convertingToMakeProject;
public static String WizardMakeProjectConversion_projectOptions_title;
public static String WizardMakeProjectConversion_projectOptions_projectType;
public static String WizardMakeProjectConversion_projectOptions_projectTypeTable;
public static String WizardMakeProjectConversion_projectOptions_showSuppressed;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
private Messages() {
}
}

View file

@ -0,0 +1,18 @@
###############################################################################
# Copyright (c) 2020 Marc-Andre Laperle and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
###############################################################################
WizardMakeProjectConversion_title=Convert to a C/C++ project
WizardMakeProjectConversion_description=The wizard adds C/C++ Nature to the selected projects to enable C/C++ Tools Support for them.
WizardMakeProjectConversion_monitor_convertingToMakeProject=Converting to C/C++ Project...
WizardMakeProjectConversion_projectOptions_title=Project options
WizardMakeProjectConversion_projectOptions_projectType=Specify project type
WizardMakeProjectConversion_projectOptions_projectTypeTable=Project type:
WizardMakeProjectConversion_projectOptions_showSuppressed=Show project types and toolchains only if they are supported on the platform

View file

@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.cdt.core.CCProjectNature;
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.cdt.managedbuilder.internal.ui.wizards.Messages;
import org.eclipse.cdt.ui.newui.AbstractPage;
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
import org.eclipse.cdt.ui.newui.PageLayout;
@ -53,9 +53,6 @@ import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
private static final String WZ_TITLE = "WizardMakeProjectConversion.title"; //$NON-NLS-1$
private static final String WZ_DESC = "WizardMakeProjectConversion.description"; //$NON-NLS-1$
/**
* @since 5.1
*/
@ -96,14 +93,13 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
layoutData.heightHint = 200;
optionsGroup.setLayoutData(layoutData);
optionsGroup.setLayout(new GridLayout(1, true));
optionsGroup.setText(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.projectOptions.title")); //$NON-NLS-1$
optionsGroup.setText(Messages.WizardMakeProjectConversion_projectOptions_title);
Composite c = new Composite(optionsGroup, SWT.NONE);
c.setLayoutData(new GridData(GridData.FILL_BOTH));
c.setLayout(new GridLayout(2, true));
specifyProjectTypeButton = new Button(c, SWT.CHECK);
specifyProjectTypeButton
.setText(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.projectOptions.projectType")); //$NON-NLS-1$
specifyProjectTypeButton.setText(Messages.WizardMakeProjectConversion_projectOptions_projectType);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
specifyProjectTypeButton.setLayoutData(gd);
@ -115,8 +111,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
});
left_label = new Label(c, SWT.NONE);
left_label
.setText(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.projectOptions.projectTypeTable")); //$NON-NLS-1$
left_label.setText(Messages.WizardMakeProjectConversion_projectOptions_projectTypeTable);
left_label.setFont(container.getFont());
left_label.setLayoutData(new GridData(GridData.BEGINNING));
@ -141,7 +136,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
show_sup = new Button(c, SWT.CHECK);
show_sup.setSelection(true);
show_sup.setText(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.projectOptions.showSuppressed")); //$NON-NLS-1$
show_sup.setText(Messages.WizardMakeProjectConversion_projectOptions_showSuppressed);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
show_sup.setLayoutData(gd);
@ -233,7 +228,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
*/
@Override
protected String getWzTitleResource() {
return MakeUIPlugin.getResourceString(WZ_TITLE);
return Messages.WizardMakeProjectConversion_title;
}
/**
@ -242,7 +237,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
*/
@Override
protected String getWzDescriptionResource() {
return MakeUIPlugin.getResourceString(WZ_DESC);
return Messages.WizardMakeProjectConversion_description;
}
/**
@ -265,8 +260,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
@Override
public void convertProject(IProject project, String bsId, IProgressMonitor monitor) throws CoreException {
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), //$NON-NLS-1$
3);
monitor.beginTask(Messages.WizardMakeProjectConversion_monitor_convertingToMakeProject, 3);
try {
boolean wasCDTProject = AbstractPage.isCDTPrj(project);
super.convertProject(project, bsId, new SubProgressMonitor(monitor, 1));
@ -280,8 +274,7 @@ public class ConvertToMakeWizardPage extends ConvertProjectWizardPage {
@Override
public void convertProject(IProject project, IProgressMonitor monitor, String projectID) throws CoreException {
monitor.beginTask(MakeUIPlugin.getResourceString("WizardMakeProjectConversion.monitor.convertingToMakeProject"), //$NON-NLS-1$
3);
monitor.beginTask(Messages.WizardMakeProjectConversion_monitor_convertingToMakeProject, 3);
try {
boolean wasCDTProject = AbstractPage.isCDTPrj(project);
super.convertProject(project, new SubProgressMonitor(monitor, 1), projectID);

View file

@ -41,6 +41,7 @@
<li><a href="#oldparsers">Remove LRParser, XLC and UPC.</a></li>
<li><a href="#cdtutilsPlatform">Remove org.eclipse.cdt.utils.Platform.</a></li>
<li><a href="#dsf">DSF and DSF-GDB API Changes.</a></li>
<li><a href="#oldStyleProjects">Partial removal of CDT 3.X project support.</a></li>
</ol>
<p>
Planned Removals after June 2022
@ -198,6 +199,22 @@
</ul>
</p>
<h3>10. <a name="oldStyleProjects">Partial removal of CDT 3.X project support</a></h3>
<p>
CDT 3.X projects have been deprecated since CDT 4.0. Some classes supporting this old version have been removed:
<ul>
<li>org.eclipse.cdt.make.ui.wizards.ConvertToMakeProjectWizard</li>
<li>org.eclipse.cdt.make.ui.wizards.ConvertToMakeProjectWizardPage</li>
<li>org.eclipse.cdt.make.ui.wizards.MakeProjectWizardOptionPage</li>
<li>org.eclipse.cdt.make.ui.wizards.NewMakeCCProjectWizard</li>
<li>org.eclipse.cdt.make.ui.wizards.NewMakeCProjectWizard</li>
<li>org.eclipse.cdt.make.ui.wizards.NewMakeProjectWizard</li>
</ul>
</p>
<p>
See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=564949" target="_blank">Bug 564949</a>.
</p>
<hr>
<h2>Future Deletions</h2>