|
|
@ -2,6 +2,7 @@ package com.fr.design.actions.file.export; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.actions.JTemplateAction; |
|
|
|
import com.fr.design.actions.JTemplateAction; |
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
import com.fr.design.base.mode.DesignModeContext; |
|
|
|
|
|
|
|
import com.fr.design.dialog.FineJOptionPane; |
|
|
|
import com.fr.design.gui.iprogressbar.FRProgressBar; |
|
|
|
import com.fr.design.gui.iprogressbar.FRProgressBar; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
@ -132,10 +133,10 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT |
|
|
|
E e = getEditingComponent(); |
|
|
|
E e = getEditingComponent(); |
|
|
|
if (!e.isALLSaved() && !DesignModeContext.isVcsMode()) { |
|
|
|
if (!e.isALLSaved() && !DesignModeContext.isVcsMode()) { |
|
|
|
e.stopEditing(); |
|
|
|
e.stopEditing(); |
|
|
|
int returnVal = JOptionPane.showConfirmDialog( |
|
|
|
int returnVal = FineJOptionPane.showConfirmDialog( |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + e.getEditingFILE() + "\" ?", |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Utils_Would_You_Like_To_Save") + " \"" + e.getEditingFILE() + "\" ?", |
|
|
|
ProductConstants.PRODUCT_NAME, |
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Confirm"), |
|
|
|
JOptionPane.YES_NO_CANCEL_OPTION, |
|
|
|
JOptionPane.YES_NO_CANCEL_OPTION, |
|
|
|
JOptionPane.QUESTION_MESSAGE |
|
|
|
JOptionPane.QUESTION_MESSAGE |
|
|
|
); |
|
|
|
); |
|
|
@ -171,30 +172,30 @@ public abstract class AbstractExportAction<E extends JTemplate<?, ?>> extends JT |
|
|
|
this.setProgress(100); |
|
|
|
this.setProgress(100); |
|
|
|
|
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().info("\"" + name + "\"" + Toolkit.i18nText("Fine-Design_Report_Finish_Export") + "!"); |
|
|
|
FineLoggerFactory.getLogger().info("\"" + name + "\"" + Toolkit.i18nText("Fine-Design_Report_Finish_Export") + "!"); |
|
|
|
JOptionPane.showMessageDialog( |
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Report_Exported_Successfully") + "\n" + name); |
|
|
|
Toolkit.i18nText("Fine-Design_Report_Exported_Successfully") + "\n" + name); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (RemoteDesignPermissionDeniedException exp) { |
|
|
|
} catch (RemoteDesignPermissionDeniedException exp) { |
|
|
|
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); |
|
|
|
|
|
|
|
this.setProgress(100); |
|
|
|
this.setProgress(100); |
|
|
|
target.closeTemplate(); |
|
|
|
target.closeTemplate(); |
|
|
|
JOptionPane.showMessageDialog( |
|
|
|
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); |
|
|
|
|
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Engine_Remote_Design_Permission_Denied"), |
|
|
|
Toolkit.i18nText("Fine-Engine_Remote_Design_Permission_Denied"), |
|
|
|
UIManager.getString("OptionPane.messageDialogTitle"), |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), |
|
|
|
JOptionPane.ERROR_MESSAGE, |
|
|
|
JOptionPane.ERROR_MESSAGE, |
|
|
|
UIManager.getIcon("OptionPane.errorIcon") |
|
|
|
UIManager.getIcon("OptionPane.errorIcon") |
|
|
|
); |
|
|
|
); |
|
|
|
} catch (Exception exp) { |
|
|
|
} catch (Exception exp) { |
|
|
|
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); |
|
|
|
|
|
|
|
this.setProgress(100); |
|
|
|
this.setProgress(100); |
|
|
|
target.closeTemplate(); |
|
|
|
target.closeTemplate(); |
|
|
|
JOptionPane.showMessageDialog( |
|
|
|
FineLoggerFactory.getLogger().error(exp.getMessage(), exp); |
|
|
|
|
|
|
|
FineJOptionPane.showMessageDialog( |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
DesignerContext.getDesignerFrame(), |
|
|
|
Toolkit.i18nText("Fine-Design_Report_Export_Failed") + "\n" + path, |
|
|
|
Toolkit.i18nText("Fine-Design_Report_Export_Failed") + "\n" + path, |
|
|
|
UIManager.getString("OptionPane.messageDialogTitle"), |
|
|
|
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Error"), |
|
|
|
JOptionPane.ERROR_MESSAGE, |
|
|
|
JOptionPane.ERROR_MESSAGE, |
|
|
|
UIManager.getIcon("OptionPane.errorIcon") |
|
|
|
UIManager.getIcon("OptionPane.errorIcon") |
|
|
|
); |
|
|
|
); |
|
|
|