@ -1,6 +1,7 @@
package com.fr.design.actions.file ;
package com.fr.design.actions.file ;
import java.awt.event.ActionEvent ;
import java.awt.event.ActionEvent ;
import java.io.File ;
import java.util.List ;
import java.util.List ;
import com.fr.base.BaseUtils ;
import com.fr.base.BaseUtils ;
@ -11,6 +12,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.menu.KeySetUtils ;
import com.fr.design.menu.KeySetUtils ;
import com.fr.design.menu.MenuDef ;
import com.fr.design.menu.MenuDef ;
import com.fr.file.FILEFactory ;
import com.fr.file.FILEFactory ;
import com.fr.file.FileFILE ;
/ * *
/ * *
* Open Resent MenuDef .
* Open Resent MenuDef .
@ -68,7 +70,12 @@ public class OpenRecentReportMenuDef extends MenuDef {
* @param e 事件
* @param e 事件
* /
* /
public void actionPerformed ( ActionEvent e ) {
public void actionPerformed ( ActionEvent e ) {
DesignerContext . getDesignerFrame ( ) . openTemplate ( FILEFactory . createFILE ( this . getPath ( ) ) ) ;
File file = new File ( this . getPath ( ) ) ;
if ( file . exists ( ) ) {
DesignerContext . getDesignerFrame ( ) . openTemplate ( new FileFILE ( file ) ) ;
} else {
DesignerContext . getDesignerFrame ( ) . openTemplate ( FILEFactory . createFILE ( this . getPath ( ) ) ) ;
}
}
}
public String getPath ( ) {
public String getPath ( ) {