/** * @return the current information control, or <code>null</code> if none available */ public IInformationControl getCurrentInformationControl2() { return getInternalAccessor().getCurrentInformationControl(); }
/** * Returns a text edit describing the text modification that would be executed if the given * selection was replaced by <code>replacement</code>. * * @param selection the selection to replace * @param replacement the replacement text * @return a text edit describing the operation needed to replace <code>selection</code> * @throws BadLocationException if computing the edit failed */ public TextEdit replace(ISelection selection, String replacement) throws BadLocationException { return getImplementation(selection).replace(selection, replacement); }
/** * Returns a text edit describing the text modification that would be executed if the backspace * key was pressed on the given selection. * * @param selection the selection to delete * @return a text edit describing the operation needed to delete <code>selection</code> * @throws BadLocationException if computing the edit failed */ public TextEdit backspace(ISelection selection) throws BadLocationException { return getImplementation(selection).backspace(selection); }
/** * Creates a new sticky hover manager. * * @param textViewer the text viewer */ public StickyHoverManager(TextViewer textViewer) { super(new DefaultInformationControlCreator()); fTextViewer= textViewer; setCloser(new Closer()); install(fTextViewer.getTextWidget()); }
/** * Returns the text covered by <code>selection</code> * * @param selection the selection * @return the text covered by <code>selection</code> * @throws BadLocationException if computing the edit failed */ public String getText(ISelection selection) throws BadLocationException { return getImplementation(selection).getText(selection); }
/** * Returns the text regions covered by the given selection. * * @param selection the selection * @return the text regions corresponding to <code>selection</code> * @throws BadLocationException if accessing the document failed */ public IRegion[] getRanges(ISelection selection) throws BadLocationException { return getImplementation(selection).getRanges(selection); }
/** * Returns the number of lines touched by <code>selection</code>. Note that for linear * selections, this is the number of contained delimiters plus 1. * * @param selection the selection * @return the number of lines touched by <code>selection</code> * @throws BadLocationException if accessing the document failed */ public int getCoveredLines(ISelection selection) throws BadLocationException { return getImplementation(selection).getCoveredLines(selection); }
/** * Returns a text edit describing the text modification that would be executed if the delete key * was pressed on the given selection. * * @param selection the selection to delete * @return a text edit describing the operation needed to delete <code>selection</code> * @throws BadLocationException if computing the edit failed */ public TextEdit delete(ISelection selection) throws BadLocationException { return getImplementation(selection).delete(selection); }
/** * Returns <code>true</code> if <code>selection</code> extends to two or more lines, * <code>false</code> otherwise. * * @param selection the selection * @return <code>true</code> if <code>selection</code> extends to two or more lines, * <code>false</code> otherwise * @throws BadLocationException if <code>selection</code> is not valid regarding the target * document */ public boolean isMultiline(ISelection selection) throws BadLocationException { return getImplementation(selection).isMultiline(selection); }
/** * Returns <code>true</code> if the text covered by <code>selection</code> does not contain any * characters. Note the difference to {@link ITextSelection#isEmpty()}, which returns * <code>true</code> only for invalid selections. * * @param selection the selection * @return <code>true</code> if <code>selection</code> does not contain any text, * <code>false</code> otherwise * @throws BadLocationException if accessing the document failed */ public boolean isEmpty(ISelection selection) throws BadLocationException { return getImplementation(selection).isEmpty(selection); }
/** * Returns a selection similar to <code>selection</code> but {@linkplain #isEmpty(ISelection) * empty}. Typically, the selection is reduced to its extreme offsets. * * @param selection the selection * @param beginning <code>true</code> to collapse the selection to its smallest position (i.e. * its left-most offset), <code>false</code> to collapse it to its greatest position * (e.g its right-most offset) * @return an empty variant of <code>selection</code> * @throws BadLocationException if accessing the document failed */ public ISelection makeEmpty(ISelection selection, boolean beginning) throws BadLocationException { return getImplementation(selection).makeEmpty(selection, beginning); }
/** * Creates a new information control replacer. * * @param creator the default information control creator */ public InformationControlReplacer(IInformationControlCreator creator) { super(creator); takesFocusWhenVisible(false); }
/** * Creates a new sticky hover manager. * * @param textViewer the text viewer */ public StickyHoverManager(TextViewer textViewer) { super(new DefaultInformationControlCreator()); fTextViewer= textViewer; setCloser(new Closer()); install(fTextViewer.getTextWidget()); }
/** * @return the current information control, or <code>null</code> if none available */ public IInformationControl getCurrentInformationControl2() { return getInternalAccessor().getCurrentInformationControl(); }
/** * Returns a text edit describing the text modification that would be executed if the given * selection was replaced by <code>replacement</code>. * * @param selection the selection to replace * @param replacement the replacement text * @return a text edit describing the operation needed to replace <code>selection</code> * @throws BadLocationException if computing the edit failed */ public TextEdit replace(ISelection selection, String replacement) throws BadLocationException { return getImplementation(selection).replace(selection, replacement); }
/** * Returns a text edit describing the text modification that would be executed if the backspace * key was pressed on the given selection. * * @param selection the selection to delete * @return a text edit describing the operation needed to delete <code>selection</code> * @throws BadLocationException if computing the edit failed */ public TextEdit backspace(ISelection selection) throws BadLocationException { return getImplementation(selection).backspace(selection); }
/** * Returns the text covered by <code>selection</code> * * @param selection the selection * @return the text covered by <code>selection</code> * @throws BadLocationException if computing the edit failed */ public String getText(ISelection selection) throws BadLocationException { return getImplementation(selection).getText(selection); }
/** * Returns the text regions covered by the given selection. * * @param selection the selection * @return the text regions corresponding to <code>selection</code> * @throws BadLocationException if accessing the document failed */ public IRegion[] getRanges(ISelection selection) throws BadLocationException { return getImplementation(selection).getRanges(selection); }
/** * Returns the number of lines touched by <code>selection</code>. Note that for linear * selections, this is the number of contained delimiters plus 1. * * @param selection the selection * @return the number of lines touched by <code>selection</code> * @throws BadLocationException if accessing the document failed */ public int getCoveredLines(ISelection selection) throws BadLocationException { return getImplementation(selection).getCoveredLines(selection); }
/** * Returns a text edit describing the text modification that would be executed if the delete key * was pressed on the given selection. * * @param selection the selection to delete * @return a text edit describing the operation needed to delete <code>selection</code> * @throws BadLocationException if computing the edit failed */ public TextEdit delete(ISelection selection) throws BadLocationException { return getImplementation(selection).delete(selection); }