There are 1 code examples for org.eclipse.update.internal.ui.wizards.InstallWizard2.

The API names are highlighted below. You can use suckoo button to vote the code example(s) you like. The best code example will be ranked first next time. Thanks a lot for your feedback.

Project Name: rssowl.ui Package: org.rssowl.ui.internal.actions

Source Code: FindExtensionsAction.java (Click to view .java file)

Method Code:
vote
like

private void openInstallWizard2(){
  if (org.eclipse.update.internal.ui.wizards.InstallWizard2.isRunning()) {
    MessageDialog.openInformation(getValidShell(),Messages.FindExtensionsAction_FIND_ADDONS,Messages.FindExtensionsAction_UPDATE_IN_PROGRESS);
    return;
  }
  if (fJob.getUpdates() == null || fJob.getUpdates().length == 0) {
    if (fJob.isUpdate())     MessageDialog.openInformation(getValidShell(),Messages.FindExtensionsAction_FIND_ADDONS,Messages.FindExtensionsAction_NO_UPDATES_FOUND);
 else     MessageDialog.openInformation(getValidShell(),Messages.FindExtensionsAction_FIND_ADDONS,Messages.FindExtensionsAction_NO_ADDONS_FOUND);
    return;
  }
  org.eclipse.update.internal.ui.wizards.InstallWizard2 wizard=new org.eclipse.update.internal.ui.wizards.InstallWizard2(fJob.getSearchRequest(),fJob.getUpdates(),fJob.isUpdate());
  WizardDialog dialog=new org.eclipse.update.internal.ui.wizards.ResizableInstallWizardDialog(getValidShell(),wizard,Messages.FindExtensionsAction_RSSOWL_ADDONS);
  dialog.create();
  if (dialog.getCurrentPage() != null) {
    Control control=dialog.getCurrentPage().getControl();
    if (control != null && !control.isDisposed() && control instanceof Composite) {
      Composite container=((Composite)control);
      Control[] children=container.getChildren();
      if (children != null && children.length == 1 && children[0] instanceof Composite) {
        container=(Composite)children[0];
        children=container.getChildren();
        if (children.length > 2) {
          if (children[1] instanceof SashForm) {
            SashForm form=(SashForm)children[1];
            form.setWeights(new int[]{70,30});
            Control[] formChilds=form.getChildren();
            if (formChilds.length != 0 && formChilds[0] instanceof Tree) {
              Tree tree=(Tree)formChilds[0];
              if (tree.getItemCount() != 0) {
                TreeItem root=tree.getItem(0);
                root.setExpanded(true);
              }
            }
          }
        }
      }
    }
  }
  dialog.open();
}