Bug 564491 - Replace deprecated editorInput variable in enabledWhen
This should allow the extension to generic editor work in case the
textviewer is actually not part of an editor.
Change-Id: Ibb6825b58e32870defadaa25259802f6ef5bfd13
Signed-off-by: Mickael Istria <mistria@redhat.com>
diff --git a/org.eclipse.lsp4e/META-INF/MANIFEST.MF b/org.eclipse.lsp4e/META-INF/MANIFEST.MF
index 234f596..4d9c459 100644
--- a/org.eclipse.lsp4e/META-INF/MANIFEST.MF
+++ b/org.eclipse.lsp4e/META-INF/MANIFEST.MF
@@ -17,7 +17,7 @@
org.eclipse.core.filebuffers;bundle-version="3.6.0",
org.eclipse.core.filesystem;bundle-version="1.6.0",
org.eclipse.search;bundle-version="3.11.0",
- org.eclipse.ui.genericeditor;bundle-version="1.1.600";resolution:=optional,
+ org.eclipse.ui.genericeditor;bundle-version="1.1.900";resolution:=optional,
org.eclipse.ui.views,
org.eclipse.debug.core,
org.eclipse.core.externaltools;bundle-version="1.0.400",
diff --git a/org.eclipse.lsp4e/plugin.xml b/org.eclipse.lsp4e/plugin.xml
index e5b8099..fe85a48 100644
--- a/org.eclipse.lsp4e/plugin.xml
+++ b/org.eclipse.lsp4e/plugin.xml
@@ -455,12 +455,14 @@
class="org.eclipse.lsp4e.operations.highlight.HighlightReconciler"
contentType="org.eclipse.core.runtime.text">
<enabledWhen>
- <with
- variable="editorInput">
- <test
- property="org.eclipse.lsp4e.hasLanguageServer">
- </test>
- </with>
+ <or>
+ <with variable="editorInput">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ <with variable="viewer">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ </or>
</enabledWhen>
</highlightReconciler>
</extension>
@@ -470,12 +472,14 @@
class="org.eclipse.lsp4e.operations.folding.LSPFoldingReconciler"
contentType="org.eclipse.core.runtime.text">
<enabledWhen>
- <with
- variable="editorInput">
- <test
- property="org.eclipse.lsp4e.hasLanguageServer">
- </test>
- </with>
+ <or>
+ <with variable="editorInput">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ <with variable="viewer">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ </or>
</enabledWhen>
</foldingReconciler>
</extension>
@@ -486,12 +490,14 @@
id="org.eclipse.lsp4e.codelens"
label="CodeLens">
<enabledWhen>
- <with
- variable="viewer">
- <test
- property="org.eclipse.lsp4e.hasLanguageServer">
- </test>
- </with>
+ <or>
+ <with variable="editorInput">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ <with variable="viewer">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ </or>
</enabledWhen>
</codeMiningProvider>
<codeMiningProvider
@@ -499,12 +505,14 @@
id="org.eclipse.lsp4e.documentColor"
label="Color">
<enabledWhen>
- <with
- variable="viewer">
- <test
- property="org.eclipse.lsp4e.hasLanguageServer">
- </test>
- </with>
+ <or>
+ <with variable="editorInput">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ <with variable="viewer">
+ <test property="org.eclipse.lsp4e.hasLanguageServer"/>
+ </with>
+ </or>
</enabledWhen>
</codeMiningProvider>
</extension>
diff --git a/target-platforms/target-platform-latest/target-platform-latest.target b/target-platforms/target-platform-latest/target-platform-latest.target
index 7cdafcf..1209c47 100644
--- a/target-platforms/target-platform-latest/target-platform-latest.target
+++ b/target-platforms/target-platform-latest/target-platform-latest.target
@@ -1,38 +1,38 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="LSP4E Target-platform" sequenceNumber="1473749377">
-<locations>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.mylyn.commons.notifications.feature.group" version="0.0.0"/>
-<repository location="http://download.eclipse.org/mylyn/releases/latest"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.mylyn.wikitext" version="0.0.0"/>
-<unit id="org.eclipse.mylyn.wikitext.markdown" version="0.0.0"/>
-<unit id="org.eclipse.mylyn.wikitext.markdown.ui" version="0.0.0"/>
-<repository location="https://download.eclipse.org/mylyn/docs/releases/3.0.38/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.lsp4j" version="0.0.0"/>
-<unit id="org.eclipse.lsp4j.jsonrpc" version="0.0.0"/>
-<unit id="org.eclipse.lsp4j.debug" version="0.0.0"/>
-<unit id="org.eclipse.lsp4j.jsonrpc.debug" version="0.0.0"/>
-<repository location="https://download.eclipse.org/lsp4j/updates/releases/0.10.0/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="org.eclipse.xtext.xbase.lib" version="0.0.0"/>
-<repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.23.0/"/>
-</location>
-<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
-<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
-<unit id="com.google.guava" version="27.1.0.v20190517-1946"/>
-<repository location="https://download.eclipse.org/tools/orbit/downloads/latest-R/"/>
-</location>
-<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
- <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
- <unit id="org.eclipse.jface.text.tests" version="0.0.0"/>
- <unit id="org.eclipse.sdk.ide" version="0.0.0"/>
- <repository location="http://download.eclipse.org/eclipse/updates/4.17"/>
- </location>
-</locations>
+ <locations>
+ <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+ <unit id="org.eclipse.mylyn.commons.notifications.feature.group" version="0.0.0"/>
+ <repository location="http://download.eclipse.org/mylyn/releases/latest"/>
+ </location>
+ <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+ <unit id="org.eclipse.mylyn.wikitext" version="0.0.0"/>
+ <unit id="org.eclipse.mylyn.wikitext.markdown" version="0.0.0"/>
+ <unit id="org.eclipse.mylyn.wikitext.markdown.ui" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/mylyn/docs/releases/3.0.38/"/>
+ </location>
+ <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+ <unit id="org.eclipse.lsp4j" version="0.0.0"/>
+ <unit id="org.eclipse.lsp4j.jsonrpc" version="0.0.0"/>
+ <unit id="org.eclipse.lsp4j.debug" version="0.0.0"/>
+ <unit id="org.eclipse.lsp4j.jsonrpc.debug" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/lsp4j/updates/releases/0.10.0/"/>
+ </location>
+ <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+ <unit id="org.eclipse.xtext.xbase.lib" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/modeling/tmf/xtext/updates/releases/2.23.0/"/>
+ </location>
+ <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+ <unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
+ <unit id="com.google.guava" version="27.1.0.v20190517-1946"/>
+ <repository location="https://download.eclipse.org/tools/orbit/downloads/latest-R/"/>
+ </location>
+ <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
+ <unit id="org.eclipse.jface.text.tests" version="0.0.0"/>
+ <unit id="org.eclipse.sdk.ide" version="0.0.0"/>
+ <repository location="https://download.eclipse.org/eclipse/updates/4.18milestones/S-4.18RC2-202012021800/"/>
+ </location>
+ </locations>
+ <targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
</target>
\ No newline at end of file