@@ -61,8 +61,8 @@ public class Base {
6161 /** Set true if this a proper release rather than a numbered revision. */
6262
6363 /** True if heavy debugging error/log messages are enabled */
64- static public boolean DEBUG = false ;
65- // static public boolean DEBUG = true;
64+ // static public boolean DEBUG = false;
65+ static public boolean DEBUG = true ;
6666
6767 static private boolean commandLine ;
6868
@@ -185,7 +185,6 @@ static private void createAndShowGUI(String[] args) {
185185 // Get the sketchbook path, and make sure it's set properly
186186 locateSketchbookFolder ();
187187
188-
189188 // Create a location for untitled sketches
190189 try {
191190 untitledFolder = Util .createTempFolder ("untitled" , "sketches" , null );
@@ -196,28 +195,30 @@ static private void createAndShowGUI(String[] args) {
196195 "That's gonna prevent us from continuing." , e );
197196 }
198197
199- Messages .log ("about to create base ..." ); //$NON-NLS-1$
198+ Messages .log ("About to create Base ..." ); //$NON-NLS-1$
200199 try {
201200 final Base base = new Base (args );
201+ Messages .log ("Base() constructor succeeded" );
202+
202203 // Prevent more than one copy of the PDE from running.
203204 SingleInstance .startServer (base );
204205
205206 // Needs to be shown after the first editor window opens, so that it
206207 // shows up on top, and doesn't prevent an editor window from opening.
207208 if (Preferences .getBoolean ("welcome.show" )) {
208209 final boolean prompt = sketchbookPrompt ;
209- EventQueue .invokeLater (new Runnable () {
210- public void run () {
211- try {
212- new Welcome (base , prompt );
213- } catch (IOException e ) {
214- Messages .showTrace ("Unwelcoming" ,
215- "Please report this error to\n " +
216- "https://github.com/processing/processing/issues" , e , false );
217- }
218- }
219- });
210+ // EventQueue.invokeLater(new Runnable() {
211+ // public void run() {
212+ try {
213+ new Welcome (base , prompt );
214+ } catch (IOException e ) {
215+ Messages .showTrace ("Unwelcoming" ,
216+ "Please report this error to\n " +
217+ "https://github.com/processing/processing/issues" , e , false );
218+ }
220219 }
220+ // });
221+ // }
221222
222223 } catch (Throwable t ) {
223224 // Catch-all to pick up badness during startup.
@@ -229,7 +230,7 @@ public void run() {
229230 Messages .showTrace ("We're off on the wrong foot" ,
230231 "An error occurred during startup." , t , true );
231232 }
232- Messages .log ("done creating base ..." ); //$NON-NLS-1$
233+ Messages .log ("Done creating Base ..." ); //$NON-NLS-1$
233234 }
234235 }
235236
@@ -314,6 +315,8 @@ public Base(String[] args) throws Exception {
314315
315316 // Check if any files were passed in on the command line
316317 for (int i = 0 ; i < args .length ; i ++) {
318+ Messages .logf ("Parsing command line... args[%d] = '%s'" , i , args [i ]);
319+
317320 String path = args [i ];
318321 // Fix a problem with systems that use a non-ASCII languages. Paths are
319322 // being passed in with 8.3 syntax, which makes the sketch loader code
@@ -323,6 +326,7 @@ public Base(String[] args) throws Exception {
323326 try {
324327 File file = new File (args [i ]);
325328 path = file .getCanonicalPath ();
329+ Messages .logf ("Changing %s to canonical %s" , i , args [i ], path );
326330 } catch (IOException e ) {
327331 e .printStackTrace ();
328332 }
@@ -334,10 +338,10 @@ public Base(String[] args) throws Exception {
334338
335339 // Create a new empty window (will be replaced with any files to be opened)
336340 if (!opened ) {
337- // System.out.println("opening a new window");
341+ Messages . log ( "Calling handleNew() to open a new window" );
338342 handleNew ();
339- // } else {
340- // System.out.println(" something else was opened ");
343+ } else {
344+ Messages . log ( "No handleNew(), something passed on the command line " );
341345 }
342346
343347 // check for updates
0 commit comments