starting coffeescript mode
@@ -248,8 +248,11 @@ public class Base {
|
||||
Mode javaScriptMode =
|
||||
ModeContribution.getCoreMode(this, "processing.mode.javascript.JavaScriptMode",
|
||||
getContentFile("modes/javascript"));
|
||||
Mode coffeeScriptMode =
|
||||
ModeContribution.getCoreMode(this, "processing.mode.coffeescript.CoffeeScriptMode",
|
||||
getContentFile("modes/coffeescript"));
|
||||
|
||||
coreModes = new Mode[] { defaultMode, androidMode, javaScriptMode };
|
||||
coreModes = new Mode[] { defaultMode, androidMode, javaScriptMode, coffeeScriptMode };
|
||||
}
|
||||
|
||||
/** Instantiates and adds new contributed modes to the contribModes list.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
package processing.mode.coffeescript;
|
||||
|
||||
public class CoffeeScriptBuild
|
||||
{
|
||||
public final static String TEMPLATE_FOLDER_NAME = "template_js";
|
||||
public final static String EXPORTED_FOLDER_NAME = "applet_js";
|
||||
public final static String TEMPLATE_FILE_NAME = "template.html";
|
||||
}
|
||||
@@ -0,0 +1,270 @@
|
||||
package processing.mode.coffeescript;
|
||||
|
||||
import processing.mode.coffeescript.CoffeeScriptMode;
|
||||
import processing.mode.coffeescript.CoffeeScriptFormatter;
|
||||
import processing.mode.coffeescript.CoffeeScriptToolbar;
|
||||
import processing.mode.coffeescript.CoffeeScriptBuild;
|
||||
|
||||
import processing.app.Base;
|
||||
import processing.app.EditorState;
|
||||
import processing.app.Editor;
|
||||
import processing.app.Mode;
|
||||
import processing.app.EditorToolbar;
|
||||
import processing.app.Formatter;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
public class CoffeeScriptEditor extends Editor
|
||||
{
|
||||
CoffeeScriptMode csMode;
|
||||
|
||||
protected CoffeeScriptEditor ( Base base, String path, EditorState state, Mode mode )
|
||||
{
|
||||
super( base, path, state, mode );
|
||||
System.out.println("Editor created.");
|
||||
|
||||
csMode = (CoffeeScriptMode) mode;
|
||||
}
|
||||
|
||||
// -------- extending Editor ----------
|
||||
|
||||
public EditorToolbar createToolbar ()
|
||||
{
|
||||
return new CoffeeScriptToolbar( this, base );
|
||||
}
|
||||
|
||||
public Formatter createFormatter ()
|
||||
{
|
||||
return new CoffeeScriptFormatter();
|
||||
}
|
||||
|
||||
public JMenu buildFileMenu ()
|
||||
{
|
||||
JMenuItem exportItem = Base.newJMenuItem("Export", 'E');
|
||||
exportItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleExport( true );
|
||||
}
|
||||
});
|
||||
return buildFileMenu(new JMenuItem[] { exportItem });
|
||||
}
|
||||
|
||||
public JMenu buildSketchMenu ()
|
||||
{
|
||||
JMenuItem startServerItem = Base.newJMenuItem("Start Server", 'R');
|
||||
startServerItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleStartServer();
|
||||
}
|
||||
});
|
||||
|
||||
JMenuItem openInBrowserItem = Base.newJMenuItem("Reopen in Browser", 'B');
|
||||
openInBrowserItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleOpenInBrowser();
|
||||
}
|
||||
});
|
||||
|
||||
JMenuItem stopServerItem = new JMenuItem("Stop Server");
|
||||
stopServerItem.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleStopServer();
|
||||
}
|
||||
});
|
||||
|
||||
JMenuItem copyServerAddressItem = new JMenuItem("Copy Server Address");
|
||||
copyServerAddressItem.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
handleCopyServerAddress();
|
||||
}
|
||||
});
|
||||
// copyServerAddressItem.getInputMap().put(
|
||||
// javax.swing.KeyStroke.getKeyStroke('C', java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.META_MASK ),
|
||||
// new AbstractAction () {
|
||||
// public void actionPerformed ( ActionEvent e ) {
|
||||
// handleCopyServerAddress();
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
|
||||
JMenuItem setServerPortItem = new JMenuItem("Set Server Port");
|
||||
setServerPortItem.addActionListener(new ActionListener(){
|
||||
public void actionPerformed (ActionEvent e) {
|
||||
handleSetServerPort();
|
||||
}
|
||||
});
|
||||
|
||||
return buildSketchMenu(new JMenuItem[] {
|
||||
startServerItem, openInBrowserItem, stopServerItem,
|
||||
copyServerAddressItem, setServerPortItem
|
||||
});
|
||||
}
|
||||
|
||||
public JMenu buildHelpMenu ()
|
||||
{
|
||||
JMenu menu = new JMenu("Help ");
|
||||
JMenuItem item;
|
||||
|
||||
// TODO switch to "http://js.processing.org/"?
|
||||
|
||||
item = new JMenuItem("CoffeeScript Language Overview");
|
||||
item.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
Base.openURL("http://coffeescript.org/");
|
||||
}
|
||||
});
|
||||
menu.add(item);
|
||||
|
||||
// item = new JMenuItem("Reference");
|
||||
// item.addActionListener(new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// //TODO get offline reference archive corresponding to the release
|
||||
// // packaged with this mode see: P.js ticket 1146 "Offline Reference"
|
||||
// Base.openURL("http://processingjs.org/reference");
|
||||
// }
|
||||
// });
|
||||
// menu.add(item);
|
||||
//
|
||||
// item = Base.newJMenuItemShift("Find in Reference", 'F');
|
||||
// item.addActionListener(new ActionListener() {
|
||||
// public void actionPerformed(ActionEvent e) {
|
||||
// handleFindReferenceHACK();
|
||||
// }
|
||||
// });
|
||||
// menu.add(item);
|
||||
|
||||
// OSX has its own about menu
|
||||
if (!Base.isMacOS()) {
|
||||
menu.addSeparator();
|
||||
item = new JMenuItem("About Processing");
|
||||
item.addActionListener( new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
base.handleAbout();
|
||||
}
|
||||
});
|
||||
menu.add(item);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
public String getCommentPrefix ()
|
||||
{
|
||||
return "#";
|
||||
}
|
||||
|
||||
public void internalCloseRunner ()
|
||||
{
|
||||
}
|
||||
|
||||
public void deactivateRun ()
|
||||
{
|
||||
}
|
||||
|
||||
// -------- handlers ----------
|
||||
|
||||
/**
|
||||
* Call the export method of the sketch and handle the gui stuff
|
||||
*/
|
||||
private boolean handleExport ( boolean openFolder )
|
||||
{
|
||||
if ( !handleExportCheckModified() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
toolbar.activate(CoffeeScriptToolbar.EXPORT);
|
||||
try
|
||||
{
|
||||
boolean success = csMode.handleExport(sketch);
|
||||
if ( success && openFolder )
|
||||
{
|
||||
File exportFolder = getExportFolder();
|
||||
Base.openFolder( exportFolder );
|
||||
|
||||
statusNotice("Finished exporting.");
|
||||
} else if ( !success ) {
|
||||
// error message already displayed by handleExport
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
statusError(e);
|
||||
toolbar.deactivate(CoffeeScriptToolbar.EXPORT);
|
||||
return false;
|
||||
}
|
||||
toolbar.deactivate(CoffeeScriptToolbar.EXPORT);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void handleStartServer () {
|
||||
|
||||
}
|
||||
|
||||
private void handleStopServer () {
|
||||
|
||||
}
|
||||
|
||||
private void handleSetServerPort () {
|
||||
|
||||
}
|
||||
|
||||
private void handleCopyServerAddress () {
|
||||
|
||||
}
|
||||
|
||||
private void handleOpenInBrowser () {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Comes from Editor.
|
||||
*/
|
||||
public void handleImportLibrary (String item)
|
||||
{
|
||||
Base.showWarning("CoffeeScript doesn't support libraries",
|
||||
"Libraries are not supported. Import statements are " +
|
||||
"ignored, and code relying on them will break.",
|
||||
null);
|
||||
}
|
||||
|
||||
private boolean handleExportCheckModified ()
|
||||
{
|
||||
if (sketch.isModified()) {
|
||||
Object[] options = { "OK", "Cancel" };
|
||||
int result = JOptionPane.showOptionDialog(this,
|
||||
"Save changes before export?",
|
||||
"Save",
|
||||
JOptionPane.OK_CANCEL_OPTION,
|
||||
JOptionPane.QUESTION_MESSAGE,
|
||||
null,
|
||||
options,
|
||||
options[0]);
|
||||
|
||||
if (result == JOptionPane.OK_OPTION) {
|
||||
handleSaveRequest(true);
|
||||
|
||||
} else {
|
||||
statusNotice("Export canceled, changes must first be saved.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// -------- other stuff ----------
|
||||
|
||||
private File getExportFolder ()
|
||||
{
|
||||
return new File( getSketch().getFolder(),
|
||||
CoffeeScriptBuild.EXPORTED_FOLDER_NAME );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package processing.mode.coffeescript;
|
||||
|
||||
import processing.app.Formatter;
|
||||
|
||||
public class CoffeeScriptFormatter implements Formatter
|
||||
{
|
||||
public String format ( String text )
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package processing.mode.coffeescript;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import processing.mode.javascript.JavaScriptMode;
|
||||
|
||||
import processing.app.Base;
|
||||
import processing.app.Editor;
|
||||
import processing.app.EditorState;
|
||||
|
||||
/**
|
||||
* CoffeeScript mode.
|
||||
* http://coffeescript.org/
|
||||
*/
|
||||
|
||||
public class CoffeeScriptMode extends JavaScriptMode
|
||||
{
|
||||
private CoffeeScriptEditor csEditor;
|
||||
|
||||
public CoffeeScriptMode( Base base, File folder )
|
||||
{
|
||||
super( base, folder );
|
||||
System.out.println("Mode created.");
|
||||
}
|
||||
|
||||
public Editor createEditor( Base base, String path, EditorState state )
|
||||
{
|
||||
if ( path != null && !path.endsWith(".coffee") ) {
|
||||
String cPath = path.replace(".pde", ".coffee");
|
||||
File cFile = new File( cPath );
|
||||
if ( !cFile.exists() ) {
|
||||
try {
|
||||
if ( cFile.createNewFile() ) {
|
||||
path = cPath;
|
||||
} else {
|
||||
System.err.println( "CoffeeScriptMode: " +
|
||||
"unable to create .coffee file for .pde file at:\n" +
|
||||
cPath );
|
||||
}
|
||||
} catch ( java.io.IOException ioe ) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
csEditor = new CoffeeScriptEditor( base, path, state, this );
|
||||
return csEditor;
|
||||
}
|
||||
|
||||
public String getTitle ()
|
||||
{
|
||||
return "CoffeeScript";
|
||||
}
|
||||
|
||||
public File[] getExampleCategoryFolders ()
|
||||
{
|
||||
File[] csExamples = examplesFolder.listFiles(new java.io.FileFilter(){
|
||||
public boolean accept (File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
java.util.Arrays.sort(csExamples);
|
||||
|
||||
return csExamples;
|
||||
}
|
||||
|
||||
public String getDefaultExtension ()
|
||||
{
|
||||
return "coffee";
|
||||
}
|
||||
|
||||
public String[] getExtensions ()
|
||||
{
|
||||
return new String[] { "coffee", "js" };
|
||||
}
|
||||
|
||||
// these come from JavaScript mode
|
||||
//public String[] getIgnorable() { }
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package processing.mode.coffeescript;
|
||||
|
||||
import java.awt.Image;
|
||||
import java.awt.event.MouseEvent;
|
||||
|
||||
import javax.swing.JPopupMenu;
|
||||
|
||||
import processing.app.Base;
|
||||
import processing.app.Editor;
|
||||
import processing.app.EditorToolbar;
|
||||
|
||||
public class CoffeeScriptToolbar extends EditorToolbar
|
||||
{
|
||||
static protected final int RUN = 0;
|
||||
static protected final int STOP = 1;
|
||||
|
||||
static protected final int NEW = 2;
|
||||
static protected final int OPEN = 3;
|
||||
static protected final int SAVE = 4;
|
||||
static protected final int EXPORT = 5;
|
||||
|
||||
static public String getTitle ( int index, boolean shift )
|
||||
{
|
||||
switch (index)
|
||||
{
|
||||
case RUN: return "Start server";
|
||||
case STOP: return "Stop server";
|
||||
case NEW: return !shift ? "New" : "New Editor Window";
|
||||
case OPEN: return !shift ? "Open" : "Open in Another Window";
|
||||
case SAVE: return "Save";
|
||||
case EXPORT: return "Export for Web";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public CoffeeScriptToolbar ( Editor editor, Base base )
|
||||
{
|
||||
super( editor, base );
|
||||
System.out.println("Toolbar created.");
|
||||
}
|
||||
|
||||
public void init ()
|
||||
{
|
||||
Image[][] images = loadImages();
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
addButton( getTitle(i, false), getTitle(i, true), images[i], i == NEW );
|
||||
}
|
||||
}
|
||||
|
||||
public void handlePressed ( MouseEvent e, int index )
|
||||
{
|
||||
boolean shift = e.isShiftDown();
|
||||
CoffeeScriptEditor csEditor = (CoffeeScriptEditor) editor;
|
||||
|
||||
switch (index) {
|
||||
|
||||
case RUN:
|
||||
//jsEditor.handleStartServer();
|
||||
break;
|
||||
|
||||
case STOP:
|
||||
//jsEditor.handleStopServer();
|
||||
break;
|
||||
|
||||
case OPEN:
|
||||
JPopupMenu popup = editor.getMode().getToolbarMenu().getPopupMenu();
|
||||
popup.show(this, e.getX(), e.getY());
|
||||
break;
|
||||
|
||||
case NEW:
|
||||
if (shift) {
|
||||
base.handleNew();
|
||||
} else {
|
||||
base.handleNewReplace();
|
||||
}
|
||||
break;
|
||||
|
||||
case SAVE:
|
||||
//jsEditor.handleSaveRequest(false);
|
||||
break;
|
||||
|
||||
case EXPORT:
|
||||
//jsEditor.handleExport( true );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import java.util.*;
|
||||
*
|
||||
* Changed to accept a document root.
|
||||
*/
|
||||
class JavaScriptServer implements HttpConstants, Runnable
|
||||
class BasicServer implements HttpConstants, Runnable
|
||||
{
|
||||
|
||||
// TODO how to handle too many servers?
|
||||
@@ -30,7 +30,7 @@ class JavaScriptServer implements HttpConstants, Runnable
|
||||
private boolean running = false, inited = false;
|
||||
// private boolean stopping = false;
|
||||
|
||||
JavaScriptServer ( File root )
|
||||
BasicServer ( File root )
|
||||
{
|
||||
if ( virtualRoot == null && root.exists() && root.canRead() )
|
||||
{
|
||||
@@ -532,6 +532,7 @@ outerloop:
|
||||
setSuffix(".cht", "audio/x-dspeeh");
|
||||
setSuffix(".class", "application/octet-stream");
|
||||
setSuffix(".cod", "image/cis-cod");
|
||||
setSuffix(".coffee", "text/coffeescript");
|
||||
setSuffix(".com", "application/octet-stream");
|
||||
setSuffix(".cpio", "application/x-cpio");
|
||||
setSuffix(".cpt", "application/mac-compactpro");
|
||||
@@ -1,5 +1,7 @@
|
||||
package processing.mode.javascript;
|
||||
|
||||
import processing.mode.javascript.ServingEditor;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.File;
|
||||
@@ -7,7 +9,6 @@ import java.io.IOException;
|
||||
|
||||
import javax.swing.JMenu;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import processing.app.Base;
|
||||
import processing.app.EditorState;
|
||||
@@ -21,14 +22,12 @@ import processing.mode.java.AutoFormat;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class JavaScriptEditor extends Editor
|
||||
public class JavaScriptEditor extends ServingEditor
|
||||
{
|
||||
final static String PROP_KEY_MODE = "mode";
|
||||
final static String PROP_VAL_MODE = "JavaScript";
|
||||
final static String PROP_KEY_SERVER_PORT = "js.server.port";
|
||||
|
||||
private JavaScriptMode jsMode;
|
||||
private JavaScriptServer jsServer;
|
||||
|
||||
private DirectivesEditor directivesEditor;
|
||||
|
||||
@@ -53,7 +52,7 @@ public class JavaScriptEditor extends Editor
|
||||
|
||||
public Formatter createFormatter ()
|
||||
{
|
||||
return new AutoFormat();
|
||||
return new AutoFormat();
|
||||
}
|
||||
|
||||
|
||||
@@ -250,15 +249,29 @@ public class JavaScriptEditor extends Editor
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
||||
// - - - - - - - - - - - - - - - - - -
|
||||
|
||||
|
||||
public String getCommentPrefix ()
|
||||
{
|
||||
return "//";
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the window is going to be reused for another sketch.
|
||||
*/
|
||||
public void internalCloseRunner ()
|
||||
{
|
||||
handleStopServer();
|
||||
if ( directivesEditor != null )
|
||||
{
|
||||
directivesEditor.hide();
|
||||
directivesEditor = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void deactivateRun ()
|
||||
{
|
||||
// not sure what to do here ..
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - -
|
||||
|
||||
@@ -266,80 +279,18 @@ public class JavaScriptEditor extends Editor
|
||||
{
|
||||
statusEmpty();
|
||||
|
||||
String pString = null;
|
||||
String msg = "Set the server port (1024 < port < 65535)";
|
||||
int currentPort = -1;
|
||||
|
||||
if ( jsServer != null ) currentPort = jsServer.getPort();
|
||||
|
||||
if ( currentPort > 0 )
|
||||
pString = JOptionPane.showInputDialog( msg, (currentPort+"") );
|
||||
else
|
||||
pString = JOptionPane.showInputDialog( msg );
|
||||
|
||||
if ( pString == null ) return;
|
||||
|
||||
int port = -1;
|
||||
try {
|
||||
port = Integer.parseInt(pString);
|
||||
} catch ( Exception e ) {
|
||||
// sending foobar? you lil' hacker you ...
|
||||
statusError("That number was not okay ..");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( port < 0 || port > 65535 )
|
||||
{
|
||||
statusError("That port number is out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
createJavaScriptServer();
|
||||
if ( jsServer != null )
|
||||
{
|
||||
jsServer.setPort(port);
|
||||
boolean wasRunning = serverRunning();
|
||||
if ( wasRunning ) {
|
||||
statusNotice("Server was running, changing the port requires a restart.");
|
||||
stopServer();
|
||||
}
|
||||
|
||||
setServerPort();
|
||||
saveSketchSettings();
|
||||
}
|
||||
|
||||
private void saveSketchSettings ()
|
||||
{
|
||||
statusEmpty();
|
||||
|
||||
File sketchProps = getSketchPropertiesFile();
|
||||
if ( !sketchProps.exists() )
|
||||
{
|
||||
try {
|
||||
sketchProps.createNewFile();
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
statusError( "Unable to create sketch properties file!" );
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Settings settings;
|
||||
try {
|
||||
settings = new Settings(sketchProps);
|
||||
} catch ( IOException ioe ) {
|
||||
ioe.printStackTrace();
|
||||
return;
|
||||
if ( wasRunning ) {
|
||||
startServer( getExportFolder() );
|
||||
}
|
||||
if ( settings == null )
|
||||
{
|
||||
statusError( "Unable to create sketch properties file!" );
|
||||
return;
|
||||
}
|
||||
settings.set( PROP_KEY_MODE, PROP_VAL_MODE );
|
||||
|
||||
if ( jsServer != null )
|
||||
{
|
||||
int port = jsServer.getPort();
|
||||
if ( port > 0 ) settings.set( PROP_KEY_SERVER_PORT, (port+"") );
|
||||
}
|
||||
|
||||
settings.save();
|
||||
}
|
||||
|
||||
private void handleCreateCustomTemplate ()
|
||||
@@ -384,10 +335,12 @@ public class JavaScriptEditor extends Editor
|
||||
|
||||
private void handleCopyServerAddress ()
|
||||
{
|
||||
if ( jsServer != null && jsServer.isRunning() )
|
||||
String address = getServerAddress();
|
||||
|
||||
if ( address != null )
|
||||
{
|
||||
java.awt.datatransfer.StringSelection stringSelection =
|
||||
new java.awt.datatransfer.StringSelection( jsServer.getAddress() );
|
||||
new java.awt.datatransfer.StringSelection( address );
|
||||
java.awt.datatransfer.Clipboard clipboard =
|
||||
java.awt.Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
clipboard.setContents( stringSelection, null );
|
||||
@@ -422,128 +375,45 @@ public class JavaScriptEditor extends Editor
|
||||
}
|
||||
}
|
||||
|
||||
public void handleStartStopServer ()
|
||||
{
|
||||
if ( jsServer != null && jsServer.isRunning())
|
||||
{
|
||||
handleStopServer();
|
||||
}
|
||||
else
|
||||
private void handleStartStopServer ()
|
||||
{
|
||||
handleStartServer();
|
||||
startStopServer( getExportFolder() );
|
||||
}
|
||||
}
|
||||
|
||||
private File getExportFolder ()
|
||||
{
|
||||
return new File( getSketch().getFolder(),
|
||||
JavaScriptBuild.EXPORTED_FOLDER_NAME );
|
||||
}
|
||||
|
||||
private File getSketchPropertiesFile ()
|
||||
{
|
||||
return new File( getSketch().getFolder(), "sketch.properties");
|
||||
}
|
||||
|
||||
private File getCustomTemplateFolder ()
|
||||
{
|
||||
return new File( getSketch().getFolder(),
|
||||
JavaScriptBuild.TEMPLATE_FOLDER_NAME );
|
||||
}
|
||||
|
||||
/**
|
||||
* Replacement for RUN:
|
||||
* export to folder, start server, open in default browser.
|
||||
*/
|
||||
public void handleStartServer ()
|
||||
{
|
||||
statusEmpty();
|
||||
|
||||
if ( !handleExport( false ) ) return;
|
||||
|
||||
File serverRoot = getExportFolder();
|
||||
// if server hung or something else went wrong .. stop it.
|
||||
if ( jsServer != null &&
|
||||
(!jsServer.isRunning() || !jsServer.getRoot().equals(serverRoot)) )
|
||||
{
|
||||
jsServer.shutDown();
|
||||
jsServer = null;
|
||||
/**
|
||||
* Replacement for RUN:
|
||||
* export to folder, start server, open in default browser.
|
||||
*/
|
||||
private void handleStartServer ()
|
||||
{
|
||||
statusEmpty();
|
||||
|
||||
if ( !handleExport( false ) ) return;
|
||||
|
||||
startServer( getExportFolder() );
|
||||
|
||||
toolbar.activate(JavaScriptToolbar.RUN);
|
||||
}
|
||||
|
||||
if ( jsServer == null )
|
||||
{
|
||||
jsServer = createJavaScriptServer();
|
||||
jsServer.start();
|
||||
|
||||
// a little delay to give the server time to kick in ..
|
||||
long ts = System.currentTimeMillis();
|
||||
while ( System.currentTimeMillis() - ts < 200 ) {}
|
||||
|
||||
while ( !jsServer.isRunning() ) {}
|
||||
|
||||
String location = jsServer.getAddress();
|
||||
|
||||
statusNotice( "Server started: " + location );
|
||||
|
||||
Base.openURL( location );
|
||||
}
|
||||
else if ( jsServer.isRunning() )
|
||||
{
|
||||
statusNotice( "Server running (" +
|
||||
jsServer.getAddress() +
|
||||
"), reload your browser window." );
|
||||
}
|
||||
toolbar.activate(JavaScriptToolbar.RUN);
|
||||
}
|
||||
|
||||
private void handleOpenInBrowser ()
|
||||
{
|
||||
if ( jsServer != null && jsServer.isRunning() )
|
||||
{
|
||||
Base.openURL( jsServer.getAddress() );
|
||||
}
|
||||
openBrowserForServer();
|
||||
}
|
||||
|
||||
private JavaScriptServer createJavaScriptServer ()
|
||||
{
|
||||
if ( jsServer != null ) return jsServer;
|
||||
|
||||
jsServer = new JavaScriptServer( getExportFolder() );
|
||||
|
||||
File sketchProps = getSketchPropertiesFile();
|
||||
if ( sketchProps.exists() ) {
|
||||
try {
|
||||
Settings props = new Settings(sketchProps);
|
||||
String portString = props.get( PROP_KEY_SERVER_PORT );
|
||||
if ( portString != null && !portString.trim().equals("") )
|
||||
{
|
||||
int port = Integer.parseInt(portString);
|
||||
jsServer.setPort(port);
|
||||
}
|
||||
} catch ( IOException ioe ) {
|
||||
statusError(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
return jsServer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replacement for STOP: stop server.
|
||||
*/
|
||||
public void handleStopServer ()
|
||||
private void handleStopServer ()
|
||||
{
|
||||
if ( jsServer != null && jsServer.isRunning() )
|
||||
jsServer.shutDown();
|
||||
stopServer();
|
||||
|
||||
statusNotice("Server stopped.");
|
||||
toolbar.deactivate(JavaScriptToolbar.RUN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call the export method of the sketch and handle the gui stuff
|
||||
*/
|
||||
public boolean handleExport ( boolean openFolder )
|
||||
private boolean handleExport ( boolean openFolder )
|
||||
{
|
||||
if ( !handleExportCheckModified() )
|
||||
{
|
||||
@@ -557,9 +427,9 @@ public class JavaScriptEditor extends Editor
|
||||
boolean success = jsMode.handleExport(sketch);
|
||||
if ( success && openFolder )
|
||||
{
|
||||
File appletJSFolder = new File( sketch.getFolder(),
|
||||
File exportFolder = new File( sketch.getFolder(),
|
||||
JavaScriptBuild.EXPORTED_FOLDER_NAME );
|
||||
Base.openFolder(appletJSFolder);
|
||||
Base.openFolder( exportFolder );
|
||||
|
||||
statusNotice("Finished exporting.");
|
||||
} else if ( !success ) {
|
||||
@@ -588,25 +458,21 @@ public class JavaScriptEditor extends Editor
|
||||
|
||||
} else if (immediately) {
|
||||
handleSave();
|
||||
if ( jsServer != null && jsServer.isRunning() )
|
||||
handleStartServer();
|
||||
else
|
||||
statusEmpty();
|
||||
statusEmpty();
|
||||
startServer( getExportFolder() );
|
||||
} else {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
handleSave();
|
||||
if ( jsServer != null && jsServer.isRunning() )
|
||||
handleStartServer();
|
||||
else
|
||||
statusEmpty();
|
||||
statusEmpty();
|
||||
startServer( getExportFolder() );
|
||||
}
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean handleExportCheckModified ()
|
||||
private boolean handleExportCheckModified ()
|
||||
{
|
||||
if (sketch.isModified()) {
|
||||
Object[] options = { "OK", "Cancel" };
|
||||
@@ -623,11 +489,7 @@ public class JavaScriptEditor extends Editor
|
||||
handleSaveRequest(true);
|
||||
|
||||
} else {
|
||||
// why it's not CANCEL_OPTION is beyond me (at least on the mac)
|
||||
// but f-- it.. let's get this shite done..
|
||||
//} else if (result == JOptionPane.CANCEL_OPTION) {
|
||||
statusNotice("Export canceled, changes must first be saved.");
|
||||
//toolbar.clear();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -660,21 +522,43 @@ public class JavaScriptEditor extends Editor
|
||||
null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the window is going to be reused for another sketch.
|
||||
*/
|
||||
public void internalCloseRunner()
|
||||
// ------- utilities ---------
|
||||
|
||||
private File getExportFolder ()
|
||||
{
|
||||
handleStopServer();
|
||||
if ( directivesEditor != null )
|
||||
{
|
||||
directivesEditor.hide();
|
||||
directivesEditor = null;
|
||||
}
|
||||
return new File( getSketch().getFolder(),
|
||||
JavaScriptBuild.EXPORTED_FOLDER_NAME );
|
||||
}
|
||||
|
||||
public void deactivateRun ()
|
||||
private File getCustomTemplateFolder ()
|
||||
{
|
||||
// not sure what to do here ..
|
||||
}
|
||||
return new File( getSketch().getFolder(),
|
||||
JavaScriptBuild.TEMPLATE_FOLDER_NAME );
|
||||
}
|
||||
|
||||
private void saveSketchSettings ()
|
||||
{
|
||||
statusEmpty();
|
||||
|
||||
File sketchProps = getSketchPropertiesFile();
|
||||
Settings settings;
|
||||
|
||||
try {
|
||||
settings = new Settings(sketchProps);
|
||||
} catch ( IOException ioe ) {
|
||||
ioe.printStackTrace();
|
||||
return;
|
||||
}
|
||||
if ( settings == null )
|
||||
{
|
||||
statusError( "Unable to create sketch properties file!" );
|
||||
return;
|
||||
}
|
||||
settings.set( PROP_KEY_MODE, PROP_VAL_MODE );
|
||||
|
||||
int port = getServerPort();
|
||||
if ( port > 0 ) settings.set( PROP_KEY_SERVER_PORT, (port+"") );
|
||||
|
||||
settings.save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public class JavaScriptMode extends Mode
|
||||
}
|
||||
}
|
||||
if ( jMode == null )
|
||||
return new File[0];
|
||||
return inclExamples; // js examples only
|
||||
|
||||
File jExamples = jMode.getContentFile("examples");
|
||||
File[] jModeExamples = new File[] {
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
package processing.mode.javascript;
|
||||
|
||||
import processing.mode.javascript.BasicServer;
|
||||
import processing.app.Base;
|
||||
import processing.app.Mode;
|
||||
import processing.app.Editor;
|
||||
import processing.app.EditorState;
|
||||
import processing.app.Settings;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
public abstract class ServingEditor extends Editor
|
||||
{
|
||||
public final static String PROP_KEY_SERVER_PORT = "basicserver.port";
|
||||
|
||||
BasicServer server;
|
||||
|
||||
protected ServingEditor ( Base base, String path, EditorState state, Mode mode )
|
||||
{
|
||||
super( base, path, state, mode );
|
||||
}
|
||||
|
||||
protected void setServerPort ()
|
||||
{
|
||||
String pString = null;
|
||||
String msg = "Set the server port (1024 < port < 65535)";
|
||||
int currentPort = -1;
|
||||
|
||||
if ( server != null ) currentPort = server.getPort();
|
||||
|
||||
if ( currentPort > 0 )
|
||||
pString = JOptionPane.showInputDialog( msg, (currentPort+"") );
|
||||
else
|
||||
pString = JOptionPane.showInputDialog( msg );
|
||||
|
||||
if ( pString == null ) return;
|
||||
|
||||
int port = -1;
|
||||
try {
|
||||
port = Integer.parseInt(pString);
|
||||
} catch ( Exception e ) {
|
||||
// sending foobar? you lil' hacker you ...
|
||||
statusError("That number was not okay ..");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( port < 0 || port > 65535 )
|
||||
{
|
||||
statusError("That port number is out of range");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( server != null )
|
||||
{
|
||||
server.setPort(port);
|
||||
}
|
||||
|
||||
File sketchProps = getSketchPropertiesFile();
|
||||
if ( sketchProps.exists() ) {
|
||||
try {
|
||||
Settings settings = new Settings(sketchProps);
|
||||
settings.set( PROP_KEY_SERVER_PORT, (port + "") );
|
||||
settings.save();
|
||||
} catch ( IOException ioe ) {
|
||||
statusError(ioe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected int getServerPort ()
|
||||
{
|
||||
if ( server != null ) return server.getPort();
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected String getServerAddress ()
|
||||
{
|
||||
if ( server != null && server.isRunning() ) return server.getAddress();
|
||||
return null;
|
||||
}
|
||||
|
||||
protected void startStopServer ( File root )
|
||||
{
|
||||
if ( server != null && server.isRunning() )
|
||||
{
|
||||
stopServer();
|
||||
}
|
||||
else
|
||||
{
|
||||
startServer( root );
|
||||
}
|
||||
}
|
||||
|
||||
protected BasicServer createServer ( File root )
|
||||
{
|
||||
if ( server != null ) return server;
|
||||
|
||||
server = new BasicServer( root );
|
||||
|
||||
File sketchProps = getSketchPropertiesFile();
|
||||
if ( sketchProps.exists() ) {
|
||||
try {
|
||||
Settings props = new Settings(sketchProps);
|
||||
String portString = props.get( PROP_KEY_SERVER_PORT );
|
||||
if ( portString != null && !portString.trim().equals("") )
|
||||
{
|
||||
int port = Integer.parseInt(portString);
|
||||
server.setPort(port);
|
||||
}
|
||||
} catch ( IOException ioe ) {
|
||||
statusError(ioe);
|
||||
}
|
||||
}
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
protected void startServer ( File root )
|
||||
{
|
||||
if ( server != null &&
|
||||
(!server.isRunning() || !server.getRoot().equals(root)) )
|
||||
{
|
||||
// if server hung or something else went wrong .. stop it.
|
||||
server.shutDown();
|
||||
server = null;
|
||||
}
|
||||
|
||||
if ( server == null )
|
||||
{
|
||||
server = createServer(root);
|
||||
server.start();
|
||||
|
||||
// a little delay to give the server time to kick in ..
|
||||
long ts = System.currentTimeMillis();
|
||||
while ( System.currentTimeMillis() - ts < 200 ) {}
|
||||
|
||||
while ( !server.isRunning() ) {}
|
||||
|
||||
String location = server.getAddress();
|
||||
|
||||
statusNotice( "Server started: " + location );
|
||||
|
||||
openBrowserForServer();
|
||||
}
|
||||
else if ( server.isRunning() )
|
||||
{
|
||||
statusNotice( "Server running (" +
|
||||
server.getAddress() +
|
||||
"), reload your browser window." );
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean serverRunning ()
|
||||
{
|
||||
return server != null && server.isRunning();
|
||||
}
|
||||
|
||||
protected void stopServer ()
|
||||
{
|
||||
if ( server != null && server.isRunning() )
|
||||
server.shutDown();
|
||||
|
||||
statusNotice("Server stopped.");
|
||||
}
|
||||
|
||||
protected File getSketchPropertiesFile ()
|
||||
{
|
||||
File sketchPropsFile = new File( getSketch().getFolder(), "sketch.properties");
|
||||
if ( !sketchPropsFile.exists() )
|
||||
{
|
||||
try {
|
||||
sketchPropsFile.createNewFile();
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
statusError( "Unable to create sketch properties file!" );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return sketchPropsFile;
|
||||
}
|
||||
|
||||
protected void openBrowserForServer ()
|
||||
{
|
||||
if ( server != null && server.isRunning() )
|
||||
{
|
||||
Base.openURL( server.getAddress() );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,6 +167,12 @@
|
||||
<exclude name="**/._*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${target.path}/modes/coffeescript">
|
||||
<fileset dir="../coffeescript">
|
||||
<exclude name="**/._*" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${target.path}/modes/android">
|
||||
<fileset dir="../android">
|
||||
|
||||
@@ -0,0 +1,642 @@
|
||||
# LITERAL2 specifies constants
|
||||
|
||||
ADD LITERAL2
|
||||
ALIGN_CENTER LITERAL2
|
||||
ALIGN_LEFT LITERAL2
|
||||
ALIGN_RIGHT LITERAL2
|
||||
ALPHA LITERAL2
|
||||
ALPHA_MASK LITERAL2
|
||||
ALT LITERAL2
|
||||
AMBIENT LITERAL2
|
||||
ARROW LITERAL2
|
||||
ARGB LITERAL2
|
||||
BACKSPACE LITERAL2
|
||||
BASELINE LITERAL2
|
||||
BEVEL LITERAL2
|
||||
BLEND LITERAL2
|
||||
BLUE_MASK LITERAL2
|
||||
BLUR LITERAL2
|
||||
BOTTOM LITERAL2
|
||||
BURN LITERAL2
|
||||
CENTER LITERAL2
|
||||
CHATTER LITERAL2
|
||||
CODED LITERAL2
|
||||
COMPLAINT LITERAL2
|
||||
COMPOSITE LITERAL2
|
||||
COMPONENT LITERAL2
|
||||
CONCAVE_POLYGON LITERAL2
|
||||
CONTROL LITERAL2
|
||||
CONVEX_POLYGON LITERAL2
|
||||
CORNER LITERAL2
|
||||
CORNERS LITERAL2
|
||||
CLOSE LITERAL2
|
||||
CMYK LITERAL2
|
||||
CODED LITERAL2
|
||||
COMPLAINT LITERAL2
|
||||
CONTROL LITERAL2
|
||||
CORNER LITERAL2
|
||||
CORNERS LITERAL2
|
||||
CROSS LITERAL2
|
||||
CUSTOM LITERAL2
|
||||
DARKEST LITERAL2
|
||||
DEGREES LITERAL2
|
||||
DEG_TO_RAD LITERAL2
|
||||
DELETE LITERAL2
|
||||
DIAMETER LITERAL2
|
||||
DIFFERENCE LITERAL2
|
||||
DIFFUSE LITERAL2
|
||||
DILATE LITERAL2
|
||||
DIRECTIONAL LITERAL2
|
||||
DISABLE_ACCURATE_TEXTURES LITERAL2
|
||||
DISABLE_DEPTH_SORT LITERAL2
|
||||
DISABLE_DEPTH_TEST LITERAL2
|
||||
DISABLE_NATIVE_FONTS LITERAL2
|
||||
DISABLE_OPENGL_ERROR_REPORT LITERAL2
|
||||
DISABLE_OPENGL_2X_SMOOTH LITERAL2
|
||||
DISABLE_OPENGL_4X_SMOOTH LITERAL2
|
||||
DISABLE_TEXT_SMOOTH LITERAL2
|
||||
DISABLED LITERAL2
|
||||
DODGE LITERAL2
|
||||
DOWN LITERAL2
|
||||
DXF LITERAL2
|
||||
ENABLE_ACCURATE_TEXTURES LITERAL2
|
||||
ENABLE_DEPTH_SORT LITERAL2
|
||||
ENABLE_DEPTH_TEST LITERAL2
|
||||
ENABLE_NATIVE_FONTS LITERAL2
|
||||
ENABLE_OPENGL_2X_SMOOTH LITERAL2
|
||||
ENABLE_OPENGL_4X_SMOOTH LITERAL2
|
||||
ENABLE_OPENGL_ERROR_REPORT LITERAL2
|
||||
ENTER LITERAL2
|
||||
EPSILON LITERAL2
|
||||
ERODE LITERAL2
|
||||
ESC LITERAL2
|
||||
EXCLUSION LITERAL2
|
||||
GIF LITERAL2
|
||||
GRAY LITERAL2
|
||||
GREEN_MASK LITERAL2
|
||||
GROUP LITERAL2
|
||||
HALF LITERAL2
|
||||
HALF_PI LITERAL2
|
||||
HAND LITERAL2
|
||||
HARD_LIGHT LITERAL2
|
||||
HINT_COUNT LITERAL2
|
||||
HSB LITERAL2
|
||||
IMAGE LITERAL2
|
||||
INVERT LITERAL2
|
||||
JAVA2D LITERAL2
|
||||
JPEG LITERAL2
|
||||
LEFT LITERAL2
|
||||
LIGHTEST LITERAL2
|
||||
LINES LITERAL2
|
||||
LINUX LITERAL2
|
||||
MACOSX LITERAL2
|
||||
MAX_FLOAT LITERAL2
|
||||
MAX_INT LITERAL2
|
||||
MITER LITERAL2
|
||||
MODEL LITERAL2
|
||||
MOVE LITERAL2
|
||||
MULTIPLY LITERAL2
|
||||
NORMAL LITERAL2
|
||||
NO_DEPTH_TEST LITERAL2
|
||||
NTSC LITERAL2
|
||||
ONE LITERAL2
|
||||
OPAQUE LITERAL2
|
||||
OPEN LITERAL2
|
||||
OPENGL LITERAL2
|
||||
ORTHOGRAPHIC LITERAL2
|
||||
OVERLAY LITERAL2
|
||||
PAL LITERAL2
|
||||
P2D LITERAL2
|
||||
P3D LITERAL2
|
||||
PERSPECTIVE LITERAL2
|
||||
PI LITERAL2
|
||||
PIXEL_CENTER LITERAL2
|
||||
POINT LITERAL2
|
||||
POINTS LITERAL2
|
||||
POSTERIZE LITERAL2
|
||||
PROBLEM LITERAL2
|
||||
PROJECT LITERAL2
|
||||
QUAD_STRIP LITERAL2
|
||||
QUADS LITERAL2
|
||||
QUARTER_PI LITERAL2
|
||||
RAD_TO_DEG LITERAL2
|
||||
RADIUS LITERAL2
|
||||
RADIANS LITERAL2
|
||||
RED_MASK LITERAL2
|
||||
REPLACE LITERAL2
|
||||
RETURN LITERAL2
|
||||
RGB LITERAL2
|
||||
RIGHT LITERAL2
|
||||
ROUND LITERAL2
|
||||
SCREEN LITERAL2
|
||||
SECAM LITERAL2
|
||||
SHIFT LITERAL2
|
||||
SPECULAR LITERAL2
|
||||
SOFT_LIGHT LITERAL2
|
||||
SQUARE LITERAL2
|
||||
SUBTRACT LITERAL2
|
||||
SVIDEO LITERAL2
|
||||
TAB LITERAL2
|
||||
TARGA LITERAL2
|
||||
TEXT LITERAL2
|
||||
TFF LITERAL2
|
||||
THIRD_PI LITERAL2
|
||||
THRESHOLD LITERAL2
|
||||
TIFF LITERAL2
|
||||
TOP LITERAL2
|
||||
TRIANGLE_FAN LITERAL2
|
||||
TRIANGLES LITERAL2
|
||||
TRIANGLE_STRIP LITERAL2
|
||||
TUNER LITERAL2
|
||||
TWO LITERAL2
|
||||
TWO_PI LITERAL2
|
||||
UP LITERAL2
|
||||
WAIT LITERAL2
|
||||
WHITESPACE LITERAL2
|
||||
|
||||
|
||||
# KEYWORD1 specifies datatypes and keywords
|
||||
|
||||
ArrayList KEYWORD1
|
||||
Boolean KEYWORD1
|
||||
Byte KEYWORD1
|
||||
Character KEYWORD1
|
||||
Class KEYWORD1
|
||||
Double KEYWORD1
|
||||
Float KEYWORD1
|
||||
Integer KEYWORD1
|
||||
HashMap KEYWORD1
|
||||
String KEYWORD1
|
||||
StringBuffer KEYWORD1
|
||||
Thread KEYWORD1
|
||||
abstract KEYWORD1
|
||||
assert KEYWORD1
|
||||
boolean KEYWORD1
|
||||
break KEYWORD1
|
||||
byte KEYWORD1
|
||||
catch KEYWORD1
|
||||
char KEYWORD1
|
||||
class KEYWORD1
|
||||
continue KEYWORD1
|
||||
default KEYWORD1
|
||||
do KEYWORD1
|
||||
double KEYWORD1
|
||||
else KEYWORD1
|
||||
enum KEYWORD1
|
||||
extends KEYWORD1
|
||||
false KEYWORD1
|
||||
final KEYWORD1
|
||||
finally KEYWORD1
|
||||
for KEYWORD1
|
||||
float KEYWORD1
|
||||
if KEYWORD1
|
||||
implements KEYWORD1
|
||||
import KEYWORD1
|
||||
instanceof KEYWORD1
|
||||
int KEYWORD1
|
||||
interface KEYWORD1
|
||||
long KEYWORD1
|
||||
native KEYWORD1
|
||||
new KEYWORD1
|
||||
null KEYWORD1
|
||||
package KEYWORD1
|
||||
private KEYWORD1
|
||||
protected KEYWORD1
|
||||
public KEYWORD1
|
||||
return KEYWORD1
|
||||
short KEYWORD1
|
||||
static KEYWORD1
|
||||
strictfp KEYWORD1
|
||||
super KEYWORD1
|
||||
switch KEYWORD1
|
||||
synchronized KEYWORD1
|
||||
this KEYWORD1
|
||||
throw KEYWORD1
|
||||
throws KEYWORD1
|
||||
transient KEYWORD1
|
||||
true KEYWORD1
|
||||
try KEYWORD1
|
||||
void KEYWORD1
|
||||
volatile KEYWORD1
|
||||
while KEYWORD1
|
||||
|
||||
# Depricated API
|
||||
|
||||
arraycopy KEYWORD2 arraycopy_
|
||||
openStream KEYWORD2 openStream_
|
||||
|
||||
|
||||
# KEYWORD2 specifies methods and functions
|
||||
|
||||
cache KEYWORD2
|
||||
|
||||
|
||||
# THE TEXT ABOVE IS HAND-WRITTEN AND FOUND IN THE FILE "keywords_base.txt"
|
||||
# THE TEXT BELOW IS AUTO-GENERATED
|
||||
|
||||
|
||||
abs KEYWORD2 abs_
|
||||
acos KEYWORD2 acos_
|
||||
+= addassign
|
||||
+ addition
|
||||
alpha KEYWORD2 alpha_
|
||||
ambient KEYWORD2 ambient_
|
||||
ambientLight KEYWORD2 ambientLight_
|
||||
append KEYWORD2 append_
|
||||
applyMatrix KEYWORD2 applyMatrix_
|
||||
arc KEYWORD2 arc_
|
||||
Array KEYWORD1 Array
|
||||
[] arrayaccess
|
||||
arrayCopy KEYWORD2 arrayCopy_
|
||||
ArrayList KEYWORD1 ArrayList
|
||||
asin KEYWORD2 asin_
|
||||
= assign
|
||||
atan KEYWORD2 atan_
|
||||
atan2 KEYWORD2 atan2_
|
||||
background KEYWORD2 background_
|
||||
beginCamera KEYWORD2 beginCamera_
|
||||
beginRaw KEYWORD2 beginRaw_
|
||||
beginRecord KEYWORD2 beginRecord_
|
||||
beginShape KEYWORD2 beginShape_
|
||||
bezier KEYWORD2 bezier_
|
||||
bezierDetail KEYWORD2 bezierDetail_
|
||||
bezierPoint KEYWORD2 bezierPoint_
|
||||
bezierTangent KEYWORD2 bezierTangent_
|
||||
bezierVertex KEYWORD2 bezierVertex_
|
||||
binary KEYWORD2 binary_
|
||||
binary KEYWORD2 bitwiseAND_
|
||||
| bitwiseOR
|
||||
blend KEYWORD2 blend_
|
||||
blendColor KEYWORD2 blendColor_
|
||||
blue KEYWORD2 blue_
|
||||
boolean KEYWORD1 boolean
|
||||
boolean KEYWORD2 boolean_
|
||||
box KEYWORD2 box_
|
||||
break KEYWORD1 break
|
||||
brightness KEYWORD2 brightness_
|
||||
BufferedReader KEYWORD2 BufferedReader_
|
||||
readLine KEYWORD2 BufferedReader_readLine_
|
||||
byte KEYWORD1 byte
|
||||
byte KEYWORD2 byte_
|
||||
camera KEYWORD2 camera_
|
||||
case KEYWORD1 case
|
||||
catch KEYWORD1 catch
|
||||
ceil KEYWORD2 ceil_
|
||||
char KEYWORD1 char
|
||||
char KEYWORD2 char_
|
||||
char KEYWORD2 class_
|
||||
color KEYWORD2 color_
|
||||
color KEYWORD1 color_datatype
|
||||
colorMode KEYWORD2 colorMode_
|
||||
, comma
|
||||
// comment
|
||||
concat KEYWORD2 concat_
|
||||
?: KEYWORD1 conditional_
|
||||
constrain KEYWORD2 constrain_
|
||||
continue KEYWORD1 continue
|
||||
copy KEYWORD2 copy_
|
||||
cos KEYWORD2 cos_
|
||||
createFont KEYWORD2 createFont_
|
||||
createGraphics KEYWORD2 createGraphics_
|
||||
createImage KEYWORD2 createImage_
|
||||
createInput KEYWORD2 createInput_
|
||||
createOutput KEYWORD2 createOutput_
|
||||
createReader KEYWORD2 createReader_
|
||||
createWriter KEYWORD2 createWriter_
|
||||
{} curlybraces
|
||||
cursor KEYWORD2 cursor_
|
||||
curve KEYWORD2 curve_
|
||||
curveDetail KEYWORD2 curveDetail_
|
||||
curvePoint KEYWORD2 curvePoint_
|
||||
curveTangent KEYWORD2 curveTangent_
|
||||
curveTightness KEYWORD2 curveTightness_
|
||||
curveVertex KEYWORD2 curveVertex_
|
||||
day KEYWORD2 day_
|
||||
-- decrement
|
||||
default KEYWORD1 default
|
||||
degrees KEYWORD2 degrees_
|
||||
delay KEYWORD2 delay_
|
||||
directionalLight KEYWORD2 directionalLight_
|
||||
dist KEYWORD2 dist_
|
||||
/ divide
|
||||
/= divideassign
|
||||
/** doccomment
|
||||
. dot
|
||||
double KEYWORD1 double
|
||||
draw KEYWORD3 draw_
|
||||
ellipse KEYWORD2 ellipse_
|
||||
ellipseMode KEYWORD2 ellipseMode_
|
||||
else KEYWORD1 else
|
||||
emissive KEYWORD2 emissive_
|
||||
endCamera KEYWORD2 endCamera_
|
||||
endRaw KEYWORD2 endRaw_
|
||||
endRecord KEYWORD2 endRecord_
|
||||
endShape KEYWORD2 endShape_
|
||||
== equality
|
||||
exit KEYWORD2 exit_
|
||||
exp KEYWORD2 exp_
|
||||
expand KEYWORD2 expand_
|
||||
extends KEYWORD1 extends
|
||||
false KEYWORD1 false
|
||||
fill KEYWORD2 fill_
|
||||
filter KEYWORD2 filter_
|
||||
final KEYWORD1 final
|
||||
float KEYWORD1 float
|
||||
float KEYWORD2 float_
|
||||
floor KEYWORD2 floor_
|
||||
focusGained KEYWORD3 focusGained_
|
||||
focusLost KEYWORD3 focusLost_
|
||||
focused LITERAL2 focused
|
||||
for KEYWORD1 for_
|
||||
frameCount LITERAL2 frameCount
|
||||
frameRate KEYWORD2 frameRate_
|
||||
frameRate LITERAL2 frameRate
|
||||
frustum KEYWORD2 frustum_
|
||||
get KEYWORD2 get_
|
||||
< greaterthan
|
||||
<= greaterthanorequalto
|
||||
green KEYWORD2 green_
|
||||
HALF_PI LITERAL2 HALF_PI
|
||||
HashMap KEYWORD1 HashMap
|
||||
height LITERAL2 height
|
||||
hex KEYWORD2 hex_
|
||||
hint KEYWORD2 hint_
|
||||
hour KEYWORD2 hour_
|
||||
hue KEYWORD2 hue_
|
||||
if KEYWORD1 if_
|
||||
image KEYWORD2 image_
|
||||
imageMode KEYWORD2 imageMode_
|
||||
implements KEYWORD1 implements
|
||||
import KEYWORD1 import
|
||||
++ increment
|
||||
!= inequality
|
||||
int KEYWORD1 int
|
||||
int KEYWORD2 int_
|
||||
join KEYWORD2 join_
|
||||
key LITERAL2 key
|
||||
keyCode LITERAL2 keyCode
|
||||
keyPressed KEYWORD2 keyPressed_
|
||||
keyPressed LITERAL2 keyPressed
|
||||
keyReleased KEYWORD2 keyReleased_
|
||||
keyTyped KEYWORD2 keyTyped_
|
||||
<< leftshift
|
||||
lerp KEYWORD2 lerp_
|
||||
lerpColor KEYWORD2 lerpColor_
|
||||
< lessthan
|
||||
<= lessthanorequalto
|
||||
lightFalloff KEYWORD2 lightFalloff_
|
||||
lights KEYWORD2 lights_
|
||||
lightSpecular KEYWORD2 lightSpecular_
|
||||
line KEYWORD2 line_
|
||||
link KEYWORD2 link_
|
||||
loadBytes KEYWORD2 loadBytes_
|
||||
loadFont KEYWORD2 loadFont_
|
||||
loadImage KEYWORD2 loadImage_
|
||||
loadPixels KEYWORD2 loadPixels_
|
||||
loadShape KEYWORD2 loadShape_
|
||||
loadStrings KEYWORD2 loadStrings_
|
||||
log KEYWORD2 log_
|
||||
&& logicalAND
|
||||
! logicalNOT
|
||||
|| logicalOR
|
||||
long KEYWORD1 long
|
||||
loop KEYWORD2 loop_
|
||||
mag KEYWORD2 mag_
|
||||
map KEYWORD2 map_
|
||||
match KEYWORD2 match_
|
||||
matchAll KEYWORD2 matchAll_
|
||||
max KEYWORD2 max_
|
||||
millis KEYWORD2 millis_
|
||||
min KEYWORD2 min_
|
||||
- minus
|
||||
minute KEYWORD2 minute_
|
||||
modelX KEYWORD2 modelX_
|
||||
modelY KEYWORD2 modelY_
|
||||
modelZ KEYWORD2 modelZ_
|
||||
% modulo
|
||||
month KEYWORD2 month_
|
||||
mouseButton LITERAL2 mouseButton
|
||||
mouseClicked KEYWORD2 mouseClicked_
|
||||
mouseDragged KEYWORD2 mouseDragged_
|
||||
mouseMoved KEYWORD2 mouseMoved_
|
||||
mousePressed KEYWORD2 mousePressed_
|
||||
mousePressed LITERAL2 mousePressed
|
||||
mouseReleased KEYWORD2 mouseReleased_
|
||||
mouseX LITERAL2 mouseX
|
||||
mouseY LITERAL2 mouseY
|
||||
/* multilinecomment
|
||||
* multiply
|
||||
*= multiplyassign
|
||||
new KEYWORD1 new
|
||||
nf KEYWORD2 nf_
|
||||
nfc KEYWORD2 nfc_
|
||||
nfp KEYWORD2 nfp_
|
||||
nfs KEYWORD2 nfs_
|
||||
noCursor KEYWORD2 noCursor_
|
||||
noFill KEYWORD2 noFill_
|
||||
noise KEYWORD2 noise_
|
||||
noiseDetail KEYWORD2 noiseDetail_
|
||||
noiseSeed KEYWORD2 noiseSeed_
|
||||
noLights KEYWORD2 noLights_
|
||||
noLoop KEYWORD2 noLoop_
|
||||
norm KEYWORD2 norm_
|
||||
normal KEYWORD2 normal_
|
||||
noSmooth KEYWORD2 noSmooth_
|
||||
noStroke KEYWORD2 noStroke_
|
||||
noTint KEYWORD2 noTint_
|
||||
null KEYWORD1 null
|
||||
Object KEYWORD1 Object
|
||||
online LITERAL2 online
|
||||
open KEYWORD2 open_
|
||||
ortho KEYWORD2 ortho_
|
||||
param KEYWORD2 param_
|
||||
() parentheses
|
||||
perspective KEYWORD2 perspective_
|
||||
PFont KEYWORD1 PFont
|
||||
list KEYWORD2 PFont_list_
|
||||
PGraphics KEYWORD1 PGraphics
|
||||
beginDraw KEYWORD2 PGraphics_beginDraw_
|
||||
endDraw KEYWORD2 PGraphics_endDraw_
|
||||
PI LITERAL2 PI
|
||||
PImage KEYWORD1 PImage
|
||||
alpha KEYWORD2 PImage_alpha_
|
||||
blend KEYWORD2 PImage_blend_
|
||||
copy KEYWORD2 PImage_copy_
|
||||
filter KEYWORD2 PImage_filter_
|
||||
get KEYWORD2 PImage_get_
|
||||
height LITERAL2 PImage_height
|
||||
loadPixels KEYWORD2 PImage_loadPixels_
|
||||
mask KEYWORD2 PImage_mask_
|
||||
pixels LITERAL2 PImage_pixels
|
||||
resize KEYWORD2 PImage_resize_
|
||||
save KEYWORD2 PImage_save_
|
||||
set KEYWORD2 PImage_set_
|
||||
updatePixels KEYWORD2 PImage_updatePixels_
|
||||
width LITERAL2 PImage_width
|
||||
pixels LITERAL2 pixels
|
||||
pmouseX LITERAL2 pmouseX
|
||||
pmouseY LITERAL2 pmouseY
|
||||
point KEYWORD2 point_
|
||||
point KEYWORD2 pointLight_
|
||||
popMatrix KEYWORD2 popMatrix_
|
||||
popStyle KEYWORD3 popStyle_
|
||||
pow KEYWORD2 pow_
|
||||
print KEYWORD2 print_
|
||||
printCamera KEYWORD2 printCamera_
|
||||
println KEYWORD2 println_
|
||||
printMatrix KEYWORD2 printMatrix_
|
||||
printProjection KEYWORD2 printProjection_
|
||||
PrintWriter KEYWORD1 PrintWriter
|
||||
close KEYWORD2 PrintWriter_close_
|
||||
flush KEYWORD2 PrintWriter_flush_
|
||||
print KEYWORD2 PrintWriter_print_
|
||||
println KEYWORD2 PrintWriter_println_
|
||||
private KEYWORD1 private
|
||||
PShape KEYWORD1 PShape
|
||||
disableStyle KEYWORD2 PShape_disableStyle_
|
||||
enableStyle KEYWORD2 PShape_enableStyle_
|
||||
getChild KEYWORD2 PShape_getChild_
|
||||
height LITERAL2 PShape_height
|
||||
isVisible KEYWORD2 PShape_isVisible_
|
||||
resetMatrix KEYWORD2 PShape_resetMatrix_
|
||||
rotate KEYWORD2 PShape_rotate_
|
||||
rotateX KEYWORD2 PShape_rotateX_
|
||||
rotateY KEYWORD2 PShape_rotateY_
|
||||
rotateZ KEYWORD2 PShape_rotateZ_
|
||||
scale KEYWORD2 PShape_scale_
|
||||
setVisible KEYWORD2 PShape_setVisible_
|
||||
translate KEYWORD2 PShape_translate_
|
||||
width LITERAL2 PShape_width
|
||||
public KEYWORD1 public
|
||||
pushMatrix KEYWORD2 pushMatrix_
|
||||
pushStyle KEYWORD3 pushStyle_
|
||||
PVector KEYWORD1 PVector
|
||||
add KEYWORD2 PVector_add_
|
||||
angleBetween KEYWORD2 PVector_angleBetween_
|
||||
array KEYWORD2 PVector_array_
|
||||
copy KEYWORD2 PVector_copy_
|
||||
cross KEYWORD2 PVector_cross_
|
||||
dist KEYWORD2 PVector_dist_
|
||||
div KEYWORD2 PVector_div_
|
||||
dot KEYWORD2 PVector_dot_
|
||||
get KEYWORD2 PVector_get_
|
||||
limit KEYWORD2 PVector_limit_
|
||||
mag KEYWORD2 PVector_mag_
|
||||
mult KEYWORD2 PVector_mult_
|
||||
normalize KEYWORD2 PVector_normalize_
|
||||
set KEYWORD2 PVector_set_
|
||||
sub KEYWORD2 PVector_sub_
|
||||
quad KEYWORD2 quad_
|
||||
QUARTER_PI LITERAL2 QUARTER_PI
|
||||
radians KEYWORD2 radians_
|
||||
random KEYWORD2 random_
|
||||
randomSeed KEYWORD2 randomSeed_
|
||||
rect KEYWORD2 rect_
|
||||
rectMode KEYWORD2 rectMode_
|
||||
red KEYWORD2 red_
|
||||
redraw KEYWORD2 redraw_
|
||||
requestImage KEYWORD2 requestImage_
|
||||
resetMatrix KEYWORD2 resetMatrix_
|
||||
return KEYWORD1 return
|
||||
reverse KEYWORD2 reverse_
|
||||
<< rightshift
|
||||
rotate KEYWORD2 rotate_
|
||||
rotateX KEYWORD2 rotateX_
|
||||
rotateY KEYWORD2 rotateY_
|
||||
rotateZ KEYWORD2 rotateZ_
|
||||
round KEYWORD2 round_
|
||||
saturation KEYWORD2 saturation_
|
||||
save KEYWORD2 save_
|
||||
saveBytes KEYWORD2 saveBytes_
|
||||
saveFrame KEYWORD2 saveFrame_
|
||||
saveStream KEYWORD2 saveStream_
|
||||
saveStrings KEYWORD2 saveStrings_
|
||||
scale KEYWORD2 scale_
|
||||
screen LITERAL2 screen
|
||||
screenHeight LITERAL2 screenHeight
|
||||
screenWidth LITERAL2 screenWidth
|
||||
screenX KEYWORD2 screenX_
|
||||
screenY KEYWORD2 screenY_
|
||||
screenZ KEYWORD2 screenZ_
|
||||
second KEYWORD2 second_
|
||||
selectFolder KEYWORD2 selectFolder_
|
||||
selectInput KEYWORD2 selectInput_
|
||||
selectOutput KEYWORD2 selectOutput_
|
||||
; semicolon
|
||||
set KEYWORD2 set_
|
||||
setup KEYWORD3 setup_
|
||||
shape KEYWORD2 shape_
|
||||
shapeMode KEYWORD2 shapeMode_
|
||||
shearX KEYWORD2 shearX_
|
||||
shearY KEYWORD2 shearY_
|
||||
shininess KEYWORD2 shininess_
|
||||
shorten KEYWORD2 shorten_
|
||||
sin KEYWORD2 sin_
|
||||
size KEYWORD2 size_
|
||||
smooth KEYWORD2 smooth_
|
||||
sort KEYWORD2 sort_
|
||||
specular KEYWORD2 specular_
|
||||
sphere KEYWORD2 sphere_
|
||||
sphereDetail KEYWORD2 sphereDetail_
|
||||
splice KEYWORD2 splice_
|
||||
split KEYWORD2 split_
|
||||
splitTokens KEYWORD2 splitTokens_
|
||||
spotLight KEYWORD2 spotLight_
|
||||
sq KEYWORD2 sq_
|
||||
sqrt KEYWORD2 sqrt_
|
||||
static KEYWORD1 static
|
||||
status KEYWORD2 status_
|
||||
str KEYWORD2 str_
|
||||
String KEYWORD1 String
|
||||
charAt KEYWORD2 String_charAt_
|
||||
equals KEYWORD2 String_equals_
|
||||
indexOf KEYWORD2 String_indexOf_
|
||||
length KEYWORD2 String_length_
|
||||
substring KEYWORD2 String_substring_
|
||||
toLowerCase KEYWORD2 String_toLowerCase_
|
||||
toUpperCase KEYWORD2 String_toUpperCase_
|
||||
stroke KEYWORD2 stroke_
|
||||
strokeCap KEYWORD2 strokeCap_
|
||||
strokeJoin KEYWORD2 strokeJoin_
|
||||
strokeWeight KEYWORD2 strokeWeight_
|
||||
subset KEYWORD2 subset_
|
||||
-= subtractassign
|
||||
super KEYWORD1 super
|
||||
switch KEYWORD2 switch_
|
||||
tan KEYWORD2 tan_
|
||||
text KEYWORD2 text_
|
||||
textAlign KEYWORD2 textAlign_
|
||||
textAscent KEYWORD2 textAscent_
|
||||
textDescent KEYWORD2 textDescent_
|
||||
textFont KEYWORD2 textFont_
|
||||
textLeading KEYWORD2 textLeading_
|
||||
textMode KEYWORD2 textMode_
|
||||
textSize KEYWORD2 textSize_
|
||||
texture KEYWORD2 texture_
|
||||
textureMode KEYWORD2 textureMode_
|
||||
textWidth KEYWORD2 textWidth_
|
||||
this KEYWORD1 this
|
||||
tint KEYWORD2 tint_
|
||||
translate KEYWORD2 translate_
|
||||
triangle KEYWORD2 triangle_
|
||||
trim KEYWORD2 trim_
|
||||
true KEYWORD1 true
|
||||
try KEYWORD1 try
|
||||
TWO_PI LITERAL2 TWO_PI
|
||||
unbinary KEYWORD2 unbinary_
|
||||
unhex KEYWORD2 unhex_
|
||||
updatePixels KEYWORD2 updatePixels_
|
||||
vertex KEYWORD2 vertex_
|
||||
void KEYWORD1 void
|
||||
while KEYWORD1 while_
|
||||
width LITERAL2 width
|
||||
XMLElement KEYWORD1 XMLElement
|
||||
getChild KEYWORD2 XMLElement_getChild_
|
||||
getChildCount KEYWORD2 XMLElement_getChildCount_
|
||||
getChildren KEYWORD2 XMLElement_getChildren_
|
||||
getContent KEYWORD2 XMLElement_getContent_
|
||||
getFloat KEYWORD2 XMLElement_getFloat_
|
||||
getInt KEYWORD2 XMLElement_getInt_
|
||||
getName KEYWORD2 XMLElement_getName_
|
||||
getString KEYWORD2 XMLElement_getString_
|
||||
year KEYWORD2 year_
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 104 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 62 B |
|
After Width: | Height: | Size: 104 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 63 B |
@@ -0,0 +1,111 @@
|
||||
# GUI - STATUS
|
||||
status.notice.fgcolor = #000000
|
||||
status.notice.bgcolor = #818b95
|
||||
status.error.fgcolor = #ffffff
|
||||
status.error.bgcolor = #662000
|
||||
status.edit.fgcolor = #000000
|
||||
status.edit.bgcolor = #cc9900
|
||||
status.font = SansSerif,plain,12
|
||||
#status.font.macosx = Helvetica,plain,12
|
||||
|
||||
# GUI - TABS
|
||||
# settings for the tabs at the top
|
||||
# (tab images are stored in the lib/theme folder)
|
||||
header.bgcolor = #818b95
|
||||
header.text.selected.color = #1a1a00
|
||||
header.text.unselected.color = #ffffff
|
||||
header.text.font = SansSerif,plain,12
|
||||
#header.text.font.macosx = Helvetica,plain,12
|
||||
|
||||
# GUI - CONSOLE
|
||||
# font is handled by preferences, since size/etc is modifiable
|
||||
console.color = #000000
|
||||
console.output.color = #cccccc
|
||||
console.error.color = #ff3000
|
||||
|
||||
# GUI - BUTTONS
|
||||
buttons.bgcolor = #4a545e
|
||||
buttons.status.font = SansSerif,plain,12
|
||||
#buttons.status.font.macosx = Helvetica,plain,12
|
||||
buttons.status.color = #ffffff
|
||||
|
||||
# GUI - MODE
|
||||
#mode.button.bgcolor = #9ca6b0
|
||||
mode.button.font = SansSerif,plain,9
|
||||
#mode.button.font.macosx = Helvetica,plain,9
|
||||
#mode.button.color = #4a545e
|
||||
mode.button.color = #9ca6b0
|
||||
|
||||
# GUI - LINESTATUS
|
||||
linestatus.color = #ffffff
|
||||
linestatus.bgcolor = #29333d
|
||||
|
||||
# EDITOR - DETAILS
|
||||
|
||||
# foreground and background colors
|
||||
editor.fgcolor = #000000
|
||||
editor.bgcolor = #ffffff
|
||||
|
||||
# highlight for the current line
|
||||
editor.linehighlight.color=#e2e2e2
|
||||
# highlight for the current line
|
||||
editor.linehighlight=true
|
||||
|
||||
# caret blinking and caret color
|
||||
editor.caret.color = #333300
|
||||
|
||||
# color to be used for background when 'external editor' enabled
|
||||
editor.external.bgcolor = #c8d2dc
|
||||
|
||||
# selection color
|
||||
editor.selection.color = #ffcc00
|
||||
|
||||
# area that's not in use by the text (replaced with tildes)
|
||||
editor.invalid.style = #7e7e7e,bold
|
||||
|
||||
# little pooties at the end of lines that show where they finish
|
||||
editor.eolmarkers = false
|
||||
editor.eolmarkers.color = #999999
|
||||
|
||||
# bracket/brace highlighting
|
||||
editor.brackethighlight = true
|
||||
editor.brackethighlight.color = #006699
|
||||
|
||||
|
||||
# TEXT - KEYWORDS
|
||||
|
||||
# e.g abstract, final, private
|
||||
editor.keyword1.style = #cc6600,plain
|
||||
|
||||
# e.g. beginShape, point, line
|
||||
editor.keyword2.style = #cc6600,plain
|
||||
|
||||
# e.g. byte, char, short, color
|
||||
editor.keyword3.style = #cc6600,bold
|
||||
|
||||
|
||||
# TEXT - LITERALS
|
||||
|
||||
# constants: e.g. null, true, this, RGB, TWO_PI
|
||||
editor.literal1.style = #006699,plain
|
||||
|
||||
# p5 built in variables: e.g. mouseX, width, pixels
|
||||
editor.literal2.style = #006699,plain
|
||||
|
||||
# e.g. + - = /
|
||||
editor.operator.style = #000000,plain
|
||||
|
||||
# ?? maybe this is for words followed by a colon
|
||||
# like in case statements or goto
|
||||
editor.label.style = #7e7e7e,bold
|
||||
|
||||
|
||||
# TEXT - COMMENTS
|
||||
editor.comment1.style = #7e7e7e,plain
|
||||
editor.comment2.style = #7e7e7e,plain
|
||||
|
||||
|
||||
# LINE STATUS - editor line number status bar at the bottom of the screen
|
||||
linestatus.font = SansSerif,plain,10
|
||||
#linestatus.font.macosx = Helvetica,plain,10
|
||||
linestatus.height = 20
|
||||
@@ -0,0 +1,10 @@
|
||||
See JS mode todo as well for things added there for Processing.js that might apply to CS mode as well.
|
||||
---
|
||||
Syntax highlighting will not work.
|
||||
---
|
||||
Auto-formatting will not work.
|
||||
---
|
||||
Pre-run catching errors / typos
|
||||
We have no precompiler with CS mode as it's not written in Java syntax and compilation happens browser-sided.
|
||||
This means errors will happen late and can only ba caught via the browser console.
|
||||
---
|
||||
@@ -3,7 +3,14 @@ http://code.google.com/p/processing/issues/detail?id=573
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Reference
|
||||
|
||||
Make sure all reference links point to the same/new location
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Integration with SketchPad.cc
|
||||
|
||||
s.cc being based on Etherpad has no API for calls from outside
|
||||
at the moment. Content scraping is possible but probably not
|
||||
submitting stuff ..
|
||||
@@ -14,6 +21,7 @@ http://studio.sketchpad.cc/sp/pad/export/ro.9civzkE0CyCy6/latest?format=txt
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Examples.
|
||||
|
||||
Some of the standard examples should be included, but not library specific
|
||||
ones. Currently there is no way to "just pick some" one has to include whole
|
||||
branches.
|
||||
@@ -21,12 +29,14 @@ branches.
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Interface.
|
||||
|
||||
As the server keeps running until being explicitly stopped we might think
|
||||
about an animated icon. How does "Server running" look like?
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Convenience.
|
||||
|
||||
A way to reopen the browser window, maybe even other browsers?
|
||||
Find your own IP address so you can test the sketch from other clients
|
||||
on the network.
|
||||
|
||||