-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Description
Problem
Since the contribution point: editor/title
is open for all the extensions, sometimes different extensions may have conflicts at this area. For example, in Java, such conflicts affect the run experience when the user installs both the Java extensions and the Code Runner extension:
This is a very open and big topic, as a author of VS Code extensions, it will be great if VS Code as a platform, can provide solutions for this issue.
Potential Solutions
Below are just rough ideas on this, it's open for discussion!
Editor Metadata
Extensions can register context value per document/editor, and register command on the editor title area according to the context value. For example. the Java Debugger can use this to mark if the current Java file is executable or not. And register the run/debug command into the editor context area if it's executable.
This can somehow achieved by using the
in
expression of the when clause, something likeresource in hasMainMethodFiles
. But we also need to get the context value dynamically from the code to handle with the corporation between multiple extensions.
Meanwhile the Java feature team can contribute changes to the Code Runner extension to align the UX (for example, hide the run button from Code Runner if the current Java file contains an executable Main class).
Official Support for the run experience in the editor title area.
This also may have some opportunity since I believe it's somehow related with #85759, if VS Code team will consider provide official run/debug
functionality area in the editor title.