コード例 #1
0
 @Override
 public String getToolTipText() {
   if (status != null && !status.isOK()) {
     return status.getMessage();
   }
   if (gotoAction != null) {
     return gotoAction.getToolTipText();
   }
   return Utils.shortenText(
       SynchronizeView.MAX_NAME_LENGTH, RefreshParticipantJob.this.getName());
 }
コード例 #2
0
  private Composite getErrorComposite(Composite parent) {
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setBackground(getListBackgroundColor());
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    composite.setLayout(layout);
    GridData data = new GridData(GridData.FILL_BOTH);
    data.grabExcessVerticalSpace = true;
    composite.setLayoutData(data);

    Hyperlink link = new Hyperlink(composite, SWT.WRAP);
    link.setText(TeamUIMessages.ChangesSection_8);
    link.addHyperlinkListener(
        new HyperlinkAdapter() {
          public void linkActivated(HyperlinkEvent e) {
            showErrors();
          }
        });
    link.setBackground(getListBackgroundColor());
    link.setUnderlined(true);

    link = new Hyperlink(composite, SWT.WRAP);
    link.setText(TeamUIMessages.ChangesSection_9);
    link.addHyperlinkListener(
        new HyperlinkAdapter() {
          public void linkActivated(HyperlinkEvent e) {
            getPage().reset();
          }
        });
    link.setBackground(getListBackgroundColor());
    link.setUnderlined(true);

    createDescriptionLabel(
        composite,
        NLS.bind(
            TeamUIMessages.ChangesSection_10,
            new String[] {
              Utils.shortenText(
                  SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName())
            }));

    return composite;
  }