| Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartTextHover.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartTextHover.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartTextHover.java
|
| index 8dbd141a5125921fce0917d6109d0ff3ef7549b2..1f6c6ddceb955791ea8bc68ebbe21824fe5186f4 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartTextHover.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartTextHover.java
|
| @@ -82,6 +82,16 @@ public class DartTextHover extends DefaultTextHover implements ITextHoverExtensi
|
| hoverContributors.remove(hoverContributor);
|
| }
|
|
|
| + private static StringBuilder append(StringBuilder buffer, String s) {
|
| + if (buffer.length() != 0) {
|
| + buffer.append("<br><br>");
|
| + }
|
| + if (s != null) {
|
| + buffer.append(s);
|
| + }
|
| + return buffer;
|
| + }
|
| +
|
| private CompilationUnitEditor editor;
|
|
|
| private DartSourceViewerConfiguration sourceViewerConfiguration;
|
| @@ -139,12 +149,11 @@ public class DartTextHover extends DefaultTextHover implements ITextHoverExtensi
|
| // means trying to call getHoverInfo2() on any contributors, and falling back on getHoverInfo().
|
| lastReturnedHover = null;
|
|
|
| - // Return any annotation info - i.e. errors and warnings.
|
| - String annotationHover = super.getHoverInfo(textViewer, region);
|
| + StringBuilder buffer = new StringBuilder();
|
|
|
| - if (annotationHover != null) {
|
| - return escapeHtmlEntities(annotationHover);
|
| - }
|
| + // Append any annotation info - i.e. errors and warnings.
|
| + String annotationHover = super.getHoverInfo(textViewer, region);
|
| + append(buffer, escapeHtmlEntities(annotationHover));
|
|
|
| // Check through the contributed hover providers.
|
| for (ITextHover hoverContributer : hoverContributors) {
|
| @@ -155,7 +164,6 @@ public class DartTextHover extends DefaultTextHover implements ITextHoverExtensi
|
|
|
| if (hoverInfo != null) {
|
| lastReturnedHover = hoverContributer;
|
| -
|
| return hoverInfo;
|
| }
|
| } else {
|
| @@ -163,14 +171,14 @@ public class DartTextHover extends DefaultTextHover implements ITextHoverExtensi
|
|
|
| if (hoverText != null) {
|
| lastReturnedHover = hoverContributer;
|
| -
|
| return hoverText;
|
| }
|
| }
|
| }
|
|
|
| // Check for a dartdoc contribution.
|
| - return getDartDocHover(region);
|
| + String dartDocHover = getDartDocHover(region);
|
| + return append(buffer, dartDocHover).toString();
|
| }
|
|
|
| @Override
|
|
|