Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2010-04-26 16:57:56 +0000
committerKen Ryall2010-04-26 16:57:56 +0000
commit562a946c0273f4a2c48dfcc23ce0e3fbef65e534 (patch)
tree8513882391b010e4fcb2b8175add7c356f56e2f9 /debug
parent2f25bce3ed9a83daf25465f331eeeb2e54e16515 (diff)
downloadorg.eclipse.cdt-562a946c0273f4a2c48dfcc23ce0e3fbef65e534.tar.gz
org.eclipse.cdt-562a946c0273f4a2c48dfcc23ce0e3fbef65e534.tar.xz
org.eclipse.cdt-562a946c0273f4a2c48dfcc23ce0e3fbef65e534.zip
Add a flag to only refresh the mapping of the source files without doing a full fetch of the source file list.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java
index 08e85f93c39..f4ace4f7910 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/executables/Executable.java
@@ -89,7 +89,9 @@ public class Executable extends PlatformObject {
private final Map<ITranslationUnit, String> remappedPaths;
private final ArrayList<ITranslationUnit> sourceFiles;
private boolean refreshSourceFiles;
+ private boolean remapSourceFiles;
private ISourceFileRemapping[] remappers;
+ private String[] symReaderSources;
public IPath getPath() {
return executablePath;
@@ -111,6 +113,7 @@ public class Executable extends PlatformObject {
remappedPaths = new HashMap<ITranslationUnit, String>();
sourceFiles = new ArrayList<ITranslationUnit>();
refreshSourceFiles = true;
+ remapSourceFiles = true;
}
public IResource getResource() {
@@ -154,7 +157,7 @@ public class Executable extends PlatformObject {
*/
public synchronized ITranslationUnit[] getSourceFiles(IProgressMonitor monitor) {
- if (!refreshSourceFiles)
+ if (!refreshSourceFiles && !remapSourceFiles)
return sourceFiles.toArray(new TranslationUnit[sourceFiles.size()]) ;
// Try to get the list of source files used to build the binary from the
@@ -168,7 +171,10 @@ public class Executable extends PlatformObject {
ICProject cproject = factory.create(project);
- String[] symReaderSources = ExecutablesManager.getExecutablesManager().getSourceFiles(this, monitor);
+ if (refreshSourceFiles)
+ {
+ symReaderSources = ExecutablesManager.getExecutablesManager().getSourceFiles(this, monitor);
+ }
if (symReaderSources != null && symReaderSources.length > 0) {
for (String filename : symReaderSources) {
String orgPath = filename;
@@ -245,6 +251,7 @@ public class Executable extends PlatformObject {
}
refreshSourceFiles = false;
+ remapSourceFiles = false;
return sourceFiles.toArray(new TranslationUnit[sourceFiles.size()]) ;
}
@@ -262,4 +269,11 @@ public class Executable extends PlatformObject {
return orgLocation;
}
+ /**
+ * @since 7.0
+ */
+ public void setRemapSourceFiles(boolean remapSourceFiles) {
+ this.remapSourceFiles = remapSourceFiles;
+ }
+
}

Back to the top