-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Add openedTextEditors, onDidOpenTextEditor, onDidCloseTextEditor to the extensions API #8886
Comments
cc @bpasero |
|
That's what I meant. |
is it at least possible to get the model information for all open editors? I have a use-case where I need to get the file path of all open tabs/editors. |
@ChuckJonas Yes - there is Also FYI everyone, we have added |
@jrieken either you are mistaken about the behavior of Example: Open Project When I access There should be a way to get a list of everything that shoulds up in the |
Well, for extensions the following is true: open editor === visible editor. That fact that there are UX elements like Open Editors or editor tabs doesn't mean that there exists an editor for those documents nor does it mean those documents are already loaded - especially not after a restart. The data from the open editors pane has no representation in the API. @ChuckJonas Curious to know what you are trying to do and why that requires access to the open editors data model? |
@jrieken sure, So imagine you need to rename a class that is referenced in 5 other classes. You replace all occurrences of the symbol and want to compile it (basicly deploy it to a development instance). I must make a single request, with all 5 updated files in order for it to succeed. You could deploy the whole project, that but might contain thousands of files, some of which could be out sync or even outright broken (and thus the compilation will fail). The way this is handled by current IDE's is to allow the user to compile all open tabs. Also, I don't need an |
Closing this because there is |
Our extension is rendering decorations in opened editors.
Extensions API has the
window.visibleTextEditors
,workspace.onDidOpenTextDocument
, andworkspace.onDidCloseTextDocument
that allow to track opened documents and render the decorations in visible editors (and dispose things when the editor is not visible anymore).Now with the new opened tabs feature, I thought it'd be good not to dispose the decorations if an editor wasn't closed but only became non-visible, but I couldn't find a way to do this with the current API version. I can track opened text documents, but there's no way to get an editor of the document and there's no
window.openedTextEditors
.It would be great if the API was extended to include:
window.openedTextEditors
,window.onDidOpenTextEditor
,window.onDidCloseTextEditor
.The text was updated successfully, but these errors were encountered: