try { final KeySequence existingSequence = KeySequence.getInstance(existingKeySequence); if (!existingSequence.equals(binding.getTriggerSequence())) return false; } catch (ParseException e) {
/** * Handles the modify event on the underlying text widget. * * @param event * The triggering event; ignored. */ @Override public void modifyText(ModifyEvent event) { try { // The original sequence. KeySequence originalSequence = getKeySequence(); // The new sequence drawn from the text. String contents = getText(); KeySequence newSequence = KeySequence.getInstance(contents); // Check to see if they're the same. if (!originalSequence.equals(newSequence)) { setKeySequence(newSequence); } } catch (ParseException e) { // Abort any cut/paste-driven modifications setKeySequence(getKeySequence()); } } }
/** * Handles the modify event on the underlying text widget. * * @param event * The triggering event; ignored. */ public void modifyText(ModifyEvent event) { try { // The original sequence. KeySequence originalSequence = getKeySequence(); // The new sequence drawn from the text. String contents = getText(); KeySequence newSequence = KeySequence.getInstance(contents); // Check to see if they're the same. if (!originalSequence.equals(newSequence)) { setKeySequence(newSequence); } } catch (ParseException e) { // Abort any cut/paste-driven modifications setKeySequence(getKeySequence()); } } }
/** * Handles the modify event on the underlying text widget. * * @param event * The triggering event; ignored. */ @Override public void modifyText(ModifyEvent event) { try { // The original sequence. KeySequence originalSequence = getKeySequence(); // The new sequence drawn from the text. String contents = getText(); KeySequence newSequence = KeySequence.getInstance(contents); // Check to see if they're the same. if (!originalSequence.equals(newSequence)) { setKeySequence(newSequence); } } catch (ParseException e) { // Abort any cut/paste-driven modifications setKeySequence(getKeySequence()); } } }
@Override public void keyPressed(KeyEvent e) { if (!Helper.okToUse(fProposalShell)) return; int accelerator= SWTKeySupport.convertEventToUnmodifiedAccelerator(e); KeySequence sequence= KeySequence.getInstance(SWTKeySupport.convertAcceleratorToKeyStroke(accelerator)); if (sequence.equals(fCommandSequence)) if (fContentAssistant.isPrefixCompletionEnabled()) incrementalComplete(); else showProposals(false); } }
@Override public void keyPressed(KeyEvent e) { if (!Helper.okToUse(fProposalShell)) return; int accelerator= SWTKeySupport.convertEventToUnmodifiedAccelerator(e); KeySequence sequence= KeySequence.getInstance(SWTKeySupport.convertAcceleratorToKeyStroke(accelerator)); if (sequence.equals(fCommandSequence)) if (fContentAssistant.isPrefixCompletionEnabled()) incrementalComplete(); else showProposals(false); } }
if (obj instanceof KeyBinding) { KeyBinding keyBinding = (KeyBinding) obj; if (!keyBinding.getKeySequence().equals(keySequence)) { if (keySequence != null && !keySequence.isEmpty()) { String activeSchemeId = fSchemeModel.getSelectedElement()