Example usage for org.eclipse.jface.action LegacyActionTools extractMnemonic

List of usage examples for org.eclipse.jface.action LegacyActionTools extractMnemonic

Introduction

In this page you can find the example usage for org.eclipse.jface.action LegacyActionTools extractMnemonic.

Prototype

public static char extractMnemonic(final String text) 

Source Link

Document

Extracts the mnemonic text from the given string.

Usage

From source file:codemirror.eclipse.swt.search.FindReplaceDialog.java

License:Open Source License

/**
 * Stores the button and its mnemonic in {@link #fMnemonicButtonMap}.
 * //from w  ww  . j a va 2 s  .  com
 * @param button button whose mnemonic has to be stored
 * @since 3.7
 */
private void storeButtonWithMnemonicInMap(Button button) {
    char mnemonic = LegacyActionTools.extractMnemonic(button.getText());
    if (mnemonic != LegacyActionTools.MNEMONIC_NONE)
        fMnemonicButtonMap.put(new Character(Character.toLowerCase(mnemonic)), button);
}

From source file:org.eclipse.tracecompass.tmf.ui.views.timegraph.TimeGraphFindDialog.java

License:Open Source License

/**
 * Stores the button and its mnemonic in {@link #fMnemonicButtonMap}.
 *
 * @param button/*from  w  w w .  j a  va  2 s  .c o  m*/
 *            button whose mnemonic has to be stored
 */
private void storeButtonWithMnemonicInMap(Button button) {
    char mnemonic = LegacyActionTools.extractMnemonic(button.getText());
    if (mnemonic != LegacyActionTools.MNEMONIC_NONE) {
        fMnemonicButtonMap.put(new Character(Character.toLowerCase(mnemonic)), button);
    }
}