-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.Used for miscellaneous pkg/ packages not associated with specific area- teams.pkg-dtdFor issues related to the Dart Tooling Daemon (package:dtd or pkg/dtd_impl within the Dart SDK)For issues related to the Dart Tooling Daemon (package:dtd or pkg/dtd_impl within the Dart SDK)triagedIssue has been triaged by sub teamIssue has been triaged by sub team
Description
While it's currently possible to listen to the DTD Editor
to respond to changes in the currently selected file in the IDE, there's no way to query the current state manually.
The implementers of the Editor
service should add support for a ActiveLocation getActiveLocation()
method which returns the currently selected location.
ActiveLocation
would have roughly the following interface:
class ActiveLocation {
/// An identifier that represents the active document.
///
/// `null` is there is no active document.
OptionalVersionedTextDocumentIdentifier? textDocument;
/// The set of selections in the document.
///
/// There will always be at least one selection if there is an active document
/// (textDocument != null), but there may also be more if a user has multiple
/// selections active.
///
/// The first selection is always the primary selection for actions that only
/// support one location.
List<EditorSelection> selections;
}
The interface for ActiveLocationChangedEvent
would now effectively be:
class ActiveLocationChangedEvent extends ActiveLocation implements Event {
String eventKind;
}
Metadata
Metadata
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-pkgUsed for miscellaneous pkg/ packages not associated with specific area- teams.Used for miscellaneous pkg/ packages not associated with specific area- teams.pkg-dtdFor issues related to the Dart Tooling Daemon (package:dtd or pkg/dtd_impl within the Dart SDK)For issues related to the Dart Tooling Daemon (package:dtd or pkg/dtd_impl within the Dart SDK)triagedIssue has been triaged by sub teamIssue has been triaged by sub team