/** * 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 } } }
String category= r.getCategory(); if (!document.containsPosition(category, p.offset, p.length)) { try { if (positionAboutToBeAdded(document, category, p)) document.addPosition(r.getCategory(), p); } catch (BadPositionCategoryException x) {
String category= r.getCategory(); if (!document.containsPosition(category, p.offset, p.length)) { try { if (positionAboutToBeAdded(document, category, p)) document.addPosition(r.getCategory(), p); } catch (BadPositionCategoryException x) {