Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2018-09-15 04:12:21 -0400
committerAndrey Loskutov2018-09-18 09:51:31 -0400
commit64b7f7b876595adbccd96e2802eb9cc51518b83d (patch)
tree4847eda1bf5f4a70b44351af38d4e3957021f489 /org.eclipse.text
parent3c80a177e44f9924952496eeb79d87b7ea955a9d (diff)
downloadeclipse.platform.text-64b7f7b876595adbccd96e2802eb9cc51518b83d.tar.gz
eclipse.platform.text-64b7f7b876595adbccd96e2802eb9cc51518b83d.tar.xz
eclipse.platform.text-64b7f7b876595adbccd96e2802eb9cc51518b83d.zip
Bug 539096 - TemplateContext should implement IAdaptableI20180918-2005I20180918-1800
Change-Id: Ia9af00f7380f72d89122cb2ae1e0f542fdb91a6a Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.text')
-rw-r--r--org.eclipse.text/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.text/pom.xml2
-rw-r--r--org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java13
3 files changed, 14 insertions, 3 deletions
diff --git a/org.eclipse.text/META-INF/MANIFEST.MF b/org.eclipse.text/META-INF/MANIFEST.MF
index b10ea24cc..92161117d 100644
--- a/org.eclipse.text/META-INF/MANIFEST.MF
+++ b/org.eclipse.text/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.text
-Bundle-Version: 3.7.0.qualifier
+Bundle-Version: 3.7.100.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package:
diff --git a/org.eclipse.text/pom.xml b/org.eclipse.text/pom.xml
index 0f9e7e0c1..db464a6c2 100644
--- a/org.eclipse.text/pom.xml
+++ b/org.eclipse.text/pom.xml
@@ -18,6 +18,6 @@
</parent>
<groupId>org.eclipse.text</groupId>
<artifactId>org.eclipse.text</artifactId>
- <version>3.7.0-SNAPSHOT</version>
+ <version>3.7.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java
index 321ed5eaa..ab7d959ef 100644
--- a/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java
+++ b/org.eclipse.text/src/org/eclipse/jface/text/templates/TemplateContext.java
@@ -16,6 +16,8 @@ package org.eclipse.jface.text.templates;
import java.util.HashMap;
import java.util.Map;
+import org.eclipse.core.runtime.IAdaptable;
+
import org.eclipse.jface.text.BadLocationException;
/**
@@ -27,7 +29,7 @@ import org.eclipse.jface.text.BadLocationException;
*
* @since 3.0
*/
-public abstract class TemplateContext {
+public abstract class TemplateContext implements IAdaptable {
/** The context type of this context */
private final TemplateContextType fContextType;
@@ -117,5 +119,14 @@ public abstract class TemplateContext {
* in this context, <code>false</code> otherwise
*/
public abstract boolean canEvaluate(Template template);
+
+ /**
+ * Default implementation does nothing, clients can override to provide adapters.
+ * {@inheritDoc}
+ */
+ @Override
+ public <T> T getAdapter(Class<T> adapter) {
+ return null;
+ }
}

Back to the top