Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.TextContentAdapter


  public static void attachContentAssist(Text text, Object[] elements) {
    try {
      char[] autoActivationCharacters = new char[0];
      KeyStroke keyStroke = KeyStroke.getInstance("Ctrl+Space");
      new ContentProposalAdapter(text, new TextContentAdapter(),
          new SimpleContentProposalProvider(elements), keyStroke,
          autoActivationCharacters);
    }
    catch (ParseException e1) {
    }
View Full Code Here


    return refText.getText();
  }

  @Override
  protected void hookContentProposalAdapters() {
    new XmlBackedContentProposalAdapter(refText, new TextContentAdapter(),
        new WizardBeanReferenceContentProposalProvider(getInput(), OsgiSchemaConstants.ATTR_REF,
            getResourceFile(), getDomDocument(), true));
  }
View Full Code Here

        return proposals.toArray(new IContentProposal[proposals.size()]);
      }
    };
    try {
      KeyStroke keyStroke = KeyStroke.getInstance("Ctrl+Space");
      ContentProposalAdapter contentProposalAdapter = new ContentProposalAdapter(profilesText, new TextContentAdapter(), proposalProvider, keyStroke, null);
      contentProposalAdapter.addContentProposalListener(new IContentProposalListener() {
       
        public void proposalAccepted(IContentProposal proposal) {
          if (proposal instanceof ProfileContentProposal) {
            ProfileContentProposal profileProposal = (ProfileContentProposal) proposal;
View Full Code Here

          originalDocument);
      proposalProvider = parentProposalProvider;
    }

    if (proposalProvider != null) {
      contentProposalAdapters.add(new XmlBackedContentProposalAdapter(text, new TextContentAdapter(),
          proposalProvider));
    }

    addListener(text, attributeName);
  }
View Full Code Here

          originalDocument);
    }

    if (proposalProvider != null) {
      if (attributeName.equals(BeansSchemaConstants.ATTR_NAME)) {
        new XmlBackedContentProposalAdapter(text, new TextContentAdapter(), proposalProvider, null);
      }
      new XmlBackedContentProposalAdapter(text, new TextContentAdapter(), proposalProvider);
    }

    addListener(text, attributeName);
  }
View Full Code Here

          originalDocument, definedProperties);
    }

    if (proposalProvider != null) {
      if (attributeName.equals(BeansSchemaConstants.ATTR_NAME)) {
        new XmlBackedContentProposalAdapter(text, new TextContentAdapter(), proposalProvider, null);
      }
      new XmlBackedContentProposalAdapter(text, new TextContentAdapter(), proposalProvider);
    }

    addListener(text, attributeName);
  }
View Full Code Here

   * adapter is providing content
   * @param proposalProvider the {@link XmlBackedContentProposalProvider} used
   * to obtain content proposals for this control, or null if no content
   */
  public TextAttributeProposalAdapter(TextAttribute attrControl, XmlBackedContentProposalProvider proposalProvider) {
    super(attrControl.getTextControl(), new TextContentAdapter(), proposalProvider);
  }
View Full Code Here

TOP

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

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.