(String[] args)
| 471 | |
| 472 | |
| 473 | public Base(String[] args) throws Exception { |
| 474 | long t1 = System.currentTimeMillis(); |
| 475 | ContributionManager.init(this); |
| 476 | |
| 477 | long t2 = System.currentTimeMillis(); |
| 478 | buildCoreModes(); |
| 479 | long t2b = System.currentTimeMillis(); |
| 480 | rebuildContribModes(); |
| 481 | long t2c = System.currentTimeMillis(); |
| 482 | rebuildContribExamples(); |
| 483 | |
| 484 | long t3 = System.currentTimeMillis(); |
| 485 | // Needs to happen after the sketchbook folder has been located. |
| 486 | // Also relies on the modes to be loaded, so it knows what can be |
| 487 | // marked as an example. |
| 488 | Recent.init(this); |
| 489 | |
| 490 | long t4 = System.currentTimeMillis(); |
| 491 | String lastModeIdentifier = Preferences.get("mode.last"); //$NON-NLS-1$ |
| 492 | if (lastModeIdentifier == null) { |
| 493 | nextMode = getDefaultMode(); |
| 494 | Messages.log("Nothing set for last.sketch.mode, using default."); //$NON-NLS-1$ |
| 495 | } else { |
| 496 | for (Mode m : getModeList()) { |
| 497 | if (m.getIdentifier().equals(lastModeIdentifier)) { |
| 498 | Messages.logf("Setting next mode to %s.", lastModeIdentifier); //$NON-NLS-1$ |
| 499 | nextMode = m; |
| 500 | } |
| 501 | } |
| 502 | if (nextMode == null) { |
| 503 | nextMode = getDefaultMode(); |
| 504 | Messages.logf("Could not find mode %s, using default.", lastModeIdentifier); //$NON-NLS-1$ |
| 505 | } |
| 506 | } |
| 507 | |
| 508 | //contributionManagerFrame = new ContributionManagerDialog(); |
| 509 | |
| 510 | long t5 = System.currentTimeMillis(); |
| 511 | |
| 512 | // Make sure ThinkDifferent has library examples too |
| 513 | nextMode.rebuildLibraryList(); |
| 514 | |
| 515 | // Put this after loading the examples, so that building the default file |
| 516 | // menu works on Mac OS X (since it needs examplesFolder to be set). |
| 517 | Platform.initBase(this); |
| 518 | |
| 519 | long t6 = System.currentTimeMillis(); |
| 520 | |
| 521 | // // Check if there were previously opened sketches to be restored |
| 522 | // boolean opened = restoreSketches(); |
| 523 | boolean opened = false; |
| 524 | |
| 525 | // Check if any files were passed in on the command line |
| 526 | for (int i = 0; i < args.length; i++) { |
| 527 | Messages.logf("Parsing command line... args[%d] = '%s'", i, args[i]); |
| 528 | |
| 529 | String path = args[i]; |
| 530 | // Fix a problem with systems that use a non-ASCII languages. Paths are |
nothing calls this directly
no test coverage detected