Make tab width 2 spaces (#445)

This commit is contained in:
Francesco Stasi
2021-07-09 10:14:42 +02:00
committed by GitHub
parent 40a73af82b
commit e10f0f1683
205 changed files with 19676 additions and 20141 deletions

View File

@@ -6,26 +6,26 @@ import { SketchesServiceClientImpl } from '../../../common/protocol/sketches-ser
@injectable()
export class WorkspaceVariableContribution extends TheiaWorkspaceVariableContribution {
@inject(SketchesServiceClientImpl)
protected readonly sketchesServiceClient: SketchesServiceClientImpl;
@inject(SketchesServiceClientImpl)
protected readonly sketchesServiceClient: SketchesServiceClientImpl;
protected currentSketch?: Sketch;
protected currentSketch?: Sketch;
@postConstruct()
protected init(): void {
this.sketchesServiceClient
.currentSketch()
.then()
.then((sketch) => (this.currentSketch = sketch));
}
getResourceUri(): URI | undefined {
const resourceUri = super.getResourceUri();
// https://github.com/arduino/arduino-ide/issues/46
// `currentWidget` can be an editor representing a file outside of the workspace. The current sketch should be a fallback.
if (!resourceUri && this.currentSketch?.uri) {
return new URI(this.currentSketch.uri);
}
return resourceUri;
@postConstruct()
protected init(): void {
this.sketchesServiceClient
.currentSketch()
.then()
.then((sketch) => (this.currentSketch = sketch));
}
getResourceUri(): URI | undefined {
const resourceUri = super.getResourceUri();
// https://github.com/arduino/arduino-ide/issues/46
// `currentWidget` can be an editor representing a file outside of the workspace. The current sketch should be a fallback.
if (!resourceUri && this.currentSketch?.uri) {
return new URI(this.currentSketch.uri);
}
return resourceUri;
}
}