Просмотр исходного кода

Moves config interfaces into single file

main
Eric Amodio 6 лет назад
Родитель
Сommit
52e9441aea
22 измененных файлов: 359 добавлений и 366 удалений
  1. +1
    -8
      src/annotations/annotationController.ts
  2. +1
    -1
      src/annotations/annotationProvider.ts
  3. +1
    -1
      src/annotations/annotations.ts
  4. +1
    -1
      src/annotations/blameAnnotationProvider.ts
  5. +1
    -2
      src/annotations/gutterBlameAnnotationProvider.ts
  6. +1
    -1
      src/annotations/heatmapBlameAnnotationProvider.ts
  7. +1
    -1
      src/annotations/hoverBlameAnnotationProvider.ts
  8. +1
    -1
      src/annotations/recentChangesAnnotationProvider.ts
  9. +1
    -1
      src/commands/openFileRevision.ts
  10. +1
    -1
      src/commands/openWorkingFile.ts
  11. +1
    -2
      src/commands/showFileBlame.ts
  12. +1
    -2
      src/commands/showLineBlame.ts
  13. +1
    -2
      src/commands/toggleFileBlame.ts
  14. +1
    -1
      src/commands/toggleFileHeatmap.ts
  15. +1
    -1
      src/commands/toggleFileRecentChanges.ts
  16. +1
    -2
      src/commands/toggleLineBlame.ts
  17. +335
    -0
      src/config.ts
  18. +4
    -316
      src/configuration.ts
  19. +1
    -7
      src/currentLineController.ts
  20. +1
    -1
      src/extension.ts
  21. +1
    -7
      src/logger.ts
  22. +1
    -7
      src/views/gitExplorer.ts

+ 1
- 8
src/annotations/annotationController.ts Просмотреть файл

