Skip to content

Commit ff8ba98

Browse files
committed
chore: import BusySignalService from atom-ide-base
1 parent 8f46250 commit ff8ba98

File tree

2 files changed

+3
-57
lines changed

2 files changed

+3
-57
lines changed

lib/auto-languageclient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as ls from './languageclient';
33
import * as rpc from 'vscode-jsonrpc';
44
import * as path from 'path';
55
import * as atomIde from 'atom-ide';
6-
import type { OutlineProvider, Outline, DefinitionProvider, DefinitionQueryResult, FindReferencesProvider, FindReferencesReturn, Datatip, DatatipService, TextEdit, RangeCodeFormatProvider, FileCodeFormatProvider, OnSaveCodeFormatProvider, OnTypeCodeFormatProvider, CodeAction, CodeHighlightProvider, CodeActionProvider, Diagnostic, RefactorProvider } from 'atom-ide-base';
6+
import type { OutlineProvider, Outline, DefinitionProvider, DefinitionQueryResult, FindReferencesProvider, FindReferencesReturn, Datatip, DatatipService, TextEdit, RangeCodeFormatProvider, FileCodeFormatProvider, OnSaveCodeFormatProvider, OnTypeCodeFormatProvider, CodeAction, CodeHighlightProvider, CodeActionProvider, Diagnostic, RefactorProvider, BusySignalService } from 'atom-ide-base';
77
import * as linter from 'atom/linter';
88
import Convert from './convert.js';
99
import ApplyEditAdapter from './adapters/apply-edit-adapter';
@@ -72,7 +72,7 @@ export default class AutoLanguageClient {
7272
private _serverAdapters = new WeakMap<ActiveServer, ServerAdapters>();
7373

7474
/** Available if consumeBusySignal is setup */
75-
protected busySignalService?: atomIde.BusySignalService;
75+
protected busySignalService?: BusySignalService;
7676

7777
protected processStdErr: string = '';
7878
protected logger!: Logger;
@@ -801,7 +801,7 @@ export default class AutoLanguageClient {
801801
});
802802
}
803803

804-
public consumeBusySignal(service: atomIde.BusySignalService): Disposable {
804+
public consumeBusySignal(service: BusySignalService): Disposable {
805805
this.busySignalService = service;
806806
return new Disposable(() => delete this.busySignalService);
807807
}

typings/atom-ide/index.d.ts

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,60 +4,6 @@ declare module 'atom-ide' {
44

55
export type IdeUri = string;
66

7-
export interface BusySignalOptions {
8-
/**
9-
* Can say that a busy signal will only appear when a given file is open.
10-
* Default = null, meaning the busy signal applies to all files.
11-
*/
12-
onlyForFile?: IdeUri;
13-
/**
14-
* Is user waiting for computer to finish a task? (traditional busy spinner)
15-
* or is the computer waiting for user to finish a task? (action required)
16-
* @defaultValue `'computer'`
17-
*/
18-
waitingFor?: 'computer' | 'user';
19-
/** Debounce it? default = true for busy-signal, and false for action-required. */
20-
debounce?: boolean;
21-
/**
22-
* If onClick is set, then the tooltip will be clickable.
23-
* @defaultValue `null`
24-
*/
25-
onDidClick?: () => void;
26-
}
27-
28-
export interface BusySignalService {
29-
/**
30-
* Activates the busy signal with the given title and returns the promise
31-
* from the provided callback.
32-
* The busy signal automatically deactivates when the returned promise
33-
* either resolves or rejects.
34-
*/
35-
reportBusyWhile<T>(
36-
title: string,
37-
f: () => Promise<T>,
38-
options?: BusySignalOptions,
39-
): Promise<T>;
40-
41-
/**
42-
* Activates the busy signal. Set the title in the returned BusySignal
43-
* object (you can update the title multiple times) and dispose it when done.
44-
*/
45-
reportBusy(title: string, options?: BusySignalOptions): BusyMessage;
46-
47-
/**
48-
* This is a no-op. When someone consumes the busy service, they get back a
49-
* reference to the single shared instance, so disposing of it would be wrong.
50-
*/
51-
dispose(): void;
52-
}
53-
54-
export interface BusyMessage {
55-
/** You can set/update the title. */
56-
setTitle(title: string): void;
57-
/** Dispose of the signal when done to make it go away. */
58-
dispose(): void;
59-
}
60-
617
export type SignatureHelpRegistry = (provider: SignatureHelpProvider) => Disposable;
628

639
/**

0 commit comments

Comments
 (0)