use of org.eclipse.egit.ui.internal.push.PushWizard in project egit by eclipse.
the class PushWizardTester method openPushWizard.
public RepoPropertiesPage openPushWizard(final Repository repository) throws Exception {
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
try {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
PushWizard pushWizard = new PushWizard(repository);
WizardDialog dlg = new WizardDialog(shell, pushWizard);
dlg.setHelpAvailable(false);
dlg.open();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
});
bot.waitUntil(Conditions.shellIsActive(UIText.PushWizard_windowTitleDefault), 20000);
return new RepoPropertiesPage();
}
use of org.eclipse.egit.ui.internal.push.PushWizard in project egit by eclipse.
the class PushActionHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
final Repository repository = getRepository(true, event);
if (repository == null)
return null;
final PushWizard pushWizard;
try {
pushWizard = new PushWizard(repository);
} catch (URISyntaxException x) {
ErrorDialog.openError(getShell(event), UIText.PushAction_wrongURITitle, UIText.PushAction_wrongURIDescription, new Status(IStatus.ERROR, Activator.getPluginId(), x.getMessage(), x));
return null;
}
WizardDialog dlg = new WizardDialog(getShell(event), pushWizard);
dlg.setHelpAvailable(true);
dlg.open();
return null;
}
use of org.eclipse.egit.ui.internal.push.PushWizard in project egit by eclipse.
the class PushCommand method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
List<RepositoryTreeNode> nodes = getSelectedNodes(event);
RepositoryTreeNode node = nodes.get(0);
IWizard pushWiz = null;
try {
switch(node.getType()) {
case REF:
Ref ref = (Ref) node.getObject();
pushWiz = new PushBranchWizard(node.getRepository(), ref);
break;
case TAG:
pushWiz = createPushTagsWizard(nodes);
break;
case REPO:
pushWiz = new PushWizard(node.getRepository());
break;
default:
// $NON-NLS-1$
throw new UnsupportedOperationException("type not supported!");
}
} catch (URISyntaxException e1) {
Activator.handleError(e1.getMessage(), e1, true);
return null;
}
WizardDialog dlg = new PushWizardDialog(getShell(event), pushWiz);
dlg.setHelpAvailable(pushWiz.isHelpAvailable());
dlg.open();
return null;
}
Aggregations