sdk icon indicating copy to clipboard operation
sdk copied to clipboard

getHovers does not return useful information for an import prefix

Open DanTup opened this issue 7 years ago • 3 comments

Given this code:

import "dart:async" as x;

main() {
  var a = new x.Future();
}

If you send a hover request for the x at the bottom you get this:

{
	"id": "212",
	"result": {
		"hovers": [
			{
				"offset": 148,
				"length": 1,
				"containingLibraryPath": "/Users/dantup/Desktop/Dart Sample/bin/main.dart",
				"containingLibraryName": "",
				"elementDescription": "as x",
				"elementKind": "import prefix",
				"isDeprecated": false
			}
		]
	}
}

There's no information in there to say that this import was for dart:async so it's hard to render a useful tooltip. If I hover over dart:async I get a bunch of information including the dartdoc for the library. It's be nice if we could have this here to show the user information about what x is.

DanTup avatar Apr 02 '18 13:04 DanTup