Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.IContentProposal


            if (pattern != null
                && !pattern.matcher(uriString).matches())
              continue;

            IContentProposal propsal = new IContentProposal() {

              public String getLabel() {
                return null;
              }
View Full Code Here


            if (pattern != null
                && !pattern.matcher(ref.getName()).matches()
                && !pattern.matcher(shortenedName).matches())
              continue;

            IContentProposal propsal = new RefContentProposal(
                repository, ref);
            resultList.add(propsal);
          }

        return resultList.toArray(new IContentProposal[resultList
View Full Code Here

        {
            final String proposal = proposals.get( k );
            if ( proposal.toUpperCase().startsWith( string.toUpperCase() ) && !proposal.equalsIgnoreCase( string )
                && !"".equals( string ) )
            {
                IContentProposal p = new IContentProposal()
                {
                    public String getContent()
                    {
                        return proposal;
                    }
View Full Code Here

    private void handleSetData(Event event) {
      TableItem item = (TableItem) event.item;
      int index = proposalTable.indexOf(item);

      if (0 <= index && index < proposals.length) {
        IContentProposal current = proposals[index];
        item.setText(getString(current));
        item.setImage(getImage(current));
        item.setData(current);
      } else {
        // this should not happen, but does on win32
View Full Code Here

          proposalTable.setRedraw(false);
          proposalTable.setItemCount(newSize);
          TableItem[] items = proposalTable.getItems();
          for (int i = 0; i < items.length; i++) {
            TableItem item = items[i];
            IContentProposal proposal = newProposals[i];
            item.setText(getString(proposal));
            item.setImage(getImage(proposal));
            item.setData(proposal);
          }
          proposalTable.setRedraw(true);
View Full Code Here

      int value = super.open();
      if (popupCloser == null) {
        popupCloser = new PopupCloserListener();
      }
      popupCloser.installListeners();
      IContentProposal p = getSelectedProposal();
      if (p != null) {
        showProposalDescription();
      }
      return value;
    }
View Full Code Here

            }
            getShell().getDisplay().syncExec(new Runnable() {
              public void run() {
                // Query the current selection since we have
                // been delayed
                IContentProposal p = getSelectedProposal();
                if (p != null) {
                  String description = p.getDescription();
                  if (description != null) {
                    if (infoPopup == null) {
                      infoPopup = new InfoPopupDialog(
                          getShell());
                      infoPopup.open();
                      infoPopup
                          .getShell()
                          .addDisposeListener(
                              new DisposeListener() {
                                public void widgetDisposed(
                                    DisposeEvent event) {
                                  infoPopup = null;
                                }
                              });
                    }
                    infoPopup.setContents(p
                        .getDescription());
                  } else if (infoPopup != null) {
                    infoPopup.close();
                  }
                  pendingDescriptionUpdate = false;
View Full Code Here

    private void acceptCurrentProposal() {
      // Close before accepting the proposal. This is important
      // so that the cursor position can be properly restored at
      // acceptance, which does not work without focus on some controls.
      // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=127108
      IContentProposal proposal = getSelectedProposal();
      close();
      proposalAccepted(proposal);
    }
View Full Code Here

        final int position) {
      List<IContentProposal> contentProposals = new ArrayList<IContentProposal>();
      for (int i = 0; i < proposals.length; i++) {
        final String proposal = proposals[i];
        if (proposal.startsWith(contents)) {
          contentProposals.add(new IContentProposal() {
            public String getContent() {
              return proposal.substring(position);
            }

            public String getDescription() {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.fieldassist.IContentProposal

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.