Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(527)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartHover.java

Issue 1003193005: Add 'containingClassDescription' to HoverInformation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartHover.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartHover.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartHover.java
index 00f6d6c60b63b5730a66ead0807977d371d01774..83b006e1d7016e88adf5629db5f9c04844c97ed3 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartHover.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/DartHover.java
@@ -171,6 +171,7 @@ public class DartHover implements ITextHover, ITextHoverExtension, ITextHoverExt
private Composite container;
private TextSection elementSection;
+ private TextSection classSection;
private TextSection librarySection;
private AnnotationsSection problemsSection;
private DocSection docSection;
@@ -210,6 +211,7 @@ public class DartHover implements ITextHover, ITextHoverExtension, ITextHoverExt
hasContents = false;
// Hide all sections.
setGridVisible(elementSection, false);
+ setGridVisible(classSection, false);
setGridVisible(librarySection, false);
setGridVisible(problemsSection, false);
setGridVisible(docSection, false);
@@ -234,6 +236,14 @@ public class DartHover implements ITextHover, ITextHoverExtension, ITextHoverExt
elementSection.setText(text);
}
}
+ // show Class
+ {
+ String className = hover.getContainingClassDescription();
+ if (className != null) {
+ setGridVisible(classSection, true);
+ classSection.setText(className);
+ }
+ }
// show Library
{
String unitName = hover.getContainingLibraryPath();
@@ -402,7 +412,8 @@ public class DartHover implements ITextHover, ITextHoverExtension, ITextHoverExt
container = toolkit.createComposite(parent);
GridLayoutFactory.create(container);
elementSection = new TextSection(container, "Element");
- librarySection = new TextSection(container, "Library");
+ classSection = new TextSection(container, "Containing class");
+ librarySection = new TextSection(container, "Containing library");
problemsSection = new AnnotationsSection(container, "Problems");
docSection = new DocSection(container, "Documentation");
staticTypeSection = new TextSection(container, "Static type");

Powered by Google App Engine
This is Rietveld 408576698