PROEDITOR-48: Open last sketch at start-up

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2019-09-23 15:31:41 +02:00
parent 7244694bd3
commit 55923be7fd
26 changed files with 357 additions and 318 deletions

View File

@@ -3,6 +3,8 @@ export const ConfigService = Symbol('ConfigService');
export interface ConfigService {
getConfiguration(): Promise<Config>;
isInDataDir(uri: string): Promise<boolean>;
isInSketchDir(uri: string): Promise<boolean>;
}
export interface Config {

View File

@@ -1,13 +1,17 @@
import { FileStat } from "@theia/filesystem/lib/common";
export const SketchesServicePath = '/services/sketches-service';
export const SketchesService = Symbol('SketchesService');
export interface SketchesService {
getSketches(fileStat?: FileStat): Promise<Sketch[]>
getSketchFiles(fileStat: FileStat): Promise<string[]>
/**
* Returns with the direct sketch folders from the location of the `fileStat`.
* The sketches returns with inverchronological order, the first item is the most recent one.
*/
getSketches(uri?: string): Promise<Sketch[]>
getSketchFiles(uri: string): Promise<string[]>
createNewSketch(parentUri: string): Promise<Sketch>
isSketchFolder(uri: string): Promise<boolean>
}
export interface Sketch {
name: string;
uri: string
readonly name: string;
readonly uri: string
}