vscode#FileDecoration TypeScript Examples

The following examples show how to use vscode#FileDecoration. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: fileDecorator.ts    From vscode-swissknife with MIT License 6 votes vote down vote up
public provideFileDecoration(uri: Uri): ProviderResult<FileDecoration> {
    const workspace = workspacePathForUri(uri)
    const decoratorsForWorkspace = this.decoratedFilesForWorkspace(workspace)

    const decorator = decoratorsForWorkspace.find(f => f.file === relativePathForUri(uri))

    if (decorator)
      //color: new vscode.ThemeColor("button.background"),
      return { badge: decorator.decorator }
  }
Example #2
Source File: DecorationsProvider.ts    From al-objid with MIT License 6 votes vote down vote up
provideFileDecoration(uri: Uri): ProviderResult<FileDecoration> {
        if (uri.scheme !== "ninja") {
            return;
        }

        const map = this._decorations[uri.authority];
        if (!map) {
            return;
        }

        const decoration = map[uri.path];
        if (!decoration) {
            return;
        }

        return {
            ...decoration,
            propagate: false,
            color: new ThemeColor(SeverityColors[`${decoration.severity}`]),
        };
    }