/**
* We will accept the selection in the workbench to see if we can initialize
* from it.
*
* @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection)
*/
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;
}
Publish2ServerWizard.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:PDFReporter-Studio
作者:
评论列表
文章目录