| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -107,7 +107,6 @@ public class Base { | |||
| 107 | 107 | // A single instance of the library manager window | |
| 108 | 108 | ContributionManagerDialog contributionManagerFrame; | |
| 109 | 109 | ||
| 110 | - | ||
| 111 | 110 | // Location for untitled items | |
| 112 | 111 | static File untitledFolder; | |
| 113 | 112 | ||
@@ -353,23 +352,9 @@ void rebuildContribExamples() { | |||
| 353 | 352 | ||
| 354 | 353 | ||
| 355 | 354 | public Base(String[] args) throws Exception { | |
| 356 | - // // Get the sketchbook path, and make sure it's set properly | ||
| 357 | - // determineSketchbookFolder(); | ||
| 358 | - | ||
| 359 | - // Delete all modes and tools that have been flagged for deletion before | ||
| 360 | - // they are initialized by an editor. | ||
| 361 | - // ArrayList<InstalledContribution> contribs = new ArrayList<InstalledContribution>(); | ||
| 362 | - // contribs.addAll(ModeContribution.list(getSketchbookModesFolder())); | ||
| 363 | - // contribs.addAll(ToolContribution.list(getSketchbookToolsFolder(), false)); | ||
| 364 | - // for (InstalledContribution contrib : contribs) { | ||
| 365 | - // if (ContributionManager.isDeletionFlagSet(contrib)) { | ||
| 366 | - // removeDir(contrib.getFolder()); | ||
| 367 | - // } | ||
| 368 | - // } | ||
| 369 | 355 | ContributionManager.cleanup(this); | |
| 370 | 356 | buildCoreModes(); | |
| 371 | 357 | rebuildContribModes(); | |
| 372 | - | ||
| 373 | 358 | rebuildContribExamples(); | |
| 374 | 359 | ||
| 375 | 360 | // Needs to happen after the sketchbook folder has been located. | |
@@ -394,8 +379,7 @@ public Base(String[] args) throws Exception { | |||
| 394 | 379 | } | |
| 395 | 380 | } | |
| 396 | 381 | ||
| 397 | - contributionManagerFrame = | ||
| 398 | - new ContributionManagerDialog(); | ||
| 382 | + contributionManagerFrame = new ContributionManagerDialog(); | ||
| 399 | 383 | ||
| 400 | 384 | // Make sure ThinkDifferent has library examples too | |
| 401 | 385 | nextMode.rebuildLibraryList(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,21 +5,20 @@ | |||
| 5 | 5 | import java.util.*; | |
| 6 | 6 | import java.util.zip.*; | |
| 7 | 7 | ||
| 8 | - //import javax.swing.SwingUtilities; | ||
| 9 | 8 | ||
| 10 | 9 | /** | |
| 11 | 10 | * This code is placed here in anticipation of running the reference from an | |
| 12 | 11 | * internal web server that reads the docs from a zip file, instead of using | |
| 13 | 12 | * thousands of .html files on the disk, which is really inefficient. | |
| 14 | 13 | * <p/> | |
| 15 | - * This is a very simple, multi-threaded HTTP server, originally based on | ||
| 14 | + * This is a very simple, multi-threaded HTTP server, originally based on | ||
| 16 | 15 | * <a href="http://j.mp/6BQwpI">this</a> article on java.sun.com. | |
| 17 | 16 | */ | |
| 18 | 17 | public class WebServer implements HttpConstants { | |
| 19 | 18 | ||
| 20 | 19 | /* Where worker threads stand idle */ | |
| 21 | 20 | static Vector threads = new Vector(); | |
| 22 | - | ||
| 21 | + | ||
| 23 | 22 | /* the web server's virtual root */ | |
| 24 | 23 | //static File root; | |
| 25 | 24 | ||
@@ -29,7 +28,7 @@ public class WebServer implements HttpConstants { | |||
| 29 | 28 | /* max # worker threads */ | |
| 30 | 29 | static int workers = 5; | |
| 31 | 30 | ||
| 32 | - // static PrintStream log = System.out; | ||
| 31 | + // static PrintStream log = System.out; | ||
| 33 | 32 | ||
| 34 | 33 | ||
| 35 | 34 | /* | |
@@ -88,7 +87,7 @@ static void printProps() { | |||
| 88 | 87 | } | |
| 89 | 88 | */ | |
| 90 | 89 | ||
| 91 | - | ||
| 90 | + | ||
| 92 | 91 | /* print to stdout */ | |
| 93 | 92 | // protected static void p(String s) { | |
| 94 | 93 | // System.out.println(s); | |
@@ -105,7 +104,7 @@ protected static void log(String s) { | |||
| 105 | 104 | // } | |
| 106 | 105 | } | |
| 107 | 106 | ||
| 108 | - | ||
| 107 | + | ||
| 109 | 108 | //public static void main(String[] a) throws Exception { | |
| 110 | 109 | static public int launch(String zipPath) throws IOException { | |
| 111 | 110 | final ZipFile zip = new ZipFile(zipPath); | |
@@ -226,7 +225,7 @@ public synchronized void run() { | |||
| 226 | 225 | } | |
| 227 | 226 | } | |
| 228 | 227 | ||
| 229 | - | ||
| 228 | + | ||
| 230 | 229 | void handleClient() throws IOException { | |
| 231 | 230 | InputStream is = new BufferedInputStream(s.getInputStream()); | |
| 232 | 231 | PrintStream ps = new PrintStream(s.getOutputStream()); | |
@@ -240,7 +239,7 @@ void handleClient() throws IOException { | |||
| 240 | 239 | buf[i] = 0; | |
| 241 | 240 | } | |
| 242 | 241 | try { | |
| 243 | - // We only support HTTP GET/HEAD, and don't support any fancy HTTP | ||
| 242 | + // We only support HTTP GET/HEAD, and don't support any fancy HTTP | ||
| 244 | 243 | // options, so we're only interested really in the first line. | |
| 245 | 244 | int nread = 0, r = 0; | |
| 246 | 245 | ||
@@ -254,7 +253,7 @@ void handleClient() throws IOException { | |||
| 254 | 253 | nread += r; | |
| 255 | 254 | for (; i < nread; i++) { | |
| 256 | 255 | if (buf[i] == (byte)'\n' || buf[i] == (byte)'\r') { | |
| 257 | - break outerloop; // read one line | ||
| 256 | + break outerloop; // read one line | ||
| 258 | 257 | } | |
| 259 | 258 | } | |
| 260 | 259 | } | |
@@ -312,7 +311,7 @@ void handleClient() throws IOException { | |||
| 312 | 311 | send404(ps); | |
| 313 | 312 | } | |
| 314 | 313 | /* | |
| 315 | - String fname = | ||
| 314 | + String fname = | ||
| 316 | 315 | (new String(buf, 0, index, i-index)).replace('/', File.separatorChar); | |
| 317 | 316 | if (fname.startsWith(File.separator)) { | |
| 318 | 317 | fname = fname.substring(1); | |
@@ -338,7 +337,7 @@ void handleClient() throws IOException { | |||
| 338 | 337 | } | |
| 339 | 338 | } | |
| 340 | 339 | ||
| 341 | - | ||
| 340 | + | ||
| 342 | 341 | boolean printHeaders(ZipEntry targ, PrintStream ps) throws IOException { | |
| 343 | 342 | boolean ret = false; | |
| 344 | 343 | int rCode = 0; | |
@@ -386,8 +385,8 @@ boolean printHeaders(ZipEntry targ, PrintStream ps) throws IOException { | |||
| 386 | 385 | ps.write(EOL); // adding another newline here [fry] | |
| 387 | 386 | return ret; | |
| 388 | 387 | } | |
| 389 | - | ||
| 390 | - | ||
| 388 | + | ||
| 389 | + | ||
| 391 | 390 | boolean printHeaders(File targ, PrintStream ps) throws IOException { | |
| 392 | 391 | boolean ret = false; | |
| 393 | 392 | int rCode = 0; | |
@@ -432,7 +431,7 @@ boolean printHeaders(File targ, PrintStream ps) throws IOException { | |||
| 432 | 431 | return ret; | |
| 433 | 432 | } | |
| 434 | 433 | ||
| 435 | - | ||
| 434 | + | ||
| 436 | 435 | void send404(PrintStream ps) throws IOException { | |
| 437 | 436 | ps.write(EOL); | |
| 438 | 437 | ps.write(EOL); | |
@@ -442,7 +441,7 @@ void send404(PrintStream ps) throws IOException { | |||
| 442 | 441 | ps.write(EOL); | |
| 443 | 442 | } | |
| 444 | 443 | ||
| 445 | - | ||
| 444 | + | ||
| 446 | 445 | void sendFile(File targ, PrintStream ps) throws IOException { | |
| 447 | 446 | InputStream is = null; | |
| 448 | 447 | ps.write(EOL); | |
@@ -454,8 +453,8 @@ void sendFile(File targ, PrintStream ps) throws IOException { | |||
| 454 | 453 | } | |
| 455 | 454 | sendFile(is, ps); | |
| 456 | 455 | } | |
| 457 | - | ||
| 458 | - | ||
| 456 | + | ||
| 457 | + | ||
| 459 | 458 | void sendFile(InputStream is, PrintStream ps) throws IOException { | |
| 460 | 459 | try { | |
| 461 | 460 | int n; | |
@@ -489,19 +488,19 @@ static void fillMap() { | |||
| 489 | 488 | setSuffix(".snd", "audio/basic"); | |
| 490 | 489 | setSuffix(".au", "audio/basic"); | |
| 491 | 490 | setSuffix(".wav", "audio/x-wav"); | |
| 492 | - | ||
| 491 | + | ||
| 493 | 492 | setSuffix(".gif", "image/gif"); | |
| 494 | 493 | setSuffix(".jpg", "image/jpeg"); | |
| 495 | 494 | setSuffix(".jpeg", "image/jpeg"); | |
| 496 | - | ||
| 495 | + | ||
| 497 | 496 | setSuffix(".htm", "text/html"); | |
| 498 | 497 | setSuffix(".html", "text/html"); | |
| 499 | - setSuffix(".css", "text/css"); | ||
| 498 | + setSuffix(".css", "text/css"); | ||
| 500 | 499 | setSuffix(".java", "text/javascript"); | |
| 501 | - | ||
| 500 | + | ||
| 502 | 501 | setSuffix(".txt", "text/plain"); | |
| 503 | 502 | setSuffix(".java", "text/plain"); | |
| 504 | - | ||
| 503 | + | ||
| 505 | 504 | setSuffix(".c", "text/plain"); | |
| 506 | 505 | setSuffix(".cc", "text/plain"); | |
| 507 | 506 | setSuffix(".c++", "text/plain"); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,10 +27,14 @@ | |||
| 27 | 27 | import java.io.PrintStream; | |
| 28 | 28 | import java.io.UnsupportedEncodingException; | |
| 29 | 29 | ||
| 30 | - import processing.app.*; | ||
| 30 | + import processing.app.Base; | ||
| 31 | + import processing.app.Preferences; | ||
| 32 | + import processing.app.RunnerListener; | ||
| 33 | + import processing.app.Sketch; | ||
| 34 | + import processing.app.SketchException; | ||
| 31 | 35 | import processing.app.contrib.ModeContribution; | |
| 32 | 36 | import processing.core.PApplet; | |
| 33 | - import processing.mode.java.runner.*; | ||
| 37 | + import processing.mode.java.runner.Runner; | ||
| 34 | 38 | ||
| 35 | 39 | ||
| 36 | 40 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,9 @@ X Add more code for handling low-level errors on startup | |||
| 12 | 12 | X update the "Supported Platforms" wiki page with current status | |
| 13 | 13 | X displayDensity() not functioning properly | |
| 14 | 14 | X https://github.com/processing/processing/issues/3436 | |
| 15 | + X error message caused by curly bracket in a println string | ||
| 16 | + X ((?<![\\])['"])((?:.(?!(?<![\\])\1))*.?)\1 to match quoted strings | ||
| 17 | + X https://github.com/processing/processing/issues/3394 | ||
| 15 | 18 | ||
| 16 | 19 | manager | |
| 17 | 20 | X changed compatibleModesList to modes in examples.properties | |
@@ -119,9 +122,6 @@ _ recent menu gets huge with other p5 versions on osx | |||
| 119 | 122 | ||
| 120 | 123 | ||
| 121 | 124 | pde/build | |
| 122 | - _ error message caused by curly bracket in a println string | ||
| 123 | - _ ((?<![\\])['"])((?:.(?!(?<![\\])\1))*.?)\1 to match quoted strings | ||
| 124 | - _ https://github.com/processing/processing/issues/3394 | ||
| 125 | 125 | _ dim out the Run button if there are compile errors detected | |
| 126 | 126 | _ the AST checker has better error message handling for those cases | |
| 127 | 127 | _ and hitting Run replaces the useful error with something weird | |
| Back | FazBrowse Home | New Git URL |
0 commit comments