mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +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
|
* @author vhirsl
|
||||||
*/
|
*/
|
||||||
public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
|
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_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 EXTERNAL_SI_PROVIDER_CONSOLE_ID = MakeCorePlugin.getUniqueIdentifier() + ".ExternalScannerInfoProviderConsole"; //$NON-NLS-1$
|
||||||
private static final String LANG_ENV_VAR = "LANG"; //$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() {
|
protected boolean initialize() {
|
||||||
|
|
||||||
IProject currProject = resource.getProject();
|
IProject currProject = resource.getProject();
|
||||||
IMakeBuilderInfo info;
|
IPath workingDirectory = null;
|
||||||
try {
|
try {
|
||||||
info = MakeCorePlugin.createBuildInfo(resource.getProject(), MakeBuilder.BUILDER_ID);
|
IMakeBuilderInfo info = MakeCorePlugin.createBuildInfo(resource.getProject(), MakeBuilder.BUILDER_ID);
|
||||||
} catch (CoreException e) {
|
workingDirectory = info.getBuildLocation();
|
||||||
// TODO Auto-generated catch block
|
if (!workingDirectory.isEmpty()) {
|
||||||
e.printStackTrace();
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
IPath workingDirectory = info.getBuildLocation();
|
|
||||||
if (workingDirectory != null && !workingDirectory.isEmpty()) {
|
|
||||||
IResource res = currProject.getParent().findMember(workingDirectory);
|
IResource res = currProject.getParent().findMember(workingDirectory);
|
||||||
if (res instanceof IContainer && res.exists()) {
|
if (res instanceof IContainer && res.exists()) {
|
||||||
workingDirectory = res.getLocation();
|
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();
|
workingDirectory = currProject.getLocation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,7 +190,6 @@ public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
|
||||||
fCompileArguments = ScannerConfigUtil.tokenizeStringWithQuotes(buildInfo.getProviderRunArguments(providerId), "\"");//$NON-NLS-1$
|
fCompileArguments = ScannerConfigUtil.tokenizeStringWithQuotes(buildInfo.getProviderRunArguments(providerId), "\"");//$NON-NLS-1$
|
||||||
return (fCompileCommand != null);
|
return (fCompileCommand != null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add additional arguments. For example: tso - target specific options
|
* Add additional arguments. For example: tso - target specific options
|
||||||
* Base class implementation returns compileArguments.
|
* Base class implementation returns compileArguments.
|
||||||
|
|
Loading…
Add table
Reference in a new issue