repo_name string | dataset string | owner string | lang string | func_name string | code string | docstring string | url string | sha string |
|---|---|---|---|---|---|---|---|---|
aide | github_2023 | codestoryai | typescript | CachedDecorations.getById | public getById(decorationId: string) {
for (const d of this.runByIdKey.values()) {
if (d.id === decorationId) {
return d;
}
}
return undefined;
} | /** Finds an extension by VS Code event ID */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L108-L115 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingDecorationService.invalidateResultMessage | public invalidateResultMessage(message: ITestMessage) {
this.invalidatedMessages.add(message);
this.invalidate();
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L224-L227 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingDecorationService.syncDecorations | public syncDecorations(resource: URI): CachedDecorations {
const model = this.modelService.getModel(resource);
if (!model) {
return new CachedDecorations();
}
const cached = this.decorationCache.get(resource);
if (cached && cached.generation === this.generation && (cached.rangeUpdateVersionId === undefine... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L230-L242 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingDecorationService.getDecoratedTestPosition | public getDecoratedTestPosition(resource: URI, testId: string) {
const model = this.modelService.getModel(resource);
if (!model) {
return undefined;
}
const decoration = Iterable.find(this.syncDecorations(resource), v => v instanceof RunTestDecoration && v.isForTest(testId));
if (!decoration) {
return ... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L245-L258 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingDecorationService.updateDecorationsAlternateAction | public updateDecorationsAlternateAction(resource: URI, isAlt: boolean) {
const model = this.modelService.getModel(resource);
const cached = this.decorationCache.get(resource);
if (!model || !cached || cached.isAlt === isAlt) {
return;
}
cached.isAlt = isAlt;
model.changeDecorations(accessor => {
for ... | /**
* Sets whether alternate actions are shown for the model.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L268-L286 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingDecorationService.applyDecorations | private applyDecorations(model: ITextModel) {
const gutterEnabled = getTestingConfiguration(this.configurationService, TestingConfigKeys.GutterEnabled);
const cached = this.decorationCache.get(model.uri);
const testRangesUpdated = cached?.rangeUpdateVersionId === model.getVersionId();
const lastDecorations = ca... | /**
* Applies the current set of test decorations to the given text model.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L291-L356 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingDecorations.get | public static get(editor: ICodeEditor): TestingDecorations | null {
return editor.getContribution<TestingDecorations>(Testing.DecorationsContributionId);
} | /**
* Gets the decorations associated with the given code editor.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingDecorations.ts#L368-L370 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerFilter.render | public override render(container: HTMLElement) {
container.classList.add('testing-filter-action-item');
const updateDelayer = this._register(new Delayer<void>(400));
const wrapper = this.wrapper = dom.$('.testing-filter-wrapper');
container.appendChild(wrapper);
let history = this.history.get({ lastValue: '... | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts#L63-L135 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerFilter.focus | public override focus(): void {
this.input.focus();
} | /**
* Focuses the filter input.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts#L148-L150 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerFilter.saveState | public saveState() {
this.history.store({ lastValue: this.input.getValue(), values: this.input.getHistory() });
} | /**
* Persists changes to the input history.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts#L155-L157 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerFilter.dispose | public override dispose() {
this.saveState();
super.dispose();
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts#L162-L165 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerFilter.updateFilterActiveState | private updateFilterActiveState() {
this.filtersAction.checked = this.testService.excluded.hasAny;
} | /**
* Updates the 'checked' state of the filter submenu.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerFilter.ts#L170-L172 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerView.getTreeIncludeExclude | public getTreeIncludeExclude(profileOrBitset: ITestRunProfile | TestRunProfileBitset, withinItems?: InternalTestItem[], filterToType: 'visible' | 'selected' = 'visible') {
const projection = this.viewModel.projection.value;
if (!projection) {
return { include: [], exclude: [] };
}
// To calculate includes a... | /**
* Gets include/exclude items in the tree, based either on visible tests
* or a use selection. If a profile is given, only tests in that profile
* are collected. If a bitset is given, any test that can run in that
* bitset is collected.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L164-L284 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerView.renderBody | protected override renderBody(container: HTMLElement): void {
super.renderBody(container);
this.container = dom.append(container, dom.$('.test-explorer'));
this.treeHeader = dom.append(this.container, dom.$('.test-explorer-header'));
this.filterActionBar.value = this.createFilterActionBar();
const messagesC... | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L307-L323 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerView.getActionViewItem | public override getActionViewItem(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined {
switch (action.id) {
case TestCommandId.FilterAction:
this.filter.value = this.instantiationService.createInstance(TestingExplorerFilter, action, options);
this.filterFocusListener.value = thi... | /** @override */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L326-L342 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerView.getTestConfigGroupActions | private getTestConfigGroupActions(group: TestRunProfileBitset) {
const profileActions: IAction[] = [];
let participatingGroups = 0;
let participatingProfiles = 0;
let hasConfigurable = false;
const defaults = this.testProfileService.getGroupDefaultProfiles(group);
for (const { profiles, controller } of thi... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L345-L434 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerView.saveState | public override saveState() {
this.filter.value?.saveState();
super.saveState();
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L439-L442 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerView.layoutBody | protected override layoutBody(height = this.dimensions.height, width = this.dimensions.width): void {
super.layoutBody(height, width);
this.dimensions.height = height;
this.dimensions.width = width;
this.container.style.height = `${height}px`;
this.viewModel?.layout(height - this.treeHeader.clientHeight, widt... | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L552-L559 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerViewModel.layout | public layout(height?: number, width?: number): void {
this.tree.layout(height, width);
} | /**
* Re-layout the tree.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L988-L990 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerViewModel.revealById | private revealById(id: string | undefined, expand = true, focus = true) {
if (!id) {
this.hasPendingReveal = false;
return;
}
const projection = this.ensureProjection();
// If the item itself is visible in the tree, show it. Otherwise, expand
// its closest parent.
let expandToLevel = 0;
const idP... | /**
* Tries to reveal by extension ID. Queues the request if the extension
* ID is not currently available.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L996-L1066 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerViewModel.collapseAll | public async collapseAll() {
this.tree.collapseAll();
} | /**
* Collapse all items in the tree.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1071-L1073 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerViewModel.tryPeekError | private tryPeekError(item: TestItemTreeElement) {
const lookup = item.test && this.testResults.getStateById(item.test.item.extId);
return lookup && lookup[1].tasks.some(s => isFailedState(s.state))
? this.peekOpener.tryPeekFirstError(lookup[0], lookup[1], { preserveFocus: true })
: false;
} | /**
* Tries to peek the first test error, if the item is in a failed state.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1078-L1083 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingExplorerViewModel.getSelectedTests | public getSelectedTests() {
return this.tree.getSelection();
} | /**
* Gets the selected tests from the tree.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1173-L1175 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestsFilter.filter | public filter(element: TestItemTreeElement): TreeFilterResult<void> {
if (element instanceof TestTreeErrorMessage) {
return TreeVisibility.Visible;
}
if (
element.test
&& !this.state.isFilteringFor(TestFilterTerm.Hidden)
&& this.testService.excluded.contains(element.test)
) {
return TreeVisibili... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1225-L1247 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemRenderer.renderTemplate | public renderTemplate(wrapper: HTMLElement): ITestElementTemplateData {
wrapper.classList.add('testing-stdtree-container');
const icon = dom.append(wrapper, dom.$('.computed-state'));
const label = dom.append(wrapper, dom.$('.label'));
const disposable = new DisposableStore();
dom.append(wrapper, dom.$(Them... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1534-L1559 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemRenderer.disposeTemplate | disposeTemplate(templateData: ITestElementTemplateData): void {
templateData.templateDisposable.clear();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1564-L1566 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemRenderer.disposeElement | disposeElement(_element: ITreeNode<TestItemTreeElement, FuzzyScore>, _: number, templateData: ITestElementTemplateData): void {
templateData.elementDisposable.clear();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1571-L1573 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestItemRenderer.renderElement | public renderElement(node: ITreeNode<TestItemTreeElement, FuzzyScore>, _depth: number, data: ITestElementTemplateData): void {
data.elementDisposable.clear();
data.current = node.element;
data.elementDisposable.add(node.element.onChange(() => this._renderElement(node, data)));
this._renderElement(node, data);
... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingExplorerView.ts#L1588-L1594 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.open | public async open() {
let uri: TestUriWithDocument | undefined;
const active = this.editorService.activeTextEditorControl;
if (isCodeEditor(active) && active.getModel()?.uri) {
const modelUri = active.getModel()?.uri;
if (modelUri) {
uri = await this.getFileCandidateMessage(modelUri, active.getPosition(... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L142-L165 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.tryPeekFirstError | public tryPeekFirstError(result: ITestResult, test: TestResultItem, options?: Partial<ITextEditorOptions>) {
const candidate = this.getFailedCandidateMessage(test);
if (!candidate) {
return false;
}
this.showPeekFromUri({
type: TestUriType.ResultMessage,
documentUri: candidate.location.uri,
taskInd... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L168-L183 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.peekUri | public peekUri(uri: URI, options: IShowResultOptions = {}) {
const parsed = parseTestUri(uri);
const result = parsed && this.testResults.getResult(parsed.resultId);
if (!parsed || !result || !('testExtId' in parsed)) {
return false;
}
if (!('messageIndex' in parsed)) {
return false;
}
const messag... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L186-L211 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.closeAllPeeks | public closeAllPeeks() {
for (const editor of this.codeEditorService.listCodeEditors()) {
TestingOutputPeekController.get(editor)?.removePeek();
}
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L214-L218 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.showPeekFromUri | private async showPeekFromUri(uri: TestUriWithDocument, editor?: IEditor, options?: ITextEditorOptions) {
if (isCodeEditor(editor)) {
this.lastUri = uri;
TestingOutputPeekController.get(editor)?.show(buildTestUri(this.lastUri));
return true;
}
const pane = await this.editorService.openEditor({
resour... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L260-L280 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.openPeekOnFailure | private openPeekOnFailure(evt: TestResultItemChange) {
if (evt.reason !== TestResultItemChangeReason.OwnStateChange) {
return;
}
const candidate = this.getFailedCandidateMessage(evt.item);
if (!candidate) {
return;
}
if (evt.result.request.continuous && !getTestingConfiguration(this.configuration, T... | /**
* Opens the peek view on a test failure, based on user preferences.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L285-L326 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.getFileCandidateMessage | private async getFileCandidateMessage(uri: URI, position: Position | null) {
let best: TestUriWithDocument | undefined;
let bestDistance = Infinity;
// Get all tests for the document. In those, find one that has a test
// message closest to the cursor position.
const demandedUriStr = uri.toString();
for (c... | /**
* Gets the message closest to the given position from a test in the file.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L331-L365 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.getAnyCandidateMessage | private getAnyCandidateMessage() {
const seen = new Set<string>();
for (const result of this.testResults.results) {
for (const test of result.tests) {
if (seen.has(test.item.extId)) {
continue;
}
seen.add(test.item.extId);
const found = mapFindTestMessage(test, (task, message, messageIndex,... | /**
* Gets any possible still-relevant message from the results.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L370-L397 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingPeekOpener.getFailedCandidateMessage | private getFailedCandidateMessage(test: TestResultItem) {
const fallbackLocation = test.item.uri && test.item.range
? { uri: test.item.uri, range: test.item.range }
: undefined;
let best: { taskId: number; index: number; message: ITestMessage; location: IRichLocation } | undefined;
mapFindTestMessage(test,... | /**
* Gets the first failed message that can be displayed from the result.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L402-L422 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.get | public static get(editor: ICodeEditor): TestingOutputPeekController | null {
return editor.getContribution<TestingOutputPeekController>(Testing.OutputPeekContributionId);
} | /**
* Gets the controller associated with the given code editor.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L432-L434 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.show | public async show(uri: URI) {
const subject = this.retrieveTest(uri);
if (subject) {
this.showSubject(subject);
}
} | /**
* Shows a peek for the message in the editor.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L469-L474 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.showSubject | public async showSubject(subject: InspectSubject) {
if (!this.peek.get()) {
const peek = this.instantiationService.createInstance(TestResultsPeek, this.editor);
this.peek.set(peek, undefined);
peek.onDidClose(() => {
this.visible.set(false);
this.peek.set(undefined, undefined);
});
this.visibl... | /**
* Shows a peek for the existing inspect subject.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L479-L497 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.removePeek | public removePeek() {
this.peek.set(undefined, undefined);
} | /**
* Disposes the peek view, if any.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L523-L525 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.collapseStack | public collapseStack() {
this.peek.get()?.collapseStack();
} | /**
* Collapses all displayed stack frames.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L530-L532 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.next | public next() {
const subject = this.peek.get()?.current.get();
if (!subject) {
return;
}
let first: IMessageIteratedReference | undefined;
let found = false;
for (const m of allMessages(this.testResults.results)) {
first ??= m;
if (subject instanceof TaskSubject && m.result.id === subject.result... | /**
* Shows the next message in the peek, if possible.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L537-L569 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.previous | public previous() {
const subject = this.subject.get();
if (!subject) {
return;
}
let previous: IMessageIteratedReference | undefined; // pointer to the last message
let previousLockedIn = false; // whether the last message was verified as previous to the current subject
let last: IMessageIteratedRefere... | /**
* Shows the previous message in the peek, if possible.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L574-L614 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.removeIfPeekingForTest | public removeIfPeekingForTest(testId: string) {
const c = this.subject.get();
if (c && c instanceof MessageSubject && c.test.extId === testId) {
this.peek.set(undefined, undefined);
}
} | /**
* Removes the peek view if it's being displayed on the given test ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L619-L624 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingOutputPeekController.closePeekOnTestChange | private closePeekOnTestChange(evt: TestResultItemChange) {
if (evt.reason !== TestResultItemChangeReason.OwnStateChange || evt.previousState === evt.item.ownComputedState) {
return;
}
this.removeIfPeekingForTest(evt.item.item.extId);
} | /**
* If the test we're currently showing has its state change to something
* else, then clear the peek.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L630-L636 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsPeek.setModel | public setModel(subject: InspectSubject): Promise<void> {
if (subject instanceof TaskSubject || subject instanceof TestOutputSubject) {
this.current.set(subject, undefined);
return this.showInPlace(subject);
}
const previous = this.current;
const revealLocation = subject.revealLocation?.range.getStartPos... | /**
* Updates the test to be shown.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L814-L836 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsPeek.collapseStack | public collapseStack() {
this.content.collapseStack();
} | /**
* Collapses all displayed stack frames.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L841-L843 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsPeek.showInPlace | public async showInPlace(subject: InspectSubject) {
if (subject instanceof MessageSubject) {
const message = subject.message;
this.setTitle(firstLine(renderTestMessageAsText(message.message)), stripIcons(subject.test.label));
} else {
this.setTitle(localize('testOutputTitle', 'Test Output'));
}
this.ap... | /**
* Shows a message in-place without showing or changing the peek location.
* This is mostly used if peeking a message without a location.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L855-L864 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsPeek._doLayoutBody | protected override _doLayoutBody(height: number, width: number) {
super._doLayoutBody(height, width);
this.content.onLayoutBody(height, width);
} | /** @override */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L867-L870 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsPeek._onWidth | protected override _onWidth(width: number) {
super._onWidth(width);
if (this.dimension) {
this.dimension = new dom.Dimension(width, this.dimension.height);
}
this.content.onWidth(width);
} | /** @override */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L873-L880 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getPeekedEditorFromFocus | const getPeekedEditorFromFocus = (codeEditorService: ICodeEditorService) => {
const editor = codeEditorService.getFocusedCodeEditor() || codeEditorService.getActiveCodeEditor();
return editor && getPeekedEditor(codeEditorService, editor);
}; | /**
* Gets the appropriate editor for peeking based on the currently focused editor.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L995-L998 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getPeekedEditor | const getPeekedEditor = (codeEditorService: ICodeEditorService, editor: ICodeEditor) => {
if (TestingOutputPeekController.get(editor)?.subject.get()) {
return editor;
}
if (editor instanceof EmbeddedCodeEditorWidget) {
return editor.getParentEditor();
}
const outer = getOuterEditorFromDiffEditor(codeEditorSe... | /**
* Gets the editor where the peek may be shown, bubbling upwards if the given
* editor is embedded (i.e. inside a peek already).
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testingOutputPeek.ts#L1004-L1019 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ListProjection.rootsWithChildren | private get rootsWithChildren(): Iterable<ListTestItemElement> {
const rootsIt = Iterable.map(this.testService.collection.rootItems, r => this.items.get(r.item.extId));
return Iterable.filter(rootsIt, (r): r is ListTestItemElement => !!r?.children.size);
} | /**
* Gets root elements of the tree.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.ts#L74-L77 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ListProjection.getElementByTestId | public getElementByTestId(testId: string): TestItemTreeElement | undefined {
return this.items.get(testId);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.ts#L144-L146 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ListProjection.applyDiff | private applyDiff(diff: TestsDiff) {
for (const op of diff) {
switch (op.op) {
case TestDiffOpType.Add: {
this.storeItem(op.item);
break;
}
case TestDiffOpType.Update: {
this.items.get(op.item.extId)?.update(op.item);
break;
}
case TestDiffOpType.Remove: {
for (const ... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.ts#L151-L178 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ListProjection.applyTo | public applyTo(tree: ObjectTree<TestExplorerTreeElement, FuzzyScore>) {
// We don't bother doing a very specific update like we do in the TreeProjection.
// It's a flat list, so chances are we need to render everything anyway.
// Let the diffIdentityProvider handle that.
tree.setChildren(null, getChildrenForPar... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.ts#L183-L191 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | ListProjection.expandElement | public expandElement(element: TestItemTreeElement, depth: number): void {
if (!(element instanceof ListTestItemElement)) {
return;
}
if (element.test.expand === TestItemExpandState.NotExpandable) {
return;
}
this.testService.collection.expand(element.test.item.extId, depth);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/listProjection.ts#L196-L206 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestingObjectTree.getOptimizedViewState | public getOptimizedViewState(updatePreviousState?: ISerializedTestTreeCollapseState): ISerializedTestTreeCollapseState {
const root: ISerializedTestTreeCollapseState = updatePreviousState || {};
/**
* Recursive builder function. Returns whether the subtree has any non-default
* value. Adds itself to the pare... | /**
* Gets a serialized view state for the tree, optimized for storage.
*
* @param updatePreviousState Optional previous state to mutate and update
* instead of creating a new one.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree.ts#L21-L72 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | build | const build = (node: ITreeNode<TestExplorerTreeElement | null, unknown>, parent: ISerializedTestTreeCollapseState): boolean => {
if (!(node.element instanceof TestItemTreeElement)) {
return false;
}
const localId = TestId.localId(node.element.test.item.extId);
const inTree = parent.children?.[localId] ... | /**
* Recursive builder function. Returns whether the subtree has any non-default
* value. Adds itself to the parent children if it does.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/testingObjectTree.ts#L28-L53 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TreeProjection.rootsWithChildren | private get rootsWithChildren(): Iterable<TreeTestItemElement> {
const rootsIt = Iterable.map(this.testService.collection.rootItems, r => this.items.get(r.item.extId));
return Iterable.filter(rootsIt, (r): r is TreeTestItemElement => !!r?.children.size);
} | /**
* Gets root elements of the tree.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.ts#L109-L112 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TreeProjection.getElementByTestId | public getElementByTestId(testId: string): TestItemTreeElement | undefined {
return this.items.get(testId);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.ts#L185-L187 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TreeProjection.applyDiff | private applyDiff(diff: TestsDiff) {
for (const op of diff) {
switch (op.op) {
case TestDiffOpType.Add: {
const item = this.createItem(op.item);
this.storeItem(item);
break;
}
case TestDiffOpType.Update: {
const patch = op.item;
const existing = this.items.get(patch.extId);
... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.ts#L192-L252 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TreeProjection.applyTo | public applyTo(tree: ObjectTree<TestExplorerTreeElement, FuzzyScore>) {
for (const parent of this.changedParents) {
if (!parent || tree.hasElement(parent)) {
tree.setChildren(parent, getChildrenForParent(this.lastState, this.rootsWithChildren, parent), { diffIdentityProvider: testIdentityProvider });
}
}
... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.ts#L257-L272 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TreeProjection.expandElement | public expandElement(element: TestItemTreeElement, depth: number): void {
if (!(element instanceof TreeTestItemElement)) {
return;
}
if (element.test.expand === TestItemExpandState.NotExpandable) {
return;
}
this.testService.collection.expand(element.test.item.extId, depth);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/explorerProjections/treeProjection.ts#L277-L287 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestRunElementRenderer.renderCompressedElements | public renderCompressedElements(node: ITreeNode<ICompressedTreeNode<ITreeElement>, FuzzyScore>, _index: number, templateData: TemplateData): void {
const chain = node.element.elements;
const lastElement = chain[chain.length - 1];
if ((lastElement instanceof TaskElement || lastElement instanceof TestMessageElement... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts#L659-L667 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestRunElementRenderer.renderTemplate | public renderTemplate(container: HTMLElement): TemplateData {
const templateDisposable = new DisposableStore();
container.classList.add('testing-stdtree-container');
const icon = dom.append(container, dom.$('.state'));
const label = dom.append(container, dom.$('.label'));
const actionBar = new ActionBar(cont... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts#L670-L694 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestRunElementRenderer.renderElement | public renderElement(element: ITreeNode<ITreeElement, FuzzyScore>, _index: number, templateData: TemplateData): void {
this.doRender(element.element, templateData);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts#L697-L699 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestRunElementRenderer.disposeTemplate | public disposeTemplate(templateData: TemplateData): void {
templateData.templateDisposable.dispose();
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts#L702-L704 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestRunElementRenderer.doRender | private doRender(element: ITreeElement, templateData: TemplateData, subjectElement?: ITreeElement) {
templateData.elementDisposable.clear();
templateData.elementDisposable.add(
element.onDidChange(() => this.doRender(element, templateData, subjectElement)),
);
this.doRenderInner(element, templateData, subjec... | /** Called to render a new element */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts#L707-L713 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestRunElementRenderer.doRenderInner | private doRenderInner(element: ITreeElement, templateData: TemplateData, subjectElement: ITreeElement | undefined) {
let { label, labelWithIcons, description } = element;
if (subjectElement instanceof TestMessageElement) {
description = subjectElement.label;
}
const descriptionElement = description ? dom.$(... | /** Called, and may be re-called, to render or re-render an element */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsTree.ts#L716-L736 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsViewContent.reveal | public reveal(opts: {
subject: InspectSubject;
preserveFocus: boolean;
}) {
this.didReveal.fire(opts);
if (this.current && equalsSubject(this.current, opts.subject)) {
return Promise.resolve();
}
this.current = opts.subject;
return this.contentProvidersUpdateLimiter.queue(async () => {
this.curre... | /**
* Shows a message in-place without showing or changing the peek location.
* This is mostly used if peeking a message without a location.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.ts#L310-L330 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestResultsViewContent.collapseStack | public collapseStack() {
this.callStackWidget.collapseAll();
} | /**
* Collapses all displayed stack frames.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/browser/testResultsView/testResultsViewContent.ts#L344-L346 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | getComputedState | const getComputedState = <T extends object>(accessor: IComputedStateAccessor<T>, node: T, force = false) => {
let computed = accessor.getCurrentComputedState(node);
if (computed === undefined || force) {
computed = accessor.getOwnState(node) ?? TestResultState.Unset;
let childrenCount = 0;
const stateMap = mak... | /**
* Gets the computed state for the node.
* @param force whether to refresh the computed state for this node, even
* if it was previously set.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/getComputedState.ts#L35-L61 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.busyProviders | public get busyProviders() {
return this.busyControllerCount;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L27-L29 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.rootItems | public get rootItems() {
return this.roots;
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L34-L36 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.all | public get all() {
return this.getIterator();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L41-L43 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.expand | public expand(testId: string, levels: number): Promise<void> {
const test = this.items.get(testId);
if (!test) {
return Promise.resolve();
}
// simple cache to avoid duplicate/unnecessary expansion calls
const existing = this.expandPromises.get(test);
if (existing && existing.pendingLvl >= levels) {
... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L58-L77 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.getNodeById | public getNodeById(id: string) {
return this.items.get(id);
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L82-L84 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.getNodeByUrl | public getNodeByUrl(uri: URI): Iterable<IncrementalTestCollectionItem> {
return this.testsByUrl.get(uri) || Iterable.empty();
} | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L89-L91 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.getReviverDiff | public getReviverDiff() {
const ops: TestsDiff = [{ op: TestDiffOpType.IncrementPendingExtHosts, amount: this.pendingRootCount }];
const queue = [this.rootIds];
while (queue.length) {
for (const child of queue.pop()!) {
const item = this.items.get(child)!;
ops.push({
op: TestDiffOpType.Add,
... | /**
* @inheritdoc
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L96-L116 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.apply | public override apply(diff: TestsDiff) {
const prevBusy = this.busyControllerCount;
super.apply(diff);
if (prevBusy !== this.busyControllerCount) {
this.busyProvidersChangeEmitter.fire(this.busyControllerCount);
}
} | /**
* Applies the diff to the collection.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L121-L128 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.clear | public clear() {
const ops: TestsDiff = [];
for (const root of this.roots) {
ops.push({ op: TestDiffOpType.Remove, itemId: root.item.extId });
}
this.roots.clear();
this.items.clear();
return ops;
} | /**
* Clears everything from the collection, and returns a diff that applies
* that action.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L134-L144 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | MainThreadTestCollection.createItem | protected createItem(internal: InternalTestItem): IncrementalTestCollectionItem {
return { ...internal, children: new Set() };
} | /**
* @override
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/mainThreadTestCollection.ts#L149-L151 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StoredValue.store | public store(value: T) {
this.value = value;
this.storage.store(this.key, this.serialization.serialize(value), this.scope, this.target);
} | /**
* Persists changes to the value.
* @param value
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/storedValue.ts#L78-L81 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | StoredValue.delete | public delete() {
this.storage.remove(this.key, this.scope);
} | /**
* Delete an element stored under the provided key from storage.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/storedValue.ts#L86-L88 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverage.allPerTestIDs | public *allPerTestIDs() {
const seen = new Set<string>();
for (const root of this.tree.nodes) {
if (root.value && root.value.perTestData) {
for (const id of root.value.perTestData) {
if (!seen.has(id)) {
seen.add(id);
yield id;
}
}
}
}
} | /** Gets all test IDs that were included in this test run. */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L40-L52 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverage.filterTreeForTest | public filterTreeForTest(testId: TestId) {
const tree = new WellDefinedPrefixTree<AbstractFileCoverage>();
for (const node of this.tree.values()) {
if (node instanceof FileCoverage) {
if (!node.perTestData?.has(testId.toString())) {
continue;
}
const canonical = [...this.treePathForUri(node.uri... | /**
* Builds a new tree filtered to per-test coverage data for the given ID.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L124-L142 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverage.getAllFiles | public getAllFiles() {
return this.fileCoverage;
} | /**
* Gets coverage information for all files.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L147-L149 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverage.getUri | public getUri(uri: URI) {
return this.fileCoverage.get(uri);
} | /**
* Gets coverage information for a specific file.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L154-L156 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverage.getComputedForUri | public getComputedForUri(uri: URI) {
return this.tree.find(this.treePathForUri(uri, /* canonical = */ false));
} | /**
* Gets computed information for a file, including DFS-computed information
* from child tests.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L162-L164 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverage.hasSynchronousDetails | public get hasSynchronousDetails() {
return this._details instanceof Array || this.resolved;
} | /** Gets whether details are synchronously available */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L247-L249 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverage.detailsForTest | public async detailsForTest(_testId: TestId, token = CancellationToken.None) {
this._detailsForTest ??= new Map();
const testId = _testId.toString();
const prev = this._detailsForTest.get(testId);
if (prev) {
return prev;
}
const promise = (async () => {
try {
return await this.accessor.getCovera... | /**
* Gets per-line coverage details.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L258-L277 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | FileCoverage.details | public async details(token = CancellationToken.None) {
this._details ??= this.accessor.getCoverageDetails(this.id, undefined, token);
try {
const d = await this._details;
this.resolved = true;
return d;
} catch (e) {
this._details = undefined;
throw e;
}
} | /**
* Gets per-line coverage details.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverage.ts#L282-L293 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverageService.openCoverage | public async openCoverage(task: ITestRunTaskResults, focus = true) {
this.lastOpenCts.value?.cancel();
const cts = this.lastOpenCts.value = new CancellationTokenSource();
const coverage = task.coverage.get();
if (!coverage) {
return;
}
transaction(tx => {
// todo: may want to preserve this if coverag... | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverageService.ts#L120-L137 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestCoverageService.closeCoverage | public closeCoverage() {
this.selected.set(undefined, undefined);
} | /** @inheritdoc */ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testCoverageService.ts#L140-L142 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExclusions.hasAny | public get hasAny() {
return this.excluded.value.size > 0;
} | /**
* Gets whether there's any excluded tests.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExclusions.ts#L39-L41 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExclusions.all | public get all(): Iterable<string> {
return this.excluded.value;
} | /**
* Gets all excluded tests.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExclusions.ts#L46-L48 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExclusions.toggle | public toggle(test: InternalTestItem, exclude?: boolean): void {
if (exclude !== true && this.excluded.value.has(test.item.extId)) {
this.excluded.value = new Set(Iterable.filter(this.excluded.value, e => e !== test.item.extId));
} else if (exclude !== false && !this.excluded.value.has(test.item.extId)) {
thi... | /**
* Sets whether a test is excluded.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExclusions.ts#L53-L59 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
aide | github_2023 | codestoryai | typescript | TestExclusions.contains | public contains(test: InternalTestItem): boolean {
return this.excluded.value.has(test.item.extId);
} | /**
* Gets whether a test is excluded.
*/ | https://github.com/codestoryai/aide/blob/1a8578f21ace8c9381461d295ed31c3500be43bf/src/vs/workbench/contrib/testing/common/testExclusions.ts#L64-L66 | 1a8578f21ace8c9381461d295ed31c3500be43bf |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.