|
|
|
@ -158,7 +158,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
|
|
|
|
|
|
|
|
|
|
private JToolBar creatToolBar() { |
|
|
|
|
ToolBarDef toolBarDef = new ToolBarDef(); |
|
|
|
|
toolBarDef.addShortCut(new PreviewAction()); |
|
|
|
|
toolBarDef.addShortCut(new PreviewAction(this)); |
|
|
|
|
toolBarDef.addShortCut(new RefreshAction()); |
|
|
|
|
toolBarDef.addShortCut(SeparatorDef.DEFAULT); |
|
|
|
|
isShareCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Is_Share_DBTableData")); |
|
|
|
@ -243,7 +243,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
|
|
|
|
|
this.storeProcedureWorkerListener = null; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private StoreProcedure updateBeanWithOutExecute() { |
|
|
|
|
String dbName = connectionTableProcedurePane.getSelectedDatabaseConnnectonName(); |
|
|
|
|
|
|
|
|
@ -266,16 +266,16 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
|
|
|
|
|
|
|
|
|
|
return sp; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public StoreProcedure updateBean() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final StoreProcedure sp = updateBeanWithOutExecute(); |
|
|
|
|
if (updateWorker != null) { |
|
|
|
|
updateWorker.cancel(true); |
|
|
|
|
} |
|
|
|
|
updateWorker = new SwingWorker<Void, Void>() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
protected Void doInBackground() throws Exception { |
|
|
|
|
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); |
|
|
|
@ -284,7 +284,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
|
|
|
|
|
sp.refreshDataModelListAndResultNames(dataModels); |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void done() { |
|
|
|
|
DesignTableDataManager.setThreadLocal(DesignTableDataManager.NO_PARAMETER); |
|
|
|
@ -293,7 +293,7 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
|
|
|
|
|
fireDSChanged(); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateWorker.execute(); |
|
|
|
|
return sp; |
|
|
|
|
} |
|
|
|
@ -359,17 +359,20 @@ public class ProcedureDataPane extends AbstractTableDataPane<StoreProcedure> imp
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private class PreviewAction extends UpdateAction { |
|
|
|
|
public PreviewAction() { |
|
|
|
|
ProcedureDataPane procedureDataPane; |
|
|
|
|
|
|
|
|
|
public PreviewAction(ProcedureDataPane procedureDataPane) { |
|
|
|
|
this.setName(PREVIEW_BUTTON); |
|
|
|
|
this.setMnemonic('P'); |
|
|
|
|
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); |
|
|
|
|
this.procedureDataPane = procedureDataPane; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent evt) { |
|
|
|
|
StoreProcedure sp = updateBeanWithOutExecute(); |
|
|
|
|
StoreProcedureDataWrapper storeProcedureDataWrappe = new StoreProcedureDataWrapper(sp, StringUtils.EMPTY, queryText.getText()); |
|
|
|
|
storeProcedureDataWrappe.previewData(StoreProcedureDataWrapper.PREVIEW_ALL); |
|
|
|
|
StoreProcedure sp = updateBeanWithOutExecute(); |
|
|
|
|
StoreProcedureDataWrapper storeProcedureDataWrapper = new StoreProcedureDataWrapper(this.procedureDataPane, sp, StringUtils.EMPTY, queryText.getText()); |
|
|
|
|
storeProcedureDataWrapper.previewData(StoreProcedureDataWrapper.PREVIEW_ALL); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|