Package ghidra.app.services

# Interface VSCodeIntegrationService

public interface VSCodeIntegrationService
Service that provides Visual Studio Code-related functionality

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addToVSCodeWorkspace(File workspaceFile, File projectDir)`
  Adds the given project directory to the given Visual Studio Code workspace file A new workspace will be created if it doesn't already exist
  `void`
  `createVSCodeModuleProject(File projectDir)`
  Creates a new Visual Studio Code module project at the given directory
  `File`
  `getVSCodeExecutableFile()`
  Returns the Visual Studio Code executable file.
  `ToolOptions`
  `getVSCodeIntegrationOptions()`
  Returns the Visual Studio Code Integration options.
  `void`
  `handleVSCodeError(String error, boolean askAboutOptions, Throwable t)`
  Displays the given Visual Studio Code related error message in an error dialog
  `void`
  `launchVSCode(File file)`
  Launches Visual Studio Code

- ## Method Details

  - ### getVSCodeIntegrationOptions

    ToolOptions getVSCodeIntegrationOptions()
    Returns the Visual Studio Code Integration options.
    Returns:
      the Visual Studio Code Integration options

  - ### getVSCodeExecutableFile

    File getVSCodeExecutableFile() throws FileNotFoundException
    Returns the Visual Studio Code executable file.
    Returns:
      the Visual Studio Code executable file
    Throws:
      `FileNotFoundException` - if the executable file does not exist

  - ### launchVSCode

    void launchVSCode(File file)
    Launches Visual Studio Code
    Parameters:
      `file` - The initial file to open in Visual Studio Code

  - ### handleVSCodeError

    void handleVSCodeError(String error, boolean askAboutOptions, Throwable t)
    Displays the given Visual Studio Code related error message in an error dialog
    Parameters:
      `error` - The error message to display in a dialog
      `askAboutOptions` - True if we should ask the user if they want to be taken to the Visual Studio Code options; otherwise, false
      `t` - An optional throwable to tie to the message

  - ### createVSCodeModuleProject

    void createVSCodeModuleProject(File projectDir) throws IOException
    Creates a new Visual Studio Code module project at the given directory
    Parameters:
      `projectDir` - The new directory to create
    Throws:
      `IOException` - if the directory failed to be created

  - ### addToVSCodeWorkspace

    void addToVSCodeWorkspace(File workspaceFile, File projectDir) throws IOException
    Adds the given project directory to the given Visual Studio Code workspace file A new workspace will be created if it doesn't already exist
    Parameters:
      `workspaceFile` - The location of the workspace file
      `projectDir` - An existing project directory to add to the workspace
    Throws:
      `IOException` - if the directory failed to be created