use of org.eclipse.ui.IImportWizard in project eclipse.jdt.ui by eclipse-jdt.
the class LibrariesWorkbookPage method replaceJarFile.
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();
}
}
use of org.eclipse.ui.IImportWizard in project eclipse.jdt.ui by eclipse-jdt.
the class JarImportWizardAction method run.
@Override
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();
}
Aggregations