feat: support for mutual open between launch.json and launch editor #2738
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types
Background or solution
🤖 Generated by Copilot at fa5f3e2
COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION
command, which is used to display the command name in the UI (link)LAUNCH_OPEN
to indicate the type of view to open when executing theCOMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION
command (link)registerCommands
method of theDebugContribution
class to accept a parameter of typeLAUNCH_OPEN
for theCOMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION
command, and call the appropriate method of thedebugConfigurationService
to open the launch editor view or the JSON file of the debug configurations (link)openLaunchEditor
to theDebugConfigurationManager
class, which opens the launch editor view for editing the debug configurations using a custom URI scheme (link)addConfiguration
method of theDebugConfigurationManager
class to open the JSON file of the debug configurations instead of the launch editor view when adding a new configuration (link)openLaunchEditor
to theDebugConfigurationService
class, which exposes theopenLaunchEditor
method of thedebugConfigurationManager
to theDebugContribution
class (link)FloatingClickWidget
component, which calls theopenLaunchEditor
method of theDebugConfigurationService
to open the launch editor view (link)openLaunchEditor
method to theFloatingClickWidget
component (link)MenuId.EditorTitle
location, which allows the user to switch between the launch editor view and the JSON file of the debug configurations using theCOMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION
command (link)MenuContribution
interface to the@Domain
decorator of theLaunchPreferencesContribution
class, indicating that the class also provides menu contributions to the workbench (link)LAUNCH_VIEW_SCHEME
andLAUNCH_VIEW_COMPONENT_ID
constants from thepackages/debug/src/common/constants.ts
file, where they are defined, instead of duplicating them in thepackages/debug/src/browser/preferences/launch-preferences-contribution.ts
file (link)LAUNCH_VIEW_SCHEME
constant from thepackages/debug/src/common/constants.ts
file, where it is defined, instead of duplicating it in thepackages/debug/src/browser/debug-configuration-manager.ts
file (link)COMMON_COMMANDS
,IMenuRegistry
,MenuContribution
, andMenuId
objects from the@opensumi/ide-core-browser
package, which are used to access theCOMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION
command and register menu items to the workbench (link)launch.json
tolaunch editor
launch editor
tolaunch.json
Changelog
🤖 Generated by Copilot at fa5f3e2
This pull request adds a new feature to the debug package that allows users to edit the debug configurations in a launch editor view instead of a JSON file. It also adds a button to the floating widget and a menu item to the editor title bar that enable users to switch between the two views. It updates the command, service, manager, and preference classes to support the new feature, and adds some constants, styles, and localization keys and values.