use of com.kyj.fx.voeditor.visual.functions.LoadFileOptionHandler in project Gargoyle by callakrsos.
the class SqlTab method miOenOnAction.
public void miOenOnAction(ActionEvent e) {
File showFileDialog = DialogUtil.showFileDialog(/*SharedMemory.getPrimaryStage()*/
null, choser -> {
choser.getExtensionFilters().add(new ExtensionFilter(GargoyleExtensionFilters.SQL_NAME, GargoyleExtensionFilters.SQL));
});
//선택한 파일이 정상적으로 선택된 경우는 null이 아님.
if (showFileDialog != null) {
String fileContent = FileUtil.readFile(showFileDialog, new LoadFileOptionHandler());
if (fileContent != null) /*공백여부는 체크안함. 파일 내용에 실제 공백이 포함될 수 있으므로...*/
{
setTxtSql(fileContent);
setText(showFileDialog.getName());
}
}
e.consume();
}
use of com.kyj.fx.voeditor.visual.functions.LoadFileOptionHandler in project Gargoyle by callakrsos.
the class DimCat method cat.
public String cat(String prjSpec, String path, String revision, String encoding) {
File copy = copy(prjSpec, path, revision, encoding);
LoadFileOptionHandler defaultHandler = LoadFileOptionHandler.getDefaultHandler();
defaultHandler.setEncoding(encoding);
return FileUtil.readFile(copy, defaultHandler);
}
Aggregations