Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.ControlDecoration


    return item;
  }

  public void addTypeFieldAssistToText(final Text text) {
    int bits = SWT.TOP | SWT.LEFT;
    ControlDecoration controlDecoration = new ControlDecoration(text, bits);
    controlDecoration.setMarginWidth(0);
    controlDecoration.setShowHover(true);
    controlDecoration.setShowOnlyOnFocus(true);
    FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
        FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    controlDecoration.setImage(contentProposalImage.getImage());

    // Create the proposal provider
    RooShellProposalProvider proposalProvider = new RooShellProposalProvider(text);
    TextContentAdapter textContentAdapter = new TextContentAdapter();
    final RooContentProposalAdapter adapter = new RooContentProposalAdapter(text, textContentAdapter, proposalProvider,
View Full Code Here


    setLabelProvider(new XmlBackedContentProposalLabelProvider());
    addControlDecoration();
  }

  private void addControlDecoration() {
    ControlDecoration controlDec = new ControlDecoration(control, SWT.TOP | SWT.LEFT);
    FieldDecoration fieldDec = FieldDecorationRegistry.getDefault().getFieldDecoration(
        FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    controlDec.setImage(fieldDec.getImage());
    controlDec.setShowOnlyOnFocus(true);
  }
View Full Code Here

TOP

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

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.