Skip to content

getHovers does not return useful information for an import prefix #32735

Closed
@DanTup

Description

@DanTup

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work ondevexp-serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.type-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions