mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
fixed bug #141541
This commit is contained in:
parent
a8d10ae99f
commit
b2265fc025
1 changed files with 144 additions and 144 deletions
|
@ -49,6 +49,7 @@ import org.eclipse.core.runtime.SubProgressMonitor;
|
|||
* @author vhirsl
|
||||
*/
|
||||
public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
|
||||
|
||||
private static final String EXTERNAL_SI_PROVIDER_ERROR = "ExternalScannerInfoProvider.Provider_Error"; //$NON-NLS-1$
|
||||
private static final String EXTERNAL_SI_PROVIDER_CONSOLE_ID = MakeCorePlugin.getUniqueIdentifier() + ".ExternalScannerInfoProviderConsole"; //$NON-NLS-1$
|
||||
private static final String LANG_ENV_VAR = "LANG"; //$NON-NLS-1$
|
||||
|
@ -164,22 +165,22 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
|
|||
protected boolean initialize() {
|
||||
|
||||
IProject currProject = resource.getProject();
|
||||
IMakeBuilderInfo info;
|
||||
IPath workingDirectory = null;
|
||||
try {
|
||||
info = MakeCorePlugin.createBuildInfo(resource.getProject(), MakeBuilder.BUILDER_ID);
|
||||
} catch (CoreException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
IPath workingDirectory = info.getBuildLocation();
|
||||
if (workingDirectory != null && !workingDirectory.isEmpty()) {
|
||||
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(resource.getProject(), MakeBuilder.BUILDER_ID);
|
||||
workingDirectory = info.getBuildLocation();
|
||||
if (!workingDirectory.isEmpty()) {
|
||||
IResource res = currProject.getParent().findMember(workingDirectory);
|
||||
if (res instanceof IContainer && res.exists()) {
|
||||
workingDirectory = res.getLocation();
|
||||
}
|
||||
}
|
||||
if (workingDirectory == null) {
|
||||
} catch (CoreException e) {
|
||||
// TODO - FIXME
|
||||
// ignore, we need to change this so that the correct
|
||||
// working directory can be provided
|
||||
}
|
||||
if (workingDirectory == null || workingDirectory.isEmpty()) {
|
||||
workingDirectory = currProject.getLocation();
|
||||
}
|
||||
|
||||
|
@ -189,7 +190,6 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
|
|||
fCompileArguments = ScannerConfigUtil.tokenizeStringWithQuotes(buildInfo.getProviderRunArguments(providerId), "\"");//$NON-NLS-1$
|
||||
return (fCompileCommand != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add additional arguments. For example: tso - target specific options
|
||||
* Base class implementation returns compileArguments.
|
||||
|
|
Loading…
Add table
Reference in a new issue