本文整理匯總了Java中org.eclipse.ui.IImportWizard類的典型用法代碼示例。如果您正苦於以下問題:Java IImportWizard類的具體用法?Java IImportWizard怎麽用?Java IImportWizard使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IImportWizard類屬於org.eclipse.ui包,在下文中一共展示了IImportWizard類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: run
import org.eclipse.ui.IImportWizard; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
public void run(final IAction action) {
if (fWorkbenchPart == null || fSelection == null)
return;
final IImportWizard wizard= new JarImportWizard(false);
final IWorkbenchWindow window= fWorkbenchPart.getSite().getWorkbenchWindow();
wizard.init(window.getWorkbench(), fSelection);
final WizardDialog dialog= new WizardDialog(window.getShell(), wizard);
dialog.create();
dialog.getShell().setSize(Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x), SIZING_WIZARD_HEIGHT);
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IJavaHelpContextIds.JARIMPORT_WIZARD_PAGE);
dialog.open();
}
示例2: replaceJarFile
import org.eclipse.ui.IImportWizard; //導入依賴的package包/類
private void replaceJarFile() {
final IPackageFragmentRoot root= getSelectedPackageFragmentRoot();
if (root != null) {
final IImportWizard wizard= new JarImportWizard(false);
wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(root));
final WizardDialog dialog= new WizardDialog(getShell(), wizard);
dialog.create();
dialog.getShell().setSize(Math.max(JarImportWizardAction.SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x), JarImportWizardAction.SIZING_WIZARD_HEIGHT);
PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(), IJavaHelpContextIds.JARIMPORT_WIZARD_PAGE);
dialog.open();
}
}