Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRolf Theunissen2019-06-10 14:37:03 +0000
committerRolf Theunissen2019-06-16 13:37:21 +0000
commitf26b0ea27485b16f074340e3e5a89bdb4b341abf (patch)
treedced7151b6bfbeaa9f8d51e643014188b6548066
parente88d686c1fc682507b0246d04249afa81bdb6146 (diff)
downloadeclipse.platform.text-f26b0ea27485b16f074340e3e5a89bdb4b341abf.tar.gz
eclipse.platform.text-f26b0ea27485b16f074340e3e5a89bdb4b341abf.tar.xz
eclipse.platform.text-f26b0ea27485b16f074340e3e5a89bdb4b341abf.zip
Bug 548109 - TemplatesView should adapt to IContributedContentsView
Change-Id: I58840cd108dba78a42027ba46ee94bf982b004de Signed-off-by: Rolf Theunissen <rolf.theunissen@gmail.com>
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java
index 54164a019bc..3c7a1c3ffcd 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatesView.java
@@ -26,6 +26,7 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.IContributedContentsView;
import org.eclipse.ui.part.IPage;
import org.eclipse.ui.part.MessagePage;
import org.eclipse.ui.part.PageBook;
@@ -167,6 +168,14 @@ public final class TemplatesView extends PageBookView {
partActivated(part);
}
+ @Override
+ public <T> T getAdapter(Class<T> key) {
+ if (key == IContributedContentsView.class) {
+ return key.cast((IContributedContentsView) () -> getCurrentContributingPart());
+ }
+ return super.getAdapter(key);
+ }
+
/**
* Returns the template store of the current page.
*

Back to the top