@ -2,7 +2,7 @@
import { Functions, Iterables } from '../system';
import { ConfigurationChangeEvent, DecorationRangeBehavior, DecorationRenderOptions, Disposable, Event, EventEmitter, OverviewRulerLane, Progress, ProgressLocation, TextDocument, TextEditor, TextEditorDecorationType, TextEditorViewColumnChangeEvent, ThemeColor, window, workspace } from 'vscode';
import { AnnotationProviderBase, TextEditorCorrelationKey } from './annotationProvider';
import { configuration, IConfig, LineHighlightLocations } from '../configuration';
import { configuration, FileAnnotationType, IConfig, LineHighlightLocations } from '../configuration';
import { CommandContext, isTextEditor, setCommandContext } from '../constants';
import { Container } from '../container';
import { DocumentBlameStateChangeEvent, DocumentDirtyStateChangeEvent, GitDocumentState } from '../trackers/documentTracker';
@ -14,13 +14,6 @@ import { Logger } from '../logger';
import { RecentChangesAnnotationProvider } from './recentChangesAnnotationProvider';
import * as path from 'path';
export enum FileAnnotationType {
Gutter = 'gutter',
Heatmap = 'heatmap',
Hover = 'hover',
RecentChanges = 'recentChanges'
}
export enum AnnotationClearReason {
User = 'User',
BlameabilityChanged = 'BlameabilityChanged',

+ 1
- 1
src/annotations/annotationProvider.ts Просмотреть файл

@ -1,7 +1,7 @@
'use strict';
import { Functions } from '../system';
import { DecorationOptions, Disposable, TextDocument, TextEditor, TextEditorDecorationType, TextEditorSelectionChangeEvent, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { FileAnnotationType } from '../configuration';
import { TextDocumentComparer } from '../comparers';
import { GitDocumentState, TrackedDocument } from '../trackers/documentTracker';

+ 1
- 1
src/annotations/annotations.ts Просмотреть файл

@ -1,7 +1,7 @@
import { Dates, Objects, Strings } from '../system';
import { DecorationInstanceRenderOptions, DecorationOptions, MarkdownString, ThemableDecorationRenderOptions, ThemeColor, window } from 'vscode';
import { FileAnnotationType } from './annotationController';
import { DiffWithCommand, OpenCommitInRemoteCommand, OpenFileRevisionCommand, ShowQuickCommitDetailsCommand, ShowQuickCommitFileDetailsCommand } from '../commands';
import { FileAnnotationType } from './../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { CommitFormatter, GitCommit, GitDiffChunkLine, GitService, GitUri, ICommitFormatOptions } from '../gitService';

+ 1
- 1
src/annotations/blameAnnotationProvider.ts Просмотреть файл

@ -1,9 +1,9 @@
'use strict';
import { Arrays, Iterables } from '../system';
import { CancellationToken, Disposable, Hover, HoverProvider, languages, Position, Range, TextDocument, TextEditor, TextEditorDecorationType } from 'vscode';
import { FileAnnotationType } from './annotationController';
import { AnnotationProviderBase } from './annotationProvider';
import { Annotations } from './annotations';
import { FileAnnotationType } from './../configuration';
import { RangeEndOfLineIndex } from '../constants';
import { Container } from '../container';
import { GitDocumentState, TrackedDocument } from '../trackers/documentTracker';

+ 1
- 2
src/annotations/gutterBlameAnnotationProvider.ts Просмотреть файл

@ -1,10 +1,9 @@
'use strict';
import { Objects, Strings } from '../system';
import { DecorationOptions, DecorationRenderOptions, Range, TextEditorDecorationType, window } from 'vscode';
import { FileAnnotationType } from './annotationController';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
import { GravatarDefaultStyle } from '../configuration';
import { FileAnnotationType, GravatarDefaultStyle } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitBlameCommit, ICommitFormatOptions } from '../gitService';

+ 1
- 1
src/annotations/heatmapBlameAnnotationProvider.ts Просмотреть файл

@ -1,8 +1,8 @@
'use strict';
import { DecorationOptions, Range } from 'vscode';
import { FileAnnotationType } from './annotationController';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
import { FileAnnotationType } from './../configuration';
import { GitBlameCommit } from '../gitService';
import { Logger } from '../logger';

+ 1
- 1
src/annotations/hoverBlameAnnotationProvider.ts Просмотреть файл

@ -1,8 +1,8 @@
'use strict';
import { DecorationOptions, Range } from 'vscode';
import { FileAnnotationType } from './annotationController';
import { Annotations } from './annotations';
import { BlameAnnotationProviderBase } from './blameAnnotationProvider';
import { FileAnnotationType } from './../configuration';
import { Container } from '../container';
import { GitBlameCommit } from '../gitService';
import { Logger } from '../logger';

+ 1
- 1
src/annotations/recentChangesAnnotationProvider.ts Просмотреть файл

@ -1,8 +1,8 @@
'use strict';
import { DecorationOptions, MarkdownString, Position, Range, TextEditor, TextEditorDecorationType } from 'vscode';
import { FileAnnotationType } from './annotationController';
import { AnnotationProviderBase } from './annotationProvider';
import { Annotations } from './annotations';
import { FileAnnotationType } from './../configuration';
import { RangeEndOfLineIndex } from '../constants';
import { Container } from '../container';
import { GitDocumentState, TrackedDocument } from '../trackers/documentTracker';

+ 1
- 1
src/commands/openFileRevision.ts Просмотреть файл

@ -1,8 +1,8 @@
'use strict';
import { Iterables, Strings } from '../system';
import { CancellationTokenSource, Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common';
import { FileAnnotationType } from '../configuration';
import { GlyphChars } from '../constants';
import { Container } from '../container';
import { GitUri } from '../gitService';

+ 1
- 1
src/commands/openWorkingFile.ts Просмотреть файл

@ -1,7 +1,7 @@
'use strict';
import { Range, TextDocumentShowOptions, TextEditor, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { ActiveEditorCommand, Commands, getCommandUri, openEditor } from './common';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { GitUri } from '../gitService';
import { Logger } from '../logger';

+ 1
- 2
src/commands/showFileBlame.ts Просмотреть файл

@ -1,8 +1,7 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { Commands, EditorCommand } from './common';
import { configuration } from '../configuration';
import { configuration, FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';

+ 1
- 2
src/commands/showLineBlame.ts Просмотреть файл

@ -1,9 +1,8 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { LineAnnotationType } from '../currentLineController';
import { Commands, EditorCommand } from './common';
import { Container } from '../container';
import { configuration } from '../configuration';
import { configuration, LineAnnotationType } from '../configuration';
import { Logger } from '../logger';
export interface ShowLineBlameCommandArgs {

+ 1
- 2
src/commands/toggleFileBlame.ts Просмотреть файл

@ -1,9 +1,8 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { Commands, EditorCommand } from './common';
import { UriComparer } from '../comparers';
import { configuration } from '../configuration';
import { configuration, FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';

+ 1
- 1
src/commands/toggleFileHeatmap.ts Просмотреть файл

@ -1,8 +1,8 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { Commands, EditorCommand } from './common';
import { UriComparer } from '../comparers';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';

+ 1
- 1
src/commands/toggleFileRecentChanges.ts Просмотреть файл

@ -1,8 +1,8 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { FileAnnotationType } from '../annotations/annotationController';
import { Commands, EditorCommand } from './common';
import { UriComparer } from '../comparers';
import { FileAnnotationType } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';

+ 1
- 2
src/commands/toggleLineBlame.ts Просмотреть файл

@ -1,8 +1,7 @@
'use strict';
import { TextEditor, TextEditorEdit, Uri, window } from 'vscode';
import { LineAnnotationType } from '../currentLineController';
import { Commands, EditorCommand } from './common';
import { configuration } from '../configuration';
import { configuration, LineAnnotationType } from '../configuration';
import { Container } from '../container';
import { Logger } from '../logger';

+ 335
- 0
src/config.ts Просмотреть файл

@ -0,0 +1,335 @@
'use strict';
export enum CodeLensCommand {
DiffWithPrevious = 'gitlens.diffWithPrevious',
ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails',
ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails',
ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory',
ShowQuickFileHistory = 'gitlens.showQuickFileHistory',
ToggleFileBlame = 'gitlens.toggleFileBlame'
}
export enum CodeLensLocations {
Document = 'document',
Containers = 'containers',
Blocks = 'blocks'
}
export enum CustomRemoteType {
Bitbucket = 'Bitbucket',
BitbucketServer = 'BitbucketServer',
Custom = 'Custom',
GitHub = 'GitHub',
GitLab = 'GitLab'
}
export enum DateStyle {
Absolute = 'absolute',
Relative = 'relative'
}
export enum ExplorerFilesLayout {
Auto = 'auto',
List = 'list',
Tree = 'tree'
}
export enum FileAnnotationType {
Gutter = 'gutter',
Heatmap = 'heatmap',
Hover = 'hover',
RecentChanges = 'recentChanges'
}
export enum GitExplorerView {
Auto = 'auto',
History = 'history',
Repository = 'repository'
}
export enum GravatarDefaultStyle {
Faces = 'wavatar',
Geometric = 'identicon',
Monster = 'monsterid',
MysteryMan = 'mm',
Retro = 'retro',
Robot = 'robohash'
}
export enum KeyMap {
Standard = 'standard',
Chorded = 'chorded',
None = 'none'
}
export enum LineAnnotationType {
Trailing = 'trailing',
Hover = 'hover'
}
export enum LineHighlightLocations {
Gutter = 'gutter',
Line = 'line',
OverviewRuler = 'overviewRuler'
}
export enum OutputLevel {
Silent = 'silent',
Errors = 'errors',
Verbose = 'verbose'
}
export enum StatusBarCommand {
DiffWithPrevious = 'gitlens.diffWithPrevious',
DiffWithWorking = 'gitlens.diffWithWorking',
ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails',
ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails',
ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory',
ShowQuickFileHistory = 'gitlens.showQuickFileHistory',
ToggleCodeLens = 'gitlens.toggleCodeLens',
ToggleFileBlame = 'gitlens.toggleFileBlame'
}
export interface IAdvancedConfig {
blame: {
delayAfterEdit: number;
sizeThresholdAfterEdit: number;
};
caching: {
enabled: boolean;
};
git: string;
maxListItems: number;
menus: {
explorerContext: {
fileDiff: boolean;
history: boolean;
remote: boolean;
};
editorContext: {
blame: boolean;
copy: boolean;
details: boolean;
fileDiff: boolean;
history: boolean;
lineDiff: boolean;
remote: boolean;
};
editorTitle: {
blame: boolean;
fileDiff: boolean;
history: boolean;
status: boolean;
};
editorTitleContext: {
blame: boolean;
fileDiff: boolean;
history: boolean;
remote: boolean;
};
};
messages: {
suppressCommitHasNoPreviousCommitWarning: boolean,
suppressCommitNotFoundWarning: boolean,
suppressFileNotUnderSourceControlWarning: boolean,
suppressGitVersionWarning: boolean,
suppressLineUncommittedWarning: boolean,
suppressNoRepositoryWarning: boolean,
suppressResultsExplorerNotice: boolean,
suppressUpdateNotice: boolean,
suppressWelcomeNotice: boolean
};
quickPick: {
closeOnFocusOut: boolean;
};
repositorySearchDepth: number;
telemetry: {
enabled: boolean;
};
}
export interface ICodeLensConfig {
enabled: boolean;
recentChange: {
enabled: boolean;
command: CodeLensCommand;
};
authors: {
enabled: boolean;
command: CodeLensCommand;
};
locations: CodeLensLocations[];
customLocationSymbols: string[];
perLanguageLocations: ICodeLensLanguageLocation[];
debug: boolean;
}
export interface ICodeLensLanguageLocation {
language: string | undefined;
locations: CodeLensLocations[];
customSymbols?: string[];
}
export interface IExplorerConfig {
files: {
layout: ExplorerFilesLayout;
compact: boolean;
threshold: number;
};
commitFormat: string;
commitFileFormat: string;
// dateFormat: string | null;
gravatars: boolean;
showTrackingBranch: boolean;
stashFormat: string;
stashFileFormat: string;
statusFileFormat: string;
}
export interface IGitExplorerConfig extends IExplorerConfig {
enabled: boolean;
autoRefresh: boolean;
includeWorkingTree: boolean;
showTrackingBranch: boolean;
view: GitExplorerView;
}
export interface IResultsExplorerConfig extends IExplorerConfig { }
export interface IRemotesConfig {
type: CustomRemoteType;
domain: string;
name?: string;
protocol?: string;
urls?: IRemotesUrlsConfig;
}
export interface IRemotesUrlsConfig {
repository: string;
branches: string;
branch: string;
commit: string;
file: string;
fileInBranch: string;
fileInCommit: string;
fileLine: string;
fileRange: string;
}
export interface IConfig {
annotations: {
file: {
gutter: {
format: string;
dateFormat: string | null;
compact: boolean;
gravatars: boolean;
heatmap: {
enabled: boolean;
location: 'left' | 'right';
};
hover: {
details: boolean;
changes: boolean;
wholeLine: boolean;
};
separateLines: boolean;
};
hover: {
details: boolean;
changes: boolean;
heatmap: {
enabled: boolean;
};
};
recentChanges: {
hover: {
details: boolean;
changes: boolean;
};
};
};
line: {
hover: {
details: boolean;
changes: boolean;
};
trailing: {
format: string;
dateFormat: string | null;
hover: {
details: boolean;
changes: boolean;
wholeLine: boolean;
};
};
};
};
blame: {
ignoreWhitespace: boolean;
file: {
annotationType: FileAnnotationType;
lineHighlight: {
enabled: boolean;
locations: LineHighlightLocations[];
};
};
line: {
enabled: boolean;
annotationType: LineAnnotationType;
};
};
recentChanges: {
file: {
lineHighlight: {
locations: LineHighlightLocations[];
};
}
};
codeLens: ICodeLensConfig;
defaultDateFormat: string | null;
defaultDateStyle: DateStyle;
defaultGravatarsStyle: GravatarDefaultStyle;
gitExplorer: IGitExplorerConfig;
keymap: KeyMap;
remotes: IRemotesConfig[];
resultsExplorer: IResultsExplorerConfig;
statusBar: {
enabled: boolean;
alignment: 'left' | 'right';
command: StatusBarCommand;
format: string;
dateFormat: string | null;
};
strings: {
codeLens: {
unsavedChanges: {
recentChangeAndAuthors: string;
recentChangeOnly: string;
authorsOnly: string;
};
};
};
debug: boolean;
insiders: boolean;
outputLevel: OutputLevel;
advanced: IAdvancedConfig;
}

+ 4
- 316
src/configuration.ts Просмотреть файл

@ -1,326 +1,14 @@
'use strict';
export * from './config';
export { ExtensionKey };
import { Functions } from './system';
import { ConfigurationChangeEvent, ConfigurationTarget, Event, EventEmitter, ExtensionContext, Uri, workspace } from 'vscode';
import { FileAnnotationType } from './annotations/annotationController';
import { IConfig, KeyMap } from './config';
import { CommandContext, ExtensionKey, setCommandContext } from './constants';
import { LineAnnotationType } from './currentLineController';
import { GitExplorerView } from './views/gitExplorer';
import { OutputLevel } from './logger';
import { Container } from './container';
import { clearGravatarCache } from './gitService';
export { ExtensionKey };
export enum CodeLensCommand {
DiffWithPrevious = 'gitlens.diffWithPrevious',
ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails',
ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails',
ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory',
ShowQuickFileHistory = 'gitlens.showQuickFileHistory',
ToggleFileBlame = 'gitlens.toggleFileBlame'
}
export enum CodeLensLocations {
Document = 'document',
Containers = 'containers',
Blocks = 'blocks'
}
export enum LineHighlightLocations {
Gutter = 'gutter',
Line = 'line',
OverviewRuler = 'overviewRuler'
}
export enum CustomRemoteType {
Bitbucket = 'Bitbucket',
BitbucketServer = 'BitbucketServer',
Custom = 'Custom',
GitHub = 'GitHub',
GitLab = 'GitLab'
}
export enum DateStyle {
Absolute = 'absolute',
Relative = 'relative'
}
export enum ExplorerFilesLayout {
Auto = 'auto',
List = 'list',
Tree = 'tree'
}
export enum GravatarDefaultStyle {
Faces = 'wavatar',
Geometric = 'identicon',
Monster = 'monsterid',
MysteryMan = 'mm',
Retro = 'retro',
Robot = 'robohash'
}
export enum KeyMap {
Standard = 'standard',
Chorded = 'chorded',
None = 'none'
}
export enum StatusBarCommand {
DiffWithPrevious = 'gitlens.diffWithPrevious',
DiffWithWorking = 'gitlens.diffWithWorking',
ShowQuickCommitDetails = 'gitlens.showQuickCommitDetails',
ShowQuickCommitFileDetails = 'gitlens.showQuickCommitFileDetails',
ShowQuickCurrentBranchHistory = 'gitlens.showQuickRepoHistory',
ShowQuickFileHistory = 'gitlens.showQuickFileHistory',
ToggleCodeLens = 'gitlens.toggleCodeLens',
ToggleFileBlame = 'gitlens.toggleFileBlame'
}
export interface IAdvancedConfig {
blame: {
delayAfterEdit: number;
sizeThresholdAfterEdit: number;
};
caching: {
enabled: boolean;
};
git: string;
maxListItems: number;
menus: {
explorerContext: {
fileDiff: boolean;
history: boolean;
remote: boolean;
};
editorContext: {
blame: boolean;
copy: boolean;
details: boolean;
fileDiff: boolean;
history: boolean;
lineDiff: boolean;
remote: boolean;
};
editorTitle: {
blame: boolean;
fileDiff: boolean;
history: boolean;
status: boolean;
};
editorTitleContext: {
blame: boolean;
fileDiff: boolean;
history: boolean;
remote: boolean;
};
};
messages: {
suppressCommitHasNoPreviousCommitWarning: boolean,
suppressCommitNotFoundWarning: boolean,
suppressFileNotUnderSourceControlWarning: boolean,
suppressGitVersionWarning: boolean,
suppressLineUncommittedWarning: boolean,
suppressNoRepositoryWarning: boolean,
suppressResultsExplorerNotice: boolean,
suppressUpdateNotice: boolean,
suppressWelcomeNotice: boolean
};
quickPick: {
closeOnFocusOut: boolean;
};
repositorySearchDepth: number;
telemetry: {
enabled: boolean;
};
}
export interface ICodeLensConfig {
enabled: boolean;
recentChange: {
enabled: boolean;
command: CodeLensCommand;
};
authors: {
enabled: boolean;
command: CodeLensCommand;
};
locations: CodeLensLocations[];
customLocationSymbols: string[];
perLanguageLocations: ICodeLensLanguageLocation[];
debug: boolean;
}
export interface ICodeLensLanguageLocation {
language: string | undefined;
locations: CodeLensLocations[];
customSymbols?: string[];
}
export interface IExplorerConfig {
files: {
layout: ExplorerFilesLayout;
compact: boolean;
threshold: number;
};
commitFormat: string;
commitFileFormat: string;
// dateFormat: string | null;
gravatars: boolean;
showTrackingBranch: boolean;
stashFormat: string;
stashFileFormat: string;
statusFileFormat: string;
}
export interface IGitExplorerConfig extends IExplorerConfig {
enabled: boolean;
autoRefresh: boolean;
includeWorkingTree: boolean;
showTrackingBranch: boolean;
view: GitExplorerView;
}
export interface IResultsExplorerConfig extends IExplorerConfig { }
export interface IRemotesConfig {
type: CustomRemoteType;
domain: string;
name?: string;
protocol?: string;
urls?: IRemotesUrlsConfig;
}
export interface IRemotesUrlsConfig {
repository: string;
branches: string;
branch: string;
commit: string;
file: string;
fileInBranch: string;
fileInCommit: string;
fileLine: string;
fileRange: string;
}
export interface IConfig {
annotations: {
file: {
gutter: {
format: string;
dateFormat: string | null;
compact: boolean;
gravatars: boolean;
heatmap: {
enabled: boolean;
location: 'left' | 'right';
};
hover: {
details: boolean;
changes: boolean;
wholeLine: boolean;
};
separateLines: boolean;
};
hover: {
details: boolean;
changes: boolean;
heatmap: {
enabled: boolean;
};
};
recentChanges: {
hover: {
details: boolean;
changes: boolean;
};
};
};
line: {
hover: {
details: boolean;
changes: boolean;
};
trailing: {
format: string;
dateFormat: string | null;
hover: {
details: boolean;
changes: boolean;
wholeLine: boolean;
};
};
};
};
blame: {
ignoreWhitespace: boolean;
file: {
annotationType: FileAnnotationType;
lineHighlight: {
enabled: boolean;
locations: LineHighlightLocations[];
};
};
line: {
enabled: boolean;
annotationType: LineAnnotationType;
};
};
recentChanges: {
file: {
lineHighlight: {
locations: LineHighlightLocations[];
};
}
};
codeLens: ICodeLensConfig;
defaultDateFormat: string | null;
defaultDateStyle: DateStyle;
defaultGravatarsStyle: GravatarDefaultStyle;
gitExplorer: IGitExplorerConfig;
keymap: KeyMap;
remotes: IRemotesConfig[];
resultsExplorer: IResultsExplorerConfig;
statusBar: {
enabled: boolean;
alignment: 'left' | 'right';
command: StatusBarCommand;
format: string;
dateFormat: string | null;
};
strings: {
codeLens: {
unsavedChanges: {
recentChangeAndAuthors: string;
recentChangeOnly: string;
authorsOnly: string;
};
};
};
debug: boolean;
insiders: boolean;
outputLevel: OutputLevel;
advanced: IAdvancedConfig;
}
const emptyConfig: any = new Proxy<any>({} as IConfig, {
get(target, propKey, receiver) {
return emptyConfig;

+ 1
- 7
src/currentLineController.ts Просмотреть файл

@ -1,10 +1,9 @@
'use strict';
import { Functions, IDeferrable } from './system';
import { CancellationToken, ConfigurationChangeEvent, debug, DecorationRangeBehavior, DecorationRenderOptions, Disposable, Hover, HoverProvider, languages, Position, Range, StatusBarAlignment, StatusBarItem, TextDocument, TextEditor, TextEditorDecorationType, window } from 'vscode';
import { FileAnnotationType } from './annotations/annotationController';
import { Annotations } from './annotations/annotations';
import { Commands } from './commands';
import { configuration, IConfig, StatusBarCommand } from './configuration';
import { configuration, FileAnnotationType, IConfig, LineAnnotationType, StatusBarCommand } from './configuration';
import { isTextEditor, RangeEndOfLineIndex } from './constants';
import { Container } from './container';
import { DocumentBlameStateChangeEvent, DocumentDirtyIdleTriggerEvent, DocumentDirtyStateChangeEvent, GitDocumentState, TrackedDocument } from './trackers/documentTracker';
@ -19,11 +18,6 @@ const annotationDecoration: TextEditorDecorationType = window.createTextEditorDe
rangeBehavior: DecorationRangeBehavior.ClosedClosed
} as DecorationRenderOptions);
export enum LineAnnotationType {
Trailing = 'trailing',
Hover = 'hover'
}
class AnnotationState {
constructor(private _enabled: boolean, private _annotationType: LineAnnotationType) { }

+ 1
- 1
src/extension.ts Просмотреть файл

@ -4,12 +4,12 @@ import { ConfigurationTarget, ExtensionContext, extensions, languages, window, w
import { configuration, Configuration, IConfig } from './configuration';
import { CommandContext, ExtensionKey, GlobalState, QualifiedExtensionId, setCommandContext } from './constants';
import { configureCommands } from './commands';
import { Container } from './container';
import { GitContentProvider } from './gitContentProvider';
import { GitRevisionCodeLensProvider } from './gitRevisionCodeLensProvider';
import { GitService } from './gitService';
import { Logger } from './logger';
import { Messages, SuppressedMessages } from './messages';
import { Container } from './container';
// import { Telemetry } from './telemetry';
// this method is called when your extension is activated

+ 1
- 7
src/logger.ts Просмотреть файл

@ -1,17 +1,11 @@
'use strict';
import { ConfigurationChangeEvent, ExtensionContext, OutputChannel, window } from 'vscode';
import { configuration } from './configuration';
import { configuration, OutputLevel } from './configuration';
import { ExtensionOutputChannelName } from './constants';
// import { Telemetry } from './telemetry';
const ConsolePrefix = `[${ExtensionOutputChannelName}]`;
export enum OutputLevel {
Silent = 'silent',
Errors = 'errors',
Verbose = 'verbose'
}
export class Logger {
static debug = false;

+ 1
- 7
src/views/gitExplorer.ts Просмотреть файл

@ -2,7 +2,7 @@
import { Functions } from '../system';
import { commands, ConfigurationChangeEvent, ConfigurationTarget, Disposable, Event, EventEmitter, TextDocumentShowOptions, TextEditor, TreeDataProvider, TreeItem, Uri, window } from 'vscode';
import { UriComparer } from '../comparers';
import { configuration, ExplorerFilesLayout, IGitExplorerConfig } from '../configuration';
import { configuration, ExplorerFilesLayout, GitExplorerView, IGitExplorerConfig } from '../configuration';
import { CommandContext, GlyphChars, setCommandContext, WorkspaceState } from '../constants';
import { Container } from '../container';
import { RefreshNodeCommandArgs } from './explorerCommands';
@ -12,12 +12,6 @@ import { Logger } from '../logger';
export * from './explorerNodes';
export enum GitExplorerView {
Auto = 'auto',
History = 'history',
Repository = 'repository'
}
export interface OpenFileRevisionCommandArgs {
uri?: Uri;
showOptions?: TextDocumentShowOptions;

Загрузка…
Отмена
Сохранить