8000 [ATL-1599] [ATL-1416] Upgrade Theia to 1.18.0 by fstasi · Pull Request #489 · arduino/arduino-ide · GitHub
[go: up one dir, main page]

Skip to content

[ATL-1599] [ATL-1416] Upgrade Theia to 1.18.0 #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
use theia editor preview
# Conflicts:
#	arduino-ide-extension/package.json
#	browser-app/package.json
#	electron-app/package.json
#	yarn.lock

# Conflicts:
#	yarn.lock
  • Loading branch information
fstasi committed Sep 15, 2021
commit 34c08fce0436a0e9b892b93ab825e92881dea55f
1 change: 1 addition & 0 deletions arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@theia/application-package": "1.17.1",
"@theia/core": "1.17.1",
"@theia/editor": "1.17.1",
"@theia/editor-preview": "1.17.1",
"@theia/filesystem": "1.17.1",
"@theia/git": "1.17.1",
"@theia/keymaps": "1.17.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import { FileNavigatorContribution as TheiaFileNavigatorContribution } from '@th
import { KeymapsFrontendContribution } from './theia/keymaps/keymaps-frontend-contribution';
import { KeymapsFrontendContribution as TheiaKeymapsFrontendContribution } from '@theia/keymaps/lib/browser/keymaps-frontend-contribution';
import { ArduinoToolbarContribution } from './toolbar/arduino-toolbar-contribution';
import { EditorContribution as TheiaEditorContribution } from '@theia/editor/lib/browser/editor-contribution';
import { EditorContribution } from './theia/editor/editor-contribution';
import { EditorPreviewContribution as TheiaEditorPreviewContribution } from '@theia/editor-preview/lib/browser/editor-preview-contribution';
import { EditorPreviewContribution } from './theia/editor/editor-contribution';
import { MonacoStatusBarContribution as TheiaMonacoStatusBarContribution } from '@theia/monaco/lib/browser/monaco-status-bar-contribution';
import { MonacoStatusBarContribution } from './theia/monaco/monaco-status-bar-contribution';
import {
Expand Down Expand Up @@ -438,7 +438,9 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
rebind(TheiaKeymapsFrontendContribution)
.to(KeymapsFrontendContribution)
.inSingletonScope();
rebind(TheiaEditorContribution).to(EditorContribution).inSingletonScope();
rebind(TheiaEditorPreviewContribution)
.to(EditorPreviewContribution)
.inSingletonScope();
rebind(TheiaMonacoStatusBarContribution)
.to(MonacoStatusBarContribution)
.inSingletonScope();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
import { injectable } from 'inversify';
import { EditorContribution as TheiaEditorContribution } from '@theia/editor/lib/browser/editor-contribution';
import { EditorPreviewContribution as TheiaEditorPreviewContribution } from '@theia/editor-preview/lib/browser/editor-preview-contribution';
import { TextEditor } from '@theia/editor/lib/browser';
import { StatusBarAlignment } from '@theia/core/lib/browser';

@injectable()
export class EditorContribution extends TheiaEditorContribution {
export class EditorPreviewContribution extends TheiaEditorPreviewContribution {
protected updateLanguageStatus(editor: TextEditor | undefined): void {}

protected setCursorPositionStatus(editor: TextEditor | undefined): void {
if (!editor) {
this.statusBar.removeElement('editor-status-cursor-position');
return;
}
const { cursor } = editor;
this.statusBar.setElement('editor-status-cursor-position', {
text: `${cursor.line + 1}`,
alignment: StatusBarAlignment.LEFT,
priority: 100,
});
}
// protected setCursorPositionStatus(editor: TextEditor | undefined): void {
// if (!editor) {
// this.statusBar.removeElement('editor-status-cursor-position');
// return;
// }
// const { cursor } = editor;
// this.statusBar.setElement('editor-status-cursor-position', {
// text: `${cursor.line + 1}`,
// alignment: StatusBarAlignment.LEFT,
// priority: 100,
// });
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,10 @@ export class SketchbookTreeModel extends FileTreeModel {
}

public open(uri: URI): void {
open(this.openerService, uri);
open(this.openerService, uri, {
mode: 'reveal',
preview: false,
});
}

protected async doOpenNode(node: TreeNode): Promise<void> {
Expand Down
1 change: 1 addition & 0 deletions browser-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@theia/core": "1.17.1",
"@theia/debug": "1.17.1",
"@theia/editor": "1.17.1",
"@theia/editor-preview": "1.17.1",
"@theia/file-search": "1.17.1",
"@theia/filesystem": "1.17.1",
"@theia/keymaps": "1.17.1",
Expand Down
1 change: 1 addition & 0 deletions electron-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@theia/core": "1.17.1",
"@theia/debug": "1.17.1",
"@theia/editor": "1.17.1",
"@theia/editor-preview": "1.17.1",
"@theia/electron": "1.17.1",
"@theia/file-search": "1.17.1",
"@theia/filesystem": "1.17.1",
Expand Down
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2297,6 +2297,15 @@
unzip-stream "^0.3.0"
vscode-debugprotocol "^1.32.0"

"@theia/editor-preview@1.17.1":
version "1.17.1"
resolved "https://registry.yarnpkg.com/@theia/editor-preview/-/editor-preview-1.17.1.tgz#2c802cc71fe62d1a9d6c16078d888b3b5c8d84ec"
integrity sha512-Stvc0Rxj+Y3MUSryF7G976JUbRxkwKtFnBv0pTw2573pWvxAsyNxhKKbEGnsHJ8NYPtiviwjIeA3lj8zolHdTA==
dependencies:
"@theia/core" "1.17.1"
"@theia/editor" "1.17.1"
"@theia/navigator" "1.17.1"

"@theia/editor@1.17.1":
version "1.17.1"
resolved "https://registry.yarnpkg.com/@theia/editor/-/editor-1.17.1.tgz#cf8a0e971f22c5b05b10f73f109236385126f98e"
Expand Down
0