final JLabel lbl = new JLabel(s_stringMgr.getString("DumpApplicationAction.warning"));
lbl.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
final File outFile = Dialogs.selectFileForWriting(parentFrame, filters, lbl);
if (outFile != null)
{
ListMessageHandler msgHandler = new ListMessageHandler();
ICommand cmd = new DumpApplicationCommand(app, outFile, msgHandler);
try
{
cmd.execute();
String[] msgs = msgHandler.getMessages();
String[] warnings = msgHandler.getWarningMessages();
Throwable[] errors = msgHandler.getExceptions();
if (msgs.length > 0 || errors.length > 0 || warnings.length > 0)
{
for (int i = 0; i < msgs.length; ++i)
{
app.showErrorDialog(msgs[i]);