mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Build Model and Internal Builder fixes and enhancements
This commit is contained in:
parent
bfbd80c0fa
commit
6140a76f77
12 changed files with 160 additions and 92 deletions
|
@ -2382,13 +2382,13 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
fail("build description creation failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
|
||||
IBuildResource rcs[] = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
IBuildResource rcs[] = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
assertEquals(rcs.length, 0);
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 0);
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 0);
|
||||
|
||||
//target
|
||||
|
@ -2400,7 +2400,7 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
} catch (CoreException e) {
|
||||
fail("build description creation failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
IBuildResource oRcs[] = des.getOutputStep().getInputResources();
|
||||
IBuildResource targetRc;
|
||||
assertEquals(rcs.length, 1);
|
||||
|
@ -2410,10 +2410,10 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
|
||||
targetRc = oRcs[0];
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 0);
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 1);
|
||||
assertEquals(oRcs.length, 1);
|
||||
if(rcs[0] != oRcs[0])
|
||||
|
@ -2429,7 +2429,7 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
} catch (CoreException e) {
|
||||
fail("build description creation failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
oRcs = des.getOutputStep().getInputResources();
|
||||
assertEquals(oRcs.length, 1);
|
||||
targetRc = oRcs[0];
|
||||
|
@ -2451,10 +2451,10 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
fail("rebuild resources do not match");
|
||||
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 0);
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 5);
|
||||
if(!resourcesEqual(rcs, oRcs))
|
||||
fail("rebuild resources do not match");
|
||||
|
@ -2469,7 +2469,7 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
} catch (CoreException e) {
|
||||
fail("build description creation failed: " + e.getLocalizedMessage());
|
||||
}
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD);
|
||||
oRcs = des.getOutputStep().getInputResources();
|
||||
assertEquals(oRcs.length, 1);
|
||||
targetRc = oRcs[0];
|
||||
|
@ -2487,10 +2487,10 @@ public class BuildDescriptionModelTests extends TestCase {
|
|||
fail("rebuild resources do not match");
|
||||
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 0);
|
||||
|
||||
rcs = BuildDescriptionManager.filterBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
rcs = BuildDescriptionManager.filterGeneratedBuildResources(des.getResources(), BuildDescriptionManager.REBUILD | BuildDescriptionManager.REMOVED);
|
||||
assertEquals(rcs.length, 3);
|
||||
if(!resourcesEqual(rcs, oRcs))
|
||||
fail("rebuild resources do not match");
|
||||
|
|
|
@ -39,8 +39,9 @@ public class BuildDescriptionManager {
|
|||
public static final int REMOVED = 0x01;
|
||||
public static final int REBUILD = 0x02;
|
||||
public static final int DEPS = 0x04;
|
||||
public static final int DEPS_CMODEL = DEPS & 0x08;
|
||||
public static final int DEPS_DEPGEN = DEPS & 0x10;
|
||||
public static final int DEPS_CMODEL = DEPS | 0x08;
|
||||
public static final int DEPS_DEPGEN = DEPS | 0x10;
|
||||
public static final int DEPS_DEPFILE_INFO = DEPS | 0x20;
|
||||
|
||||
private Set fVisitedSteps = new HashSet();
|
||||
private boolean fUp;
|
||||
|
@ -168,7 +169,7 @@ public class BuildDescriptionManager {
|
|||
return (IBuildStep[])set.toArray(new IBuildStep[set.size()]);
|
||||
}
|
||||
|
||||
public static IBuildResource[] filterBuildResources(IBuildResource rc[], int rcState){
|
||||
public static IBuildResource[] filterGeneratedBuildResources(IBuildResource rc[], int rcState){
|
||||
List list = new ArrayList();
|
||||
|
||||
addBuildResources(rc, list, rcState);
|
||||
|
@ -231,8 +232,8 @@ public class BuildDescriptionManager {
|
|||
* @param des build description
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void cleanRebuildResources(IBuildDescription des) throws CoreException{
|
||||
IBuildResource bRcs[] = filterBuildResources(des.getResources(), REMOVED | REBUILD);
|
||||
public static void cleanGeneratedRebuildResources(IBuildDescription des) throws CoreException{
|
||||
IBuildResource bRcs[] = filterGeneratedBuildResources(des.getResources(), REMOVED | REBUILD);
|
||||
List failList = new ArrayList();
|
||||
|
||||
for(int i = 0; i < bRcs.length; i++){
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006 Intel Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Intel Corporation - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.managedbuilder.buildmodel;
|
||||
|
||||
/**
|
||||
*
|
||||
* This interface represents the build group.
|
||||
* The build group is a group of actions
|
||||
*
|
||||
*/
|
||||
public interface IBuildGroup {
|
||||
/**
|
||||
*
|
||||
* Returns the array of build steps that belong to this group
|
||||
*
|
||||
* @return IBuildStep[]
|
||||
*/
|
||||
IBuildStep[] getSteps();
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns true if the build group contains the given step,
|
||||
* false - otherwise
|
||||
*
|
||||
* @param action
|
||||
* @return boolean
|
||||
*/
|
||||
boolean contains(IBuildStep action);
|
||||
|
||||
/**
|
||||
* returns true is the build group needs rebuild,
|
||||
* false - otherwise
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
boolean needsRebuild();
|
||||
}
|
|
@ -48,6 +48,11 @@ import org.eclipse.cdt.managedbuilder.internal.macros.OptionContextData;
|
|||
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
|
||||
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyCommands;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator2;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyInfo;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
|
@ -649,7 +654,7 @@ public class BuildDescription implements IBuildDescription {
|
|||
return fOutputStep;
|
||||
}
|
||||
|
||||
private boolean checkFlags(int flags){
|
||||
public boolean checkFlags(int flags){
|
||||
return (fFlags & flags) == flags;
|
||||
}
|
||||
|
||||
|
@ -882,14 +887,18 @@ public class BuildDescription implements IBuildDescription {
|
|||
|
||||
if(outFullPath.isAbsolute()){
|
||||
outLocation = outFullPath;
|
||||
if(!fProject.getLocation().isPrefixOf(outLocation))
|
||||
if(fProject.getLocation().isPrefixOf(outLocation))
|
||||
outFullPath = fProject.getFullPath().append(outLocation.removeFirstSegments(fProject.getLocation().segmentCount()));
|
||||
else
|
||||
outFullPath = null;
|
||||
} else {
|
||||
if (outFullPath.segmentCount() == 1) {
|
||||
outFullPath = outDirPath.append(outFullPath);
|
||||
outLocation = fProject.getLocation().append(outFullPath.removeFirstSegments(1));
|
||||
} else {
|
||||
outLocation = getTopBuildDirLocation().append(outFullPath);
|
||||
outFullPath = getTopBuildDirFullPath().append(outFullPath);
|
||||
}
|
||||
|
||||
outLocation = fProject.getLocation().append(outFullPath.removeFirstSegments(1));
|
||||
}
|
||||
|
||||
BuildResource outRc = createResource(outLocation, outFullPath);
|
||||
|
@ -1192,6 +1201,54 @@ public class BuildDescription implements IBuildDescription {
|
|||
BuildResource outRc = createResource(outLocation, outFullPath);
|
||||
buildArg.addResource(outRc);
|
||||
}
|
||||
|
||||
if(checkFlags(BuildDescriptionManager.DEPS_DEPFILE_INFO)){
|
||||
if(tool != null && buildRc != null){
|
||||
IInputType type = action.getInputType();
|
||||
String ext = null;
|
||||
if(type != null){
|
||||
String exts[] = type.getSourceExtensions(tool);
|
||||
String location = buildRc.getLocation().toOSString();
|
||||
for(int i = 0; i < exts.length; i++){
|
||||
if(location.endsWith(exts[i])){
|
||||
ext = exts[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ext == null)
|
||||
ext = buildRc.getLocation().getFileExtension();
|
||||
|
||||
if(ext != null){
|
||||
IManagedDependencyGeneratorType depGenType = tool.getDependencyGeneratorForExtension(ext);
|
||||
if(depGenType != null){
|
||||
IPath depFiles[] = null;
|
||||
if(depGenType instanceof IManagedDependencyGenerator2){
|
||||
IBuildObject context = tool.getParent();
|
||||
if(context instanceof IToolChain){
|
||||
context = ((IToolChain)context).getParent();
|
||||
}
|
||||
IPath path = buildRc.isProjectResource() ?
|
||||
buildRc.getFullPath().removeFirstSegments(1) :
|
||||
buildRc.getLocation();
|
||||
IManagedDependencyInfo info = ((IManagedDependencyGenerator2)depGenType).getDependencySourceInfo(path, context, tool, getDefaultBuildDirLocation());
|
||||
if(info instanceof IManagedDependencyCommands){
|
||||
depFiles = ((IManagedDependencyCommands)info).getDependencyFiles();
|
||||
}
|
||||
} else if (depGenType.getCalculatorType() == IManagedDependencyGeneratorType.TYPE_COMMAND
|
||||
&& depGenType instanceof IManagedDependencyGenerator) {
|
||||
depFiles = new IPath[1];
|
||||
depFiles[0] = new Path(buildRc.getLocation().segment(buildRc.getLocation().segmentCount() -1 )).removeFileExtension().addFileExtension("d"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if(depFiles != null){
|
||||
BuildIOType depType = action.createIOType(false, false, null);
|
||||
addOutputs(depFiles, depType, outDirPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -14,11 +14,9 @@ import java.util.HashSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildGroup;
|
||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildResource;
|
||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildStep;
|
||||
|
||||
public class BuildGroup implements IBuildGroup {
|
||||
public class BuildGroup {
|
||||
private Set fActions = new HashSet();
|
||||
private boolean fNeedsRebuild;
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.managedbuilder.buildmodel.IBuildDescription;
|
|||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildIOType;
|
||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildResource;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
||||
public class BuildResource implements IBuildResource {
|
||||
|
|
|
@ -240,14 +240,33 @@ public class BuildStep implements IBuildStep {
|
|||
* @see org.eclipse.cdt.managedbuilder.builddescription.IBuildStep#getCommands(org.eclipse.core.runtime.IPath, java.util.Map, java.util.Map, boolean)
|
||||
*/
|
||||
public IBuildCommand[] getCommands(IPath cwd, Map inputArgValues, Map outputArgValues, boolean resolveAll) {
|
||||
if(fTool == null)
|
||||
if(fTool == null){
|
||||
String step = null;
|
||||
if(this == fBuildDescription.getInputStep()){
|
||||
step = fBuildDescription.getConfiguration().getPrebuildStep();
|
||||
} else if(this == fBuildDescription.getOutputStep()){
|
||||
step = fBuildDescription.getConfiguration().getPostbuildStep();
|
||||
}
|
||||
|
||||
if(step != null){
|
||||
String commands[] = step.split(";"); //$NON-NLS-1$
|
||||
if(cwd == null)
|
||||
cwd = calcCWD();
|
||||
|
||||
List list = new ArrayList();
|
||||
for(int i = 0; i < commands.length; i++){
|
||||
IBuildCommand cmds[] = createCommandsFromString(commands[i], cwd, getEnvironment());
|
||||
for(int j = 0; j < cmds.length; j++){
|
||||
list.add(cmds[j]);
|
||||
}
|
||||
}
|
||||
return (IBuildCommand[])list.toArray(new BuildCommand[list.size()]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
if(cwd == null)
|
||||
cwd = fBuildDescription.getDefaultBuildDirLocation();
|
||||
|
||||
if(!cwd.isAbsolute())
|
||||
cwd = fBuildDescription.getConfiguration().getOwner().getProject().getLocation().append(cwd);
|
||||
cwd = calcCWD();
|
||||
|
||||
performAsignToOption(cwd);
|
||||
|
||||
|
@ -270,6 +289,15 @@ public class BuildStep implements IBuildStep {
|
|||
return createCommandsFromString(info.getCommandLine(), cwd, getEnvironment());
|
||||
}
|
||||
|
||||
private IPath calcCWD(){
|
||||
IPath cwd = fBuildDescription.getDefaultBuildDirLocation();
|
||||
|
||||
if(!cwd.isAbsolute())
|
||||
cwd = fBuildDescription.getConfiguration().getOwner().getProject().getLocation().append(cwd);
|
||||
|
||||
return cwd;
|
||||
}
|
||||
|
||||
protected Map getEnvironment(){
|
||||
return fBuildDescription.getEnvironment();
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public class DefaultBuildDescriptionFactory implements IBuildDescriptionFactory
|
|||
* @see org.eclipse.cdt.managedbuilder.builddescription.IBuildDescriptionFactory#getSupportedMethods()
|
||||
*/
|
||||
public int getSupportedMethods() {
|
||||
return BuildDescriptionManager.REMOVED | BuildDescriptionManager.REBUILD;
|
||||
return BuildDescriptionManager.REMOVED | BuildDescriptionManager.REBUILD | BuildDescriptionManager.DEPS_DEPFILE_INFO;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,7 +16,10 @@ import org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager;
|
|||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildCommand;
|
||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildResource;
|
||||
import org.eclipse.cdt.managedbuilder.buildmodel.IBuildStep;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
@ -90,10 +93,13 @@ public class StepBuilder implements IBuildModelBuilder {
|
|||
}
|
||||
}
|
||||
}
|
||||
return postProcess(status);
|
||||
return postProcess(status, monitor);
|
||||
}
|
||||
|
||||
protected int postProcess(int status){
|
||||
protected int postProcess(int status, IProgressMonitor monitor){
|
||||
if(status != STATUS_ERROR_LAUNCH){
|
||||
refreshOutputs(monitor);
|
||||
}
|
||||
switch(status){
|
||||
case STATUS_OK:
|
||||
break;
|
||||
|
@ -101,24 +107,48 @@ public class StepBuilder implements IBuildModelBuilder {
|
|||
case STATUS_ERROR_BUILD:
|
||||
case STATUS_ERROR_LAUNCH:
|
||||
default:
|
||||
cleanOutputs();
|
||||
cleanOutputs(monitor);
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
protected void cleanOutputs(){
|
||||
protected void refreshOutputs(IProgressMonitor monitor){
|
||||
if(fStep == fStep.getBuildDescription().getInputStep())
|
||||
return;
|
||||
|
||||
IBuildResource rcs[] = fStep.getOutputResources();
|
||||
|
||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||
for(int i = 0; i < rcs.length; i++){
|
||||
IPath path = rcs[i].getFullPath();
|
||||
if(path != null){
|
||||
IFile file = root.getFile(path);
|
||||
try {
|
||||
file.refreshLocal(IResource.DEPTH_ZERO, monitor);
|
||||
} catch (CoreException e) {
|
||||
if(DbgUtil.DEBUG){
|
||||
DbgUtil.traceln("failed to refresh resource " //$NON-NLS-1$
|
||||
+ file.getFullPath()
|
||||
+ ", error: " + e.getLocalizedMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void cleanOutputs(IProgressMonitor monitor){
|
||||
IBuildResource bRcs[] = fStep.getOutputResources();
|
||||
for(int i = 0; i < bRcs.length; i++){
|
||||
IResource rc = BuildDescriptionManager.findResourceForBuildResource(bRcs[i]);
|
||||
if(rc != null){
|
||||
try {
|
||||
rc.delete(true, null);
|
||||
rc.delete(true, monitor);
|
||||
} catch (CoreException e) {
|
||||
if(DbgUtil.DEBUG){
|
||||
DbgUtil.traceln("failed to delete resource "
|
||||
DbgUtil.traceln("failed to delete resource " //$NON-NLS-1$
|
||||
+ rc.getFullPath()
|
||||
+ ", error: " + e.getLocalizedMessage());
|
||||
+ ", error: " + e.getLocalizedMessage()); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -448,7 +448,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
|||
//use a build desacription model to calculate the resources to be cleaned
|
||||
//only in case there are some changes to the project sources or build information
|
||||
try{
|
||||
int flags = BuildDescriptionManager.REBUILD;
|
||||
int flags = BuildDescriptionManager.REBUILD | BuildDescriptionManager.DEPS_DEPFILE_INFO;
|
||||
if(delta != null)
|
||||
flags |= BuildDescriptionManager.REMOVED;
|
||||
|
||||
|
@ -456,7 +456,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
|||
|
||||
des = BuildDescriptionManager.createBuildDescription(info.getDefaultConfiguration(), getDelta(getProject()), flags);
|
||||
|
||||
BuildDescriptionManager.cleanRebuildResources(des);
|
||||
BuildDescriptionManager.cleanGeneratedRebuildResources(des);
|
||||
} catch (Throwable e){
|
||||
//TODO: log error
|
||||
outputError(getProject().getName(), "error occured while build description calculation: " + e.getLocalizedMessage()); //$NON-NLS-1$
|
||||
|
@ -1249,10 +1249,9 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
|||
|
||||
int status = builder.build(epmOutputStream, epmOutputStream, monitor);
|
||||
|
||||
// Force a resync of the projects without allowing the user to cancel.
|
||||
// This is probably unkind, but short of this there is no way to insure
|
||||
// the UI is up-to-date with the build results
|
||||
monitor.subTask(ManagedMakeMessages
|
||||
//no refresh is needed since the builder now performs
|
||||
//a refresh automatically after each build step
|
||||
/* monitor.subTask(ManagedMakeMessages
|
||||
.getResourceString(REFRESH));
|
||||
try {
|
||||
currentProject.refreshLocal(
|
||||
|
@ -1261,7 +1260,7 @@ public class GeneratedMakefileBuilder extends ACBuilder {
|
|||
monitor.subTask(ManagedMakeMessages
|
||||
.getResourceString(REFRESH_ERROR));
|
||||
}
|
||||
|
||||
*/
|
||||
// Report either the success or failure of our mission
|
||||
buf = new StringBuffer();
|
||||
|
||||
|
|
|
@ -60,8 +60,10 @@ public class PropertyManager {
|
|||
|
||||
protected void setProperty(IConfiguration cfg, IBuildObject bo, String prop, String value){
|
||||
Properties props = getProperties(cfg, bo);
|
||||
if(props != null)
|
||||
if(props != null){
|
||||
props.setProperty(prop, value);
|
||||
serialize(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
protected String getProperty(IConfiguration cfg, IBuildObject bo, String prop){
|
||||
|
|
|
@ -436,7 +436,6 @@ public class ResourceChangeHandler implements IResourceChangeListener, ISavePart
|
|||
// No state to be saved by the plug-in, but request a
|
||||
// resource delta to be used on next activation.
|
||||
context.needDelta();
|
||||
PropertyManager.getInstance().serialize();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Add table
Reference in a new issue