Package org.eclipse.jface.bindings.keys

Examples of org.eclipse.jface.bindings.keys.KeyStroke.format()


        ControlDecoration decPattern = new ControlDecoration(txtName, SWT.LEFT | SWT.TOP, mainComposite);
        decPattern.setImage(assistDecor.getImage());
        if (assistKeyStroke == null) {
            decPattern.setDescriptionText("Content assist is available. Start typing to activate");
        } else {
            decPattern.setDescriptionText(MessageFormat.format("Content assist is available. Press {0} or start typing to activate", assistKeyStroke.format()));
        }
        decPattern.setShowHover(true);
        decPattern.setShowOnlyOnFocus(true);

        PkgPatternsProposalProvider proposalProvider = new PkgPatternsProposalProvider(new FormPartJavaSearchContext(this));
View Full Code Here


        ControlDecoration decorActivator = new ControlDecoration(txtActivator, SWT.LEFT | SWT.CENTER, composite);
        decorActivator.setImage(contentAssistDecoration.getImage());
        if (assistKeyStroke == null) {
            decorActivator.setDescriptionText("Content Assist is available. Start typing to activate");
        } else {
            decorActivator.setDescriptionText(MessageFormat.format("Content Assist is available. Press {0} or start typing to activate", assistKeyStroke.format()));
        }
        decorActivator.setShowOnlyOnFocus(true);
        decorActivator.setShowHover(true);

        // Decorator for the Components combo
View Full Code Here

        decorActivator.setImage(contentAssistDecoration.getImage());
        decorActivator.setMarginWidth(3);
        if (assistKeyStroke == null) {
            decorActivator.setDescriptionText("Content Assist is available. Start typing to activate");
        } else {
            decorActivator.setDescriptionText(MessageFormat.format("Content Assist is available. Press {0} or start typing to activate", assistKeyStroke.format()));
        }
        decorActivator.setShowOnlyOnFocus(true);
        decorActivator.setShowHover(true);

        // Decorator for the Components combo
View Full Code Here

    final Menu addKeyMenu = new Menu(addKeyButton);
    final Iterator trappedKeyItr = KeySequenceText.TRAPPED_KEYS.iterator();
    while (trappedKeyItr.hasNext()) {
      final KeyStroke trappedKey = (KeyStroke) trappedKeyItr.next();
      final MenuItem menuItem = new MenuItem(addKeyMenu, SWT.PUSH);
      menuItem.setText(trappedKey.format());
      menuItem.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
          keySequenceText.insert(trappedKey);
          bindingText.setFocus();
View Full Code Here

    final Menu menuButtonAddKey = new Menu(buttonAddKey);
    final Iterator trappedKeyItr = KeySequenceText.TRAPPED_KEYS.iterator();
    while (trappedKeyItr.hasNext()) {
      final KeyStroke trappedKey = (KeyStroke) trappedKeyItr.next();
      final MenuItem menuItem = new MenuItem(menuButtonAddKey, SWT.PUSH);
      menuItem.setText(trappedKey.format());
      menuItem.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
          textTriggerSequenceManager.insert(trappedKey);
          textTriggerSequence.setFocus();
View Full Code Here

    KeyStroke stroke = UIUtils
        .getKeystrokeOfBestActiveBindingFor(IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST);
    if (stroke != null)
      UIUtils.addBulbDecorator(textField, NLS.bind(
          UIText.GerritConfigurationPage_BranchTooltipHover,
          stroke.format()));

    IContentProposalProvider cp = new IContentProposalProvider() {
      public IContentProposal[] getProposals(String contents, int position) {
        List<IContentProposal> resultList = new ArrayList<IContentProposal>();
View Full Code Here

    KeyStroke stroke = UIUtils
        .getKeystrokeOfBestActiveBindingFor(IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST);
    if (stroke != null)
      UIUtils.addBulbDecorator(textField, NLS.bind(
          UIText.FetchGerritChangePage_ContentAssistTooltip,
          stroke.format()));

    IContentProposalProvider cp = new IContentProposalProvider() {
      public IContentProposal[] getProposals(String contents, int position) {
        List<IContentProposal> resultList = new ArrayList<IContentProposal>();
View Full Code Here

    KeyStroke stroke = UIUtils
        .getKeystrokeOfBestActiveBindingFor(IWorkbenchCommandConstants.EDIT_CONTENT_ASSIST);
    if (stroke != null)
      UIUtils.addBulbDecorator(textField, NLS.bind(
          UIText.PushToGerritPage_ContentProposalHoverText,
          stroke.format()));

    IContentProposalProvider cp = new IContentProposalProvider() {
      public IContentProposal[] getProposals(String contents, int position) {
        List<IContentProposal> resultList = new ArrayList<IContentProposal>();
View Full Code Here

          UIText.UIUtils_StartTypingForPreviousValuesMessage);
    else
      addBulbDecorator(
          textField,
          NLS.bind(UIText.UIUtils_PressShortcutMessage,
              stroke.format()));

    IContentProposalProvider cp = new IContentProposalProvider() {

      public IContentProposal[] getProposals(String contents, int position) {
View Full Code Here

          UIText.UIUtils_StartTypingForPreviousValuesMessage);
    else
      addBulbDecorator(
          textField,
          NLS.bind(UIText.UIUtils_PressShortcutMessage,
              stroke.format()));

    IContentProposalProvider cp = new IContentProposalProvider() {
      public IContentProposal[] getProposals(String contents, int position) {
        List<IContentProposal> resultList = new ArrayList<IContentProposal>();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.