Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leherbauer2014-04-23 13:12:14 +0000
committerAnton Leherbauer2014-04-24 14:43:44 +0000
commit5a050674f8f772056129c1d79b17da86fb45a570 (patch)
treee562fd225403d4979e91a4f4183fe2ad746cf70b
parent2139ae43e867e354cadae44e3275db21c042ba31 (diff)
downloadorg.eclipse.tcf-5a050674f8f772056129c1d79b17da86fb45a570.tar.gz
org.eclipse.tcf-5a050674f8f772056129c1d79b17da86fb45a570.tar.xz
org.eclipse.tcf-5a050674f8f772056129c1d79b17da86fb45a570.zip
Bug 433296 - Open default text editor in case of unknown content type
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java
index c10446ef4..0409d58b1 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModelPresentation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,6 +48,7 @@ import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.editors.text.EditorsUI;
import org.eclipse.ui.ide.FileStoreEditorInput;
import org.eclipse.ui.part.FileEditorInput;
@@ -240,7 +241,8 @@ public class TCFModelPresentation implements IDebugModelPresentation {
if (input != null) {
IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
IEditorDescriptor descriptor = registry.getDefaultEditor(input.getName());
- if (descriptor != null) id = descriptor.getId();
+ if (descriptor != null && !descriptor.isOpenExternal()) id = descriptor.getId();
+ else id = EditorsUI.DEFAULT_TEXT_EDITOR_ID;
}
return id;
}

Back to the top