mirror of
https://github.com/processing/processing4.git
synced 2026-02-14 10:55:38 +01:00
stopping server on internalCloseRunner (window closing etc)
This commit is contained in:
@@ -440,9 +440,16 @@ public class JavaScriptEditor extends Editor
|
||||
null);
|
||||
}
|
||||
|
||||
/** JavaScript mode has no runner. This method is empty. */
|
||||
public void internalCloseRunner () { }
|
||||
/**
|
||||
* Called when the window is going to be reused for another sketch.
|
||||
*/
|
||||
public void internalCloseRunner()
|
||||
{
|
||||
handleStopServer();
|
||||
}
|
||||
|
||||
/** JavaScript mode does not run anything. This method is empty. */
|
||||
public void deactivateRun () { }
|
||||
public void deactivateRun ()
|
||||
{
|
||||
// not sure what to do here ..
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package processing.mode.javascript;
|
||||
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowAdapter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -19,11 +22,14 @@ import processing.mode.java.JavaMode;
|
||||
* replacement for the normal runner.
|
||||
*/
|
||||
public class JavaScriptMode extends Mode
|
||||
{
|
||||
{
|
||||
private JavaScriptEditor jsEditor;
|
||||
|
||||
// create a new editor with the mode
|
||||
public Editor createEditor( Base base, String path, int[] location )
|
||||
{
|
||||
return new JavaScriptEditor( base, path, location, this );
|
||||
jsEditor = new JavaScriptEditor( base, path, location, this );
|
||||
return jsEditor;
|
||||
}
|
||||
|
||||
public JavaScriptMode( Base base, File folder )
|
||||
@@ -77,8 +83,6 @@ public class JavaScriptMode extends Mode
|
||||
// public Formatter createFormatter() { }
|
||||
|
||||
// public Editor createEditor(Base ibase, String path, int[] location) { }
|
||||
|
||||
// abstract public void internalCloseRunner();
|
||||
|
||||
// ------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user