@theia/workspace 1.67.0-next.3 → 1.67.0-next.56
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 +1 -1
- package/package.json +5 -5
- package/src/browser/diff-service.ts +6 -12
- package/src/browser/workspace-schema-updater.ts +3 -3
- package/src/browser/workspace-service.ts +2 -2
- package/src/browser/workspace-variable-contribution.ts +13 -12
- package/lib/browser/canonical-uri-service.d.ts +0 -12
- package/lib/browser/canonical-uri-service.d.ts.map +0 -1
- package/lib/browser/canonical-uri-service.js +0 -55
- package/lib/browser/canonical-uri-service.js.map +0 -1
- package/lib/browser/diff-service.d.ts +0 -11
- package/lib/browser/diff-service.d.ts.map +0 -1
- package/lib/browser/diff-service.js +0 -78
- package/lib/browser/diff-service.js.map +0 -1
- package/lib/browser/index.d.ts +0 -7
- package/lib/browser/index.d.ts.map +0 -1
- package/lib/browser/index.js +0 -25
- package/lib/browser/index.js.map +0 -1
- package/lib/browser/quick-open-workspace.d.ts +0 -18
- package/lib/browser/quick-open-workspace.d.ts.map +0 -1
- package/lib/browser/quick-open-workspace.js +0 -112
- package/lib/browser/quick-open-workspace.js.map +0 -1
- package/lib/browser/untitled-workspace-exit-dialog.d.ts +0 -20
- package/lib/browser/untitled-workspace-exit-dialog.d.ts.map +0 -1
- package/lib/browser/untitled-workspace-exit-dialog.js +0 -64
- package/lib/browser/untitled-workspace-exit-dialog.js.map +0 -1
- package/lib/browser/workspace-breadcrumbs-contribution.d.ts +0 -11
- package/lib/browser/workspace-breadcrumbs-contribution.d.ts.map +0 -1
- package/lib/browser/workspace-breadcrumbs-contribution.js +0 -59
- package/lib/browser/workspace-breadcrumbs-contribution.js.map +0 -1
- package/lib/browser/workspace-commands.d.ts +0 -116
- package/lib/browser/workspace-commands.d.ts.map +0 -1
- package/lib/browser/workspace-commands.js +0 -568
- package/lib/browser/workspace-commands.js.map +0 -1
- package/lib/browser/workspace-commands.spec.d.ts +0 -2
- package/lib/browser/workspace-commands.spec.d.ts.map +0 -1
- package/lib/browser/workspace-commands.spec.js +0 -128
- package/lib/browser/workspace-commands.spec.js.map +0 -1
- package/lib/browser/workspace-compare-handler.d.ts +0 -27
- package/lib/browser/workspace-compare-handler.d.ts.map +0 -1
- package/lib/browser/workspace-compare-handler.js +0 -59
- package/lib/browser/workspace-compare-handler.js.map +0 -1
- package/lib/browser/workspace-delete-handler.d.ts +0 -76
- package/lib/browser/workspace-delete-handler.d.ts.map +0 -1
- package/lib/browser/workspace-delete-handler.js +0 -207
- package/lib/browser/workspace-delete-handler.js.map +0 -1
- package/lib/browser/workspace-duplicate-handler.d.ts +0 -31
- package/lib/browser/workspace-duplicate-handler.d.ts.map +0 -1
- package/lib/browser/workspace-duplicate-handler.js +0 -79
- package/lib/browser/workspace-duplicate-handler.js.map +0 -1
- package/lib/browser/workspace-frontend-contribution.d.ts +0 -111
- package/lib/browser/workspace-frontend-contribution.d.ts.map +0 -1
- package/lib/browser/workspace-frontend-contribution.js +0 -538
- package/lib/browser/workspace-frontend-contribution.js.map +0 -1
- package/lib/browser/workspace-frontend-module.d.ts +0 -4
- package/lib/browser/workspace-frontend-module.d.ts.map +0 -1
- package/lib/browser/workspace-frontend-module.js +0 -93
- package/lib/browser/workspace-frontend-module.js.map +0 -1
- package/lib/browser/workspace-input-dialog.d.ts +0 -20
- package/lib/browser/workspace-input-dialog.d.ts.map +0 -1
- package/lib/browser/workspace-input-dialog.js +0 -64
- package/lib/browser/workspace-input-dialog.js.map +0 -1
- package/lib/browser/workspace-schema-updater.d.ts +0 -34
- package/lib/browser/workspace-schema-updater.d.ts.map +0 -1
- package/lib/browser/workspace-schema-updater.js +0 -147
- package/lib/browser/workspace-schema-updater.js.map +0 -1
- package/lib/browser/workspace-service.d.ts +0 -201
- package/lib/browser/workspace-service.d.ts.map +0 -1
- package/lib/browser/workspace-service.js +0 -753
- package/lib/browser/workspace-service.js.map +0 -1
- package/lib/browser/workspace-storage-service.d.ts +0 -16
- package/lib/browser/workspace-storage-service.d.ts.map +0 -1
- package/lib/browser/workspace-storage-service.js +0 -73
- package/lib/browser/workspace-storage-service.js.map +0 -1
- package/lib/browser/workspace-trust-service.d.ts +0 -30
- package/lib/browser/workspace-trust-service.d.ts.map +0 -1
- package/lib/browser/workspace-trust-service.js +0 -153
- package/lib/browser/workspace-trust-service.js.map +0 -1
- package/lib/browser/workspace-uri-contribution.d.ts +0 -21
- package/lib/browser/workspace-uri-contribution.d.ts.map +0 -1
- package/lib/browser/workspace-uri-contribution.js +0 -106
- package/lib/browser/workspace-uri-contribution.js.map +0 -1
- package/lib/browser/workspace-uri-contribution.spec.d.ts +0 -2
- package/lib/browser/workspace-uri-contribution.spec.d.ts.map +0 -1
- package/lib/browser/workspace-uri-contribution.spec.js +0 -170
- package/lib/browser/workspace-uri-contribution.spec.js.map +0 -1
- package/lib/browser/workspace-user-working-directory-provider.d.ts +0 -13
- package/lib/browser/workspace-user-working-directory-provider.d.ts.map +0 -1
- package/lib/browser/workspace-user-working-directory-provider.js +0 -55
- package/lib/browser/workspace-user-working-directory-provider.js.map +0 -1
- package/lib/browser/workspace-utils.d.ts +0 -16
- package/lib/browser/workspace-utils.d.ts.map +0 -1
- package/lib/browser/workspace-utils.js +0 -47
- package/lib/browser/workspace-utils.js.map +0 -1
- package/lib/browser/workspace-variable-contribution.d.ts +0 -24
- package/lib/browser/workspace-variable-contribution.d.ts.map +0 -1
- package/lib/browser/workspace-variable-contribution.js +0 -230
- package/lib/browser/workspace-variable-contribution.js.map +0 -1
- package/lib/browser/workspace-window-title-updater.d.ts +0 -8
- package/lib/browser/workspace-window-title-updater.d.ts.map +0 -1
- package/lib/browser/workspace-window-title-updater.js +0 -50
- package/lib/browser/workspace-window-title-updater.js.map +0 -1
- package/lib/browser-only/browser-only-workspace-server.d.ts +0 -13
- package/lib/browser-only/browser-only-workspace-server.d.ts.map +0 -1
- package/lib/browser-only/browser-only-workspace-server.js +0 -73
- package/lib/browser-only/browser-only-workspace-server.js.map +0 -1
- package/lib/browser-only/workspace-frontend-only-module.d.ts +0 -4
- package/lib/browser-only/workspace-frontend-only-module.d.ts.map +0 -1
- package/lib/browser-only/workspace-frontend-only-module.js +0 -30
- package/lib/browser-only/workspace-frontend-only-module.js.map +0 -1
- package/lib/common/index.d.ts +0 -5
- package/lib/common/index.d.ts.map +0 -1
- package/lib/common/index.js +0 -23
- package/lib/common/index.js.map +0 -1
- package/lib/common/test/mock-workspace-server.d.ts +0 -8
- package/lib/common/test/mock-workspace-server.d.ts.map +0 -1
- package/lib/common/test/mock-workspace-server.js +0 -31
- package/lib/common/test/mock-workspace-server.js.map +0 -1
- package/lib/common/untitled-workspace-service.d.ts +0 -9
- package/lib/common/untitled-workspace-service.d.ts.map +0 -1
- package/lib/common/untitled-workspace-service.js +0 -53
- package/lib/common/untitled-workspace-service.js.map +0 -1
- package/lib/common/workspace-file-service.d.ts +0 -27
- package/lib/common/workspace-file-service.d.ts.map +0 -1
- package/lib/common/workspace-file-service.js +0 -67
- package/lib/common/workspace-file-service.js.map +0 -1
- package/lib/common/workspace-preferences.d.ts +0 -12
- package/lib/common/workspace-preferences.d.ts.map +0 -1
- package/lib/common/workspace-preferences.js +0 -46
- package/lib/common/workspace-preferences.js.map +0 -1
- package/lib/common/workspace-protocol.d.ts +0 -27
- package/lib/common/workspace-protocol.d.ts.map +0 -1
- package/lib/common/workspace-protocol.js +0 -24
- package/lib/common/workspace-protocol.js.map +0 -1
- package/lib/common/workspace-trust-preferences.d.ts +0 -22
- package/lib/common/workspace-trust-preferences.d.ts.map +0 -1
- package/lib/common/workspace-trust-preferences.js +0 -66
- package/lib/common/workspace-trust-preferences.js.map +0 -1
- package/lib/node/default-workspace-server.d.ts +0 -78
- package/lib/node/default-workspace-server.d.ts.map +0 -1
- package/lib/node/default-workspace-server.js +0 -265
- package/lib/node/default-workspace-server.js.map +0 -1
- package/lib/node/default-workspace-server.spec.d.ts +0 -2
- package/lib/node/default-workspace-server.spec.d.ts.map +0 -1
- package/lib/node/default-workspace-server.spec.js +0 -96
- package/lib/node/default-workspace-server.spec.js.map +0 -1
- package/lib/node/index.d.ts +0 -3
- package/lib/node/index.d.ts.map +0 -1
- package/lib/node/index.js +0 -21
- package/lib/node/index.js.map +0 -1
- package/lib/node/workspace-backend-module.d.ts +0 -4
- package/lib/node/workspace-backend-module.d.ts.map +0 -1
- package/lib/node/workspace-backend-module.js +0 -40
- package/lib/node/workspace-backend-module.js.map +0 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ The `@theia/workspace` extension provides functionality and services to handle w
|
|
|
16
16
|
|
|
17
17
|
## Additional Information
|
|
18
18
|
|
|
19
|
-
- [API documentation for `@theia/workspace`](https://eclipse-theia.github.io/theia/docs/next/modules/
|
|
19
|
+
- [API documentation for `@theia/workspace`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_workspace.html)
|
|
20
20
|
- [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
21
21
|
- [Theia - Website](https://theia-ide.org/)
|
|
22
22
|
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/workspace",
|
|
3
|
-
"version": "1.67.0-next.
|
|
3
|
+
"version": "1.67.0-next.56+d8f18cc386c",
|
|
4
4
|
"description": "Theia - Workspace Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/core": "1.67.0-next.
|
|
7
|
-
"@theia/filesystem": "1.67.0-next.
|
|
8
|
-
"@theia/variable-resolver": "1.67.0-next.
|
|
6
|
+
"@theia/core": "1.67.0-next.56+d8f18cc386c",
|
|
7
|
+
"@theia/filesystem": "1.67.0-next.56+d8f18cc386c",
|
|
8
|
+
"@theia/variable-resolver": "1.67.0-next.56+d8f18cc386c",
|
|
9
9
|
"jsonc-parser": "^2.2.0",
|
|
10
10
|
"tslib": "^2.6.2",
|
|
11
11
|
"valid-filename": "^2.0.1"
|
|
@@ -52,5 +52,5 @@
|
|
|
52
52
|
"nyc": {
|
|
53
53
|
"extends": "../../configs/nyc.json"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
|
|
56
56
|
}
|
|
@@ -20,6 +20,7 @@ import { DiffUris } from '@theia/core/lib/browser/diff-uris';
|
|
|
20
20
|
import { open, OpenerService, OpenerOptions } from '@theia/core/lib/browser';
|
|
21
21
|
import { MessageService } from '@theia/core/lib/common/message-service';
|
|
22
22
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
23
|
+
import { nls } from '@theia/core';
|
|
23
24
|
|
|
24
25
|
@injectable()
|
|
25
26
|
export class DiffService {
|
|
@@ -39,18 +40,11 @@ export class DiffService {
|
|
|
39
40
|
const uri = DiffUris.encode(left, right, label);
|
|
40
41
|
await open(this.openerService, uri, options);
|
|
41
42
|
} else {
|
|
42
|
-
const details =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return `'${left.path.base}' was a directory.`;
|
|
48
|
-
} else {
|
|
49
|
-
return `'${right.path.base}' was a directory.`;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
this.messageService.warn(`Directories cannot be compared. ${details()}`);
|
|
43
|
+
const details =
|
|
44
|
+
leftStat.isDirectory && rightStat.isDirectory ?
|
|
45
|
+
nls.localize('theia/workspace/bothAreDirectories', 'Both resources are directories.') :
|
|
46
|
+
nls.localize('theia/workspace/isDirectory', "'{0}' is a directory.", leftStat.isDirectory ? left.path.base : right.path.base);
|
|
47
|
+
this.messageService.warn(nls.localize('theia/workspace/directoriesCannotBeCompared', 'Directories cannot be compared. {0}', details));
|
|
54
48
|
}
|
|
55
49
|
}
|
|
56
50
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
18
18
|
import { JsonSchemaContribution, JsonSchemaDataStore, JsonSchemaRegisterContext } from '@theia/core/lib/browser/json-schema-store';
|
|
19
|
-
import { isArray, isObject } from '@theia/core/lib/common';
|
|
19
|
+
import { isArray, isObject, nls } from '@theia/core/lib/common';
|
|
20
20
|
import { IJSONSchema } from '@theia/core/lib/common/json-schema';
|
|
21
21
|
import URI from '@theia/core/lib/common/uri';
|
|
22
22
|
import { Deferred } from '@theia/core/lib/common/promise-util';
|
|
@@ -127,12 +127,12 @@ export const workspaceSchemaId = 'vscode://schemas/workspace';
|
|
|
127
127
|
export const workspaceSchema: IJSONSchema = {
|
|
128
128
|
$id: workspaceSchemaId,
|
|
129
129
|
type: 'object',
|
|
130
|
-
title: 'Workspace File',
|
|
130
|
+
title: nls.localize('theia/workspace/schema/title', 'Workspace File'),
|
|
131
131
|
required: ['folders'],
|
|
132
132
|
default: { folders: [{ path: '' }], settings: {} },
|
|
133
133
|
properties: {
|
|
134
134
|
folders: {
|
|
135
|
-
description: 'Root folders in the workspace',
|
|
135
|
+
description: nls.localize('theia/workspace/schema/folders/description', 'Root folders in the workspace'),
|
|
136
136
|
type: 'array',
|
|
137
137
|
items: {
|
|
138
138
|
type: 'object',
|
|
@@ -165,7 +165,7 @@ export class WorkspaceService implements FrontendApplicationContribution, Worksp
|
|
|
165
165
|
workspaceStat = await this.fileService.resolve(workspaceUri);
|
|
166
166
|
} catch { }
|
|
167
167
|
if (workspaceStat && !workspaceStat.isDirectory && !this.isWorkspaceFile(workspaceStat)) {
|
|
168
|
-
this.messageService.error(
|
|
168
|
+
this.messageService.error(nls.localize('theia/workspace/notWorkspaceFile', 'Not a valid workspace file: {0}', this.labelProvider.getLongName(workspaceUri)));
|
|
169
169
|
return undefined;
|
|
170
170
|
}
|
|
171
171
|
return workspaceUri.toString();
|
|
@@ -380,7 +380,7 @@ export class WorkspaceService implements FrontendApplicationContribution, Worksp
|
|
|
380
380
|
const stat = await this.toFileStat(uri);
|
|
381
381
|
if (stat) {
|
|
382
382
|
if (!stat.isDirectory && !this.isWorkspaceFile(stat)) {
|
|
383
|
-
const message =
|
|
383
|
+
const message = nls.localize('theia/workspace/notWorkspaceFile', 'Not a valid workspace file: {0}', this.labelProvider.getLongName(uri));
|
|
384
384
|
this.messageService.error(message);
|
|
385
385
|
throw new Error(message);
|
|
386
386
|
}
|
|
@@ -21,6 +21,7 @@ import { ApplicationShell, NavigatableWidget, WidgetManager } from '@theia/core/
|
|
|
21
21
|
import { VariableContribution, VariableRegistry, Variable } from '@theia/variable-resolver/lib/browser';
|
|
22
22
|
import { WorkspaceService } from './workspace-service';
|
|
23
23
|
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
24
|
+
import { nls } from '@theia/core';
|
|
24
25
|
|
|
25
26
|
@injectable()
|
|
26
27
|
export class WorkspaceVariableContribution implements VariableContribution {
|
|
@@ -97,7 +98,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
97
98
|
|
|
98
99
|
variables.registerVariable({
|
|
99
100
|
name: 'file',
|
|
100
|
-
description: 'The path of the currently opened file',
|
|
101
|
+
description: nls.localize('theia/workspace/variables/file/description', 'The path of the currently opened file'),
|
|
101
102
|
resolve: () => {
|
|
102
103
|
const uri = this.getResourceUri();
|
|
103
104
|
return uri && this.fileService.fsPath(uri);
|
|
@@ -105,7 +106,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
105
106
|
});
|
|
106
107
|
variables.registerVariable({
|
|
107
108
|
name: 'fileBasename',
|
|
108
|
-
description: 'The basename of the currently opened file',
|
|
109
|
+
description: nls.localize('theia/workspace/variables/fileBasename/description', 'The basename of the currently opened file'),
|
|
109
110
|
resolve: () => {
|
|
110
111
|
const uri = this.getResourceUri();
|
|
111
112
|
return uri && uri.path.base;
|
|
@@ -113,7 +114,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
113
114
|
});
|
|
114
115
|
variables.registerVariable({
|
|
115
116
|
name: 'fileBasenameNoExtension',
|
|
116
|
-
description: "The currently opened file's name without extension",
|
|
117
|
+
description: nls.localize('theia/workspace/variables/fileBasenameNoExtension/description', "The currently opened file's name without extension"),
|
|
117
118
|
resolve: () => {
|
|
118
119
|
const uri = this.getResourceUri();
|
|
119
120
|
return uri && uri.path.name;
|
|
@@ -121,7 +122,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
121
122
|
});
|
|
122
123
|
variables.registerVariable({
|
|
123
124
|
name: 'fileDirname',
|
|
124
|
-
description: "The name of the currently opened file's directory",
|
|
125
|
+
description: nls.localize('theia/workspace/variables/fileDirname/description', "The name of the currently opened file's directory"),
|
|
125
126
|
resolve: () => {
|
|
126
127
|
const uri = this.getResourceUri();
|
|
127
128
|
return uri && uri.path.dir.toString();
|
|
@@ -129,7 +130,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
129
130
|
});
|
|
130
131
|
variables.registerVariable({
|
|
131
132
|
name: 'fileExtname',
|
|
132
|
-
description: 'The extension of the currently opened file',
|
|
133
|
+
description: nls.localize('theia/workspace/variables/fileExtname/description', 'The extension of the currently opened file'),
|
|
133
134
|
resolve: () => {
|
|
134
135
|
const uri = this.getResourceUri();
|
|
135
136
|
return uri && uri.path.ext;
|
|
@@ -148,7 +149,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
148
149
|
});
|
|
149
150
|
variables.registerVariable(scoped({
|
|
150
151
|
name: 'workspaceRoot',
|
|
151
|
-
description: 'The path of the workspace root folder',
|
|
152
|
+
description: nls.localize('theia/workspace/variables/workspaceRoot/description', 'The path of the workspace root folder'),
|
|
152
153
|
resolve: (context?: URI) => {
|
|
153
154
|
const uri = this.getWorkspaceRootUri(context);
|
|
154
155
|
return uri && this.fileService.fsPath(uri);
|
|
@@ -156,7 +157,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
156
157
|
}));
|
|
157
158
|
variables.registerVariable(scoped({
|
|
158
159
|
name: 'workspaceFolder',
|
|
159
|
-
description: 'The path of the workspace root folder',
|
|
160
|
+
description: nls.localize('theia/workspace/variables/workspaceFolder/description', 'The path of the workspace root folder'),
|
|
160
161
|
resolve: (context?: URI) => {
|
|
161
162
|
const uri = this.getWorkspaceRootUri(context);
|
|
162
163
|
return uri && this.fileService.fsPath(uri);
|
|
@@ -164,7 +165,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
164
165
|
}));
|
|
165
166
|
variables.registerVariable(scoped({
|
|
166
167
|
name: 'workspaceRootFolderName',
|
|
167
|
-
description: 'The name of the workspace root folder',
|
|
168
|
+
description: nls.localize('theia/workspace/variables/workspaceRootFolderName/description', 'The name of the workspace root folder'),
|
|
168
169
|
resolve: (context?: URI) => {
|
|
169
170
|
const uri = this.getWorkspaceRootUri(context);
|
|
170
171
|
return uri && uri.displayName;
|
|
@@ -172,7 +173,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
172
173
|
}));
|
|
173
174
|
variables.registerVariable(scoped({
|
|
174
175
|
name: 'workspaceFolderBasename',
|
|
175
|
-
description: 'The name of the workspace root folder',
|
|
176
|
+
description: nls.localize('theia/workspace/variables/workspaceFolderBasename/description', 'The name of the workspace root folder'),
|
|
176
177
|
resolve: (context?: URI) => {
|
|
177
178
|
const uri = this.getWorkspaceRootUri(context);
|
|
178
179
|
return uri && uri.displayName;
|
|
@@ -180,7 +181,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
180
181
|
}));
|
|
181
182
|
variables.registerVariable(scoped({
|
|
182
183
|
name: 'cwd',
|
|
183
|
-
description: "The task runner's current working directory on startup",
|
|
184
|
+
description: nls.localize('theia/workspace/variables/cwd/description', "The task runner's current working directory on startup"),
|
|
184
185
|
resolve: (context?: URI) => {
|
|
185
186
|
const uri = this.getWorkspaceRootUri(context);
|
|
186
187
|
return (uri && this.fileService.fsPath(uri)) || '';
|
|
@@ -188,7 +189,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
188
189
|
}));
|
|
189
190
|
variables.registerVariable(scoped({
|
|
190
191
|
name: 'relativeFile',
|
|
191
|
-
description: "The currently opened file's path relative to the workspace root",
|
|
192
|
+
description: nls.localize('theia/workspace/variables/relativeFile/description', "The currently opened file's path relative to the workspace root"),
|
|
192
193
|
resolve: (context?: URI) => {
|
|
193
194
|
const uri = this.getResourceUri();
|
|
194
195
|
return uri && this.getWorkspaceRelativePath(uri, context);
|
|
@@ -196,7 +197,7 @@ export class WorkspaceVariableContribution implements VariableContribution {
|
|
|
196
197
|
}));
|
|
197
198
|
variables.registerVariable(scoped({
|
|
198
199
|
name: 'relativeFileDirname',
|
|
199
|
-
description: "The current opened file's dirname relative to ${workspaceFolder}",
|
|
200
|
+
description: nls.localize('theia/workspace/variables/relativeFileDirname/description', "The current opened file's dirname relative to ${workspaceFolder}"),
|
|
200
201
|
resolve: (context?: URI) => {
|
|
201
202
|
const uri = this.getResourceUri();
|
|
202
203
|
const relativePath = uri && this.getWorkspaceRelativePath(uri, context);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { CancellationToken, URI } from '@theia/core/lib/common';
|
|
2
|
-
import { Disposable } from '@theia/core/shared/vscode-languageserver-protocol';
|
|
3
|
-
export interface CanonicalUriProvider extends Disposable {
|
|
4
|
-
provideCanonicalUri(uri: URI, targetScheme: string, token: CancellationToken): Promise<URI | undefined>;
|
|
5
|
-
}
|
|
6
|
-
export declare class CanonicalUriService {
|
|
7
|
-
private providers;
|
|
8
|
-
registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
|
|
9
|
-
private removeCanonicalUriProvider;
|
|
10
|
-
provideCanonicalUri(uri: URI, targetScheme: string, token?: CancellationToken): Promise<URI | undefined>;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=canonical-uri-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-uri-service.d.ts","sourceRoot":"","sources":["../../src/browser/canonical-uri-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,mDAAmD,CAAC;AAE/E,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACpD,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC;CAC3G;AAED,qBACa,mBAAmB;IAC5B,OAAO,CAAC,SAAS,CAA2C;IAE5D,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,oBAAoB,GAAG,UAAU;IASxF,OAAO,CAAC,0BAA0B;IAU5B,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,GAAE,iBAA0C,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC;CASzI"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2023 STMicroelectronics and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.CanonicalUriService = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const common_1 = require("@theia/core/lib/common");
|
|
21
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
22
|
-
const vscode_languageserver_protocol_1 = require("@theia/core/shared/vscode-languageserver-protocol");
|
|
23
|
-
let CanonicalUriService = class CanonicalUriService {
|
|
24
|
-
constructor() {
|
|
25
|
-
this.providers = new Map();
|
|
26
|
-
}
|
|
27
|
-
registerCanonicalUriProvider(scheme, provider) {
|
|
28
|
-
if (this.providers.has(scheme)) {
|
|
29
|
-
throw new Error(`Canonical URI provider for scheme: '${scheme}' already exists`);
|
|
30
|
-
}
|
|
31
|
-
this.providers.set(scheme, provider);
|
|
32
|
-
return vscode_languageserver_protocol_1.Disposable.create(() => { this.removeCanonicalUriProvider(scheme); });
|
|
33
|
-
}
|
|
34
|
-
removeCanonicalUriProvider(scheme) {
|
|
35
|
-
const provider = this.providers.get(scheme);
|
|
36
|
-
if (!provider) {
|
|
37
|
-
throw new Error(`No Canonical URI provider for scheme: '${scheme}' exists`);
|
|
38
|
-
}
|
|
39
|
-
this.providers.delete(scheme);
|
|
40
|
-
provider.dispose();
|
|
41
|
-
}
|
|
42
|
-
async provideCanonicalUri(uri, targetScheme, token = common_1.CancellationToken.None) {
|
|
43
|
-
const provider = this.providers.get(uri.scheme);
|
|
44
|
-
if (!provider) {
|
|
45
|
-
console.warn(`No Canonical URI provider for scheme: '${uri.scheme}' exists`);
|
|
46
|
-
return undefined;
|
|
47
|
-
}
|
|
48
|
-
return provider.provideCanonicalUri(uri, targetScheme, token);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
exports.CanonicalUriService = CanonicalUriService;
|
|
52
|
-
exports.CanonicalUriService = CanonicalUriService = tslib_1.__decorate([
|
|
53
|
-
(0, inversify_1.injectable)()
|
|
54
|
-
], CanonicalUriService);
|
|
55
|
-
//# sourceMappingURL=canonical-uri-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"canonical-uri-service.js","sourceRoot":"","sources":["../../src/browser/canonical-uri-service.ts"],"names":[],"mappings":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GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,CAAC,IAAI,CAAC,0CAA0C,GAAG,CAAC,MAAM,UAAU,CAAC,CAAC;YAC7E,OAAO,SAAS,CAAC;QACrB,CAAC;QAED,OAAO,QAAQ,CAAC,mBAAmB,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AA/BY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,sBAAU,GAAE;GACA,mBAAmB,CA+B/B"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import URI from '@theia/core/lib/common/uri';
|
|
2
|
-
import { OpenerService, OpenerOptions } from '@theia/core/lib/browser';
|
|
3
|
-
import { MessageService } from '@theia/core/lib/common/message-service';
|
|
4
|
-
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
5
|
-
export declare class DiffService {
|
|
6
|
-
protected readonly fileService: FileService;
|
|
7
|
-
protected readonly openerService: OpenerService;
|
|
8
|
-
protected readonly messageService: MessageService;
|
|
9
|
-
openDiffEditor(left: URI, right: URI, label?: string, options?: OpenerOptions): Promise<void>;
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=diff-service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-service.d.ts","sourceRoot":"","sources":["../../src/browser/diff-service.ts"],"names":[],"mappings":"AAiBA,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAE7C,OAAO,EAAQ,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAEzE,qBACa,WAAW;IAEC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1C,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAC/C,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAE7D,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;CA+B7G"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2017 TypeFox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.DiffService = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const diff_uris_1 = require("@theia/core/lib/browser/diff-uris");
|
|
22
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
23
|
-
const message_service_1 = require("@theia/core/lib/common/message-service");
|
|
24
|
-
const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
|
|
25
|
-
let DiffService = class DiffService {
|
|
26
|
-
async openDiffEditor(left, right, label, options) {
|
|
27
|
-
if (left.scheme === 'file' && right.scheme === 'file') {
|
|
28
|
-
const [resolvedLeft, resolvedRight] = await this.fileService.resolveAll([{ resource: left }, { resource: right }]);
|
|
29
|
-
if (resolvedLeft.success && resolvedRight.success) {
|
|
30
|
-
const leftStat = resolvedLeft.stat;
|
|
31
|
-
const rightStat = resolvedRight.stat;
|
|
32
|
-
if (leftStat && rightStat) {
|
|
33
|
-
if (!leftStat.isDirectory && !rightStat.isDirectory) {
|
|
34
|
-
const uri = diff_uris_1.DiffUris.encode(left, right, label);
|
|
35
|
-
await (0, browser_1.open)(this.openerService, uri, options);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
const details = (() => {
|
|
39
|
-
if (leftStat.isDirectory && rightStat.isDirectory) {
|
|
40
|
-
return 'Both resource were a directory.';
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
if (leftStat.isDirectory) {
|
|
44
|
-
return `'${left.path.base}' was a directory.`;
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
return `'${right.path.base}' was a directory.`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
this.messageService.warn(`Directories cannot be compared. ${details()}`);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
const uri = diff_uris_1.DiffUris.encode(left, right, label);
|
|
58
|
-
await (0, browser_1.open)(this.openerService, uri, options);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
exports.DiffService = DiffService;
|
|
63
|
-
tslib_1.__decorate([
|
|
64
|
-
(0, inversify_1.inject)(file_service_1.FileService),
|
|
65
|
-
tslib_1.__metadata("design:type", file_service_1.FileService)
|
|
66
|
-
], DiffService.prototype, "fileService", void 0);
|
|
67
|
-
tslib_1.__decorate([
|
|
68
|
-
(0, inversify_1.inject)(browser_1.OpenerService),
|
|
69
|
-
tslib_1.__metadata("design:type", Object)
|
|
70
|
-
], DiffService.prototype, "openerService", void 0);
|
|
71
|
-
tslib_1.__decorate([
|
|
72
|
-
(0, inversify_1.inject)(message_service_1.MessageService),
|
|
73
|
-
tslib_1.__metadata("design:type", message_service_1.MessageService)
|
|
74
|
-
], DiffService.prototype, "messageService", void 0);
|
|
75
|
-
exports.DiffService = DiffService = tslib_1.__decorate([
|
|
76
|
-
(0, inversify_1.injectable)()
|
|
77
|
-
], DiffService);
|
|
78
|
-
//# sourceMappingURL=diff-service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"diff-service.js","sourceRoot":"","sources":["../../src/browser/diff-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAkE;AAElE,iEAA6D;AAC7D,qDAA6E;AAC7E,4EAAwE;AACxE,6EAAyE;AAGlE,IAAM,WAAW,GAAjB,MAAM,WAAW;IAMb,KAAK,CAAC,cAAc,CAAC,IAAS,EAAE,KAAU,EAAE,KAAc,EAAE,OAAuB;QACtF,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM,IAAI,KAAK,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;YACpD,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;YACnH,IAAI,YAAY,CAAC,OAAO,IAAI,aAAa,CAAC,OAAO,EAAE,CAAC;gBAChD,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC;gBACnC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAAC;gBACrC,IAAI,QAAQ,IAA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,kBAAM,EAAC,gCAAc,CAAC;sCAAoC,gCAAc;mDAAC;sBAJjE,WAAW;IADvB,IAAA,sBAAU,GAAE;GACA,WAAW,CAqCvB"}
|
package/lib/browser/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './workspace-commands';
|
|
2
|
-
export * from './workspace-service';
|
|
3
|
-
export * from './canonical-uri-service';
|
|
4
|
-
export * from './workspace-frontend-contribution';
|
|
5
|
-
export * from './workspace-frontend-module';
|
|
6
|
-
export * from './workspace-trust-service';
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAgBA,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC"}
|
package/lib/browser/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2017 TypeFox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
const tslib_1 = require("tslib");
|
|
19
|
-
tslib_1.__exportStar(require("./workspace-commands"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./workspace-service"), exports);
|
|
21
|
-
tslib_1.__exportStar(require("./canonical-uri-service"), exports);
|
|
22
|
-
tslib_1.__exportStar(require("./workspace-frontend-contribution"), exports);
|
|
23
|
-
tslib_1.__exportStar(require("./workspace-frontend-module"), exports);
|
|
24
|
-
tslib_1.__exportStar(require("./workspace-trust-service"), exports);
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
package/lib/browser/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,+DAAqC;AACrC,8DAAoC;AACpC,kEAAwC;AACxC,4EAAkD;AAClD,sEAA4C;AAC5C,oEAA0C"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { LabelProvider, QuickInputService, QuickInputButton } from '@theia/core/lib/browser';
|
|
2
|
-
import { EnvVariablesServer } from '@theia/core/lib/common/env-variables';
|
|
3
|
-
import { WorkspaceOpenHandlerContribution, WorkspaceService } from './workspace-service';
|
|
4
|
-
import { ContributionProvider } from '@theia/core/lib/common';
|
|
5
|
-
import { UntitledWorkspaceService } from '../common/untitled-workspace-service';
|
|
6
|
-
export declare class QuickOpenWorkspace {
|
|
7
|
-
protected opened: boolean;
|
|
8
|
-
protected readonly quickInputService: QuickInputService;
|
|
9
|
-
protected readonly workspaceService: WorkspaceService;
|
|
10
|
-
protected readonly labelProvider: LabelProvider;
|
|
11
|
-
protected readonly envServer: EnvVariablesServer;
|
|
12
|
-
protected untitledWorkspaceService: UntitledWorkspaceService;
|
|
13
|
-
protected readonly workspaceOpenHandlers: ContributionProvider<WorkspaceOpenHandlerContribution>;
|
|
14
|
-
protected readonly removeRecentWorkspaceButton: QuickInputButton;
|
|
15
|
-
open(workspaces: string[]): Promise<void>;
|
|
16
|
-
select(): void;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=quick-open-workspace.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-open-workspace.d.ts","sourceRoot":"","sources":["../../src/browser/quick-open-workspace.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAiB,aAAa,EAAE,iBAAiB,EAAE,gBAAgB,EAAsB,MAAM,yBAAyB,CAAC;AAChI,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEzF,OAAO,EAAE,oBAAoB,EAAa,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAMhF,qBACa,kBAAkB;IAC3B,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAEa,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IACrE,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IACzD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAC3C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,kBAAkB,CAAC;IAC3C,SAAS,CAAC,wBAAwB,EAAE,wBAAwB,CAAC;IAG/F,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,gCAAgC,CAAC,CAAC;IAEjG,SAAS,CAAC,QAAQ,CAAC,2BAA2B,EAAE,gBAAgB,CAG9D;IAEI,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA2C/C,MAAM,IAAI,IAAI;CAQjB"}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 Ericsson and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.QuickOpenWorkspace = void 0;
|
|
19
|
-
const tslib_1 = require("tslib");
|
|
20
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
21
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
-
const env_variables_1 = require("@theia/core/lib/common/env-variables");
|
|
23
|
-
const workspace_service_1 = require("./workspace-service");
|
|
24
|
-
const uri_1 = require("@theia/core/lib/common/uri");
|
|
25
|
-
const common_1 = require("@theia/core/lib/common");
|
|
26
|
-
const untitled_workspace_service_1 = require("../common/untitled-workspace-service");
|
|
27
|
-
let QuickOpenWorkspace = class QuickOpenWorkspace {
|
|
28
|
-
constructor() {
|
|
29
|
-
this.removeRecentWorkspaceButton = {
|
|
30
|
-
iconClass: 'codicon-remove-close',
|
|
31
|
-
tooltip: common_1.nls.localizeByDefault('Remove from Recently Opened')
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
async open(workspaces) {
|
|
35
|
-
var _a, _b, _c, _d;
|
|
36
|
-
const homeDirUri = await this.envServer.getHomeDirUri();
|
|
37
|
-
const home = new uri_1.default(homeDirUri).path.fsPath();
|
|
38
|
-
const items = [{
|
|
39
|
-
type: 'separator',
|
|
40
|
-
label: common_1.nls.localizeByDefault('folders & workspaces')
|
|
41
|
-
}];
|
|
42
|
-
for (const workspace of workspaces) {
|
|
43
|
-
const uri = new uri_1.default(workspace);
|
|
44
|
-
const label = (_c = await ((_b = (_a = this.workspaceOpenHandlers.getContributions()
|
|
45
|
-
.find(handler => handler.getWorkspaceLabel && handler.canHandle(uri))) === null || _a === void 0 ? void 0 : _a.getWorkspaceLabel) === null || _b === void 0 ? void 0 : _b.call(_a, uri))) !== null && _c !== void 0 ? _c : uri.path.base;
|
|
46
|
-
if (!label || this.untitledWorkspaceService.isUntitledWorkspace(uri)) {
|
|
47
|
-
continue; // skip temporary workspace files & empty workspace names
|
|
48
|
-
}
|
|
49
|
-
items.push({
|
|
50
|
-
label: label,
|
|
51
|
-
description: common_1.Path.tildify(uri.path.fsPath(), home),
|
|
52
|
-
buttons: [this.removeRecentWorkspaceButton],
|
|
53
|
-
resource: uri,
|
|
54
|
-
execute: () => {
|
|
55
|
-
const current = this.workspaceService.workspace;
|
|
56
|
-
if ((current && current.resource.toString() !== workspace) || !current) {
|
|
57
|
-
this.workspaceService.open(uri);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
(_d = this.quickInputService) === null || _d === void 0 ? void 0 : _d.showQuickPick(items, {
|
|
63
|
-
placeholder: common_1.nls.localize('theia/workspace/openRecentPlaceholder', 'Type the name of the workspace you want to open'),
|
|
64
|
-
onDidTriggerItemButton: async (context) => {
|
|
65
|
-
const resource = context.item.resource;
|
|
66
|
-
if (resource) {
|
|
67
|
-
await this.workspaceService.removeRecentWorkspace(resource.toString());
|
|
68
|
-
context.removeItem();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
select() {
|
|
74
|
-
this.opened = this.workspaceService.opened;
|
|
75
|
-
this.workspaceService.recentWorkspaces().then(workspaceRoots => {
|
|
76
|
-
if (workspaceRoots) {
|
|
77
|
-
this.open(workspaceRoots);
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
exports.QuickOpenWorkspace = QuickOpenWorkspace;
|
|
83
|
-
tslib_1.__decorate([
|
|
84
|
-
(0, inversify_1.inject)(browser_1.QuickInputService),
|
|
85
|
-
(0, inversify_1.optional)(),
|
|
86
|
-
tslib_1.__metadata("design:type", Object)
|
|
87
|
-
], QuickOpenWorkspace.prototype, "quickInputService", void 0);
|
|
88
|
-
tslib_1.__decorate([
|
|
89
|
-
(0, inversify_1.inject)(workspace_service_1.WorkspaceService),
|
|
90
|
-
tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
|
|
91
|
-
], QuickOpenWorkspace.prototype, "workspaceService", void 0);
|
|
92
|
-
tslib_1.__decorate([
|
|
93
|
-
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
94
|
-
tslib_1.__metadata("design:type", browser_1.LabelProvider)
|
|
95
|
-
], QuickOpenWorkspace.prototype, "labelProvider", void 0);
|
|
96
|
-
tslib_1.__decorate([
|
|
97
|
-
(0, inversify_1.inject)(env_variables_1.EnvVariablesServer),
|
|
98
|
-
tslib_1.__metadata("design:type", Object)
|
|
99
|
-
], QuickOpenWorkspace.prototype, "envServer", void 0);
|
|
100
|
-
tslib_1.__decorate([
|
|
101
|
-
(0, inversify_1.inject)(untitled_workspace_service_1.UntitledWorkspaceService),
|
|
102
|
-
tslib_1.__metadata("design:type", untitled_workspace_service_1.UntitledWorkspaceService)
|
|
103
|
-
], QuickOpenWorkspace.prototype, "untitledWorkspaceService", void 0);
|
|
104
|
-
tslib_1.__decorate([
|
|
105
|
-
(0, inversify_1.inject)(common_1.ContributionProvider),
|
|
106
|
-
(0, inversify_1.named)(workspace_service_1.WorkspaceOpenHandlerContribution),
|
|
107
|
-
tslib_1.__metadata("design:type", Object)
|
|
108
|
-
], QuickOpenWorkspace.prototype, "workspaceOpenHandlers", void 0);
|
|
109
|
-
exports.QuickOpenWorkspace = QuickOpenWorkspace = tslib_1.__decorate([
|
|
110
|
-
(0, inversify_1.injectable)()
|
|
111
|
-
], QuickOpenWorkspace);
|
|
112
|
-
//# sourceMappingURL=quick-open-workspace.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"quick-open-workspace.js","sourceRoot":"","sources":["../../src/browser/quick-open-workspace.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,0CAA0C;AAC1C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAmF;AACnF,qDAAgI;AAChI,wEAA0E;AAC1E,2DAAyF;AACzF,oDAA6C;AAC7C,mDAAyE;AACzE,qFAAgF;AAOzE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAAxB;QAYgB,gCAA2B,GAAqB;YAC/D,SAAS,EAAE,sBAAsB;YACjC,OAAO,EAAE,YAAG,CAAC,iBAAiB,CAAC,6BAA6B,CAAC;SAChE,CAAC;IAqDN,CAAC;IAnDG,KAAK,CAAC,IAAI,CAAC,UAAoB;;QAC3B,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QACxD,MAAM,IAAI,GAAG,IAAI,aAAG,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC/C,MAAM,KAAK,GAAgD,CAAC;gBACxD,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,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 +0,0 @@
|
|
|
1
|
-
import { AbstractDialog, DialogProps, Message } from '@theia/core/lib/browser';
|
|
2
|
-
export declare class UntitledWorkspaceExitDialog extends AbstractDialog<UntitledWorkspaceExitDialog.Options> {
|
|
3
|
-
protected readonly dontSaveButton: HTMLButtonElement;
|
|
4
|
-
protected _value: UntitledWorkspaceExitDialog.Options;
|
|
5
|
-
get value(): UntitledWorkspaceExitDialog.Options;
|
|
6
|
-
constructor(props: DialogProps);
|
|
7
|
-
protected onAfterAttach(msg: Message): void;
|
|
8
|
-
protected addAcceptAction<K extends keyof HTMLElementEventMap>(element: HTMLElement, ...additionalEventTypes: K[]): void;
|
|
9
|
-
protected dontSave(): void;
|
|
10
|
-
protected doSave(): void;
|
|
11
|
-
}
|
|
12
|
-
export declare namespace UntitledWorkspaceExitDialog {
|
|
13
|
-
const enum Values {
|
|
14
|
-
"Don't Save" = "Don't Save",
|
|
15
|
-
Cancel = "Cancel",
|
|
16
|
-
Save = "Save"
|
|
17
|
-
}
|
|
18
|
-
type Options = keyof typeof Values;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=untitled-workspace-exit-dialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"untitled-workspace-exit-dialog.d.ts","sourceRoot":"","sources":["../../src/browser/untitled-workspace-exit-dialog.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,cAAc,EAAU,WAAW,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAEvF,qBAAa,2BAA4B,SAAQ,cAAc,CAAC,2BAA2B,CAAC,OAAO,CAAC;IAChG,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,iBAAiB,CAAC;IACrD,SAAS,CAAC,MAAM,EAAE,2BAA2B,CAAC,OAAO,CAAY;IAEjE,IAAI,KAAK,IAAI,2BAA2B,CAAC,OAAO,CAE/C;gBAGwB,KAAK,EAAE,WAAW;cAaxB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI;cAKjC,eAAe,CAAC,CAAC,SAAS,MAAM,mBAAmB,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,oBAAoB,EAAE,CAAC,EAAE,GAAG,IAAI;IAIjI,SAAS,CAAC,QAAQ,IAAI,IAAI;IAK1B,SAAS,CAAC,MAAM,IAAI,IAAI;CAI3B;AAED,yBAAiB,2BAA2B,CAAC;IACzC,WAAkB,MAAM;QACpB,YAAY,eAAe;QAC3B,MAAM,WAAW;QACjB,IAAI,SAAS;KAChB;IACD,KAAY,OAAO,GAAG,MAAM,OAAO,MAAM,CAAC;CAC7C"}
|