Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorKen Ryall2009-03-03 09:19:47 -0500
committerKen Ryall2009-03-03 09:19:47 -0500
commitc5fbdfcc314be8fa6f691ebbf539cc07bc2f64b2 (patch)
treee099283ec41dde4202a742d559acd1090e92e387 /debug
parenta05121662459ecd623f4506e5ecc62c8803ba74b (diff)
downloadorg.eclipse.cdt-c5fbdfcc314be8fa6f691ebbf539cc07bc2f64b2.tar.gz
org.eclipse.cdt-c5fbdfcc314be8fa6f691ebbf539cc07bc2f64b2.tar.xz
org.eclipse.cdt-c5fbdfcc314be8fa6f691ebbf539cc07bc2f64b2.zip
Refresh the files list if the exe changes.
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesViewer.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesViewer.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesViewer.java
index 1d6300d34b..cc44147ebe 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesViewer.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/executables/ExecutablesViewer.java
@@ -21,6 +21,7 @@ import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.jface.viewers.ViewerDropAdapter;
@@ -177,6 +178,19 @@ public class ExecutablesViewer extends BaseViewer implements IExecutablesChangeL
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
+ // if the user has selected an executable, they expect its
+ // list of source files to be refreshed automatically
+ if (viewer.getSelection() != null &&
+ viewer.getSelection() instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+
+ Object firstElement = selection.getFirstElement();
+ if (firstElement instanceof Executable) {
+ Executable executable = (Executable)firstElement;
+ executable.setRefreshSourceFiles(true);
+ viewer.setSelection(selection);
+ }
+ }
viewer.refresh(null);
viewer.packColumns();
return Status.OK_STATUS;

Back to the top