Example usage for org.eclipse.jface.bindings.keys KeyBinding getLocale

List of usage examples for org.eclipse.jface.bindings.keys KeyBinding getLocale

Introduction

In this page you can find the example usage for org.eclipse.jface.bindings.keys KeyBinding getLocale.

Prototype

public final String getLocale() 

Source Link

Document

Returns the locale in which this binding applies.

Usage

From source file:org.eclipse.oomph.setup.workbench.impl.KeyBindingTaskImpl.java

License:Open Source License

private boolean isEqual(KeyBindingContext keyBindingContext, KeyBinding keyBinding) throws Exception {
    if (!ObjectUtil.equals(keyBinding.getSchemeId(), getScheme())) {
        return false;
    }// w  w w  . j  av a2  s .c om

    if (!ObjectUtil.equals(keyBinding.getContextId(), keyBindingContext.getID())) {
        return false;
    }

    if (!ObjectUtil.equals(keyBinding.getPlatform(), getPlatform())) {
        return false;
    }

    if (!ObjectUtil.equals(keyBinding.getLocale(), getLocale())) {
        return false;
    }

    KeySequence keySequence = KeySequence.getInstance(getKeys());
    if (!ObjectUtil.equals(keyBinding.getKeySequence(), keySequence)) {
        return false;
    }

    ParameterizedCommand parameterizedCommand = keyBinding.getParameterizedCommand();
    if (parameterizedCommand == null || !ObjectUtil.equals(parameterizedCommand.getId(), getCommand())) {
        return false;
    }

    if (!ObjectUtil.equals(parameterizedCommand.getParameterMap(), getCommandParameterMap())) {
        return false;
    }

    return true;
}