/** * Returns the position in the partitoner's position category which is * close to the given offset. This is, the position has either an offset which * is the same as the given offset or an offset which is smaller than the given * offset. This method profits from the knowledge that a partitioning is * a ordered set of disjoint position. * <p> * May be extended or replaced by subclasses. * </p> * @param offset the offset for which to search the closest position * @return the closest position in the partitioner's category */ protected TypedPosition findClosestPosition(int offset) { try { int index= fDocument.computeIndexInCategory(fPositionCategory, offset); Position[] category= getPositions(); if (category.length == 0) return null; if (index < category.length) { if (offset == category[index].offset) return (TypedPosition) category[index]; } if (index > 0) index--; return (TypedPosition) category[index]; } catch (BadPositionCategoryException x) { } catch (BadLocationException x) { } return null; }
/** * Returns the position in the partitoner's position category which is * close to the given offset. This is, the position has either an offset which * is the same as the given offset or an offset which is smaller than the given * offset. This method profits from the knowledge that a partitioning is * a ordered set of disjoint position. * <p> * May be extended or replaced by subclasses. * </p> * @param offset the offset for which to search the closest position * @return the closest position in the partitioner's category */ protected TypedPosition findClosestPosition(int offset) { try { int index= fDocument.computeIndexInCategory(fPositionCategory, offset); Position[] category= getPositions(); if (category.length == 0) return null; if (index < category.length) { if (offset == category[index].offset) return (TypedPosition) category[index]; } if (index > 0) index--; return (TypedPosition) category[index]; } catch (BadPositionCategoryException x) { } catch (BadLocationException x) { } return null; }
/** * Returns the position in the partitoner's position category which is * close to the given offset. This is, the position has either an offset which * is the same as the given offset or an offset which is smaller than the given * offset. This method profits from the knowledge that a partitioning is * a ordered set of disjoint position. * <p> * May be extended or replaced by subclasses. * </p> * @param offset the offset for which to search the closest position * @return the closest position in the partitioner's category */ protected TypedPosition findClosestPosition(int offset) { try { int index= fDocument.computeIndexInCategory(fPositionCategory, offset); Position[] category= getPositions(); if (category.length == 0) return null; if (index < category.length) { if (offset == category[index].offset) return (TypedPosition) category[index]; } if (index > 0) index--; return (TypedPosition) category[index]; } catch (BadPositionCategoryException x) { } catch (BadLocationException x) { } return null; }
/** * Returns the position in the partitoner's position category which is * close to the given offset. This is, the position has either an offset which * is the same as the given offset or an offset which is smaller than the given * offset. This method profits from the knowledge that a partitioning is * a ordered set of disjoint position. * <p> * May be extended or replaced by subclasses. * </p> * @param offset the offset for which to search the closest position * @return the closest position in the partitioner's category */ protected TypedPosition findClosestPosition(int offset) { try { int index= fDocument.computeIndexInCategory(fPositionCategory, offset); Position[] category= getPositions(); if (category.length == 0) return null; if (index < category.length) { if (offset == category[index].offset) return (TypedPosition) category[index]; } if (index > 0) index--; return (TypedPosition) category[index]; } catch (BadPositionCategoryException x) { } catch (BadLocationException x) { } return null; }
Position[] category= getPositions();
Position[] category= getPositions();
Position[] category= getPositions();
Position[] category= getPositions();
Assert.isTrue(e.getDocument() == fDocument); Position[] category= getPositions(); IRegion line= fDocument.getLineInformationOfOffset(e.getOffset()); int reparseStart= line.getOffset(); category= getPositions(); category= getPositions(); TypedPosition p; while (first < category.length) {
Assert.isTrue(e.getDocument() == fDocument); Position[] category= getPositions(); IRegion line= fDocument.getLineInformationOfOffset(e.getOffset()); int reparseStart= line.getOffset(); category= getPositions(); category= getPositions(); TypedPosition p; while (first < category.length) {
Assert.isTrue(e.getDocument() == fDocument); Position[] category= getPositions(); IRegion line= fDocument.getLineInformationOfOffset(e.getOffset()); int reparseStart= line.getOffset(); category= getPositions(); category= getPositions(); TypedPosition p; while (first < category.length) {
Assert.isTrue(e.getDocument() == fDocument); Position[] category= getPositions(); IRegion line= fDocument.getLineInformationOfOffset(e.getOffset()); int reparseStart= line.getOffset(); category= getPositions(); category= getPositions(); TypedPosition p; while (first < category.length) {
Position[] category = getPositions();
Position[] category = getPositions();
Position[] category = getPositions();
Position[] category = getPositions();