Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/dsf
diff options
context:
space:
mode:
authorPierre Sachot2017-04-20 13:47:35 +0000
committerPierre Sachot2017-04-21 10:24:47 +0000
commit8be69a5985bfa00cec5860e3e90560f901fd21f7 (patch)
tree335bb76f743ec051a6d162cbfad4b5d5c15d8599 /dsf
parent765960cec628f1ccc86eac06d77a29616eeccbcf (diff)
downloadorg.eclipse.cdt-8be69a5985bfa00cec5860e3e90560f901fd21f7.tar.gz
org.eclipse.cdt-8be69a5985bfa00cec5860e3e90560f901fd21f7.tar.xz
org.eclipse.cdt-8be69a5985bfa00cec5860e3e90560f901fd21f7.zip
Bug 515296: Adding choice to not show editor again
We added a checkbox to disable the source not found editor and an option in preferences for adding it again. Change-Id: Icc7a21cd14ea81e53517d0b3c420de0927335ed4 Also-by: Yannick Mayeur <yannick.mayeur@gmail.com> Signed-off-by: Pierre Sachot <sachot.pierre@laposte.net>
Diffstat (limited to 'dsf')
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java25
1 files changed, 16 insertions, 9 deletions
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
index 8069eb40b06..2817285afca 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
@@ -21,6 +21,8 @@ import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceNotFoundElement;
import org.eclipse.cdt.debug.internal.ui.sourcelookup.CSourceNotFoundEditorInput;
@@ -53,6 +55,7 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
@@ -416,15 +419,19 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
if (!page.getWorkbenchWindow().getWorkbench().isClosing()) {
try {
if (input instanceof CSourceNotFoundEditorInput) {
- /*
- * Don't open additional source not found
- * editors if there is one to reuse.
- */
- editor[0] = page.openEditor(input, id, false, IWorkbenchPage.MATCH_ID);
- if (editor[0] instanceof IReusableEditor) {
- IReusableEditor re = (IReusableEditor) editor[0];
- if (!input.equals(re.getEditorInput())) {
- re.setInput(input);
+ if (Platform.getPreferencesService().getBoolean(CCorePlugin.PLUGIN_ID,
+ CCorePreferenceConstants.SHOW_SOURCE_NOT_FOUND_EDITOR, true, null)) {
+ editor[0] = page.openEditor(input, id, false, IWorkbenchPage.MATCH_ID);
+ /*
+ * Don't open additional source not found
+ * editors if there is one to reuse.
+ */
+ editor[0] = page.openEditor(input, id, false, IWorkbenchPage.MATCH_ID);
+ if (editor[0] instanceof IReusableEditor) {
+ IReusableEditor re = (IReusableEditor) editor[0];
+ if (!input.equals(re.getEditorInput())) {
+ re.setInput(input);
+ }
}
}
} else {

Back to the top