Search in sources :

Example 1 with NewRemoteDialog

use of org.eclipse.egit.ui.internal.dialogs.NewRemoteDialog in project egit by eclipse.

the class ConfigureRemoteCommand method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    RemotesNode node = getSelectedNodes(event).get(0);
    Repository repository = node.getRepository();
    NewRemoteDialog nrd = new NewRemoteDialog(getShell(event), repository);
    if (nrd.open() != Window.OK)
        return null;
    if (nrd.getPushMode())
        SimpleConfigurePushDialog.getDialog(getShell(event), repository, nrd.getName()).open();
    else
        SimpleConfigureFetchDialog.getDialog(getShell(event), repository, nrd.getName()).open();
    return null;
}
Also used : Repository(org.eclipse.jgit.lib.Repository) RemotesNode(org.eclipse.egit.ui.internal.repository.tree.RemotesNode) NewRemoteDialog(org.eclipse.egit.ui.internal.dialogs.NewRemoteDialog)

Aggregations

NewRemoteDialog (org.eclipse.egit.ui.internal.dialogs.NewRemoteDialog)1 RemotesNode (org.eclipse.egit.ui.internal.repository.tree.RemotesNode)1 Repository (org.eclipse.jgit.lib.Repository)1