/** * Removes the affected positions from their categories to avoid * that they are invalidly updated. * * @param document the document */ private void removeAffectedPositions(IDocument document) { int size= fOverlappingPositionReferences.size(); for (int i= 0; i < size; i++) { PositionReference r= fOverlappingPositionReferences.get(i); try { document.removePosition(r.getCategory(), r.getPosition()); } catch (BadPositionCategoryException x) { // can not happen } } }
/** * Removes the affected positions from their categories to avoid * that they are invalidly updated. * * @param document the document */ private void removeAffectedPositions(IDocument document) { int size= fOverlappingPositionReferences.size(); for (int i= 0; i < size; i++) { PositionReference r= fOverlappingPositionReferences.get(i); try { document.removePosition(r.getCategory(), r.getPosition()); } catch (BadPositionCategoryException x) { // can not happen } } }
r.setLength((offset + positions[i]) - r.getOffset()); Position p= r.getPosition(); String category= r.getCategory(); if (!document.containsPosition(category, p.offset, p.length)) {
r.setLength((offset + positions[i]) - r.getOffset()); Position p= r.getPosition(); String category= r.getCategory(); if (!document.containsPosition(category, p.offset, p.length)) {