private static String getProjectDirectory(final String arg) {
final String[] ret = new String[1];
try {
SwingUtilities.invokeAndWait(new Runnable() {
public void run() {
MPFSelection selection = new MPFSelection();
if (arg != null && arg.endsWith(".mpf") && new File(arg).isFile()) {
argProcessor.help("A marathon project file is given.\nUse project directory instead");
}
ret[0] = selection.getProjectDirectory(arg);
}
});
} catch (Exception e) {
e.printStackTrace();
}