@theia/file-search 1.53.0-next.4 → 1.53.0-next.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -30
- package/package.json +8 -8
- package/src/browser/file-search-frontend-module.ts +37 -37
- package/src/browser/quick-file-open-contribution.ts +66 -66
- package/src/browser/quick-file-open.ts +387 -387
- package/src/common/file-search-service.ts +52 -52
- package/src/node/file-search-backend-module.ts +30 -30
- package/src/node/file-search-service-impl.spec.ts +230 -230
- package/src/node/file-search-service-impl.ts +187 -187
package/README.md
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<div align='center'>
|
|
2
|
-
|
|
3
|
-
<br />
|
|
4
|
-
|
|
5
|
-
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
-
|
|
7
|
-
<h2>ECLIPSE THEIA - FILE-SEARCH EXTENSION</h2>
|
|
8
|
-
|
|
9
|
-
<hr />
|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
## Description
|
|
14
|
-
|
|
15
|
-
The `@theia/file-search` extension adds the command and ability to quickly open any file in a given workspace.
|
|
16
|
-
|
|
17
|
-
## Additional Information
|
|
18
|
-
|
|
19
|
-
- [API documentation for `@theia/file-search`](https://eclipse-theia.github.io/theia/docs/next/modules/file_search.html)
|
|
20
|
-
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
21
|
-
- [Theia - Website](https://theia-ide.org/)
|
|
22
|
-
|
|
23
|
-
## License
|
|
24
|
-
|
|
25
|
-
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
26
|
-
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
27
|
-
|
|
28
|
-
## Trademark
|
|
29
|
-
"Theia" is a trademark of the Eclipse Foundation
|
|
30
|
-
https://www.eclipse.org/theia
|
|
1
|
+
<div align='center'>
|
|
2
|
+
|
|
3
|
+
<br />
|
|
4
|
+
|
|
5
|
+
<img src='https://raw.githubusercontent.com/eclipse-theia/theia/master/logo/theia.svg?sanitize=true' alt='theia-ext-logo' width='100px' />
|
|
6
|
+
|
|
7
|
+
<h2>ECLIPSE THEIA - FILE-SEARCH EXTENSION</h2>
|
|
8
|
+
|
|
9
|
+
<hr />
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
## Description
|
|
14
|
+
|
|
15
|
+
The `@theia/file-search` extension adds the command and ability to quickly open any file in a given workspace.
|
|
16
|
+
|
|
17
|
+
## Additional Information
|
|
18
|
+
|
|
19
|
+
- [API documentation for `@theia/file-search`](https://eclipse-theia.github.io/theia/docs/next/modules/file_search.html)
|
|
20
|
+
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
21
|
+
- [Theia - Website](https://theia-ide.org/)
|
|
22
|
+
|
|
23
|
+
## License
|
|
24
|
+
|
|
25
|
+
- [Eclipse Public License 2.0](http://www.eclipse.org/legal/epl-2.0/)
|
|
26
|
+
- [一 (Secondary) GNU General Public License, version 2 with the GNU Classpath Exception](https://projects.eclipse.org/license/secondary-gpl-2.0-cp)
|
|
27
|
+
|
|
28
|
+
## Trademark
|
|
29
|
+
"Theia" is a trademark of the Eclipse Foundation
|
|
30
|
+
https://www.eclipse.org/theia
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/file-search",
|
|
3
|
-
"version": "1.53.0-next.
|
|
3
|
+
"version": "1.53.0-next.55+d1a989a68c",
|
|
4
4
|
"description": "Theia - File Search Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.53.0-next.
|
|
7
|
-
"@theia/editor": "1.53.0-next.
|
|
8
|
-
"@theia/filesystem": "1.53.0-next.
|
|
9
|
-
"@theia/process": "1.53.0-next.
|
|
10
|
-
"@theia/workspace": "1.53.0-next.
|
|
6
|
+
"@theia/core": "1.53.0-next.55+d1a989a68c",
|
|
7
|
+
"@theia/editor": "1.53.0-next.55+d1a989a68c",
|
|
8
|
+
"@theia/filesystem": "1.53.0-next.55+d1a989a68c",
|
|
9
|
+
"@theia/process": "1.53.0-next.55+d1a989a68c",
|
|
10
|
+
"@theia/workspace": "1.53.0-next.55+d1a989a68c",
|
|
11
11
|
"@vscode/ripgrep": "^1.14.2",
|
|
12
12
|
"tslib": "^2.6.2"
|
|
13
13
|
},
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"watch": "theiaext watch"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@theia/ext-scripts": "1.
|
|
48
|
+
"@theia/ext-scripts": "1.53.0"
|
|
49
49
|
},
|
|
50
50
|
"nyc": {
|
|
51
51
|
"extends": "../../configs/nyc.json"
|
|
52
52
|
},
|
|
53
|
-
"gitHead": "
|
|
53
|
+
"gitHead": "d1a989a68c1b5ec1f9098e9126653c6346844769"
|
|
54
54
|
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2017 TypeFox and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
18
|
-
import { CommandContribution, MenuContribution } from '@theia/core/lib/common';
|
|
19
|
-
import { WebSocketConnectionProvider, KeybindingContribution } from '@theia/core/lib/browser';
|
|
20
|
-
import { QuickFileOpenFrontendContribution } from './quick-file-open-contribution';
|
|
21
|
-
import { QuickFileOpenService } from './quick-file-open';
|
|
22
|
-
import { fileSearchServicePath, FileSearchService } from '../common/file-search-service';
|
|
23
|
-
import { QuickAccessContribution } from '@theia/core/lib/browser/quick-input/quick-access';
|
|
24
|
-
|
|
25
|
-
export default new ContainerModule((bind: interfaces.Bind) => {
|
|
26
|
-
bind(FileSearchService).toDynamicValue(ctx => {
|
|
27
|
-
const provider = ctx.container.get(WebSocketConnectionProvider);
|
|
28
|
-
return provider.createProxy<FileSearchService>(fileSearchServicePath);
|
|
29
|
-
}).inSingletonScope();
|
|
30
|
-
|
|
31
|
-
bind(QuickFileOpenFrontendContribution).toSelf().inSingletonScope();
|
|
32
|
-
[CommandContribution, KeybindingContribution, MenuContribution, QuickAccessContribution].forEach(serviceIdentifier =>
|
|
33
|
-
bind(serviceIdentifier).toService(QuickFileOpenFrontendContribution)
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
bind(QuickFileOpenService).toSelf().inSingletonScope();
|
|
37
|
-
});
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 TypeFox and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { ContainerModule, interfaces } from '@theia/core/shared/inversify';
|
|
18
|
+
import { CommandContribution, MenuContribution } from '@theia/core/lib/common';
|
|
19
|
+
import { WebSocketConnectionProvider, KeybindingContribution } from '@theia/core/lib/browser';
|
|
20
|
+
import { QuickFileOpenFrontendContribution } from './quick-file-open-contribution';
|
|
21
|
+
import { QuickFileOpenService } from './quick-file-open';
|
|
22
|
+
import { fileSearchServicePath, FileSearchService } from '../common/file-search-service';
|
|
23
|
+
import { QuickAccessContribution } from '@theia/core/lib/browser/quick-input/quick-access';
|
|
24
|
+
|
|
25
|
+
export default new ContainerModule((bind: interfaces.Bind) => {
|
|
26
|
+
bind(FileSearchService).toDynamicValue(ctx => {
|
|
27
|
+
const provider = ctx.container.get(WebSocketConnectionProvider);
|
|
28
|
+
return provider.createProxy<FileSearchService>(fileSearchServicePath);
|
|
29
|
+
}).inSingletonScope();
|
|
30
|
+
|
|
31
|
+
bind(QuickFileOpenFrontendContribution).toSelf().inSingletonScope();
|
|
32
|
+
[CommandContribution, KeybindingContribution, MenuContribution, QuickAccessContribution].forEach(serviceIdentifier =>
|
|
33
|
+
bind(serviceIdentifier).toService(QuickFileOpenFrontendContribution)
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
bind(QuickFileOpenService).toSelf().inSingletonScope();
|
|
37
|
+
});
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
// *****************************************************************************
|
|
2
|
-
// Copyright (C) 2017 TypeFox and others.
|
|
3
|
-
//
|
|
4
|
-
// This program and the accompanying materials are made available under the
|
|
5
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
-
//
|
|
8
|
-
// This Source Code may also be made available under the following Secondary
|
|
9
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
-
// with the GNU Classpath Exception which is available at
|
|
12
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
-
//
|
|
14
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
-
// *****************************************************************************
|
|
16
|
-
|
|
17
|
-
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
|
-
import URI from '@theia/core/lib/common/uri';
|
|
19
|
-
import { QuickFileOpenService, quickFileOpen } from './quick-file-open';
|
|
20
|
-
import { CommandRegistry, CommandContribution, MenuContribution, MenuModelRegistry } from '@theia/core/lib/common';
|
|
21
|
-
import { KeybindingRegistry, KeybindingContribution, QuickAccessContribution } from '@theia/core/lib/browser';
|
|
22
|
-
import { EditorMainMenu } from '@theia/editor/lib/browser';
|
|
23
|
-
import { nls } from '@theia/core/lib/common/nls';
|
|
24
|
-
|
|
25
|
-
@injectable()
|
|
26
|
-
export class QuickFileOpenFrontendContribution implements QuickAccessContribution, CommandContribution, KeybindingContribution, MenuContribution {
|
|
27
|
-
|
|
28
|
-
@inject(QuickFileOpenService)
|
|
29
|
-
protected readonly quickFileOpenService: QuickFileOpenService;
|
|
30
|
-
|
|
31
|
-
registerCommands(commands: CommandRegistry): void {
|
|
32
|
-
commands.registerCommand(quickFileOpen, {
|
|
33
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
-
execute: (...args: any[]) => {
|
|
35
|
-
let fileURI: string | undefined;
|
|
36
|
-
if (args) {
|
|
37
|
-
[fileURI] = args;
|
|
38
|
-
}
|
|
39
|
-
if (fileURI) {
|
|
40
|
-
this.quickFileOpenService.openFile(new URI(fileURI));
|
|
41
|
-
} else {
|
|
42
|
-
this.quickFileOpenService.open();
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
registerKeybindings(keybindings: KeybindingRegistry): void {
|
|
49
|
-
keybindings.registerKeybinding({
|
|
50
|
-
command: quickFileOpen.id,
|
|
51
|
-
keybinding: 'ctrlcmd+p'
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
registerMenus(menus: MenuModelRegistry): void {
|
|
56
|
-
menus.registerMenuAction(EditorMainMenu.WORKSPACE_GROUP, {
|
|
57
|
-
commandId: quickFileOpen.id,
|
|
58
|
-
label: nls.localizeByDefault('Go to File...'),
|
|
59
|
-
order: '1',
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
registerQuickAccessProvider(): void {
|
|
64
|
-
this.quickFileOpenService.registerQuickAccessProvider();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2017 TypeFox and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
18
|
+
import URI from '@theia/core/lib/common/uri';
|
|
19
|
+
import { QuickFileOpenService, quickFileOpen } from './quick-file-open';
|
|
20
|
+
import { CommandRegistry, CommandContribution, MenuContribution, MenuModelRegistry } from '@theia/core/lib/common';
|
|
21
|
+
import { KeybindingRegistry, KeybindingContribution, QuickAccessContribution } from '@theia/core/lib/browser';
|
|
22
|
+
import { EditorMainMenu } from '@theia/editor/lib/browser';
|
|
23
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
24
|
+
|
|
25
|
+
@injectable()
|
|
26
|
+
export class QuickFileOpenFrontendContribution implements QuickAccessContribution, CommandContribution, KeybindingContribution, MenuContribution {
|
|
27
|
+
|
|
28
|
+
@inject(QuickFileOpenService)
|
|
29
|
+
protected readonly quickFileOpenService: QuickFileOpenService;
|
|
30
|
+
|
|
31
|
+
registerCommands(commands: CommandRegistry): void {
|
|
32
|
+
commands.registerCommand(quickFileOpen, {
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
|
+
execute: (...args: any[]) => {
|
|
35
|
+
let fileURI: string | undefined;
|
|
36
|
+
if (args) {
|
|
37
|
+
[fileURI] = args;
|
|
38
|
+
}
|
|
39
|
+
if (fileURI) {
|
|
40
|
+
this.quickFileOpenService.openFile(new URI(fileURI));
|
|
41
|
+
} else {
|
|
42
|
+
this.quickFileOpenService.open();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
registerKeybindings(keybindings: KeybindingRegistry): void {
|
|
49
|
+
keybindings.registerKeybinding({
|
|
50
|
+
command: quickFileOpen.id,
|
|
51
|
+
keybinding: 'ctrlcmd+p'
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
registerMenus(menus: MenuModelRegistry): void {
|
|
56
|
+
menus.registerMenuAction(EditorMainMenu.WORKSPACE_GROUP, {
|
|
57
|
+
commandId: quickFileOpen.id,
|
|
58
|
+
label: nls.localizeByDefault('Go to File...'),
|
|
59
|
+
order: '1',
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
registerQuickAccessProvider(): void {
|
|
64
|
+
this.quickFileOpenService.registerQuickAccessProvider();
|
|
65
|
+
}
|
|
66
|
+
}
|