mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 02:48:33 +00:00
fixed save-as. added sketchload
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -17,7 +17,9 @@ export class EditorManager extends TheiaEditorManager {
|
||||
const { editor } = widget;
|
||||
if (editor instanceof MonacoEditor) {
|
||||
const codeEditor = editor.getControl();
|
||||
codeEditor.updateOptions({ readOnly });
|
||||
const lineNumbersMinChars = 2;
|
||||
const overviewRulerLanes = 0;
|
||||
codeEditor.updateOptions({ readOnly, lineNumbersMinChars, overviewRulerLanes });
|
||||
}
|
||||
}
|
||||
return widget;
|
||||
|
||||
@@ -7,7 +7,6 @@ import { ApplicationServer } from '@theia/core/lib/common/application-protocol';
|
||||
import { FrontendApplication } from '@theia/core/lib/browser/frontend-application';
|
||||
import { FocusTracker, Widget } from '@theia/core/lib/browser';
|
||||
import { WorkspaceService as TheiaWorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
|
||||
import { EditorMode } from '../../editor-mode';
|
||||
import { ConfigService } from '../../../common/protocol/config-service';
|
||||
import { SketchesService } from '../../../common/protocol/sketches-service';
|
||||
import { ArduinoWorkspaceRootResolver } from '../../arduino-workspace-resolver';
|
||||
@@ -24,9 +23,6 @@ export class WorkspaceService extends TheiaWorkspaceService {
|
||||
@inject(LabelProvider)
|
||||
protected readonly labelProvider: LabelProvider;
|
||||
|
||||
@inject(EditorMode)
|
||||
protected readonly editorMode: EditorMode;
|
||||
|
||||
@inject(MessageService)
|
||||
protected readonly messageService: MessageService;
|
||||
|
||||
@@ -82,13 +78,7 @@ export class WorkspaceService extends TheiaWorkspaceService {
|
||||
if (!exists) {
|
||||
return false;
|
||||
}
|
||||
// The workspace root location must exist. However, when opening a workspace root in pro-mode,
|
||||
// the workspace root must not be a sketch folder. It can be the default sketch directory, or any other directories, for instance.
|
||||
if (this.editorMode.proMode) {
|
||||
return true;
|
||||
}
|
||||
const sketchFolder = await this.sketchService.isSketchFolder(uri);
|
||||
return sketchFolder;
|
||||
return this.sketchService.isSketchFolder(uri);
|
||||
}
|
||||
|
||||
protected onCurrentWidgetChange({ newValue }: FocusTracker.IChangedArgs<Widget>): void {
|
||||
|
||||
Reference in New Issue
Block a user