[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Managed Build System patches
|
This mail contains patches for the Managed Build System
core, tests, and ui.
- Handles Managed Build System
projects that fail to open or convert, for example, because the tool-chain
that the project uses is not installed.
- When a project configuration is
removed, cleans the configuration output.
- Edits for some of the
externalized strings.
Regards,
Leo
|
Index: src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties,v
retrieving revision 1.21
diff -u -r1.21 PluginResources.properties
--- src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties 4 Nov 2004 16:56:03 -0000 1.21
+++ src/org/eclipse/cdt/managedbuilder/internal/ui/PluginResources.properties 6 Nov 2004 00:52:30 -0000
@@ -4,7 +4,7 @@
#########################################
# ------- Project Update Messages -------
-ManagedBuilderStartup.update.20x.title=Update Managed Builder Project
+ManagedBuilderStartup.update.20x.title=Update Managed Make Project
ManagedBuilderStartup.update.20x.message=The project {0} has been detected in your workspace.\n Its build settings are stored in a format that is no longer supported.\n Would you like to convert them now?
# ------- NewProjectCreationPluginPage-------
@@ -54,7 +54,7 @@
BuildPropertyPage.tip.remconf=Remove configurations for the platform
BuildPropertyPage.manage.title=Manage
BuildPropertyPage.error.Unknown_tree_element=Unknown type of element in tree of type {0}
-BuildPropertyPage.error.version_low=The project settings are stored in an earlier format.\nYou must upgrade the project before the settings can be upgraded.
+BuildPropertyPage.error.version_low=The project settings are stored in an earlier format.\nYou must upgrade the project before the settings can be displayed.
BuildPropertyPage.defaults.title=Reset Configuration Tools
BuildPropertyPage.defaults.message=This action will reset all of the tools in the selected configuration to their default settings.\n\nDo you want to proceed?
BuildPropertyPage.changes.save.title=Apply Configuration Changes
@@ -87,6 +87,7 @@
ResourceBuildPropertyPage.label.ToolTree=Tools
ResourceBuildPropertyPage.label.ToolOptions=Options
ResourceBuildPropertyPage.label.NotMBSFile=The project is closed or the file is not contained within a Managed Make project.
+ResourceBuildPropertyPage.error.version_low=The project settings are stored in an earlier format.\nYou must upgrade the project before the settings can be displayed.
# ----------- Entry Dialog -----------
BrowseEntryDialog.error.Folder_name_invalid = Folder name invalid
Index: src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java,v
retrieving revision 1.22
diff -u -r1.22 BuildPropertyPage.java
--- src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java 28 Oct 2004 17:16:33 -0000 1.22
+++ src/org/eclipse/cdt/managedbuilder/ui/properties/BuildPropertyPage.java 6 Nov 2004 00:52:31 -0000
@@ -141,6 +141,7 @@
invalidInfo.setFont(parent.getFont());
invalidInfo.setText(ManagedBuilderUIMessages.getResourceString("BuildPropertyPage.error.version_low")); //$NON-NLS-1$
invalidInfo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING, GridData.VERTICAL_ALIGN_CENTER, true, true));
+ noDefaultAndApplyButton();
return;
}
projectTypes = ManagedBuildManager.getDefinedProjectTypes();
Index: src/org/eclipse/cdt/managedbuilder/ui/properties/ResourceBuildPropertyPage.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ResourceBuildPropertyPage.java,v
retrieving revision 1.2
diff -u -r1.2 ResourceBuildPropertyPage.java
--- src/org/eclipse/cdt/managedbuilder/ui/properties/ResourceBuildPropertyPage.java 4 Nov 2004 16:56:03 -0000 1.2
+++ src/org/eclipse/cdt/managedbuilder/ui/properties/ResourceBuildPropertyPage.java 6 Nov 2004 00:52:31 -0000
@@ -152,6 +152,9 @@
invalidInfo.setFont(composite.getFont());
invalidInfo.setText(ManagedBuilderUIMessages.getResourceString("ResourceBuildPropertyPage.error.version_low")); //$NON-NLS-1$
invalidInfo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING,GridData.VERTICAL_ALIGN_CENTER, true, true));
+ noContentOnPage = true;
+ noDefaultAndApplyButton();
+ return;
}
// Add a config selection area
Index: src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java,v
retrieving revision 1.15
diff -u -r1.15 NewManagedProjectWizard.java
--- src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java 28 Oct 2004 17:16:34 -0000 1.15
+++ src/org/eclipse/cdt/managedbuilder/ui/wizards/NewManagedProjectWizard.java 6 Nov 2004 00:52:31 -0000
@@ -21,6 +21,7 @@
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderHelpContextIds;
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIMessages;
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
@@ -122,8 +123,9 @@
// Add the ManagedProject to the project
IManagedProject newManagedProject = null;
+ IManagedBuildInfo info = null;
try {
- ManagedBuildManager.createBuildInfo(newProject);
+ info = ManagedBuildManager.createBuildInfo(newProject);
IProjectType parent = projectConfigurationPage.getSelectedProjectType();
newManagedProject = ManagedBuildManager.createManagedProject(newProject, parent);
if (newManagedProject != null) {
@@ -168,7 +170,10 @@
// Save the build options
monitor.subTask(ManagedBuilderUIMessages.getResourceString(MSG_SAVE));
- ManagedBuildManager.saveBuildInfo(newProject, true);
+ if (info != null) {
+ info.setValid(true);
+ ManagedBuildManager.saveBuildInfo(newProject, true);
+ }
monitor.done();
}
Index: src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java,v
retrieving revision 1.14
diff -u -r1.14 IManagedBuildInfo.java
--- src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java 28 Oct 2004 17:16:53 -0000 1.14
+++ src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java 6 Nov 2004 00:51:09 -0000
@@ -272,13 +272,21 @@
public boolean isHeaderFile(String ext);
/**
- * gets the read only status of Managed Build Info
+ * Gets the read only status of Managed Build Info
*
* @return <code>true</code> if Managed Build Info is read only
* otherwise returns <code>false</code>
*/
public boolean isReadOnly();
-
+
+ /**
+ * Gets the "valid" status of Managed Build Info. Managed Build Info is invalid
+ * if the loading of, or conversion to, the Managed Build Info failed.
+ *
+ * @return <code>true</code> if Managed Build Info is valid,
+ * otherwise returns <code>false</code>
+ */
+ public boolean isValid();
/**
* Answers whether the receiver has been changed and requires the
@@ -314,11 +322,18 @@
public boolean setDefaultConfiguration(String configName);
/**
- * Set the dirty flag for the build model to the value of the argument.
+ * Sets the dirty flag for the build model to the value of the argument.
*
* @param isDirty
*/
public void setDirty(boolean isDirty);
+
+ /**
+ * Sets the valid flag for the build model to the value of the argument.
+ *
+ * @param isValid
+ */
+ public void setValid(boolean isValid);
/**
* Sets the ManagedProject associated with this build info
Index: src/org/eclipse/cdt/managedbuilder/core/ITool.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java,v
retrieving revision 1.11
diff -u -r1.11 ITool.java
--- src/org/eclipse/cdt/managedbuilder/core/ITool.java 4 Nov 2004 16:56:27 -0000 1.11
+++ src/org/eclipse/cdt/managedbuilder/core/ITool.java 6 Nov 2004 00:51:09 -0000
@@ -95,7 +95,10 @@
public IOption getOptionById(String id);
/**
- * Answers the options that may be customized for this tool.
+ * Returns the complete list of options that are available for this tool.
+ * The list is a merging of the options specified for this tool with the
+ * options of its superclasses. The lowest option instance in the hierarchy
+ * takes precedence.
*
* @return IOption[]
*/
Index: src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java,v
retrieving revision 1.30
diff -u -r1.30 ManagedBuildManager.java
--- src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java 4 Nov 2004 16:56:27 -0000 1.30
+++ src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java 6 Nov 2004 00:51:12 -0000
@@ -79,6 +79,10 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -807,7 +811,10 @@
ManagedBuildInfo buildInfo = (ManagedBuildInfo) getBuildInfo(project);
// Save the build info
- if (buildInfo != null && !buildInfo.isReadOnly() && (force == true || buildInfo.isDirty())) {
+ if (buildInfo != null &&
+ !buildInfo.isReadOnly() &&
+ buildInfo.isValid() &&
+ (force == true || buildInfo.isDirty())) {
// For post-2.0 projects, there will be a version
String projectVersion = buildInfo.getVersion();
if (projectVersion != null) {
@@ -1158,8 +1165,7 @@
}
}
} catch (Exception e) {
- buildInfo = null;
- // TODO: Issue an error message that the managed build project file (.cdtbuild) is invalid
+ throw e;
}
try {
@@ -1198,8 +1204,7 @@
try{
UpdateManagedProjectManager.updateProject(project,buildInfo);
} catch(CoreException e){
- //TODO: error occured while updating the project,
- //handle error, log error or display the message
+ throw e;
}
}
project.setSessionProperty(buildInfoProperty, buildInfo);
@@ -1207,6 +1212,8 @@
} catch (Exception e) {
throw e;
}
+
+ buildInfo.setValid(true);
return buildInfo;
}
@@ -1529,7 +1536,7 @@
*
* @param resource The resource the build information is associated with
*/
- public static void createBuildInfo(IResource resource) {
+ public static ManagedBuildInfo createBuildInfo(IResource resource) {
ManagedBuildInfo buildInfo = new ManagedBuildInfo(resource);
try {
// Associate the build info with the project for the duration of the session
@@ -1538,6 +1545,7 @@
// There is no point in keeping the info around if it isn't associated with the project
buildInfo = null;
}
+ return buildInfo;
}
private static IManagedConfigElementProvider createConfigProvider(
@@ -1673,7 +1681,28 @@
try {
buildInfo = loadBuildInfo(project);
} catch (Exception e) {
- // TODO: Issue error reagarding not being able to load the project file (.cdtbuild)
+ // Issue error regarding not being able to load the project file (.cdtbuild)
+ if (buildInfo == null) {
+ buildInfo = createBuildInfo(project);
+ }
+ buildInfo.setValid(false);
+ // Display error message
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if(window == null){
+ IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows();
+ window = windows[0];
+ }
+
+ final Shell shell = window.getShell();
+ final String exceptionMsg = e.getMessage();
+ shell.getDisplay().syncExec( new Runnable() {
+ public void run() {
+ MessageDialog.openError(shell,
+ ManagedMakeMessages.getResourceString("ManagedBuildManager.error.open_failed_title"), //$NON-NLS-1$
+ ManagedMakeMessages.getFormattedString("ManagedBuildManager.error.open_failed", //$NON-NLS-1$
+ exceptionMsg));
+ }
+ } );
}
try {
Index: src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java,v
retrieving revision 1.30
diff -u -r1.30 GeneratedMakefileBuilder.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java 4 Nov 2004 16:56:27 -0000 1.30
+++ src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java 6 Nov 2004 00:51:13 -0000
@@ -222,7 +222,11 @@
outputError(getProject().getName(), "Build information was not found"); //$NON-NLS-1$
return referencedProjects;
}
-
+ if (!info.isValid()) {
+ outputError(getProject().getName(), "Build information is not valid"); //$NON-NLS-1$
+ return referencedProjects;
+ }
+
// Create a makefile generator for the build
IManagedBuilderMakefileGenerator generator = ManagedBuildManager.getBuildfileGenerator(info.getDefaultConfiguration());
generator.initialize(getProject(), info, monitor);
@@ -281,6 +285,10 @@
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(getProject());
if (info == null) {
outputError(getProject().getName(), "Build information was not found"); //$NON-NLS-1$
+ return;
+ }
+ if (!info.isValid()) {
+ outputError(getProject().getName(), "Build information is not valid"); //$NON-NLS-1$
return;
}
IPath buildDirPath = getProject().getLocation().append(info.getConfigurationName());
Index: src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java,v
retrieving revision 1.26
diff -u -r1.26 ManagedBuildInfo.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java 4 Nov 2004 16:56:27 -0000 1.26
+++ src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java 6 Nov 2004 00:51:14 -0000
@@ -72,6 +72,7 @@
private IConfiguration defaultConfig;
private String defaultConfigId;
private boolean isDirty;
+ private boolean isValid = false;
private IResource owner;
private boolean rebuildNeeded;
private String version;
@@ -390,31 +391,33 @@
if (location == null) {
location = new Path("."); //$NON-NLS-1$
}
- IPath root = location.addTrailingSeparator().append(config.getName());
- ITool[] tools = config.getFilteredTools();
- for (int i = 0; i < tools.length; i++) {
- ITool tool = tools[i];
- // The tool checks out for this project, get its options
- IOption[] opts = tool.getOptions();
- for (int j = 0; j < opts.length; j++) {
- IOption option = opts[j];
- try {
- if (option.getValueType() == IOption.INCLUDE_PATH) {
- // Get all the user-defined paths from the option as absolute paths
- String[] userPaths = option.getIncludePaths();
- for (int index = 0; index < userPaths.length; ++index) {
- IPath userPath = new Path(userPaths[index]);
- if (userPath.isAbsolute()) {
- paths.add(userPath.toOSString());
- } else {
- IPath absPath = root.addTrailingSeparator().append(userPath);
- paths.add(absPath.makeAbsolute().toOSString());
+ if (config != null) {
+ IPath root = location.addTrailingSeparator().append(config.getName());
+ ITool[] tools = config.getFilteredTools();
+ for (int i = 0; i < tools.length; i++) {
+ ITool tool = tools[i];
+ // The tool checks out for this project, get its options
+ IOption[] opts = tool.getOptions();
+ for (int j = 0; j < opts.length; j++) {
+ IOption option = opts[j];
+ try {
+ if (option.getValueType() == IOption.INCLUDE_PATH) {
+ // Get all the user-defined paths from the option as absolute paths
+ String[] userPaths = option.getIncludePaths();
+ for (int index = 0; index < userPaths.length; ++index) {
+ IPath userPath = new Path(userPaths[index]);
+ if (userPath.isAbsolute()) {
+ paths.add(userPath.toOSString());
+ } else {
+ IPath absPath = root.addTrailingSeparator().append(userPath);
+ paths.add(absPath.makeAbsolute().toOSString());
+ }
}
}
+ } catch (BuildException e) {
+ // TODO: report error
+ continue;
}
- } catch (BuildException e) {
- // TODO: report error
- continue;
}
}
}
@@ -670,9 +673,27 @@
}
// Check if the project is dirty
- return managedProject.isDirty();
+ if (managedProject != null) {
+ return managedProject.isDirty();
+ }
+ return false;
}
-
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#isValid()
+ */
+ public boolean isValid() {
+ // If the info has been flagged as valid, answer true
+ return isValid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#isReadOnly()
+ */
+ public boolean isReadOnly(){
+ return isReadOnly;
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#isHeaderFile(java.lang.String)
*/
@@ -773,8 +794,11 @@
* @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#setDefaultConfiguration(org.eclipse.cdt.core.build.managed.IConfiguration)
*/
public void setDefaultConfiguration(IConfiguration configuration) {
+ // TODO: This is probably wrong. I'll bet we don't handle the case where all configs are deleted...
+ // But, at least, our UI does not allow the last config to be deleted.
// Sanity
if (configuration == null) return;
+
if (!configuration.equals(getDefaultConfiguration())) {
// Save it
defaultConfig = configuration;
@@ -815,6 +839,23 @@
}
/* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setValid(boolean)
+ */
+ public void setValid(boolean isValid) {
+ // Reset the valid status
+ this.isValid = isValid;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setReadOnly(boolean)
+ */
+ public void setReadOnly(boolean readOnly){
+ if(!readOnly && isReadOnly)
+ setDirty(true);
+ isReadOnly = readOnly;
+ }
+
+ /* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
*/
public void setRebuildState(boolean rebuild) {
@@ -931,15 +972,5 @@
targetList = new ArrayList();
}
return targetList;
- }
-
- public void setReadOnly(boolean readOnly){
- if(!readOnly && isReadOnly)
- setDirty(true);
- isReadOnly = readOnly;
- }
-
- public boolean isReadOnly(){
- return isReadOnly;
}
}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java,v
retrieving revision 1.1
diff -u -r1.1 ManagedProject.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java 28 Oct 2004 17:16:53 -0000 1.1
+++ src/org/eclipse/cdt/managedbuilder/internal/core/ManagedProject.java 6 Nov 2004 00:51:14 -0000
@@ -22,7 +22,13 @@
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
+import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -231,16 +237,56 @@
* @see org.eclipse.cdt.managedbuilder.core.IManagedProject#removeConfiguration(java.lang.String)
*/
public void removeConfiguration(String id) {
- // Remove the specified configuration from the list and map
- Iterator iter = getConfigurationList().listIterator();
- while (iter.hasNext()) {
- IConfiguration config = (IConfiguration)iter.next();
- if (config.getId().equals(id)) {
- getConfigurationList().remove(config);
- getConfigurationMap().remove(id);
- break;
- }
+ final String removeId = id;
+ IWorkspaceRunnable remover = new IWorkspaceRunnable() {
+ public void run(IProgressMonitor monitor) throws CoreException {
+ // Remove the specified configuration from the list and map
+ Iterator iter = getConfigurationList().listIterator();
+ while (iter.hasNext()) {
+ IConfiguration config = (IConfiguration)iter.next();
+ if (config.getId().equals(removeId)) {
+ // TODO: For now we clean the entire project. This may be overkill, but
+ // it avoids a problem with leaving the configuration output directory
+ // around and having the outputs try to be used by the makefile generator code.
+ IResource proj = config.getOwner();
+ IManagedBuildInfo info = null;
+ if (proj instanceof IProject) {
+ info = ManagedBuildManager.getBuildInfo(proj);
+ }
+ IConfiguration currentConfig = null;
+ boolean isCurrent = true;
+ if (info != null) {
+ currentConfig = info.getDefaultConfiguration();
+ if (!currentConfig.getId().equals(removeId)) {
+ info.setDefaultConfiguration(config);
+ isCurrent = false;
+ }
+ }
+ ((IProject)proj).build(IncrementalProjectBuilder.CLEAN_BUILD, monitor);
+
+ getConfigurationList().remove(config);
+ getConfigurationMap().remove(removeId);
+
+ if (info != null) {
+ if (!isCurrent) {
+ info.setDefaultConfiguration(currentConfig);
+ } else {
+ // If the current default config is the one being removed, reset the default config
+ String[] configs = info.getConfigurationNames();
+ if (configs.length > 0) {
+ info.setDefaultConfiguration(configs[0]);
+ }
+ }
+ }
+ break;
+ }
+ }
+ }
+ };
+ try {
+ ResourcesPlugin.getWorkspace().run( remover, null );
}
+ catch( CoreException e ) {}
setDirty(true);
}
Index: src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties,v
retrieving revision 1.18
diff -u -r1.18 PluginResources.properties
--- src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties 26 Jun 2004 21:13:07 -0000 1.18
+++ src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties 6 Nov 2004 00:51:15 -0000
@@ -39,6 +39,8 @@
ManagedBuildManager.error.owner_not_project=addTarget: owner not project
ManagedBuildManager.error.manifest.version.error=The version of plugin file is higher than version of the build system
ManagedBuildManager.error.project.version.error=The version of the project is higher than the build system
+ManagedBuildManager.error.open_failed_title=Managed Make Project File Error
+ManagedBuildManager.error.open_failed=The Managed Make project file could not be read because of the following error.\n\n{0}\n\nManaged Make functionality will not be available for this project.
# Makefile Generator Messages
MakefileGenerator.message.start.file=Building file:
Index: src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java,v
retrieving revision 1.24
diff -u -r1.24 GnuMakefileGenerator.java
--- src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java 4 Nov 2004 16:56:27 -0000 1.24
+++ src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java 6 Nov 2004 00:51:18 -0000
@@ -533,7 +533,9 @@
if (info.buildsFileType(ext)) {
// look for the extension in the map
StringBuffer bufferForExtension = new StringBuffer();
- bufferForExtension.append(extensionToRuleStringMap.get(ext).toString());
+ if (extensionToRuleStringMap.containsKey(ext)) {
+ bufferForExtension.append(extensionToRuleStringMap.get(ext).toString());
+ }
if(bufferForExtension != null &&
!getOutputExtensions().contains(bufferForExtension.toString())) {
Index: src/org/eclipse/cdt/managedbuilder/projectconverter/PluginResources.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/PluginResources.properties,v
retrieving revision 1.1
diff -u -r1.1 PluginResources.properties
--- src/org/eclipse/cdt/managedbuilder/projectconverter/PluginResources.properties 28 Oct 2004 17:16:53 -0000 1.1
+++ src/org/eclipse/cdt/managedbuilder/projectconverter/PluginResources.properties 6 Nov 2004 00:51:18 -0000
@@ -12,31 +12,33 @@
UpdateManagedProject20.0=Backing up the settings file for {0}
UpdateManagedProject20.1=Updating build settings for project {0}
UpdateManagedProject20.10=No configurations were found for project {0}
-UpdateManagedProject20.11=Build exception occured while creating managed project {0} : {1}
+UpdateManagedProject20.11=Build exception occurred while creating Managed Make project {0} : {1}
UpdateManagedProject20.2=convertConfiguration: Configuration {0} was not found
UpdateManagedProject20.3=convertToolRef: Tool ID attribute does not exist
UpdateManagedProject20.4=convertToolRef: Toolchain does not contain tools
UpdateManagedProject20.5=convertToolRef: Parent not found for tool {0}
UpdateManagedProject20.6=convertOptionRef: option ID attribute does not exist
UpdateManagedProject20.7=convertOptionRef: option {0} not found
-UpdateManagedProject20.8=convertOptionRef: BuildException occured: {0}
+UpdateManagedProject20.8=convertOptionRef: BuildException occurred: {0}
UpdateManagedProject20.9=Project type {0} not found
+UpdateManagedProject20.invalid_build_info=The Managed Make information for the project is not valid.
UpdateManagedProject12.0=Backing up the settings file for {0}
UpdateManagedProject12.1=Updating build settings for project {0}
UpdateManagedProject12.2=configuration {0} not found
UpdateManagedProject12.3=Parent not found for option {0}
UpdateManagedProject12.4=option {0} not found
-UpdateManagedProject12.5=convertOptionRef: BuildException occured: {0}
+UpdateManagedProject12.5=convertOptionRef: BuildException occurred: {0}
UpdateManagedProject12.6=Project type {0} not found
UpdateManagedProject12.7=No configurations were found for project {0}
-UpdateManagedProject12.8=Build exception occured while creating managed project {0} : {1}
+UpdateManagedProject12.8=Build exception occurred while creating Managed Make project {0} : {1}
UpdateManagedProject12.9=Toolchain does not contain tools
UpdateManagedProject12.10=Parent not found for tool {0}
UpdateManagedProject12.11=tool {0} not found
+UpdateManagedProject12.invalid_build_info=The Managed Make information for the project is not valid.
UpdateManagedProjectManager.0=Backup File Already Exists
UpdateManagedProjectManager.1=A backup file {0} already exists for the project {1}.\n Do you want to convert the project anyway?
UpdateManagedProjectManager.2=The update operation has been cancelled.\n The build system will not be able to read the project settings until you update the project.
-UpdateManagedProjectManager.3=Update Managed Builder Project
+UpdateManagedProjectManager.3=Update Managed Make Project
UpdateManagedProjectManager.4=The project {0} build settings are stored in a format that is no longer supported (version {1}).\n\nWould you like to convert it to the newer version ({2})?\n\nNOTE: Converted projects can no longer be loaded by previous versions of the Managed Build System.\nIf you select "No", project settings will be available in readonly mode.
-UpdateManagedProjectManager.5=Managed project conversion FAILED: \n ManagedBuildManager version {0} is not equivalent to ManagedProject version {1} (project ID = {2})
+UpdateManagedProjectManager.5=Managed Make project conversion failed: \n Managed Build System version {0} is not equivalent to the Managed Make project version {1} (project ID = {2})
UpdateManagedProjectManager.6=the project .cdtbuild file does not exist
Index: tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests20.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests20.java,v
retrieving revision 1.1
diff -u -r1.1 ManagedBuildCoreTests20.java
--- tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests20.java 4 Nov 2004 16:55:58 -0000 1.1
+++ tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests20.java 6 Nov 2004 00:52:03 -0000
@@ -733,7 +733,8 @@
private void addManagedBuildNature (IProject project) {
// Create the buildinformation object for the project
- ManagedBuildManager.createBuildInfo(project);
+ IManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
+ info.setValid(true);
// Add the managed build nature
try {