Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CppConfigurationProvider

The actual class that provides information to the cpptools extension. See the CustomConfigurationProvider interface for information on how this class should be used.

Hierarchy

  • CppConfigurationProvider

Implements

  • CustomConfigurationProvider

Index

Constructors

constructor

Properties

Private _bestGuessIndex

_bestGuessIndex: Map<string, SourceFileConfigurationItem> = new Map<string, cpt.SourceFileConfigurationItem>()

The "best guess" configuration index. Used to look up the result for files that aren't already in _fileIndex. This uses the "stemmed" filepath as the keys to encourage collision between header files and their corresponding source files.

Private _fileIndex

_fileIndex: Map<string, SourceFileConfigurationItem> = new Map<string, cpt.SourceFileConfigurationItem>()

Index of files to configurations, using the normalized path to the file as the key.

Private _lastUpdateSucceeded

_lastUpdateSucceeded: boolean = true

This value determines if we need to show the user an error message about missing compilers. When an update succeeds without missing any compilers, we set this to true, otherwise false.

If an update fails and the value is true, we display the message. If an update fails and the value is false, we do not display the message.

This ensures that we only show the message the first time an update fails within a sequence of failing updates.

extensionContext

extensionContext: vscode.ExtensionContext

extensionId

extensionId: "vector-of-bool.cmake-tools" = "vector-of-bool.cmake-tools"

Our extension ID, visible to cpptools

name

name: "CMake Tools" = "CMake Tools"

Our name visible to cpptools

Methods

Private _buildConfigurationData

Private _getConfiguration

  • _getConfiguration(uri: vscode.Uri, silent?: boolean): SourceFileConfigurationItem | undefined
  • Get the SourceFileConfigurationItem from the index for the given URI

    Parameters

    • uri: vscode.Uri

      The configuration to get from the index

    • Default value silent: boolean = true

    Returns SourceFileConfigurationItem | undefined

Private _updateFileGroup

  • Update the configuration index for the files in the given file group

    Parameters

    Returns void

canProvideBrowseConfiguration

  • canProvideBrowseConfiguration(): Promise<boolean>
  • A request to determine whether this provider can provide a code browsing configuration for the workspace folder.

    Returns Promise<boolean>

    'true' if this provider can provider a code browsing configuration for the workspace folder.

canProvideConfiguration

  • canProvideConfiguration(uri: vscode.Uri): Promise<boolean>
  • Test if we are able to provide a configuration for the given URI

    Parameters

    • uri: vscode.Uri

      The URI to look up

    Returns Promise<boolean>

dispose

  • dispose(): void

provideBrowseConfiguration

  • provideBrowseConfiguration(): Promise<WorkspaceBrowseConfiguration>
  • A request to get the code browsing configuration for the workspace folder.

    Returns Promise<WorkspaceBrowseConfiguration>

    A WorkspaceBrowseConfiguration with the information required to construct the equivalent of browse.path from c_cpp_properties.json.

provideConfigurations

  • provideConfigurations(uris: vscode.Uri[]): Promise<SourceFileConfigurationItem[]>
  • Get the configurations for the given URIs. URIs for which we have no configuration are simply ignored.

    Parameters

    • uris: vscode.Uri[]

      The file URIs to look up

    Returns Promise<SourceFileConfigurationItem[]>

updateConfigurationData

Object literals

Private _workspaceBrowseConfiguration

_workspaceBrowseConfiguration: object

browsePath

browsePath: never[] = []

Generated using TypeDoc