/** Remove the marks if they were not removed yet */ void destroyMarks() { // now remove the marks try { if (startMark != null) { startMark.remove(); startMark = null; } } catch (InvalidMarkException e) { // already removed } try { if (endMark != null) { endMark.remove(); endMark = null; } } catch (InvalidMarkException e) { // already removed } }
/** Remove the marks if they were not removed yet */ void destroyMarks() { // now remove the marks try { if (startMark != null) { startMark.remove(); startMark = null; } } catch (InvalidMarkException e) { // already removed } try { if (endMark != null) { endMark.remove(); endMark = null; } } catch (InvalidMarkException e) { // already removed } }
/** Remove mark in finalize method */ protected void finalize() throws Throwable { mark.remove(); super.finalize(); }
void removeStoredPosition(int posID) { if (posID >= 0 || posID < posList.size()) { Mark mark = (Mark)posList.get(posID); posList.set(posID, null); // clear the index posFreeList.add(new Integer(posID)); // Remove the mark #19429 try { mark.remove(); } catch (InvalidMarkException e) { } } }
void removeStoredPosition(int posID) { if (posID >= 0 || posID < posList.size()) { Mark mark = (Mark) posList.get(posID); posList.set(posID, null); // clear the index posFreeList.add(new Integer(posID)); // Remove the mark #19429 try { mark.remove(); } catch (InvalidMarkException e) { } } }
/** Moves the mark to different position */ synchronized void moveMark(Mark mark, int newPos) throws BadLocationException, InvalidMarkException { if (newPos < 0 || newPos > docLen) { throw new BadLocationException(WRONG_POSITION + newPos + DOC_LEN + docLen, newPos); } mark.remove(); insertMark(mark, newPos); }
/** Construct block from positions on some document */ public MarkBlock(BaseDocument doc, Mark startMark, Mark endMark, int startPos, int endPos) throws BadLocationException { this(doc, startMark, endMark); try { doc.op.insertMark(startMark, startPos); try { doc.op.insertMark(endMark, endPos); } catch (BadLocationException e) { try { startMark.remove(); } catch (InvalidMarkException e2) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e2.printStackTrace(); } } throw e; } catch (InvalidMarkException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e.printStackTrace(); } } } catch (InvalidMarkException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N e.printStackTrace(); } } }
/** Construct block from positions on some document */ public MarkBlock(BaseDocument doc, Mark startMark, Mark endMark, int startPos, int endPos) throws BadLocationException { this(doc, startMark, endMark); try { startMark.insert(doc, startPos); try { endMark.insert(doc, endPos); } catch (BadLocationException e) { try { startMark.remove(); } catch (InvalidMarkException e2) { Utilities.annotateLoggable(e2); } throw e; } catch (InvalidMarkException e) { Utilities.annotateLoggable(e); } } catch (InvalidMarkException e) { Utilities.annotateLoggable(e); } }
if (!(mark.getInsertAfter() || (mark instanceof MarkFactory.CaretMark))) { try { mark.remove(); } catch (InvalidMarkException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N
markArray[i].remove(); } catch (InvalidMarkException e) { if (Boolean.getBoolean("netbeans.debug.exceptions")) { // NOI18N