Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Bullen2017-12-01 11:05:29 -0500
committerLucas Bullen2017-12-01 11:52:09 -0500
commit45c76cacad2d0e3839304f2a16330b02d965c3b1 (patch)
tree0f3be5461656fe1f9910a2199d002e76d4fa4dd3 /org.eclipse.ui.genericeditor
parent1ee194e213ba0ebcad498da3abbd8f4677bd8f47 (diff)
downloadeclipse.platform.text-45c76cacad2d0e3839304f2a16330b02d965c3b1.tar.gz
eclipse.platform.text-45c76cacad2d0e3839304f2a16330b02d965c3b1.tar.xz
eclipse.platform.text-45c76cacad2d0e3839304f2a16330b02d965c3b1.zip
Bug 527071 - [generic editor] Hover in .project editor does not workI20171204-0530I20171203-2000I20171203-0800I20171202-1500I20171202-0800I20171201-2000
Nature Label Hover was returning an empty string instead of null Change-Id: Ic64575e8e0230a2b617f1fb8178627251063cd30 Signed-off-by: Lucas Bullen <lbullen@redhat.com>
Diffstat (limited to 'org.eclipse.ui.genericeditor')
-rw-r--r--org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/CompositeInformationControl.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/CompositeInformationControl.java b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/CompositeInformationControl.java
index a63088f2f..86d0f62a2 100644
--- a/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/CompositeInformationControl.java
+++ b/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/hover/CompositeInformationControl.java
@@ -7,6 +7,7 @@
*
* Contributors:
* - Mickael Istria (Red Hat Inc.)
+ * - Lucas Bullen (Red Hat Inc.) - [Bug 527071] Empty string as content breaks hover
*******************************************************************************/
package org.eclipse.ui.internal.genericeditor.hover;
@@ -70,8 +71,11 @@ public class CompositeInformationControl extends AbstractInformationControl impl
if (informationControl != null) {
if (informationControl instanceof IInformationControlExtension2) {
((IInformationControlExtension2)informationControl).setInput(entry.getValue());
- } else {
- informationControl.setInformation(entry.getValue().toString());
+ continue;
+ }
+ String information = entry.getValue().toString();
+ if(!information.isEmpty()){
+ informationControl.setInformation(information);
}
}
}
@@ -107,14 +111,14 @@ public class CompositeInformationControl extends AbstractInformationControl impl
}
}
}
-
+
@Override
public void dispose() {
controls.values().forEach(IInformationControl::dispose);
controls.clear();
super.dispose();
}
-
+
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
if (controls.isEmpty()) {

Back to the top