mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Bug 137138: Common source containers get disposed.
This commit is contained in:
parent
ebd2942d59
commit
f414177e35
3 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-05-26 Mikhail Khodjaiants
|
||||||
|
Bug 137138: Common source containers get disposed.
|
||||||
|
* CSourceLookupParticipant.java
|
||||||
|
* CSourcePathComputerDelegate.java
|
||||||
|
|
||||||
2006-05-26 Mikhail Khodjaiants
|
2006-05-26 Mikhail Khodjaiants
|
||||||
Bug 122010: Registers View is displayed even if supportsRegisters and
|
Bug 122010: Registers View is displayed even if supportsRegisters and
|
||||||
supportsRegisterModification are disabled.
|
supportsRegisterModification are disabled.
|
||||||
|
|
|
@ -28,7 +28,7 @@ import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
|
||||||
*/
|
*/
|
||||||
public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
|
public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
|
||||||
|
|
||||||
static private class NoSourceElement {
|
static class NoSourceElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final NoSourceElement gfNoSource = new NoSourceElement();
|
private static final NoSourceElement gfNoSource = new NoSourceElement();
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
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 java.util.Arrays;
|
|
||||||
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.MappingSourceContainer;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -41,7 +41,12 @@ public class CSourcePathComputerDelegate implements ISourcePathComputerDelegate
|
||||||
public ISourceContainer[] computeSourceContainers( ILaunchConfiguration configuration, IProgressMonitor monitor ) throws CoreException {
|
public ISourceContainer[] computeSourceContainers( ILaunchConfiguration configuration, IProgressMonitor monitor ) throws CoreException {
|
||||||
ISourceContainer[] common = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector().getSourceContainers();
|
ISourceContainer[] common = CDebugCorePlugin.getDefault().getCommonSourceLookupDirector().getSourceContainers();
|
||||||
ArrayList containers = new ArrayList( common.length + 1 );
|
ArrayList containers = new ArrayList( common.length + 1 );
|
||||||
containers.addAll( Arrays.asList( common ) );
|
for ( int i = 0; i < common.length; ++i ) {
|
||||||
|
ISourceContainer sc = common[i];
|
||||||
|
if ( sc.getType().getId().equals( MappingSourceContainer.TYPE_ID ) )
|
||||||
|
sc = ((MappingSourceContainer)sc).copy();
|
||||||
|
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 ) {
|
||||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName );
|
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName );
|
||||||
|
|
Loading…
Add table
Reference in a new issue