mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-10 10:58:33 +00:00
PROEDITOR-53: Changed the way we set the workspace
Got rid of the `sketch` search parameter from the URL. Rules: - Get the desired workspace location from the - `Path` defined as the `window.location.hash` of the URL, - most recent workspaces, - most recent sketches from the default sketch folder. - Validate the location. - If no valid location was found, create a new sketch in the default sketch folder. Note: when validating the location of the workspace root, the root must always exist. However, when in pro-mode, the desired workspace root must not be a sketch directory with the `.ino` file, but can be any existing location. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -3,11 +3,15 @@ export const SketchesService = Symbol('SketchesService');
|
||||
export interface SketchesService {
|
||||
/**
|
||||
* 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.
|
||||
* The sketches returns with inverse-chronological order, the first item is the most recent one.
|
||||
*/
|
||||
getSketches(uri?: string): Promise<Sketch[]>
|
||||
getSketchFiles(uri: string): Promise<string[]>
|
||||
createNewSketch(parentUri: string): Promise<Sketch>
|
||||
/**
|
||||
* Creates a new sketch folder in the `parentUri` location. If `parentUri` is not specified,
|
||||
* it falls back to the default `sketchDirUri` from the CLI.
|
||||
*/
|
||||
createNewSketch(parentUri?: string): Promise<Sketch>
|
||||
isSketchFolder(uri: string): Promise<boolean>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user