Java 类org.eclipse.ui.commands.IKeySequenceBinding 实例源码

项目:Eclipse-Postfix-Code-Completion    文件:AbstractInformationControl.java   
final protected KeySequence[] getInvokingCommandKeySequences() {
    if (fInvokingCommandKeySequences == null) {
        if (getInvokingCommand() != null) {
            List<IKeySequenceBinding> list= getInvokingCommand().getKeySequenceBindings();
            if (!list.isEmpty()) {
                fInvokingCommandKeySequences= new KeySequence[list.size()];
                for (int i= 0; i < fInvokingCommandKeySequences.length; i++) {
                    fInvokingCommandKeySequences[i]= list.get(i).getKeySequence();
                }
                return fInvokingCommandKeySequences;
            }
        }
    }
    return fInvokingCommandKeySequences;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AbstractInformationControl.java   
final protected KeySequence[] getInvokingCommandKeySequences() {
    if (fInvokingCommandKeySequences == null) {
        if (getInvokingCommand() != null) {
            List<IKeySequenceBinding> list= getInvokingCommand().getKeySequenceBindings();
            if (!list.isEmpty()) {
                fInvokingCommandKeySequences= new KeySequence[list.size()];
                for (int i= 0; i < fInvokingCommandKeySequences.length; i++) {
                    fInvokingCommandKeySequences[i]= list.get(i).getKeySequence();
                }
                return fInvokingCommandKeySequences;
            }
        }
    }
    return fInvokingCommandKeySequences;
}
项目:Pydev    文件:PythonBreakpointPage.java   
/**
 * Creates the controls that allow the user to specify the breakpoint's
 * condition
 * @param parent the composite in which the condition editor should be created
 * @throws CoreException if an exception occurs accessing the breakpoint
 */
private void createConditionEditor(Composite parent) throws CoreException {
    PyBreakpoint breakpoint = getBreakpoint();

    String label = null;
    ICommandManager commandManager = PlatformUI.getWorkbench().getCommandSupport().getCommandManager();
    ICommand command = commandManager.getCommand("org.eclipse.ui.edit.text.contentAssist.proposals"); //$NON-NLS-1$
    if (command != null) {
        List keyBindings = command.getKeySequenceBindings();
        if (keyBindings != null && keyBindings.size() > 0) {
            IKeySequenceBinding binding = (IKeySequenceBinding) keyBindings.get(0);
            label = StringUtils.format("E&nable Condition %s", binding.getKeySequence().format()); //$NON-NLS-1$
        }
    }

    if (label == null) {
        label = "E&nable Condition (code assist not available)"; //$NON-NLS-1$
    }
    Composite conditionComposite = new Group(parent, SWT.NONE);
    conditionComposite.setFont(parent.getFont());
    conditionComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    conditionComposite.setLayout(new GridLayout());
    fEnableConditionButton = createCheckButton(conditionComposite, label);
    fEnableConditionButton.setSelection(breakpoint.isConditionEnabled());
    fEnableConditionButton.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            setConditionEnabled(fEnableConditionButton.getSelection());
        }
    });

    fConditionEditor = new BreakpointConditionEditor(conditionComposite, this);

    //fSuspendWhenLabel= createLabel(conditionComposite, "Suspend when:");
    //fConditionIsTrue= createRadioButton(conditionComposite, "condition is \'tr&ue\'");
    //fConditionIsTrue= createLabel(conditionComposite, "condition is \'tr&ue\'");
    //fConditionHasChanged= createRadioButton(conditionComposite, "value of condition ch&anges");
    //        if (breakpoint.isConditionSuspendOnTrue()) {
    //            fConditionIsTrue.setSelection(true);
    //        } else {
    //            fConditionHasChanged.setSelection(true);
    //        }
    setConditionEnabled(fEnableConditionButton.getSelection());
}