@Override public void setOffset(int offset) { synchronized (fLock) { super.setOffset(offset); } }
/** * Sets the completion offset. * * @param newOffset the new completion offset */ protected void setCompletionOffset(int newOffset) { fOriginalOffset= newOffset; fPosition.setOffset(newOffset); }
/** * Manipulates the offset of the referenced position. * * @param offset the new offset of the referenced position */ protected void setOffset(int offset) { fPosition.setOffset(offset); }
public void setOffset(int offset) { synchronized (fLock) { super.setOffset(offset); } }
@Override public void setOffset(int offset) { synchronized (fLock) { super.setOffset(offset); } }
/** * Manipulates the offset of the referenced position. * * @param offset the new offset of the referenced position */ protected void setOffset(int offset) { fPosition.setOffset(offset); }
/** * Sets the completion offset. * * @param newOffset the new completion offset */ protected void setCompletionOffset(int newOffset) { fOriginalOffset= newOffset; fPosition.setOffset(newOffset); }
@Override public void setOffset(int offset) { synchronized (fLock) { super.setOffset(offset); } }
public void update(int off, int len) { synchronized (fLock) { super.setOffset(off); super.setLength(len); } }
public void update(int off, int len) { synchronized (fLock) { super.setOffset(off); super.setLength(len); } }
public void update(int off, int len) { synchronized (fLock) { super.setOffset(off); super.setLength(len); } }
public void update(int off, int len) { synchronized (fLock) { super.setOffset(off); super.setLength(len); } }
/** * Updates a position with the given information and clears its deletion state. * * @param position the position to update * @param offset the new selection offset * @param length the new selection length */ private void updatePosition(Position position, int offset, int length) { position.setOffset(offset); position.setLength(length); // http://bugs.eclipse.org/bugs/show_bug.cgi?id=32795 position.isDeleted= false; }
/** * Updates a position with the given information and clears its deletion state. * * @param position the position to update * @param offset the new selection offset * @param length the new selection length */ private void updatePosition(Position position, int offset, int length) { position.setOffset(offset); position.setLength(length); // http://bugs.eclipse.org/bugs/show_bug.cgi?id=32795 position.isDeleted= false; }
position.setOffset(replacementOffset + buffer.length()); position.setLength(argument.length());
/** * Called before document changes occur. It must be followed by a call to postReplace(). * * @param document the document on which to track the reference position. * @param offset the offset * @throws BadLocationException if the offset describes an invalid range in this document * */ public void preReplace(IDocument document, int offset) throws BadLocationException { fPosition.setOffset(offset); try { document.addPositionCategory(CATEGORY); document.addPositionUpdater(fPositionUpdater); document.addPosition(CATEGORY, fPosition); } catch (BadPositionCategoryException e) { // should not happen JavaPlugin.log(e); } }
/** * Called before document changes occur. It must be followed by a call to postReplace(). * * @param document the document on which to track the reference position. * @param offset the offset * @throws BadLocationException if the offset describes an invalid range in this document * */ public void preReplace(IDocument document, int offset) throws BadLocationException { fPosition.setOffset(offset); try { document.addPositionCategory(CATEGORY); document.addPositionUpdater(fPositionUpdater); document.addPosition(CATEGORY, fPosition); } catch (BadPositionCategoryException e) { // should not happen JavaPlugin.log(e); } }
/** * Called before document changes occur. It must be followed by a call to postReplace(). * * @param document the document on which to track the reference position. * @param offset the offset * @throws BadLocationException if the offset describes an invalid range in this document * */ public void preReplace(IDocument document, int offset) throws BadLocationException { fPosition.setOffset(offset); try { document.addPositionCategory(CATEGORY); document.addPositionUpdater(fPositionUpdater); document.addPosition(CATEGORY, fPosition); } catch (BadPositionCategoryException e) { // should not happen JavaPlugin.log(e); } }
@Override public void update(DocumentEvent event) { int offset= event.getOffset(); int length= event.getLength(); int delta= event.getText().length() - length; if (offset < fPosition.getOffset()) fPosition.setOffset(fPosition.getOffset() + delta); else if (offset < fPosition.getOffset() + fPosition.getLength()) fPosition.setLength(fPosition.getLength() + delta); } }
@Override public void update(DocumentEvent event) { int offset= event.getOffset(); int length= event.getLength(); int delta= event.getText().length() - length; if (offset < fPosition.getOffset()) fPosition.setOffset(fPosition.getOffset() + delta); else if (offset < fPosition.getOffset() + fPosition.getLength()) fPosition.setLength(fPosition.getLength() + delta); } }