ExportHandler.java 文件源码

java
阅读 23 收藏 0 点赞 0 评论 0

项目:termsuite-ui 作者:
@Execute
public void execute(
        @Optional @Named(IServiceConstants.ACTIVE_SHELL) Shell shell,
        @Optional TerminologyService terminologyService,
        @Optional ETerminology terminology,
        @Optional IndexedCorpus indexedCorpus
        ) throws IOException {

    FileDialog fileDialog = new FileDialog(shell, SWT.SAVE);
    fileDialog.setText("Exporting terminology "+ TerminologyPart.toPartLabel(terminology) +" to " + formatName);
    String path = fileDialog.open();
    if(path != null) {
        if(withOptionDialog) {
            Dialog dialog = getDialog(shell);
            if(dialog.open() == Dialog.OK) 
                export(shell, terminology, getExporter(dialog), indexedCorpus, path);
        } else
            // no option dialog
            export(shell, terminology, getExporter(), indexedCorpus, path);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号