diff options
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.core')
-rw-r--r-- | build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java index 8186fc07b92..a59d13da68d 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java @@ -858,7 +858,7 @@ public class ManagedBuildManager extends AbstractCExtension { return; } } catch (BuildException e) {return;} - + // Figure out if there is a listener for this change IResource resource = config.getOwner(); List listeners = (List) getBuildModelListeners().get(resource); @@ -1363,10 +1363,10 @@ public class ManagedBuildManager extends AbstractCExtension { try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.newDocument(); - + // Get the build information for the project ManagedBuildInfo buildInfo = (ManagedBuildInfo) getBuildInfo(project); - + // Save the build info if (buildInfo != null && !buildInfo.isReadOnly() && @@ -1381,7 +1381,7 @@ public class ManagedBuildManager extends AbstractCExtension { Element rootElement = doc.createElement(ROOT_NODE_NAME); doc.appendChild(rootElement); buildInfo.serialize(doc, rootElement); - + // Transform the document to something we can save in a file ByteArrayOutputStream stream = new ByteArrayOutputStream(); Transformer transformer = TransformerFactory.newInstance().newTransformer(); @@ -1391,11 +1391,11 @@ public class ManagedBuildManager extends AbstractCExtension { DOMSource source = new DOMSource(doc); StreamResult result = new StreamResult(stream); transformer.transform(source, result); - + // Save the document IFile projectFile = project.getFile(SETTINGS_FILE_NAME); String utfString = stream.toString("UTF-8"); //$NON-NLS-1$ - + if (projectFile.exists()) { if (projectFile.isReadOnly()) { // If we are not running headless, and there is a UI Window around, grab it @@ -1429,7 +1429,7 @@ public class ManagedBuildManager extends AbstractCExtension { } else { projectFile.create(new ByteArrayInputStream(utfString.getBytes("UTF-8")), IResource.FORCE, new NullProgressMonitor()); //$NON-NLS-1$ } - + // Close the streams stream.close(); } @@ -1450,7 +1450,7 @@ public class ManagedBuildManager extends AbstractCExtension { // Save to IFile failed err = e; } - + if (err != null) { // Put out an error message indicating that the attempted write to the .cdtbuild project file failed IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); @@ -1458,7 +1458,7 @@ public class ManagedBuildManager extends AbstractCExtension { IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); window = windows[0]; } - + final Shell shell = window.getShell(); if (shell != null) { final String exceptionMsg = err.getMessage(); @@ -1536,9 +1536,9 @@ public class ManagedBuildManager extends AbstractCExtension { for (int i=0; i < configs.length; i++) { ManagedBuildManager.performValueHandlerEvent(configs[i], IManagedOptionValueHandler.EVENT_CLOSE); } - + info.setValid(false); - + try { resource.setSessionProperty(buildInfoProperty, null); } catch (CoreException e) { @@ -1819,7 +1819,7 @@ public class ManagedBuildManager extends AbstractCExtension { return Status.OK_STATUS; /* ManagedBuildInfo buildInfo = null; - + // Get the build info associated with this project for this session try { buildInfo = findBuildInfo(resource.getProject(), true); @@ -2729,7 +2729,7 @@ public class ManagedBuildManager extends AbstractCExtension { } catch (Exception e) { // TODO: Issue error reagarding not being able to load the project file (.cdtbuild) } - + try { // Check if the project needs its container initialized initBuildInfoContainer(buildInfo); @@ -2811,7 +2811,7 @@ public class ManagedBuildManager extends AbstractCExtension { */ /* synchronized private static ManagedBuildInfo findBuildInfoSynchronized(IProject project, boolean forceLoad) { ManagedBuildInfo buildInfo = null; - + // Check if there is any build info associated with this project for this session try { buildInfo = (ManagedBuildInfo)project.getSessionProperty(buildInfoProperty); @@ -2822,7 +2822,7 @@ public class ManagedBuildManager extends AbstractCExtension { } catch (CoreException e) { // return null; } - + if(buildInfo == null && forceLoad){ // Make sure the extension information is loaded first try { @@ -2831,11 +2831,11 @@ public class ManagedBuildManager extends AbstractCExtension { e.printStackTrace(); return null; } - - + + // Check weather getBuildInfo is called from converter buildInfo = UpdateManagedProjectManager.getConvertedManagedBuildInfo(project); - + // Nothing in session store, so see if we can load it from cdtbuild if (buildInfo == null) { try { @@ -2852,7 +2852,7 @@ public class ManagedBuildManager extends AbstractCExtension { IWorkbenchWindow windows[] = PlatformUI.getWorkbench().getWorkbenchWindows(); window = windows[0]; } - + final Shell shell = window.getShell(); final String exceptionMsg = e.getMessage(); //using syncExec could cause a dead-lock @@ -2866,7 +2866,7 @@ public class ManagedBuildManager extends AbstractCExtension { } } ); } - + if (buildInfo != null && !buildInfo.isContainerInited()) { // NOTE: If this is called inside the above rule, then an IllegalArgumentException can // occur when the CDT project file is saved - it uses the Workspace Root as the scheduling rule. @@ -2880,7 +2880,7 @@ public class ManagedBuildManager extends AbstractCExtension { } } } - + return buildInfo; } */ |