Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.ContentProposalAdapter


    char[] autoActivationCharacters = new char[(126 - 32) + 1];
    for (int i = 32; i <= 126; i++)
      autoActivationCharacters[i - 32] = (char) i;

    ContentProposalAdapter urlProposalAdapter = new ContentProposalAdapter(currentURLText, new TextContentAdapter(),
        new URLContentProposalProvider(urlHistory), keyStroke, autoActivationCharacters);

    // create the Browse button
    browseButton = new Button(toolbarTopArea, SWT.PUSH);
    browseButton.setText("Browse...");
View Full Code Here


        GridData gd = new GridData();
        gd.widthHint = 180;
        rdnLine.rdnNameComboField.getLayoutControl().setLayoutData( gd );
        rdnLine.rdnNameCombo = ( Combo ) rdnLine.rdnNameComboField.getControl();

        rdnLine.rdnNameCPA = new ContentProposalAdapter( rdnLine.rdnNameCombo, new ComboContentAdapter(),
            new ListContentProposalProvider( attributeNames ), null, null );
        rdnLine.rdnNameCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
        rdnLine.rdnNameCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

        rdnLine.rdnEqualsLabel = new Label( rdnComposite, SWT.NONE );
View Full Code Here

            }
        } );

        parser = new LdapFilterParser();
        contentAssistProcessor = new FilterContentAssistProcessor( parser );
        filterCPA = new ContentProposalAdapter( filterCombo, new ComboContentAdapter(), contentAssistProcessor,
            KeyStroke.getInstance( SWT.CTRL, ' ' ), null );
        filterCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
        filterCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

        // auto edit strategy
View Full Code Here

                    validate();
                }
            } );

            // attach content proposal behavior
            contextEntryDnComboCPA = new ContentProposalAdapter( contextEntryDnCombo, new ComboContentAdapter(), null,
                null, null );
            contextEntryDnComboCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
            contextEntryDnComboCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

            setControl( composite );
View Full Code Here

        // Content assist is available
        UIUtils.createContentProposalDecorator(patternText,
            Messages.Log4JPatternLayoutWizardPage_dec_contentAssistAvailable);
       
        KeyStroke keyStroke = KeyStroke.getInstance("Ctrl+Space"); //$NON-NLS-1$
        ContentProposalAdapter adapter = new ContentProposalAdapter(patternText,
            new TextContentAdapter(),
            new SimpleContentProposalProvider(patterns.toArray(new String[patterns.size()])),
            keyStroke, null);
        adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
      }
    } catch (Exception e) {
      // Log and show error
      UIPlugin.logAndShowError(new CoreException(new Status(IStatus.ERROR,
          UIPlugin.PLUGIN_ID, e.getLocalizedMessage(), e)), false);
View Full Code Here

       
        if( contentProposalService != null )
        {
            final ContentProposalProvider contentProposalProvider = new ContentProposalProvider( contentProposalService, part );
           
            final ContentProposalAdapter contentProposalAdapter
                = new ContentProposalAdapter( this.textField, new TextContentAdapter(), contentProposalProvider, CONTENT_ASSIST_KEY_STROKE, null );
           
            contentProposalAdapter.setPropagateKeys( true );
            contentProposalAdapter.setLabelProvider( new ContentProposalLabelProvider() );
            contentProposalAdapter.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );
        }
       
        if( isDeprecated )
        {
            final Control deprecationMarker = createDeprecationMarker( textFieldParent );
View Full Code Here

                    validate();
                }
            } );

            // attach content proposal behavior
            contextEntryDnComboCPA = new ContentProposalAdapter( contextEntryDnCombo, new ComboContentAdapter(), null,
                null, null );
            contextEntryDnComboCPA.setFilterStyle( ContentProposalAdapter.FILTER_NONE );
            contextEntryDnComboCPA.setProposalAcceptanceStyle( ContentProposalAdapter.PROPOSAL_REPLACE );

            setControl( composite );
View Full Code Here

        return resultList.toArray(new IContentProposal[resultList
            .size()]);
      }
    };

    ContentProposalAdapter adapter = new ContentProposalAdapter(textField,
        new TextContentAdapter(), cp, stroke, null);
    // set the acceptance style to always replace the complete content
    adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
  }
View Full Code Here

    UIUtils
        .addBulbDecorator(combo,
            UIText.CommitCombo_showSuggestedCommits);

    ContentProposalAdapter adapter = new ContentProposalAdapter(combo,
        new ComboContentAdapter(), new CommitContentProposalProvider(),
        null, null);
    adapter.setPropagateKeys(true);
    adapter
        .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
  }
View Full Code Here

        return resultList.toArray(new IContentProposal[resultList
            .size()]);
      }
    };

    ContentProposalAdapter adapter = new ContentProposalAdapter(textField,
        new TextContentAdapter(), cp, stroke, null);
    // set the acceptance style to always replace the complete content
    adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
  }
View Full Code Here

TOP

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

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.