public interface EBindingService
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIVE_SCHEME_TAG
Tag used for the active scheme
|
static java.lang.String |
DEFAULT_SCHEME_ID
Name of the default scheme
|
static java.lang.String |
DELETED_BINDING_TAG
Tag prefix for the deleted
|
static java.lang.String |
DIALOG_CONTEXT_ID
The id used in the context
|
static java.lang.String |
LOCALE_ATTR_TAG
Tag prefix for the locale
|
static java.lang.String |
MODEL_TO_BINDING_KEY
Key used to store the binding in the transient map
|
static java.lang.String |
PLATFORM_ATTR_TAG
Tag prefix for the platform
|
static java.lang.String |
SCHEME_ID_ATTR_TAG
Tag prefix for the scheme
|
static java.lang.String |
TYPE_ATTR_TAG
Tag prefix for the type
|
Modifier and Type | Method and Description |
---|---|
void |
activateBinding(@NonNull Binding binding)
Activate the binding
|
Binding |
createBinding(@NonNull TriggerSequence sequence,
@NonNull org.eclipse.core.commands.ParameterizedCommand command,
@NonNull java.lang.String contextId,
@NonNull java.util.Map<java.lang.String,java.lang.String> attributes)
Create a binding between a sequence and a command
|
@Nullable TriggerSequence |
createSequence(@NonNull java.lang.String sequence)
Create a trigger sequence from a string definition
|
void |
deactivateBinding(@NonNull Binding binding)
Deactivate the binding
|
@NonNull java.util.Collection<Binding> |
getActiveBindings() |
@NonNull java.util.Collection<Binding> |
getAllConflicts() |
@Nullable TriggerSequence |
getBestSequenceFor(@NonNull org.eclipse.core.commands.ParameterizedCommand command)
Find the best sequence for the command
|
@NonNull java.util.Collection<Binding> |
getBindingsFor(@NonNull org.eclipse.core.commands.ParameterizedCommand cmd)
Find all bindings for the command
|
@Nullable java.util.Collection<Binding> |
getConflictsFor(@NonNull TriggerSequence sequence)
Get the conflicts for a sequence
|
@NonNull java.util.Collection<Binding> |
getPartialMatches(@NonNull TriggerSequence sequence)
Find all partial matches
|
@Nullable Binding |
getPerfectMatch(@NonNull TriggerSequence trigger)
Get the perfect match for the trigger
|
@NonNull java.util.Collection<TriggerSequence> |
getSequencesFor(@NonNull org.eclipse.core.commands.ParameterizedCommand command)
Find all sequences for the give command
|
boolean |
isPartialMatch(@NonNull TriggerSequence keySequence)
Check if the sequence is partially matched
|
boolean |
isPerfectMatch(@NonNull TriggerSequence sequence)
Check if there is a perfect match
|
static final java.lang.String DIALOG_CONTEXT_ID
static final java.lang.String DEFAULT_SCHEME_ID
static final java.lang.String MODEL_TO_BINDING_KEY
static final java.lang.String ACTIVE_SCHEME_TAG
static final java.lang.String SCHEME_ID_ATTR_TAG
static final java.lang.String LOCALE_ATTR_TAG
static final java.lang.String PLATFORM_ATTR_TAG
static final java.lang.String TYPE_ATTR_TAG
static final java.lang.String DELETED_BINDING_TAG
Binding createBinding(@NonNull TriggerSequence sequence, @NonNull org.eclipse.core.commands.ParameterizedCommand command, @NonNull java.lang.String contextId, @NonNull java.util.Map<java.lang.String,java.lang.String> attributes)
sequence
- the sequencecommand
- the commandcontextId
- the context idattributes
- the attributesvoid activateBinding(@NonNull Binding binding)
binding
- the binding to activatevoid deactivateBinding(@NonNull Binding binding)
binding
- the binding to deactivate@Nullable TriggerSequence createSequence(@NonNull java.lang.String sequence)
sequence
- a string definition@Nullable java.util.Collection<Binding> getConflictsFor(@NonNull TriggerSequence sequence)
sequence
- the sequence@NonNull java.util.Collection<Binding> getAllConflicts()
@Nullable Binding getPerfectMatch(@NonNull TriggerSequence trigger)
trigger
- the triggerboolean isPartialMatch(@NonNull TriggerSequence keySequence)
keySequence
- the sequencetrue
if a partial matchboolean isPerfectMatch(@NonNull TriggerSequence sequence)
sequence
- the sequencetrue
if a perfect match@Nullable TriggerSequence getBestSequenceFor(@NonNull org.eclipse.core.commands.ParameterizedCommand command)
command
- the command@NonNull java.util.Collection<TriggerSequence> getSequencesFor(@NonNull org.eclipse.core.commands.ParameterizedCommand command)
command
- the command@NonNull java.util.Collection<Binding> getPartialMatches(@NonNull TriggerSequence sequence)
sequence
- the sequence@NonNull java.util.Collection<Binding> getActiveBindings()
@NonNull java.util.Collection<Binding> getBindingsFor(@NonNull org.eclipse.core.commands.ParameterizedCommand cmd)
cmd
- the command