/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base'; import URI from 'vs/base/common/uri'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import Event from 'vs/base/common/event'; import { IDisposable } from 'vs/base/common/lifecycle'; import { Command } from 'vs/editor/common/modes'; import { ColorIdentifier } from 'vs/platform/theme/common/colorRegistry'; import { ISequence } from 'vs/base/common/sequence'; export interface IBaselineResourceProvider { getBaselineResource(resource: URI): TPromise; } export const ISCMService = createDecorator('scm'); export interface ISCMResourceDecorations { icon?: URI; iconDark?: URI; tooltip?: string; strikeThrough?: boolean; faded?: boolean; source?: string; letter?: string; color?: ColorIdentifier; } export interface ISCMResource { readonly resourceGroup: ISCMResourceGroup; readonly sourceUri: URI; readonly decorations: ISCMResourceDecorations; open(): TPromise; } export interface ISCMResourceGroup extends ISequence { readonly provider: ISCMProvider; readonly label: string; readonly id: string; readonly hideWhenEmpty: boolean; readonly onDidChange: Event; } export interface ISCMProvider extends IDisposable { readonly label: string; readonly id: string; readonly contextValue: string; readonly groups: ISequence; // TODO@Joao: remove readonly onDidChangeResources: Event; readonly rootUri?: URI; readonly count?: number; readonly commitTemplate?: string; readonly onDidChangeCommitTemplate?: Event; readonly acceptInputCommand?: Command; readonly statusBarCommands?: Command[]; readonly onDidChange: Event; getOriginalResource(uri: URI): TPromise; } export interface ISCMInput { value: string; readonly onDidChange: Event; placeholder: string; readonly onDidChangePlaceholder: Event; } export interface ISCMRepository extends IDisposable { readonly onDidFocus: Event; readonly provider: ISCMProvider; readonly input: ISCMInput; focus(): void; } export interface ISCMService { readonly _serviceBrand: any; readonly onDidAddRepository: Event; readonly onDidRemoveRepository: Event; readonly repositories: ISCMRepository[]; registerSCMProvider(provider: ISCMProvider): ISCMRepository; }