Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Update to Theia from master #20

Merged
merged 1 commit into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions browser-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
"name": "browser-app",
"version": "0.0.0",
"dependencies": {
"@theia/core": "0.3.14",
"@theia/filesystem": "0.3.14",
"@theia/workspace": "0.3.14",
"@theia/preferences": "0.3.14",
"@theia/navigator": "0.3.14",
"@theia/process": "0.3.14",
"@theia/terminal": "0.3.14",
"@theia/editor": "0.3.14",
"@theia/languages": "0.3.14",
"@theia/markers": "0.3.14",
"@theia/monaco": "0.3.14",
"@theia/task": "0.3.14",
"@theia/typescript": "0.3.14",
"@theia/messages": "0.3.14",
"@theia/variable-resolver": "0.3.14",
"@theia/core": "next",
"@theia/filesystem": "next",
"@theia/workspace": "next",
"@theia/preferences": "next",
"@theia/navigator": "next",
"@theia/process": "next",
"@theia/terminal": "next",
"@theia/editor": "next",
"@theia/languages": "next",
"@theia/markers": "next",
"@theia/monaco": "next",
"@theia/task": "next",
"@theia/typescript": "next",
"@theia/messages": "next",
"@theia/variable-resolver": "next",
"@eclipse-che/theia-task-extension": "0.0.0"
},
"devDependencies": {
"@theia/cli": "0.3.14"
"@theia/cli": "next"
},
"scripts": {
"prepare": "theia build --mode development",
Expand Down
8 changes: 4 additions & 4 deletions che-theia-task-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@
"src"
],
"dependencies": {
"@theia/core": "0.3.14",
"@theia/mini-browser": "0.3.14",
"@theia/task": "0.3.14",
"@theia/core": "next",
"@theia/mini-browser": "next",
"@theia/task": "next",
"@eclipse-che/workspace-client": "latest",
"@eclipse-che/api": "latest",
"reconnecting-websocket": "3.2.2"
},
"devDependencies": {
"rimraf": "2.6.2",
"typescript": "2.9.2"
"typescript": "3.1.3"
},
"scripts": {
"prepare": "yarn run clean && yarn run build",
Expand Down
3 changes: 2 additions & 1 deletion che-theia-task-extension/src/browser/che-task-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ export class CheTaskProvider implements TaskProvider {
target: {
machineName: this.getCommandAttribute(command, 'machineName')
},
previewUrl: this.getCommandAttribute(command, 'previewUrl')
previewUrl: this.getCommandAttribute(command, 'previewUrl'),
_source: 'che'
};
tasks.push(providedTask);
}
Expand Down
3 changes: 2 additions & 1 deletion che-theia-task-extension/src/browser/che-task-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export class CheTaskResolver implements TaskResolver {
label: cheTaskConfig.label,
command: await this.variableResolverService.resolve(cheTaskConfig.command),
target: resultTarget,
previewUrl: cheTaskConfig.previewUrl
previewUrl: cheTaskConfig.previewUrl,
_source: 'che'
};
return resultTask;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@
import { inject, injectable } from 'inversify';
import { WidgetManager, ApplicationShell } from '@theia/core/lib/browser';
import { WindowService } from '@theia/core/lib/browser/window/window-service';
import { MiniBrowserProps, MiniBrowser } from '@theia/mini-browser/lib/browser/mini-browser';
import { VariableResolverService } from '@theia/variable-resolver/lib/browser';
import { CheTaskConfiguration } from '../../common/task-protocol';
import { MiniBrowserOpenHandler } from '@theia/mini-browser/lib/browser/mini-browser-open-handler';
import URI from '@theia/core/lib/common/uri';

@injectable()
export class PreviewUrlOpenService {
Expand All @@ -30,6 +31,9 @@ export class PreviewUrlOpenService {
@inject(WindowService)
protected readonly windowService: WindowService;

@inject(MiniBrowserOpenHandler)
protected readonly miniBrowserOpenHandler: MiniBrowserOpenHandler;

/**
* Open the given task's preview URL.
* @param task a Che task to open its preview URL
Expand Down Expand Up @@ -65,14 +69,11 @@ export class PreviewUrlOpenService {
*/
protected async previewInternally(previewURL: string, label: string): Promise<void> {
const url = await this.varResolver.resolve(previewURL);
const widget = await this.widgetManager.getOrCreateWidget(
MiniBrowser.Factory.ID,
<MiniBrowserProps>{
startPage: url,
name: `Preview - ${label}`
await this.miniBrowserOpenHandler.open(new URI(url), {
name: `Preview - ${label}`,
widgetOptions: {
area: 'right'
}
);
this.shell.addWidget(widget, { area: 'right' });
this.shell.activateWidget(widget.id);
});
}
}
Loading