Package org.eclipse.egit.ui.UIUtils

Examples of org.eclipse.egit.ui.UIUtils.IRefListProvider


    remoteBranchNameText = new Text(remoteGroup, SWT.BORDER);
    GridDataFactory.fillDefaults().grab(true, false).span(2, 1)
        .applyTo(remoteBranchNameText);
    remoteBranchNameText.setText(getSuggestedBranchName());
    UIUtils.addRefContentProposalToText(remoteBranchNameText,
        this.repository, new IRefListProvider() {

          public List<Ref> getRefList() {
            if (PushBranchPage.this.assist != null) {
              return PushBranchPage.this.assist
                  .getRefsForContentAssist(false, true);
View Full Code Here


        checkPage();
      }
    });
    GridDataFactory.fillDefaults().grab(true, false).applyTo(sourceText);
    UIUtils.addRefContentProposalToText(sourceText, repository,
        new IRefListProvider() {
          public List<Ref> getRefList() {
            return getRemoteRefs();
          }
        });
    checkPage();
View Full Code Here

            setSpec(getSpec().setSource(sourceText.getText()));
      }
    });
    // content assist for source
    UIUtils.addRefContentProposalToText(sourceText, repo,
        new IRefListProvider() {
          public List<Ref> getRefList() {
            return assistProvider.getRefsForContentAssist(true, pushMode);
          }
        });

    // suggest remote tracking branch
    if (!pushMode) {
      final Button autoSuggest = new Button(main, SWT.CHECK);
      GridDataFactory.fillDefaults().span(2, 1).applyTo(autoSuggest);
      autoSuggest.setText(UIText.RefSpecDialog_AutoSuggestCheckbox);
      autoSuggest.setSelection(true);
      autoSuggest.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
          autoSuggestDestination = autoSuggest.getSelection();
        }
      });
    }

    // destination
    Label destinationLabel = new Label(main, SWT.NONE);
    if (pushMode)
      destinationLabel.setText(UIText.RefSpecDialog_DestinationPushLabel);
    else
      destinationLabel
          .setText(UIText.RefSpecDialog_DestinationFetchLabel);
    destinationText = new Text(main, SWT.BORDER);
    GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).grab(true,
        false).applyTo(destinationText);
    if (spec != null && spec.getDestination() != null)
      destinationText.setText(spec.getDestination());
    destinationText.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        if (destinationText.isFocusControl())
          setSpec(getSpec().setDestination(destinationText.getText()));
      }
    });
    // content assist for destination
    UIUtils.addRefContentProposalToText(destinationText, repo,
        new IRefListProvider() {
          public List<Ref> getRefList() {
            return assistProvider.getRefsForContentAssist(false, pushMode);
          }
        });
View Full Code Here

      }
    });
    GridDataFactory.fillDefaults().grab(true, false).applyTo(
        destinationText);
    UIUtils.addRefContentProposalToText(sourceText, repository,
        new IRefListProvider() {
          public List<Ref> getRefList() {
            return getRemoteRefs();
          }
        });
View Full Code Here

TOP

Related Classes of org.eclipse.egit.ui.UIUtils.IRefListProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.