-
Notifications
You must be signed in to change notification settings - Fork 72
ProblemsView
github-actions[bot] edited this page May 16, 2024
·
3 revisions
import { BottomBarPanel, ProblemsView } from 'vscode-extension-tester';
...
const problemsView = await new BottomBarPanel().openProblemsView();
Fill in a string into the filter box.
await problemsView.setFilter("**/filter/glob*");
await problemsView.collapseAll();
import { MarkerType } from 'vscode-extension-tester';
...
// get all markers regardless of type
const markers = await problemsView.getAllVisibleMarkers(MarkerType.Any);
// get all error markers
const errors = await problemsView.getAllVisibleMarkers(MarkerType.Error);
// get all warning markers
const errors = await problemsView.getAllVisibleMarkers(MarkerType.Warning);
// get all file markers
const errors = await problemsView.getAllVisibleMarkers(MarkerType.File);
Markers represent items displayed in the problems view. Each row corresponds to one Marker item.
const markers = await problemsView.getAllVisibleMarkers(MarkerType.Any);
const marker = markers[0];
// get the marker type
const type = await marker.getType();
// get the text of the marker row
const text = await marker.getText();
// get the label of the marker
const text = await marker.getLabel();
// expand the marker if available
await marker.toggleExpand(true);
// collapse
await marker.toggleExpand(false);