Skip to content

Provide diagnostic marker API in $psEditor #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
daviwil opened this issue May 18, 2016 · 0 comments
Open

Provide diagnostic marker API in $psEditor #235

daviwil opened this issue May 18, 2016 · 0 comments
Labels
Issue-Enhancement A feature request (enhancement).

Comments

@daviwil
Copy link
Contributor

daviwil commented May 18, 2016

It would be useful if there was an API to add diagnostic markers to script files so that any editor command could add "squigglies" to arbitrary regions of an open file. Markers would be added in relation to a named "layer" which would allow Editor Services to keep track of a unique set of markers for each module or use case.

The API might look something like this:

$file = $context.CurrentFile
# OR: $file = $psEditor.Workspace.GetFile("filePath.ext")
$file.SetMarkers("MarkerLayerName", markerArray)

We should also provide an API for clearing markers, either for a specific layer or for all layers:

$file.ClearMarkers("MarkerLayerName")
$file.ClearMarkers()

Once this API exists, I'll use it to implement the new integration model for PSScriptAnalyzer in issue #213.

FEEDBACK NEEDED: Is SetMarkers good enough or should it be SetFileMarkers, SetDiagnosticMarkers or something else?

@daviwil daviwil added the Issue-Enhancement A feature request (enhancement). label May 18, 2016
@daviwil daviwil modified the milestones: Backlog, 0.7.0 May 18, 2016
@daviwil daviwil modified the milestones: 0.7.0, 0.8.0 Sep 2, 2016
@daviwil daviwil modified the milestones: 0.8.0, 0.9.0 Nov 29, 2016
@daviwil daviwil modified the milestones: 0.9.0, 0.10.0 Jan 18, 2017
@daviwil daviwil modified the milestones: 0.10.0, April 2017 Mar 14, 2017
@daviwil daviwil modified the milestones: June 2017, Backlog Oct 27, 2017
TylerLeonhardt pushed a commit to TylerLeonhardt/PowerShellEditorServices that referenced this issue Feb 26, 2019
@andyleejordan andyleejordan removed this from the Backlog milestone Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement A feature request (enhancement).
Projects
None yet
Development

No branches or pull requests

2 participants