-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor to hide VS Code interfaces behind core services (#9727)
Refactor to hide VS Code interfaces behind core services Signed-off-by: Thomas Mäder <[email protected]>
- Loading branch information
Showing
39 changed files
with
1,009 additions
and
1,038 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 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
23 changes: 0 additions & 23 deletions
23
packages/core/src/browser/quick-input/quick-access-contribution.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2021 SAP SE or an SAP affiliate company and others. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* This Source Code may also be made available under the following Secondary | ||
* Licenses when the conditions for such availability set forth in the Eclipse | ||
* Public License v. 2.0 are satisfied: GNU General Public License, version 2 | ||
* with the GNU Classpath Exception which is available at | ||
* https://www.gnu.org/software/classpath/license.html. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | ||
********************************************************************************/ | ||
|
||
import { CancellationToken, Disposable } from '../../common'; | ||
import { QuickPicks } from './quick-input-service'; | ||
|
||
export const QuickAccessContribution = Symbol('QuickAccessContribution'); | ||
/** | ||
* Bind this contribution in order to register quick access providers with the | ||
* QuickAccessRegistry at startup | ||
*/ | ||
export interface QuickAccessContribution { | ||
registerQuickAccessProvider(): void; | ||
} | ||
|
||
export interface QuickAccessProvider { | ||
getPicks(filter: string, token: CancellationToken): QuickPicks | Promise<QuickPicks>; | ||
reset?(): void; | ||
} | ||
|
||
export interface QuickAccessProviderHelp { | ||
prefix?: string; | ||
description: string; | ||
needsEditor: boolean; | ||
} | ||
|
||
export interface QuickAccessProviderDescriptor { | ||
/** | ||
* return an instance of QuickAccessProvider. Implementers are free to return that same instance multiple times | ||
*/ | ||
readonly getInstance: () => QuickAccessProvider; | ||
/** | ||
* The prefix for quick access picker to use the provider for. | ||
*/ | ||
readonly prefix: string; | ||
/** | ||
* A placeholder to use for the input field when the provider is active. | ||
* This will also be read out by screen readers and thus helps for | ||
* accessibility. | ||
*/ | ||
readonly placeholder?: string; | ||
/** | ||
* Help entries for this quick access provider | ||
*/ | ||
readonly helpEntries: QuickAccessProviderHelp[]; | ||
/** | ||
* A context key that will be set automatically when this quick access is being shown | ||
*/ | ||
readonly contextKey?: string; | ||
} | ||
|
||
export const QuickAccessRegistry = Symbol('QuickAccessRegistry'); | ||
|
||
/** | ||
* A registry for quick access providers. | ||
*/ | ||
export interface QuickAccessRegistry { | ||
registerQuickAccessProvider(provider: QuickAccessProviderDescriptor): Disposable; | ||
getQuickAccessProviders(): QuickAccessProviderDescriptor[]; | ||
getQuickAccessProvider(prefix: string): QuickAccessProviderDescriptor | undefined; | ||
clear(): void; | ||
} |
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
33 changes: 0 additions & 33 deletions
33
packages/core/src/browser/quick-input/quick-editor-service.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.