PublishFile2ServerWizard.java 文件源码

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

项目:PDFReporter-Studio 作者:
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
    if (selection instanceof StructuredSelection) {
        if (selection.getFirstElement() instanceof IProject || selection.getFirstElement() instanceof IFile || selection.getFirstElement() instanceof IFolder) {
            this.selection = selection;
            return;
        }
        for (Object obj : selection.toList()) {
            if (obj instanceof EditPart) {
                IEditorInput ein = SelectionHelper.getActiveJRXMLEditor().getEditorInput();
                if (ein instanceof FileEditorInput) {
                    this.selection = new TreeSelection(new TreePath(new Object[] { ((FileEditorInput) ein).getFile() }));
                    return;
                }
            }
        }
    }
    this.selection = selection;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号