/** * Sets the exit position to move the caret to when linked mode is exited. * * @param viewer the viewer where the exit position is located * @param offset the offset of the exit position * @param length the length of the exit position (in case there should be a * selection) * @param sequence set to the tab stop position of the exit position, or * <code>LinkedPositionGroup.NO_STOP</code> if there should be no tab stop. * @throws BadLocationException if the position is not valid in the * viewer's document */ public void setExitPosition(ITextViewer viewer, int offset, int length, int sequence) throws BadLocationException { setExitPosition(new EmptyTarget(viewer), offset, length, sequence); }
/** * Convenience constructor for multiple viewers. * * @param model the linked mode model * @param viewers the non-empty list of viewers upon which the linked mode * UI should act */ public LinkedModeUI(LinkedModeModel model, ITextViewer[] viewers) { LinkedModeUITarget[] array= new LinkedModeUITarget[viewers.length]; for (int i= 0; i < array.length; i++) { array[i]= new EmptyTarget(viewers[i]); } constructor(model, array); }
/** * Convenience constructor for multiple viewers. * * @param model the linked mode model * @param viewers the non-empty list of viewers upon which the linked mode * UI should act */ public LinkedModeUI(LinkedModeModel model, ITextViewer[] viewers) { LinkedModeUITarget[] array= new LinkedModeUITarget[viewers.length]; for (int i= 0; i < array.length; i++) { array[i]= new EmptyTarget(viewers[i]); } constructor(model, array); }
/** * Sets the exit position to move the caret to when linked mode is exited. * * @param viewer the viewer where the exit position is located * @param offset the offset of the exit position * @param length the length of the exit position (in case there should be a * selection) * @param sequence set to the tab stop position of the exit position, or * <code>LinkedPositionGroup.NO_STOP</code> if there should be no tab stop. * @throws BadLocationException if the position is not valid in the * viewer's document */ public void setExitPosition(ITextViewer viewer, int offset, int length, int sequence) throws BadLocationException { setExitPosition(new EmptyTarget(viewer), offset, length, sequence); }
/** * Convenience constructor for just one viewer. * * @param model the linked mode model * @param viewer the viewer upon which the linked mode UI should act */ public LinkedModeUI(LinkedModeModel model, ITextViewer viewer) { constructor(model, new LinkedModeUITarget[]{new EmptyTarget(viewer)}); }
/** * Convenience constructor for just one viewer. * * @param model the linked mode model * @param viewer the viewer upon which the linked mode UI should act */ public LinkedModeUI(LinkedModeModel model, ITextViewer viewer) { constructor(model, new LinkedModeUITarget[]{new EmptyTarget(viewer)}); }