Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Krasilnikov2007-02-26 12:19:33 +0000
committerOleg Krasilnikov2007-02-26 12:19:33 +0000
commitf55428ec7677034759fb11ce65c54d7e72aa3ed2 (patch)
tree7ad7a7f38e89a06ccd16de7f62d262b5d6869900
parent349a765023e622e57b28ebd585d13205a33e5201 (diff)
downloadorg.eclipse.cdt-f55428ec7677034759fb11ce65c54d7e72aa3ed2.tar.gz
org.eclipse.cdt-f55428ec7677034759fb11ce65c54d7e72aa3ed2.tar.xz
org.eclipse.cdt-f55428ec7677034759fb11ce65c54d7e72aa3ed2.zip
Bug #112787 ManagedCommandLineGenerator not called to show Tool Settings:
check for empty inputResource added
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
index ec69efaf3f8..d883c2c6192 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedCommandLineGenerator.java
@@ -32,6 +32,7 @@ public class ManagedCommandLineGenerator implements
public final String WHITESPACE = " "; //$NON-NLS-1$
public final String WILDCARD = "%"; //$NON-NLS-1$
public final String UNDERLINE = "_"; //$NON-NLS-1$
+ public final String EMPTY = ""; //$NON-NLS-1$
public final String VAR_FIRST_CHAR = "$"; //$NON-NLS-1$
public final char VAR_SECOND_CHAR = '{'; //$NON-NLS-1$
@@ -92,9 +93,9 @@ public class ManagedCommandLineGenerator implements
else if( varName.compareToIgnoreCase( OUTPUT_PREFIX_PRM_NAME ) == 0 ) sb.append( outputPrefix.trim() );
else if( varName.compareToIgnoreCase( OUTPUT_PRM_NAME ) == 0 )
{
- StringBuffer tempBuffer = new StringBuffer("");
+ StringBuffer tempBuffer = new StringBuffer(EMPTY);
- if(!outputName.equals("")) //$NON-NLS-1$
+ if(!outputName.equals(EMPTY))
{
// if the output name isn't a variable then quote it
if(outputName.indexOf("$(") != 0) //$NON-NLS-1$
@@ -105,11 +106,12 @@ public class ManagedCommandLineGenerator implements
sb.append(tempBuffer.toString().trim());
}
- else if( varName.compareToIgnoreCase( INPUTS_PRM_NAME ) == 0 ){
- StringBuffer tempBuffer = new StringBuffer(""); //$NON-NLS-1$
+ else if( varName.compareToIgnoreCase( INPUTS_PRM_NAME ) == 0 &&
+ (inputResources != null)){
+ StringBuffer tempBuffer = new StringBuffer(EMPTY);
for(int k = 0; k < inputResources.length; k++)
{
- if(!inputResources[k].equals("")) //$NON-NLS-1$
+ if(!inputResources[k].equals(EMPTY))
{
// if the input resource isn't a variable then quote it
if(inputResources[k].indexOf("$(") != 0) //$NON-NLS-1$

Back to the top