/** Substitute the document's text with the text * that is appopriate for the selection * in the view. This function is usually triggered * upon pressing the Enter key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteText( boolean shift ) { trace("ENTRY substituteText " + shift); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteText(index, shift ); } return true; } else { return false; } }
/** * Substitute the document's text with the text that is appopriate for the * selection in the view. This function is usually triggered upon pressing * the Enter key. * * @return true if the substitution was performed false if not. */ public synchronized boolean substituteText(boolean shift) { if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteText(index, shift); } return true; } else { return false; } }
/** * Substitute the document's text with the text that is appopriate for the * selection in the view. This function is usually triggered upon pressing * the Enter key. * * @return true if the substitution was performed false if not. */ public synchronized boolean substituteText(boolean flag) { if (getLastResult() != null) { int index = getView().getSelectedIndex(); if (index >= 0) { getLastResult().substituteText(index, flag); } return true; } else { return false; } }
/** Substitute the document's text with the text * that is appopriate for the selection * in the view. This function is usually triggered * upon pressing the Enter key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteText( boolean shift ) { trace("ENTRY substituteText " + shift); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteText(index, shift ); } return true; } else { return false; } }
/** Substitute the document's text with the text * that is appopriate for the selection * in the view. This function is usually triggered * upon pressing the Enter key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteText( boolean flag ) { if( getLastResult() != null ) { int index = getView().getSelectedIndex(); if (index >= 0) { getLastResult().substituteText( index, flag ); } return true; } else { return false; } }
private synchronized boolean instantSubstitutionImpl(int caretPos){ if (getLastResult() == null) return false; JTextComponent comp = extEditorUI.getComponent(); try{ if (comp != null) { int[] block = Utilities.getIdentifierBlock(comp,caretPos); if (block == null || block[1] == caretPos) return getLastResult().substituteText(0, false); } }catch(BadLocationException ble){ } return false; }
private synchronized boolean instantSubstitutionImpl(int caretPos){ if (getLastResult() == null) return false; JTextComponent comp = extEditorUI.getComponent(); try{ if ((comp == null) || Utilities.getWordEnd(comp,caretPos) > caretPos) return false; return getLastResult().substituteText(0, false); }catch(BadLocationException ble){ return false; } }