mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Bug 98814: NullPointerException and failed to launch debug session for a project.
This commit is contained in:
parent
a81f74c376
commit
750f5bb545
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
2005-06-14 Mikhail Khodjaiants
|
||||
Bug 98814: NullPointerException and failed to launch debug session for a project.
|
||||
* CDebugTarget.java
|
||||
|
||||
2005-06-13 Mikhail Khodjaiants
|
||||
Temporary fix for bug 77279: The memory view address should not be cleared on project restart.
|
||||
* ICDTLaunchConfigurationConstants.java
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.debug.internal.core.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
|
@ -86,6 +87,7 @@ import org.eclipse.cdt.debug.internal.core.CSignalManager;
|
|||
import org.eclipse.cdt.debug.internal.core.ICDebugInternalConstants;
|
||||
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupParticipant;
|
||||
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceManager;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IMarkerDelta;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
@ -1725,13 +1727,19 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
|||
private void getSourceLookupPath( List list, ISourceContainer[] containers ) {
|
||||
for ( int i = 0; i < containers.length; ++i ) {
|
||||
if ( containers[i] instanceof ProjectSourceContainer ) {
|
||||
list.add( ((ProjectSourceContainer)containers[i]).getProject().getLocation().toOSString() );
|
||||
IProject project = ((ProjectSourceContainer)containers[i]).getProject();
|
||||
if ( project != null && project.exists() )
|
||||
list.add( project.getLocation().toOSString() );
|
||||
}
|
||||
if ( containers[i] instanceof FolderSourceContainer ) {
|
||||
list.add( ((FolderSourceContainer)containers[i]).getContainer().getLocation().toOSString() );
|
||||
IContainer container = ((FolderSourceContainer)containers[i]).getContainer();
|
||||
if ( container != null && container.exists() )
|
||||
list.add( container.getLocation().toOSString() );
|
||||
}
|
||||
if ( containers[i] instanceof CDirectorySourceContainer ) {
|
||||
list.add( ((CDirectorySourceContainer)containers[i]).getDirectory().getAbsolutePath() );
|
||||
File dir = ((CDirectorySourceContainer)containers[i]).getDirectory();
|
||||
if ( dir != null && dir.exists() )
|
||||
list.add( dir.getAbsolutePath() );
|
||||
}
|
||||
if ( containers[i].isComposite() ) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue