mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
experimental now building from ant as its own unit
This commit is contained in:
@@ -283,8 +283,8 @@ public class Base {
|
||||
// try {
|
||||
// Class.forName("processing.mode.java2.DebugMode");
|
||||
ModeContribution experimentalContrib =
|
||||
ModeContribution.load(this, getContentFile("modes/java2"),
|
||||
"processing.mode.java2.DebugMode");
|
||||
ModeContribution.load(this, getContentFile("modes/experimental"),
|
||||
"processing.mode.experimental.ExperimentalMode");
|
||||
if (experimentalContrib != null) {
|
||||
Mode experimentalMode = experimentalContrib.getMode();
|
||||
coreModes = new Mode[] { javaMode, androidMode, javaScriptMode, experimentalMode };
|
||||
|
||||
+4
-4
@@ -87,7 +87,7 @@
|
||||
<subant buildpath="../java/libraries/pdf" target="clean"/>
|
||||
<subant buildpath="../java/libraries/serial" target="clean"/>
|
||||
<subant buildpath="../java/libraries/video" target="clean"/>
|
||||
<subant buildpath="../java2" target="clean"/>
|
||||
<subant buildpath="../experimental" target="clean"/>
|
||||
<subant buildpath="../android/core" target="clean"/>
|
||||
<subant buildpath="shared/tools/MovieMaker" target="clean"/>
|
||||
</target>
|
||||
@@ -100,7 +100,7 @@
|
||||
<subant buildpath="../java/libraries/pdf" target="build"/>
|
||||
<subant buildpath="../java/libraries/serial" target="build"/>
|
||||
<subant buildpath="../java/libraries/video" target="build"/>
|
||||
<subant buildpath="../java2" target="build"/>
|
||||
<subant buildpath="../experimental" target="build"/>
|
||||
<subant buildpath="../android/core" target="build"/>
|
||||
<subant buildpath="shared/tools/MovieMaker" target="build"/>
|
||||
</target>
|
||||
@@ -134,8 +134,8 @@
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${target.path}/modes/java2">
|
||||
<fileset dir="../java2">
|
||||
<copy todir="${target.path}/modes/experimental">
|
||||
<fileset dir="../experimental">
|
||||
<include name="**/mode/*" />
|
||||
<include name="**/theme/*" />
|
||||
</fileset>
|
||||
|
||||
@@ -67,7 +67,7 @@ public class DebugBuild extends JavaBuild {
|
||||
return null;
|
||||
}
|
||||
|
||||
public DebugMode getMode() {
|
||||
return (DebugMode)mode;
|
||||
public ExperimentalMode getMode() {
|
||||
return (ExperimentalMode)mode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
// variable inspector
|
||||
protected JMenuItem toggleVariableInspectorMenuItem;
|
||||
// references
|
||||
protected DebugMode dmode; // the mode
|
||||
protected ExperimentalMode dmode; // the mode
|
||||
protected Debugger dbg; // the debugger
|
||||
protected VariableInspector vi; // the variable inspector frame
|
||||
protected TextArea ta; // the text area
|
||||
@@ -133,7 +133,7 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
super(base, path, state, mode);
|
||||
|
||||
// get mode
|
||||
dmode = (DebugMode) mode;
|
||||
dmode = (ExperimentalMode) mode;
|
||||
|
||||
// init controller class
|
||||
dbg = new Debugger(this);
|
||||
@@ -153,7 +153,7 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
// });
|
||||
|
||||
// load settings from theme.txt
|
||||
DebugMode theme = dmode;
|
||||
ExperimentalMode theme = dmode;
|
||||
breakpointColor = theme.getThemeColor("breakpoint.bgcolor", breakpointColor);
|
||||
breakpointMarkerColor = theme.getThemeColor("breakpoint.marker.color", breakpointMarkerColor);
|
||||
currentLineColor = theme.getThemeColor("currentline.bgcolor", currentLineColor);
|
||||
@@ -835,7 +835,7 @@ public class DebugEditor extends JavaEditor implements ActionListener {
|
||||
*
|
||||
* @return the mode object
|
||||
*/
|
||||
public DebugMode mode() {
|
||||
public ExperimentalMode mode() {
|
||||
return dmode;
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ public class ErrorBar extends JPanel {
|
||||
return getPreferredSize();
|
||||
}
|
||||
|
||||
public ErrorBar(DebugEditor editor, int height, DebugMode mode) {
|
||||
public ErrorBar(DebugEditor editor, int height, ExperimentalMode mode) {
|
||||
this.editor = editor;
|
||||
this.preferredHeight = height;
|
||||
this.errorCheckerService = editor.errorCheckerService;
|
||||
|
||||
+31
-27
@@ -1,20 +1,24 @@
|
||||
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2012 Martin Leopold <m@martinleopold.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License as published by the Free Software
|
||||
* Foundation; either version 2 of the License, or (at your option) any later
|
||||
* version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
* Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
Part of the Processing project - http://processing.org
|
||||
|
||||
Copyright (c) 2012 The Processing Foundation
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
package processing.mode.experimental;
|
||||
|
||||
import java.awt.Color;
|
||||
@@ -29,18 +33,18 @@ import processing.app.EditorState;
|
||||
import processing.app.Mode;
|
||||
import processing.mode.java.JavaMode;
|
||||
|
||||
|
||||
/**
|
||||
* Debug Mode for Processing. Built on top of JavaMode.
|
||||
*
|
||||
* @author Martin Leopold <m@martinleopold.com>
|
||||
* Experimental Mode for Processing, combines Debug Mode and XQMode and
|
||||
* starts us working toward our next generation editor/debugger setup.
|
||||
*/
|
||||
public class DebugMode extends JavaMode {
|
||||
public class ExperimentalMode extends JavaMode {
|
||||
public static final boolean VERBOSE_LOGGING = true;
|
||||
//public static final boolean VERBOSE_LOGGING = false;
|
||||
public static final int LOG_SIZE = 512 * 1024; // max log file size (in bytes)
|
||||
|
||||
|
||||
public DebugMode(Base base, File folder) {
|
||||
public ExperimentalMode(Base base, File folder) {
|
||||
super(base, folder);
|
||||
|
||||
// use libraries folder from javamode. will make sketches using core libraries work, as well as import libraries and examples menus
|
||||
@@ -80,16 +84,16 @@ public class DebugMode extends JavaMode {
|
||||
globalLogger.addHandler(handler);
|
||||
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(DebugMode.class.getName()).log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger(ExperimentalMode.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (SecurityException ex) {
|
||||
Logger.getLogger(DebugMode.class.getName()).log(Level.SEVERE, null, ex);
|
||||
Logger.getLogger(ExperimentalMode.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
|
||||
// output version from manifest file
|
||||
Package p = DebugMode.class.getPackage();
|
||||
Package p = ExperimentalMode.class.getPackage();
|
||||
String titleAndVersion = p.getImplementationTitle() + " (v" + p.getImplementationVersion() + ")";
|
||||
//System.out.println(titleAndVersion);
|
||||
Logger.getLogger(DebugMode.class.getName()).log(Level.INFO, titleAndVersion);
|
||||
Logger.getLogger(ExperimentalMode.class.getName()).log(Level.INFO, titleAndVersion);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +132,7 @@ public class DebugMode extends JavaMode {
|
||||
if (newString != null) {
|
||||
return newString;
|
||||
}
|
||||
Logger.getLogger(DebugMode.class.getName()).log(Level.WARNING, "Error loading String: {0}", attribute);
|
||||
Logger.getLogger(ExperimentalMode.class.getName()).log(Level.WARNING, "Error loading String: {0}", attribute);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@@ -147,7 +151,7 @@ public class DebugMode extends JavaMode {
|
||||
return newColor;
|
||||
}
|
||||
System.out.println("error loading color: " + attribute);
|
||||
Logger.getLogger(DebugMode.class.getName()).log(Level.WARNING, "Error loading Color: {0}", attribute);
|
||||
Logger.getLogger(ExperimentalMode.class.getName()).log(Level.WARNING, "Error loading Color: {0}", attribute);
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TextArea extends JEditTextArea {
|
||||
add(CENTER, painter);
|
||||
|
||||
// load settings from theme.txt
|
||||
DebugMode theme = (DebugMode) editor.getMode();
|
||||
ExperimentalMode theme = (ExperimentalMode) editor.getMode();
|
||||
gutterBgColor = theme.getThemeColor("gutter.bgcolor", gutterBgColor);
|
||||
gutterLineColor = theme.getThemeColor("gutter.linecolor", gutterLineColor);
|
||||
gutterPadding = theme.getInteger("gutter.padding");
|
||||
@@ -92,7 +92,7 @@ public class TextArea extends JEditTextArea {
|
||||
currentLineMarker = theme.loadThemeString("currentline.marker", currentLineMarker);
|
||||
}
|
||||
|
||||
public void setECSandThemeforTextArea(ErrorCheckerService ecs, DebugMode mode)
|
||||
public void setECSandThemeforTextArea(ErrorCheckerService ecs, ExperimentalMode mode)
|
||||
{
|
||||
customPainter.setECSandTheme(ecs, mode);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class TextAreaPainter extends processing.app.syntax.TextAreaPainter {
|
||||
ta = textArea;
|
||||
}
|
||||
|
||||
private void loadTheme(DebugMode mode){
|
||||
private void loadTheme(ExperimentalMode mode){
|
||||
errorColor = mode.getThemeColor("editor.errorcolor", errorColor);
|
||||
warningColor = mode.getThemeColor("editor.warningcolor",
|
||||
warningColor);
|
||||
@@ -306,7 +306,7 @@ public class TextAreaPainter extends processing.app.syntax.TextAreaPainter {
|
||||
return newString;
|
||||
}
|
||||
|
||||
public void setECSandTheme(ErrorCheckerService ecs, DebugMode mode){
|
||||
public void setECSandTheme(ErrorCheckerService ecs, ExperimentalMode mode){
|
||||
this.errorCheckerService = ecs;
|
||||
loadTheme(mode);
|
||||
}
|
||||
|
||||
@@ -260,7 +260,7 @@ public class VariableInspector extends javax.swing.JFrame {
|
||||
* null if the file wasn't found.
|
||||
*/
|
||||
protected ImageIcon[][] loadIcons(String fileName) {
|
||||
DebugMode mode = editor.mode();
|
||||
ExperimentalMode mode = editor.mode();
|
||||
File file = mode.getContentFile(fileName);
|
||||
if (!file.exists()) {
|
||||
Logger.getLogger(OutlineRenderer.class.getName()).log(Level.SEVERE, "icon file not found: {0}", file.getAbsolutePath());
|
||||
|
||||
@@ -74,26 +74,32 @@ editor.brackethighlight.color = #006699
|
||||
|
||||
# TEXT - KEYWORDS
|
||||
|
||||
# e.g abstract, final, private
|
||||
editor.keyword1.style = #cc6600,plain
|
||||
# e.g. Functions
|
||||
editor.function1.style = #006699,plain
|
||||
|
||||
# e.g. beginShape, point, line
|
||||
editor.keyword2.style = #cc6600,plain
|
||||
# e.g. Methods (functions inside a class)
|
||||
editor.function2.style = #006699,plain
|
||||
|
||||
# e.g. byte, char, short, color
|
||||
editor.keyword3.style = #cc6600,bold
|
||||
# e.g. Datatypes and keywords (void, int, boolean, etc.)
|
||||
editor.keyword1.style = #D86736,plain
|
||||
|
||||
# e.g. Processing fields [variables within a class]
|
||||
editor.keyword2.style = #EE3C96,plain
|
||||
|
||||
# e.g. Processing variables (width, height, focused, etc.)
|
||||
editor.keyword3.style = #EE3C96,plain
|
||||
|
||||
|
||||
# TEXT - LITERALS
|
||||
|
||||
# constants: e.g. null, true, this, RGB, TWO_PI
|
||||
editor.literal1.style = #006699,plain
|
||||
# e.g. Strings (text in quotes)
|
||||
editor.literal1.style = #7D4793,plain
|
||||
|
||||
# p5 built in variables: e.g. mouseX, width, pixels
|
||||
editor.literal2.style = #006699,plain
|
||||
# e.g. Constants (QUARTER_PI, CORNERS, etc.)
|
||||
editor.literal2.style = #669933,plain
|
||||
|
||||
# e.g. + - = /
|
||||
editor.operator.style = #000000,plain
|
||||
editor.operator.style = #006699,plain
|
||||
|
||||
# ?? maybe this is for words followed by a colon
|
||||
# like in case statements or goto
|
||||
|
||||
Reference in New Issue
Block a user