pr = new PNMLImport((ApplicationMediator) getMediator());
boolean loadSuccess = false;
InputStream is;
ImportFrame aImp = new ImportFrame();
if (aImp.getElement() == null)
{
getMediator().getUi().getComponent().setCursor(Cursor.getDefaultCursor());
return null;
}
ApromoreAccessObject aao = new ApromoreAccessObject();//"proxy.dhbw-karlsruhe.de", 8080);
try {
is = aao.getPNML(aImp.getElement()).getInputStream();
loadSuccess = pr.run(is);
} catch (NullPointerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (loadSuccess) {
editor = pr.getEditor()[pr.getEditor().length - 1];
for (int i = 0; i < pr.getEditor().length; i++) {
// add Editor
LoggerManager.info(Constants.FILE_LOGGER,
"Petrinet loaded from Apromore");
((EditorVC) pr.getEditor()[i]).setApromoreSettings(aImp.getEditSession());
}
} else {
String arg[] = { "Apromore" };
JOptionPane.showMessageDialog(null,
Messages.getString("File.Error.FileOpen.Text", arg),