mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 17:23:15 -05:00
Merge from vscode dbe62be3266ffb6772a7f3db0bf61d63f4aa7f65 (#9337)
This commit is contained in:
@@ -40,6 +40,29 @@ export const enum ResourceGroupType {
|
||||
|
||||
export class Resource implements SourceControlResourceState {
|
||||
|
||||
static getStatusText(type: Status) {
|
||||
switch (type) {
|
||||
case Status.INDEX_MODIFIED: return localize('index modified', "Index Modified");
|
||||
case Status.MODIFIED: return localize('modified', "Modified");
|
||||
case Status.INDEX_ADDED: return localize('index added', "Index Added");
|
||||
case Status.INDEX_DELETED: return localize('index deleted', "Index Deleted");
|
||||
case Status.DELETED: return localize('deleted', "Deleted");
|
||||
case Status.INDEX_RENAMED: return localize('index renamed', "Index Renamed");
|
||||
case Status.INDEX_COPIED: return localize('index copied', "Index Copied");
|
||||
case Status.UNTRACKED: return localize('untracked', "Untracked");
|
||||
case Status.IGNORED: return localize('ignored', "Ignored");
|
||||
case Status.INTENT_TO_ADD: return localize('intent to add', "Intent to Add");
|
||||
case Status.BOTH_DELETED: return localize('both deleted', "Both Deleted");
|
||||
case Status.ADDED_BY_US: return localize('added by us', "Added By Us");
|
||||
case Status.DELETED_BY_THEM: return localize('deleted by them', "Deleted By Them");
|
||||
case Status.ADDED_BY_THEM: return localize('added by them', "Added By Them");
|
||||
case Status.DELETED_BY_US: return localize('deleted by us', "Deleted By Us");
|
||||
case Status.BOTH_ADDED: return localize('both added', "Both Added");
|
||||
case Status.BOTH_MODIFIED: return localize('both modified', "Both Modified");
|
||||
default: return '';
|
||||
}
|
||||
}
|
||||
|
||||
@memoize
|
||||
get resourceUri(): Uri {
|
||||
if (this.renameResourceUri && (this._type === Status.MODIFIED || this._type === Status.DELETED || this._type === Status.INDEX_RENAMED || this._type === Status.INDEX_COPIED)) {
|
||||
@@ -110,26 +133,7 @@ export class Resource implements SourceControlResourceState {
|
||||
}
|
||||
|
||||
private get tooltip(): string {
|
||||
switch (this.type) {
|
||||
case Status.INDEX_MODIFIED: return localize('index modified', "Index Modified");
|
||||
case Status.MODIFIED: return localize('modified', "Modified");
|
||||
case Status.INDEX_ADDED: return localize('index added', "Index Added");
|
||||
case Status.INDEX_DELETED: return localize('index deleted', "Index Deleted");
|
||||
case Status.DELETED: return localize('deleted', "Deleted");
|
||||
case Status.INDEX_RENAMED: return localize('index renamed', "Index Renamed");
|
||||
case Status.INDEX_COPIED: return localize('index copied', "Index Copied");
|
||||
case Status.UNTRACKED: return localize('untracked', "Untracked");
|
||||
case Status.IGNORED: return localize('ignored', "Ignored");
|
||||
case Status.INTENT_TO_ADD: return localize('intent to add', "Intent to Add");
|
||||
case Status.BOTH_DELETED: return localize('both deleted', "Both Deleted");
|
||||
case Status.ADDED_BY_US: return localize('added by us', "Added By Us");
|
||||
case Status.DELETED_BY_THEM: return localize('deleted by them', "Deleted By Them");
|
||||
case Status.ADDED_BY_THEM: return localize('added by them', "Added By Them");
|
||||
case Status.DELETED_BY_US: return localize('deleted by us', "Deleted By Us");
|
||||
case Status.BOTH_ADDED: return localize('both added', "Both Added");
|
||||
case Status.BOTH_MODIFIED: return localize('both modified', "Both Modified");
|
||||
default: return '';
|
||||
}
|
||||
return Resource.getStatusText(this.type);
|
||||
}
|
||||
|
||||
private get strikeThrough(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user