Skip to content

Commit ec8152e

Browse files
authored
[vscode] remove proposed API createFileSystemWatcher (#15265)
fixes #15135 Contributed on behalf of STMicroelectronics Signed-off-by: Remi Schnekenburger <[email protected]>
1 parent 8d34507 commit ec8152e

File tree

4 files changed

+7
-83
lines changed

4 files changed

+7
-83
lines changed

packages/plugin-ext/src/plugin/file-system-event-service-ext-impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ export class ExtHostFileSystemEventService implements ExtHostFileSystemEventServ
163163
// --- file events
164164

165165
createFileSystemWatcher(globPattern: string | IRelativePattern, ignoreCreateEvents?: boolean,
166-
ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean, excludes?: string[]): vscode.FileSystemWatcher {
167-
return new FileSystemWatcher(this._onFileSystemEvent.event, globPattern, ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents, excludes);
166+
ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): vscode.FileSystemWatcher {
167+
return new FileSystemWatcher(this._onFileSystemEvent.event, globPattern, ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents);
168168
}
169169

170170
$onFileEvent(events: FileSystemEvents) {

packages/plugin-ext/src/plugin/plugin-context.ts

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ import { NotebookDocumentsExtImpl } from './notebook/notebook-documents';
286286
import { NotebookEditorsExtImpl } from './notebook/notebook-editors';
287287
import { TestingExtImpl } from './tests';
288288
import { UriExtImpl } from './uri-ext';
289-
import { isObject } from '@theia/core';
290289
import { PluginLogger } from './logger';
291290

292291
export function createAPIObject<T extends Object>(rawObject: T): T {
@@ -688,21 +687,12 @@ export function createAPIFactory(
688687
onDidStartTerminalShellExecution: Event.None
689688
};
690689

691-
function createFileSystemWatcher(pattern: RelativePattern, options?: theia.FileSystemWatcherOptions): theia.FileSystemWatcher;
692690
function createFileSystemWatcher(pattern: theia.GlobPattern, ignoreCreateEvents?: boolean, ignoreChangeEvents?:
693-
boolean, ignoreDeleteEvents?: boolean): theia.FileSystemWatcher;
694-
function createFileSystemWatcher(pattern: RelativePattern | theia.GlobPattern,
695-
ignoreCreateOrOptions?: theia.FileSystemWatcherOptions | boolean, ignoreChangeEventsBoolean?: boolean, ignoreDeleteEventsBoolean?: boolean): theia.FileSystemWatcher {
696-
if (isObject<theia.FileSystemWatcherOptions>(ignoreCreateOrOptions)) {
697-
const { ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents, excludes } = (ignoreCreateOrOptions as theia.FileSystemWatcherOptions);
698-
return createAPIObject(
699-
extHostFileSystemEvent.createFileSystemWatcher(fromGlobPattern(pattern),
700-
ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents, excludes));
701-
} else {
702-
return createAPIObject(
703-
extHostFileSystemEvent.createFileSystemWatcher(fromGlobPattern(pattern),
704-
ignoreCreateOrOptions as boolean, ignoreChangeEventsBoolean, ignoreDeleteEventsBoolean));
705-
}
691+
boolean, ignoreDeleteEvents?: boolean): theia.FileSystemWatcher {
692+
return createAPIObject(
693+
extHostFileSystemEvent.createFileSystemWatcher(fromGlobPattern(pattern),
694+
ignoreCreateEvents, ignoreChangeEvents, ignoreDeleteEvents));
695+
706696
}
707697
const workspace: typeof theia.workspace = {
708698

packages/plugin/src/theia.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import './theia-extra';
2525
import './theia.proposed.canonicalUriProvider';
26-
import './theia.proposed.createFileSystemWatcher';
2726
import './theia.proposed.customEditorMove';
2827
import './theia.proposed.debugVisualization';
2928
import './theia.proposed.diffCommand';

packages/plugin/src/theia.proposed.createFileSystemWatcher.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)