*/
protected void perform( File[] paths )
{
if( paths.length == 0 ) return;
Session doc;
// File f;
// check if the document is already open
for( int j = 0; j < paths.length; j++ ) {
doc = findDocumentForPath( paths[ j ]);
if( doc != null ) {
doc.getFrame().setVisible( true );
doc.getFrame().toFront();
return;
}
}
try {
doc = Session.newFrom( paths );
addRecent( doc.getDisplayDescr().file );
AbstractApplication.getApplication().getDocumentHandler().addDocument( this, doc );
doc.createFrame(); // must be performed after the doc was added
}
catch( IOException e1 ) {
BasicWindowHandler.showErrorDialog( null, e1, getValue( Action.NAME ).toString() );
}
}