-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into switch-jest-to-swc
- Loading branch information
Showing
26 changed files
with
2,718 additions
and
3,970 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { EventEmitter, FileDecoration, ThemeColor, Uri } from 'vscode' | ||
import { DecoratableTreeItemScheme, getDecoratableUri } from '../../tree' | ||
import { ErrorDecorationProvider } from '../../tree/errorDecorationProvider' | ||
|
||
export class DecorationProvider extends ErrorDecorationProvider { | ||
private static DecorationFiltered: FileDecoration = { | ||
color: new ThemeColor('gitDecoration.ignoredResourceForeground'), | ||
tooltip: 'Filtered' | ||
} | ||
|
||
private errors = new Set<string>() | ||
private filtered = new Set<string>() | ||
|
||
constructor(decorationsChanged?: EventEmitter<Uri[]>) { | ||
super(DecoratableTreeItemScheme.EXPERIMENTS, decorationsChanged) | ||
} | ||
|
||
public provideFileDecoration(uri: Uri): FileDecoration | undefined { | ||
if (this.errors.has(uri.fsPath)) { | ||
return DecorationProvider.DecorationError | ||
} | ||
if (this.filtered.has(uri.fsPath)) { | ||
return DecorationProvider.DecorationFiltered | ||
} | ||
} | ||
|
||
public setState( | ||
labels: string[], | ||
filtered: Set<string>, | ||
errors: Set<string> | ||
) { | ||
const urisToUpdate: Uri[] = [] | ||
|
||
for (const label of labels) { | ||
urisToUpdate.push( | ||
getDecoratableUri(label, DecoratableTreeItemScheme.EXPERIMENTS) | ||
) | ||
} | ||
|
||
this.filtered = filtered | ||
this.errors = errors | ||
this.decorationsChanged.fire(urisToUpdate) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.