/** Get the help and show it in the view. If the view is already visible * perform the refresh of the view. * @param postRequest post the request instead of displaying the view * immediately. The <tt>ExtSettingsNames.COMPLETION_AUTO_POPUP_DELAY</tt> * setting stores the number of milliseconds before the view is displayed. * If the user presses a key until the delay expires nothing is shown. * This guarantees that the user which knows what to write will not be * annoyed with the unnecessary help. */ public void popup(boolean postRequest) { trace("ENTRY popup " + postRequest); // NOI18N popupImpl(postRequest); }
/** Get the help and show it in the view. If the view is already visible * perform the refresh of the view. * @param postRequest post the request instead of displaying the view * immediately. The <tt>ExtSettingsNames.COMPLETION_AUTO_POPUP_DELAY</tt> * setting stores the number of milliseconds before the view is displayed. * If the user presses a key until the delay expires nothing is shown. * This guarantees that the user which knows what to write will not be * annoyed with the unnecessary help. */ public void popup(boolean postRequest) { trace("ENTRY popup " + postRequest); // NOI18N popupImpl(postRequest); }
/** Performs instant text substitution, provided that result contains only one * item and completion has been invoked at the end of the word. * @param caretPos offset position of the caret */ public boolean instantSubstitution(int caretPos){ trace("ENTRY instantSubstitution " + caretPos); // NOI18N return instantSubstitutionImpl(caretPos); }
/** Refresh the contents of the view if it's currently visible. * @param postRequest post the request instead of refreshing the view * immediately. The <tt>ExtSettingsNames.COMPLETION_REFRESH_DELAY</tt> * setting stores the number of milliseconds before the view is refreshed. */ public void refresh(boolean postRequest) { trace("ENTRY refresh " + postRequest); // NOI18N refreshImpl(postRequest); }
/** Cancel last request for either displaying or refreshing * the pane. It resets the internal timer. */ public void cancelRequest() { trace("ENTRY cancelRequest"); // NOI18N cancelRequestImpl(); }
/** Refresh the contents of the view if it's currently visible. * @param postRequest post the request instead of refreshing the view * immediately. The <tt>ExtSettingsNames.COMPLETION_REFRESH_DELAY</tt> * setting stores the number of milliseconds before the view is refreshed. */ public void refresh(boolean postRequest) { trace("ENTRY refresh " + postRequest); // NOI18N refreshImpl(postRequest); }
/** Cancel last request for either displaying or refreshing * the pane. It resets the internal timer. */ public void cancelRequest() { trace("ENTRY cancelRequest"); // NOI18N cancelRequestImpl(); }
/** Performs instant text substitution, provided that result contains only one * item and completion has been invoked at the end of the word. * @param caretPos offset position of the caret */ public boolean instantSubstitution(int caretPos){ trace("ENTRY instantSubstitution " + caretPos); // NOI18N return instantSubstitutionImpl(caretPos); }
public void completionCancel(){ trace("ENTRY completionCancel"); // NOI18N if (pane != null){ cancelRequestImpl(); invalidateLastResult(); caretPos=-1; } }
public void completionCancel(){ trace("ENTRY completionCancel"); // NOI18N if (pane != null){ cancelRequestImpl(); invalidateLastResult(); caretPos=-1; } }
/** * Execute complegtion query subtask */ private void performQuery(final JTextComponent target) { BaseDocument doc = Utilities.getDocument(target); long start = System.currentTimeMillis(); try { lastResult = getQuery().query( target, caretPos, doc.getSyntaxSupport()); } finally { trace("performQuery took " + (System.currentTimeMillis() - start) + "ms"); // NOI18N setKeyPressed(false); } }
/** * Execute complegtion query subtask */ private void performQuery(final JTextComponent target) { BaseDocument doc = Utilities.getDocument(target); long start = System.currentTimeMillis(); try { lastResult = getQuery().query( target, caretPos, doc.getSyntaxSupport()); } finally { trace("performQuery took " + (System.currentTimeMillis() - start) + "ms"); // NOI18N setKeyPressed(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 text with the longest common * part of all the entries appearing in the view. * This function is usually triggered * upon pressing the Tab key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteCommonText() { trace("ENTRY substituteCommonText"); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteCommonText(index); } return true; } else { return false; } }
/** Substitute the text with the longest common * part of all the entries appearing in the view. * This function is usually triggered * upon pressing the Tab key. * @return true if the substitution was performed * false if not. */ public synchronized boolean substituteCommonText() { trace("ENTRY substituteCommonText"); // NOI18N if (lastResult != null) { int index = getView().getSelectedIndex(); if (index >= 0) { lastResult.substituteCommonText(index); } 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; } }
/** Set the visibility of the view. This method should * be used mainly for hiding the completion pane. If used * with visible set to true it calls the <tt>popup(false)</tt>. */ public void setPaneVisible(boolean visible) { trace("ENTRY setPaneVisible " + visible); // NOI18N if (visible) { if (extEditorUI.getComponent() != null) { popupImpl(false); } } else { if (pane != null) { cancelRequestImpl(); invalidateLastResult(); getJDCPopupPanel().setCompletionVisible(false); caretPos=-1; } } }
/** Set the visibility of the view. This method should * be used mainly for hiding the completion pane. If used * with visible set to true it calls the <tt>popup(false)</tt>. */ public void setPaneVisible(boolean visible) { trace("ENTRY setPaneVisible " + visible); // NOI18N if (visible) { if (extEditorUI.getComponent() != null) { popupImpl(false); } } else { if (pane != null) { cancelRequestImpl(); invalidateLastResult(); getJDCPopupPanel().setCompletionVisible(false); caretPos=-1; } } }