Skip to content

Commit 16a06de

Browse files
Clean up
1 parent 7c59545 commit 16a06de

File tree

4 files changed

+2
-29
lines changed

4 files changed

+2
-29
lines changed

packages/common/src/types/ScopeProvider.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,5 @@ export interface IterationScopeRanges {
218218
export enum ScopeSupport {
219219
supportedAndPresentInEditor,
220220
supportedButNotPresentInEditor,
221-
supportedLegacy,
222221
unsupported,
223222
}

packages/cursorless-org-docs/src/docs/user/languages/components/ScopeSupport.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ export function ScopeSupport({ languageId }: Props): JSX.Element {
1717
const supportedScopes = scopesSorted.filter(
1818
(facet) => scopeSupport[facet] === ScopeSupportFacetLevel.supported,
1919
);
20-
const supportedLegacyScopes = scopesSorted.filter(
21-
(facet) => scopeSupport[facet] === ScopeSupportFacetLevel.supportedLegacy,
22-
);
2320
const unsupportedScopes = scopesSorted.filter(
2421
(facet) => scopeSupport[facet] === ScopeSupportFacetLevel.unsupported,
2522
);
@@ -38,12 +35,6 @@ export function ScopeSupport({ languageId }: Props): JSX.Element {
3835
open
3936
/>
4037

41-
<ScopeSupportForLevel
42-
facets={supportedLegacyScopes}
43-
title="Supported Legacy facets"
44-
subtitle="These facets are supported with the legacy implementation and should be migrated to the new implementation"
45-
/>
46-
4738
<ScopeSupportForLevel
4839
facets={unsupportedScopes}
4940
title="Unsupported facets"

packages/cursorless-vscode/src/ScopeTreeProvider.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export class ScopeTreeProvider implements TreeDataProvider<MyTreeItem> {
112112
getChildren(element?: MyTreeItem): MyTreeItem[] {
113113
if (element == null) {
114114
void this.possiblyShowUpdateTalonMessage();
115-
return getSupportCategories(this.hasLegacyScopes());
115+
return getSupportCategories();
116116
}
117117

118118
if (element instanceof SupportCategoryTreeItem) {
@@ -156,12 +156,6 @@ export class ScopeTreeProvider implements TreeDataProvider<MyTreeItem> {
156156
}
157157
}
158158

159-
private hasLegacyScopes(): boolean {
160-
return this.supportLevels.some(
161-
(supportLevel) => supportLevel.support === ScopeSupport.supportedLegacy,
162-
);
163-
}
164-
165159
private getScopeTypesWithSupport(
166160
scopeSupport: ScopeSupport,
167161
): ScopeSupportTreeItem[] {
@@ -210,15 +204,10 @@ export class ScopeTreeProvider implements TreeDataProvider<MyTreeItem> {
210204
}
211205
}
212206

213-
function getSupportCategories(
214-
includeLegacy: boolean,
215-
): SupportCategoryTreeItem[] {
207+
function getSupportCategories(): SupportCategoryTreeItem[] {
216208
return [
217209
new SupportCategoryTreeItem(ScopeSupport.supportedAndPresentInEditor),
218210
new SupportCategoryTreeItem(ScopeSupport.supportedButNotPresentInEditor),
219-
...(includeLegacy
220-
? [new SupportCategoryTreeItem(ScopeSupport.supportedLegacy)]
221-
: []),
222211
new SupportCategoryTreeItem(ScopeSupport.unsupported),
223212
];
224213
}
@@ -314,11 +303,6 @@ class SupportCategoryTreeItem extends TreeItem {
314303
description = "but not present in active editor";
315304
collapsibleState = TreeItemCollapsibleState.Expanded;
316305
break;
317-
case ScopeSupport.supportedLegacy:
318-
label = "Legacy";
319-
description = "may or may not be present in active editor";
320-
collapsibleState = TreeItemCollapsibleState.Expanded;
321-
break;
322306
case ScopeSupport.unsupported:
323307
label = "Unsupported";
324308
description = "unsupported in language of active editor";

packages/cursorless-vscode/src/ide/vscode/VSCodeScopeVisualizer/VscodeScopeVisualizer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export abstract class VscodeScopeVisualizer {
6363
case ScopeSupport.supportedAndPresentInEditor:
6464
case ScopeSupport.supportedButNotPresentInEditor:
6565
return;
66-
case ScopeSupport.supportedLegacy:
6766
case ScopeSupport.unsupported:
6867
void showError(
6968
this.ide.messages,

0 commit comments

Comments
 (0)