You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Recursively deletes the sketch folder with all its content.
112
-
*/
113
-
deleteSketch(sketch: Sketch): Promise<void>;
114
-
115
110
/**
116
111
* This is the JS/TS re-implementation of [`GenBuildPath`](https://github.com/arduino/arduino-cli/blob/c0d4e4407d80aabad81142693513b3306759cfa6/arduino/sketch/sketch.go#L296-L306) of the CLI.
117
112
* Pass in a sketch and get the build temporary folder filesystem path calculated from the main sketch file location. Can be multiple ones. This method does not check the existence of the sketch.
@@ -66,6 +73,34 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
66
73
privatestartup=false;
67
74
private_firstWindowId: number|undefined;
68
75
privateopenFilePromise=newDeferred();
76
+
/**
77
+
* It contains all things the IDE2 must clean up before a normal stop.
78
+
*
79
+
* When deleting the sketch, the IDE2 must close the browser window and
80
+
* recursively delete the sketch folder from the filesystem. The sketch
81
+
* cannot be deleted when the window is open because that is the currently
82
+
* opened workspace. IDE2 cannot delete the sketch folder from the
83
+
* filesystem after closing the browser window because the window can be
84
+
* the last, and when the last window closes, the application quits.
85
+
* There is no way to clean up the undesired resources.
86
+
*
87
+
* This array contains disposable instances wrapping synchronous sketch
88
+
* delete operations. When IDE2 closes the browser window, it schedules
89
+
* the sketch deletion, and the window closes.
90
+
*
91
+
* When IDE2 schedules a sketch for deletion, it creates a synchronous
92
+
* folder deletion as a disposable instance and pushes it into this
93
+
* array. After the push, IDE2 starts the sketch deletion in an
94
+
* asynchronous way. When the deletion completes, the disposable is
95
+
* removed. If the app quits when the asynchronous deletion is still in
96
+
* progress, it disposes the elements of this array. Since it is
97
+
* synchronous, it is [ensured by Theia](https://github.com/eclipse-theia/theia/blob/678e335644f1b38cb27522cc27a3b8209293cf31/packages/core/src/node/backend-application.ts#L91-L97)
98
+
* that IDE2 won't quit before the cleanup is done. It works only in normal
99
+
* quit.
100
+
*/
101
+
// TODO: Why is it here and not in the Theia backend?
@@ -82,32 +69,6 @@ export class SketchesServiceImpl
82
69
concurrency: 1,
83
70
});
84
71
privateinoContent: Deferred<string>|undefined;
85
-
/**
86
-
* It contains all things the IDE2 must clean up before a normal stop.
87
-
*
88
-
* When deleting the sketch, the IDE2 must close the browser window and
89
-
* recursively delete the sketch folder from the filesystem. The sketch
90
-
* cannot be deleted when the window is open because that is the currently
91
-
* opened workspace. IDE2 cannot delete the sketch folder from the
92
-
* filesystem after closing the browser window because the window can be
93
-
* the last, and when the last window closes, the application quits.
94
-
* There is no way to clean up the undesired resources.
95
-
*
96
-
* This array contains disposable instances wrapping synchronous sketch
97
-
* delete operations. When IDE2 closes the browser window, it schedules
98
-
* the sketch deletion, and the window closes.
99
-
*
100
-
* When IDE2 schedules a sketch for deletion, it creates a synchronous
101
-
* folder deletion as a disposable instance and pushes it into this
102
-
* array. After the push, IDE2 starts the sketch deletion in an
103
-
* asynchronous way. When the deletion completes, the disposable is
104
-
* removed. If the app quits when the asynchronous deletion is still in
105
-
* progress, it disposes the elements of this array. Since it is
106
-
* synchronous, it is [ensured by Theia](https://github.com/eclipse-theia/theia/blob/678e335644f1b38cb27522cc27a3b8209293cf31/packages/core/src/node/backend-application.ts#L91-L97)
107
-
* that IDE2 won't quit before the cleanup is done. It works only in normal
0 commit comments