mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 07:15:39 +02:00
Commit for Leo Treggiari:
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.
This commit is contained in:
parent
cf5df1e48f
commit
b7c36f5113
14 changed files with 216 additions and 67 deletions
|
@ -733,7 +733,8 @@ public class ManagedBuildCoreTests20 extends TestCase {
|
||||||
|
|
||||||
private void addManagedBuildNature (IProject project) {
|
private void addManagedBuildNature (IProject project) {
|
||||||
// Create the buildinformation object for the project
|
// Create the buildinformation object for the project
|
||||||
ManagedBuildManager.createBuildInfo(project);
|
IManagedBuildInfo info = ManagedBuildManager.createBuildInfo(project);
|
||||||
|
info.setValid(true);
|
||||||
|
|
||||||
// Add the managed build nature
|
// Add the managed build nature
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -272,13 +272,21 @@ public interface IManagedBuildInfo {
|
||||||
public boolean isHeaderFile(String ext);
|
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
|
* @return <code>true</code> if Managed Build Info is read only
|
||||||
* otherwise returns <code>false</code>
|
* otherwise returns <code>false</code>
|
||||||
*/
|
*/
|
||||||
public boolean isReadOnly();
|
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
|
* Answers whether the receiver has been changed and requires the
|
||||||
|
@ -314,12 +322,19 @@ public interface IManagedBuildInfo {
|
||||||
public boolean setDefaultConfiguration(String configName);
|
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
|
* @param isDirty
|
||||||
*/
|
*/
|
||||||
public void setDirty(boolean 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
|
* Sets the ManagedProject associated with this build info
|
||||||
*
|
*
|
||||||
|
|
|
@ -95,7 +95,10 @@ public interface ITool extends IBuildObject {
|
||||||
public IOption getOptionById(String id);
|
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[]
|
* @return IOption[]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -79,6 +79,10 @@ import org.eclipse.core.runtime.QualifiedName;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.jobs.IJobManager;
|
import org.eclipse.core.runtime.jobs.IJobManager;
|
||||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
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.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
@ -807,7 +811,10 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
ManagedBuildInfo buildInfo = (ManagedBuildInfo) getBuildInfo(project);
|
ManagedBuildInfo buildInfo = (ManagedBuildInfo) getBuildInfo(project);
|
||||||
|
|
||||||
// Save the build info
|
// 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
|
// For post-2.0 projects, there will be a version
|
||||||
String projectVersion = buildInfo.getVersion();
|
String projectVersion = buildInfo.getVersion();
|
||||||
if (projectVersion != null) {
|
if (projectVersion != null) {
|
||||||
|
@ -1158,8 +1165,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
buildInfo = null;
|
throw e;
|
||||||
// TODO: Issue an error message that the managed build project file (.cdtbuild) is invalid
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -1198,8 +1204,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
try{
|
try{
|
||||||
UpdateManagedProjectManager.updateProject(project,buildInfo);
|
UpdateManagedProjectManager.updateProject(project,buildInfo);
|
||||||
} catch(CoreException e){
|
} catch(CoreException e){
|
||||||
//TODO: error occured while updating the project,
|
throw e;
|
||||||
//handle error, log error or display the message
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
project.setSessionProperty(buildInfoProperty, buildInfo);
|
project.setSessionProperty(buildInfoProperty, buildInfo);
|
||||||
|
@ -1207,6 +1212,8 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildInfo.setValid(true);
|
||||||
return buildInfo;
|
return buildInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1529,7 +1536,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
*
|
*
|
||||||
* @param resource The resource the build information is associated with
|
* @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);
|
ManagedBuildInfo buildInfo = new ManagedBuildInfo(resource);
|
||||||
try {
|
try {
|
||||||
// Associate the build info with the project for the duration of the session
|
// Associate the build info with the project for the duration of the session
|
||||||
|
@ -1538,6 +1545,7 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
// There is no point in keeping the info around if it isn't associated with the project
|
// There is no point in keeping the info around if it isn't associated with the project
|
||||||
buildInfo = null;
|
buildInfo = null;
|
||||||
}
|
}
|
||||||
|
return buildInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static IManagedConfigElementProvider createConfigProvider(
|
private static IManagedConfigElementProvider createConfigProvider(
|
||||||
|
@ -1673,7 +1681,28 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
try {
|
try {
|
||||||
buildInfo = loadBuildInfo(project);
|
buildInfo = loadBuildInfo(project);
|
||||||
} catch (Exception e) {
|
} 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 {
|
try {
|
||||||
|
|
|
@ -222,6 +222,10 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
outputError(getProject().getName(), "Build information was not found"); //$NON-NLS-1$
|
outputError(getProject().getName(), "Build information was not found"); //$NON-NLS-1$
|
||||||
return referencedProjects;
|
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
|
// Create a makefile generator for the build
|
||||||
IManagedBuilderMakefileGenerator generator = ManagedBuildManager.getBuildfileGenerator(info.getDefaultConfiguration());
|
IManagedBuilderMakefileGenerator generator = ManagedBuildManager.getBuildfileGenerator(info.getDefaultConfiguration());
|
||||||
|
@ -283,6 +287,10 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
||||||
outputError(getProject().getName(), "Build information was not found"); //$NON-NLS-1$
|
outputError(getProject().getName(), "Build information was not found"); //$NON-NLS-1$
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!info.isValid()) {
|
||||||
|
outputError(getProject().getName(), "Build information is not valid"); //$NON-NLS-1$
|
||||||
|
return;
|
||||||
|
}
|
||||||
IPath buildDirPath = getProject().getLocation().append(info.getConfigurationName());
|
IPath buildDirPath = getProject().getLocation().append(info.getConfigurationName());
|
||||||
IWorkspace workspace = CCorePlugin.getWorkspace();
|
IWorkspace workspace = CCorePlugin.getWorkspace();
|
||||||
IContainer buildDir = workspace.getRoot().getContainerForLocation(buildDirPath);
|
IContainer buildDir = workspace.getRoot().getContainerForLocation(buildDirPath);
|
||||||
|
|
|
@ -72,6 +72,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
private IConfiguration defaultConfig;
|
private IConfiguration defaultConfig;
|
||||||
private String defaultConfigId;
|
private String defaultConfigId;
|
||||||
private boolean isDirty;
|
private boolean isDirty;
|
||||||
|
private boolean isValid = false;
|
||||||
private IResource owner;
|
private IResource owner;
|
||||||
private boolean rebuildNeeded;
|
private boolean rebuildNeeded;
|
||||||
private String version;
|
private String version;
|
||||||
|
@ -390,6 +391,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
location = new Path("."); //$NON-NLS-1$
|
location = new Path("."); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
if (config != null) {
|
||||||
IPath root = location.addTrailingSeparator().append(config.getName());
|
IPath root = location.addTrailingSeparator().append(config.getName());
|
||||||
ITool[] tools = config.getFilteredTools();
|
ITool[] tools = config.getFilteredTools();
|
||||||
for (int i = 0; i < tools.length; i++) {
|
for (int i = 0; i < tools.length; i++) {
|
||||||
|
@ -418,6 +420,7 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Answer the results as an array
|
// Answer the results as an array
|
||||||
return (String[])paths.toArray(new String[paths.size()]);
|
return (String[])paths.toArray(new String[paths.size()]);
|
||||||
|
@ -670,8 +673,26 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the project is dirty
|
// Check if the project is dirty
|
||||||
|
if (managedProject != null) {
|
||||||
return managedProject.isDirty();
|
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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#isHeaderFile(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#isHeaderFile(java.lang.String)
|
||||||
|
@ -773,8 +794,11 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
* @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#setDefaultConfiguration(org.eclipse.cdt.core.build.managed.IConfiguration)
|
* @see org.eclipse.cdt.core.build.managed.IManagedBuildInfo#setDefaultConfiguration(org.eclipse.cdt.core.build.managed.IConfiguration)
|
||||||
*/
|
*/
|
||||||
public void setDefaultConfiguration(IConfiguration configuration) {
|
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
|
// Sanity
|
||||||
if (configuration == null) return;
|
if (configuration == null) return;
|
||||||
|
|
||||||
if (!configuration.equals(getDefaultConfiguration())) {
|
if (!configuration.equals(getDefaultConfiguration())) {
|
||||||
// Save it
|
// Save it
|
||||||
defaultConfig = configuration;
|
defaultConfig = configuration;
|
||||||
|
@ -814,6 +838,23 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (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)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
|
* @see org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo#setRebuildState(boolean)
|
||||||
*/
|
*/
|
||||||
|
@ -932,14 +973,4 @@ public class ManagedBuildInfo implements IManagedBuildInfo, IScannerInfo {
|
||||||
}
|
}
|
||||||
return targetList;
|
return targetList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setReadOnly(boolean readOnly){
|
|
||||||
if(!readOnly && isReadOnly)
|
|
||||||
setDirty(true);
|
|
||||||
isReadOnly = readOnly;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isReadOnly(){
|
|
||||||
return isReadOnly;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,13 @@ import org.eclipse.cdt.managedbuilder.core.IManagedProject;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
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.Document;
|
||||||
import org.w3c.dom.Element;
|
import org.w3c.dom.Element;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
@ -231,16 +237,56 @@ public class ManagedProject extends BuildObject implements IManagedProject {
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedProject#removeConfiguration(java.lang.String)
|
* @see org.eclipse.cdt.managedbuilder.core.IManagedProject#removeConfiguration(java.lang.String)
|
||||||
*/
|
*/
|
||||||
public void removeConfiguration(String id) {
|
public void removeConfiguration(String id) {
|
||||||
|
final String removeId = id;
|
||||||
|
IWorkspaceRunnable remover = new IWorkspaceRunnable() {
|
||||||
|
public void run(IProgressMonitor monitor) throws CoreException {
|
||||||
// Remove the specified configuration from the list and map
|
// Remove the specified configuration from the list and map
|
||||||
Iterator iter = getConfigurationList().listIterator();
|
Iterator iter = getConfigurationList().listIterator();
|
||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
IConfiguration config = (IConfiguration)iter.next();
|
IConfiguration config = (IConfiguration)iter.next();
|
||||||
if (config.getId().equals(id)) {
|
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);
|
getConfigurationList().remove(config);
|
||||||
getConfigurationMap().remove(id);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
ResourcesPlugin.getWorkspace().run( remover, null );
|
||||||
|
}
|
||||||
|
catch( CoreException e ) {}
|
||||||
setDirty(true);
|
setDirty(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ ManagedBuildManager.error.null_owner=addTarget: null owner
|
||||||
ManagedBuildManager.error.owner_not_project=addTarget: owner not project
|
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.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.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
|
# Makefile Generator Messages
|
||||||
MakefileGenerator.message.start.file=Building file:
|
MakefileGenerator.message.start.file=Building file:
|
||||||
|
|
|
@ -533,7 +533,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator {
|
||||||
if (info.buildsFileType(ext)) {
|
if (info.buildsFileType(ext)) {
|
||||||
// look for the extension in the map
|
// look for the extension in the map
|
||||||
StringBuffer bufferForExtension = new StringBuffer();
|
StringBuffer bufferForExtension = new StringBuffer();
|
||||||
|
if (extensionToRuleStringMap.containsKey(ext)) {
|
||||||
bufferForExtension.append(extensionToRuleStringMap.get(ext).toString());
|
bufferForExtension.append(extensionToRuleStringMap.get(ext).toString());
|
||||||
|
}
|
||||||
if(bufferForExtension != null &&
|
if(bufferForExtension != null &&
|
||||||
!getOutputExtensions().contains(bufferForExtension.toString())) {
|
!getOutputExtensions().contains(bufferForExtension.toString())) {
|
||||||
|
|
||||||
|
|
|
@ -12,31 +12,33 @@
|
||||||
UpdateManagedProject20.0=Backing up the settings file for {0}
|
UpdateManagedProject20.0=Backing up the settings file for {0}
|
||||||
UpdateManagedProject20.1=Updating build settings for project {0}
|
UpdateManagedProject20.1=Updating build settings for project {0}
|
||||||
UpdateManagedProject20.10=No configurations were found 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.2=convertConfiguration: Configuration {0} was not found
|
||||||
UpdateManagedProject20.3=convertToolRef: Tool ID attribute does not exist
|
UpdateManagedProject20.3=convertToolRef: Tool ID attribute does not exist
|
||||||
UpdateManagedProject20.4=convertToolRef: Toolchain does not contain tools
|
UpdateManagedProject20.4=convertToolRef: Toolchain does not contain tools
|
||||||
UpdateManagedProject20.5=convertToolRef: Parent not found for tool {0}
|
UpdateManagedProject20.5=convertToolRef: Parent not found for tool {0}
|
||||||
UpdateManagedProject20.6=convertOptionRef: option ID attribute does not exist
|
UpdateManagedProject20.6=convertOptionRef: option ID attribute does not exist
|
||||||
UpdateManagedProject20.7=convertOptionRef: option {0} not found
|
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.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.0=Backing up the settings file for {0}
|
||||||
UpdateManagedProject12.1=Updating build settings for project {0}
|
UpdateManagedProject12.1=Updating build settings for project {0}
|
||||||
UpdateManagedProject12.2=configuration {0} not found
|
UpdateManagedProject12.2=configuration {0} not found
|
||||||
UpdateManagedProject12.3=Parent not found for option {0}
|
UpdateManagedProject12.3=Parent not found for option {0}
|
||||||
UpdateManagedProject12.4=option {0} not found
|
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.6=Project type {0} not found
|
||||||
UpdateManagedProject12.7=No configurations were found for project {0}
|
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.9=Toolchain does not contain tools
|
||||||
UpdateManagedProject12.10=Parent not found for tool {0}
|
UpdateManagedProject12.10=Parent not found for tool {0}
|
||||||
UpdateManagedProject12.11=tool {0} not found
|
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.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.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.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.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
|
UpdateManagedProjectManager.6=the project .cdtbuild file does not exist
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
# ------- Project Update Messages -------
|
# ------- 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?
|
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-------
|
# ------- NewProjectCreationPluginPage-------
|
||||||
|
@ -54,7 +54,7 @@ BuildPropertyPage.tip.addconf=Add configurations for the platform
|
||||||
BuildPropertyPage.tip.remconf=Remove configurations for the platform
|
BuildPropertyPage.tip.remconf=Remove configurations for the platform
|
||||||
BuildPropertyPage.manage.title=Manage
|
BuildPropertyPage.manage.title=Manage
|
||||||
BuildPropertyPage.error.Unknown_tree_element=Unknown type of element in tree of type {0}
|
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.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.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
|
BuildPropertyPage.changes.save.title=Apply Configuration Changes
|
||||||
|
@ -87,6 +87,7 @@ ResourceBuildPropertyPage.selection.configuration.all=All configurations
|
||||||
ResourceBuildPropertyPage.label.ToolTree=Tools
|
ResourceBuildPropertyPage.label.ToolTree=Tools
|
||||||
ResourceBuildPropertyPage.label.ToolOptions=Options
|
ResourceBuildPropertyPage.label.ToolOptions=Options
|
||||||
ResourceBuildPropertyPage.label.NotMBSFile=The project is closed or the file is not contained within a Managed Make project.
|
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 -----------
|
# ----------- Entry Dialog -----------
|
||||||
BrowseEntryDialog.error.Folder_name_invalid = Folder name invalid
|
BrowseEntryDialog.error.Folder_name_invalid = Folder name invalid
|
||||||
|
|
|
@ -141,6 +141,7 @@ public class BuildPropertyPage extends PropertyPage implements IWorkbenchPropert
|
||||||
invalidInfo.setFont(parent.getFont());
|
invalidInfo.setFont(parent.getFont());
|
||||||
invalidInfo.setText(ManagedBuilderUIMessages.getResourceString("BuildPropertyPage.error.version_low")); //$NON-NLS-1$
|
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));
|
invalidInfo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING, GridData.VERTICAL_ALIGN_CENTER, true, true));
|
||||||
|
noDefaultAndApplyButton();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
projectTypes = ManagedBuildManager.getDefinedProjectTypes();
|
projectTypes = ManagedBuildManager.getDefinedProjectTypes();
|
||||||
|
|
|
@ -152,6 +152,9 @@ public class ResourceBuildPropertyPage extends PropertyPage implements
|
||||||
invalidInfo.setFont(composite.getFont());
|
invalidInfo.setFont(composite.getFont());
|
||||||
invalidInfo.setText(ManagedBuilderUIMessages.getResourceString("ResourceBuildPropertyPage.error.version_low")); //$NON-NLS-1$
|
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));
|
invalidInfo.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING,GridData.VERTICAL_ALIGN_CENTER, true, true));
|
||||||
|
noContentOnPage = true;
|
||||||
|
noDefaultAndApplyButton();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a config selection area
|
// Add a config selection area
|
||||||
|
|
|
@ -21,6 +21,7 @@ import org.eclipse.cdt.managedbuilder.core.ITargetPlatform;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
|
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.ManagedBuilderHelpContextIds;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIMessages;
|
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIMessages;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
|
import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
|
||||||
|
@ -122,8 +123,9 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
|
||||||
|
|
||||||
// Add the ManagedProject to the project
|
// Add the ManagedProject to the project
|
||||||
IManagedProject newManagedProject = null;
|
IManagedProject newManagedProject = null;
|
||||||
|
IManagedBuildInfo info = null;
|
||||||
try {
|
try {
|
||||||
ManagedBuildManager.createBuildInfo(newProject);
|
info = ManagedBuildManager.createBuildInfo(newProject);
|
||||||
IProjectType parent = projectConfigurationPage.getSelectedProjectType();
|
IProjectType parent = projectConfigurationPage.getSelectedProjectType();
|
||||||
newManagedProject = ManagedBuildManager.createManagedProject(newProject, parent);
|
newManagedProject = ManagedBuildManager.createManagedProject(newProject, parent);
|
||||||
if (newManagedProject != null) {
|
if (newManagedProject != null) {
|
||||||
|
@ -168,7 +170,10 @@ public class NewManagedProjectWizard extends NewCProjectWizard {
|
||||||
|
|
||||||
// Save the build options
|
// Save the build options
|
||||||
monitor.subTask(ManagedBuilderUIMessages.getResourceString(MSG_SAVE));
|
monitor.subTask(ManagedBuilderUIMessages.getResourceString(MSG_SAVE));
|
||||||
|
if (info != null) {
|
||||||
|
info.setValid(true);
|
||||||
ManagedBuildManager.saveBuildInfo(newProject, true);
|
ManagedBuildManager.saveBuildInfo(newProject, true);
|
||||||
|
}
|
||||||
monitor.done();
|
monitor.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue