use of com.cubrid.cubridmanager.ui.host.dialog.ExportConfigDialog in project cubrid-manager by CUBRID.
the class EditConfigEditor method doExport.
/**
* Perform the export based upon the given ConfigType.
*
* @param configType the ConfigType
*/
protected void doExport(ConfigType configType) {
IEditorInput input = this.getEditorInput();
if (!(input instanceof ConfEditInput)) {
return;
}
ExportConfigDialog dialog = new ExportConfigDialog(this.getSite().getShell(), configType, true);
if (defaultExportFilePath != null && !"".equals(defaultExportFilePath)) {
dialog.setDefaultFilePath(defaultExportFilePath);
}
if (defaultExportFileName != null && !"".equals(defaultExportFileName)) {
dialog.setDefaultFileName(defaultExportFileName);
}
if (defaultExportFileExtName != null && !"".equals(defaultExportFileExtName)) {
dialog.setDefaultFileExtName(defaultExportFileExtName);
}
if (defaultExportFileCharset != null && !"".equals(defaultExportFileCharset)) {
dialog.setOutputFileCharset(defaultExportFileCharset);
}
if (dialog.open() == Dialog.OK) {
defaultExportFilePath = dialog.getDefaultFilePath();
defaultExportFileName = dialog.getDefaultFileName();
defaultExportFileExtName = dialog.getDefaultFileExtName();
String fileFullName = dialog.getOutputFileFullName();
defaultExportFileCharset = dialog.getOutputFileCharset();
ConfigParaHelp.exportConf(contents, fileFullName, defaultExportFileCharset);
}
}
Aggregations