1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Bug 353113 - BuildDescription class does not behave properly for remote

projects
This commit is contained in:
Chris Recoskie 2011-07-26 17:10:15 -04:00
parent 43acd6a0f8
commit a8fb1e3376

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2006, 2010 Intel Corporation and others. * Copyright (c) 2006, 2011 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
@ -68,6 +68,7 @@ import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator2;
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType; import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType;
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyInfo; import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyInfo;
import org.eclipse.cdt.managedbuilder.pdomdepgen.PDOMDependencyGenerator; import org.eclipse.cdt.managedbuilder.pdomdepgen.PDOMDependencyGenerator;
import org.eclipse.cdt.utils.EFSExtensionManager;
import org.eclipse.core.filesystem.EFS; import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore; import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.filesystem.URIUtil; import org.eclipse.core.filesystem.URIUtil;
@ -259,16 +260,7 @@ public class BuildDescription implements IBuildDescription {
//return rc.getFullPath(); //return rc.getFullPath();
IPath rcLocation = rc.getLocation(); IPath rcLocation = rc.getLocation();
if(rcLocation == null){ if(rcLocation == null){
IPath fullPath = rc.getFullPath(); rcLocation = new Path(EFSExtensionManager.getDefault().getPathFromURI(rc.getLocationURI()));
rcLocation = calcLocationForFullPath(fullPath);
// IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
// IProject proj = root.getProject(fullPath.segment(0));
// rcLocation = proj.getLocation();
// if(rcLocation != null){
// rcLocation = rcLocation.append(fullPath.removeFirstSegments(1));
// } else {
// rcLocation = root.getLocation().append(fullPath);
// }
} }
return rcLocation; return rcLocation;
} }
@ -1067,16 +1059,9 @@ public class BuildDescription implements IBuildDescription {
return null; return null;
} }
try { URI newURI = EFSExtensionManager.getDefault().createNewURIFromPath(projURI, location.toString());
URI newURI = new URI(projURI.getScheme(), projURI.getUserInfo(), return newURI;
projURI.getHost(), projURI.getPort(), location.toString(), projURI.getQuery(), projURI
.getFragment());
return newURI;
} catch (URISyntaxException e) {
ManagedBuilderCorePlugin.log(e);
}
return null;
} }
private void calculateOutputs(BuildStep action, BuildIOType arg, BuildResource buildRc) throws CoreException { private void calculateOutputs(BuildStep action, BuildIOType arg, BuildResource buildRc) throws CoreException {