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

Fix bug where project name was empty.

This commit is contained in:
Doug Schaefer 2007-04-12 21:01:16 +00:00
parent f097879171
commit 738955feca

View file

@ -12,6 +12,7 @@
package org.eclipse.cdt.debug.internal.core.sourcelookup; package org.eclipse.cdt.debug.internal.core.sourcelookup;
import java.util.ArrayList; import java.util.ArrayList;
import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer; import org.eclipse.cdt.debug.core.sourcelookup.AbsolutePathSourceContainer;
@ -50,7 +51,7 @@ public class CSourcePathComputerDelegate implements ISourcePathComputerDelegate
containers.add( sc ); containers.add( sc );
} }
String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null ); String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)null );
if ( projectName != null ) { if (projectName != null && projectName.length() > 0) {
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName ); IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName );
if ( project.exists() ) { if ( project.exists() ) {
containers.add( 0, new ProjectSourceContainer( project, true ) ); containers.add( 0, new ProjectSourceContainer( project, true ) );