eclipse plugin: Use the native java messagebox...
...in case we had any errors setting up the logger instead of using eclipse's shell which was not even created yet.
This commit is contained in:
parent
6d2b21f13d
commit
a1c06468af
2 changed files with 4 additions and 5 deletions
|
@ -17,6 +17,8 @@ import java.io.StringWriter;
|
|||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.swing.JOptionPane;
|
||||
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.wesnoth.utils.GUIUtils;
|
||||
import org.wesnoth.utils.WorkspaceUtils;
|
||||
|
@ -63,8 +65,7 @@ public class Logger {
|
|||
log(Messages.Logger_3);
|
||||
} catch (IOException e)
|
||||
{
|
||||
GUIUtils.showErrorMessageBox(Messages.Logger_4 +
|
||||
e.getMessage());
|
||||
JOptionPane.showMessageDialog(null, Messages.Logger_4 + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +153,6 @@ public class Logger {
|
|||
}
|
||||
}
|
||||
System.out.println(message);
|
||||
//Activator.getDefault().getLog().log(new Status(IStatus.INFO,"wesnoth_plugin",message));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -277,10 +277,9 @@ public class WorkspaceUtils
|
|||
|
||||
File tmpFile = new File(temporaryFolder_);
|
||||
|
||||
tmpFile.mkdirs();
|
||||
if (!tmpFile.exists())
|
||||
temporaryFolder_ = null;
|
||||
else
|
||||
tmpFile.mkdirs();
|
||||
}
|
||||
return temporaryFolder_;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue