From: costamojan <cos...@us...> - 2006-04-18 20:02:11
|
Update of /cvsroot/abbot/abbot/src/abbot/editor/editors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4503/src/abbot/editor/editors Modified Files: LaunchEditor.java Log Message: ~ fix: arguments will be applied properly (with square braces) Index: LaunchEditor.java =================================================================== RCS file: /cvsroot/abbot/abbot/src/abbot/editor/editors/LaunchEditor.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** LaunchEditor.java 18 Apr 2006 19:33:25 -0000 1.22 --- LaunchEditor.java 18 Apr 2006 20:02:07 -0000 1.23 *************** *** 173,186 **** Workspace workspace = Workspace.getWorkspace( workspacedir ); String cp = loadClasspath( workspace, launchconfig ); // modify the step ! launch . setArguments ( launchconfig.getProgramArguments() ); ! launch . setClasspath ( cp ); ! launch . setTargetClassName ( launchconfig.getMainType() ); // ant4eclipse assures the File.pathSeparator classpath . setValues ( cp.split( File.pathSeparator ) ); ! target . setText ( launchconfig.getMainType() ); ! arguments . setValues ( launchconfig.getProgramArguments().split( " " ) ); result = true; --- 173,196 ---- Workspace workspace = Workspace.getWorkspace( workspacedir ); String cp = loadClasspath( workspace, launchconfig ); + + String[] splitted = launchconfig.getProgramArguments().split(" "); + StringBuffer args = new StringBuffer(); + for( int i = 0; i < splitted.length; i++ ) { + if( i > 0 ) { + args.append(" "); + } + splitted[i] = "[" + splitted[i] + "]"; + args.append( splitted[i] ); + } // modify the step ! launch . setArguments ( args.toString() ); ! launch . setClasspath ( cp ); ! launch . setTargetClassName ( launchconfig.getMainType() ); // ant4eclipse assures the File.pathSeparator classpath . setValues ( cp.split( File.pathSeparator ) ); ! target . setText ( launchconfig.getMainType() ); ! arguments . setValues ( splitted ); result = true; |