Search in sources :

Example 1 with FetchWizard

use of org.eclipse.egit.ui.internal.fetch.FetchWizard in project egit by eclipse.

the class FetchActionHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    final Repository repository = getRepository(true, event);
    if (repository == null)
        return null;
    final FetchWizard fetchWizard;
    try {
        fetchWizard = new FetchWizard(repository);
    } catch (URISyntaxException x) {
        ErrorDialog.openError(getShell(event), UIText.FetchAction_wrongURITitle, UIText.FetchAction_wrongURIMessage, new Status(IStatus.ERROR, Activator.getPluginId(), x.getMessage(), x));
        return null;
    }
    WizardDialog dlg = new WizardDialog(getShell(event), fetchWizard);
    dlg.setHelpAvailable(false);
    dlg.open();
    return null;
}
Also used : IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) Repository(org.eclipse.jgit.lib.Repository) FetchWizard(org.eclipse.egit.ui.internal.fetch.FetchWizard) URISyntaxException(java.net.URISyntaxException) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Example 2 with FetchWizard

use of org.eclipse.egit.ui.internal.fetch.FetchWizard in project egit by eclipse.

the class FetchCommand method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    RepositoryNode node = getSelectedNodes(event).get(0);
    try {
        WizardDialog dlg = new WizardDialog(getShell(event), new FetchWizard(node.getRepository()));
        dlg.setHelpAvailable(false);
        dlg.open();
    } catch (URISyntaxException e1) {
        Activator.handleError(e1.getMessage(), e1, true);
    }
    return null;
}
Also used : FetchWizard(org.eclipse.egit.ui.internal.fetch.FetchWizard) URISyntaxException(java.net.URISyntaxException) RepositoryNode(org.eclipse.egit.ui.internal.repository.tree.RepositoryNode) WizardDialog(org.eclipse.jface.wizard.WizardDialog)

Aggregations

URISyntaxException (java.net.URISyntaxException)2 FetchWizard (org.eclipse.egit.ui.internal.fetch.FetchWizard)2 WizardDialog (org.eclipse.jface.wizard.WizardDialog)2 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 RepositoryNode (org.eclipse.egit.ui.internal.repository.tree.RepositoryNode)1 Repository (org.eclipse.jgit.lib.Repository)1