public void delete() { synchronized (fLock) { super.delete(); } }
@Override public void delete() { synchronized (fLock) { super.delete(); } }
@Override public void delete() { synchronized (fLock) { super.delete(); } }
@Override public void delete() { synchronized (fLock) { super.delete(); } }
/** * Determines whether the currently investigated position has been deleted by * the replace operation specified in the current event. If so, it deletes * the position and removes it from the document's position category. * * @return <code>true</code> if position has not been deleted */ protected boolean notDeleted() { if (fOffset < fPosition.offset && (fPosition.offset + fPosition.length < fOffset + fLength)) { fPosition.delete(); try { fDocument.removePosition(fCategory, fPosition); } catch (BadPositionCategoryException x) { } return false; } return true; }
/** * Determines whether the currently investigated position has been deleted by * the replace operation specified in the current event. If so, it deletes * the position and removes it from the document's position category. * * @return <code>true</code> if position has not been deleted */ protected boolean notDeleted() { if (fOffset < fPosition.offset && (fPosition.offset + fPosition.length < fOffset + fLength)) { fPosition.delete(); try { fDocument.removePosition(fCategory, fPosition); } catch (BadPositionCategoryException x) { } return false; } return true; }
/** * When any region of a hyperlink is replaced, the hyperlink needs to be deleted. * * @return <code>true</code> if position has NOT been deleted */ @Override protected boolean notDeleted() { int positionEnd = fPosition.offset + fPosition.length - 1; int editEnd = fOffset + fLength - 1; if ((fOffset <= fPosition.offset && (editEnd > fPosition.offset)) || (fOffset < positionEnd && (editEnd > positionEnd)) || (fOffset >= fPosition.offset && fOffset <= positionEnd) || (editEnd >= fPosition.offset && editEnd <= positionEnd)) { fPosition.delete(); try { fDocument.removePosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, fPosition); } catch (BadPositionCategoryException x) { } return false; } return true; } }
/** * When any region of a hyperlink is replaced, the hyperlink needs to be deleted. * * @return <code>true</code> if position has NOT been deleted */ protected boolean notDeleted() { int positionEnd = fPosition.offset + fPosition.length - 1; int editEnd = fOffset + fLength - 1; if ((fOffset <= fPosition.offset && (editEnd > fPosition.offset)) || (fOffset < positionEnd && (editEnd > positionEnd)) || (fOffset >= fPosition.offset && fOffset <= positionEnd) || (editEnd >= fPosition.offset && editEnd <= positionEnd)) { fPosition.delete(); try { fDocument.removePosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, fPosition); } catch (BadPositionCategoryException x) { } return false; } return true; } }
public void update(DocumentEvent event) { try { IDocument document = getDocument(); if (document != null) { Position[] positions = document.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY); for (int i = 0; i < positions.length; i++) { Position position = positions[i]; if (position.offset == event.fOffset && position.length<=event.fLength) { position.delete(); } if (position.isDeleted) { document.removePosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, position); } } } } catch (BadPositionCategoryException e) { } } };
@Override public void update(DocumentEvent event) { try { IDocument document = getDocument(); if (document != null) { Position[] positions = document.getPositions(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY); for (int i = 0; i < positions.length; i++) { Position position = positions[i]; if (position.offset == event.fOffset && position.length<=event.fLength) { position.delete(); } if (position.isDeleted) { document.removePosition(ConsoleHyperlinkPosition.HYPER_LINK_CATEGORY, position); } } } } catch (BadPositionCategoryException e) { } } };
/** * This does the actual constructor work. * * @param model the linked mode model * @param targets the non-empty array of targets upon which the linked mode UI * should act */ private void constructor(LinkedModeModel model, LinkedModeUITarget[] targets) { Assert.isNotNull(model); Assert.isNotNull(targets); Assert.isTrue(targets.length > 0); Assert.isTrue(model.getTabStopSequence().size() > 0); fModel= model; fTargets= targets; fCurrentTarget= targets[0]; fIterator= new TabStopIterator(fModel.getTabStopSequence()); fIterator.setCycling(!fModel.isNested()); fModel.addLinkingListener(fLinkedListener); fAssistant= new ContentAssistant2(); fAssistant.addProposalListener(fProposalListener); // TODO find a way to set up content assistant. // fAssistant.setDocumentPartitioning(IJavaPartitions.JAVA_PARTITIONING); fCaretPosition.delete(); }
/** * This does the actual constructor work. * * @param model the linked mode model * @param targets the non-empty array of targets upon which the linked mode UI * should act */ private void constructor(LinkedModeModel model, LinkedModeUITarget[] targets) { Assert.isNotNull(model); Assert.isNotNull(targets); Assert.isTrue(targets.length > 0); Assert.isTrue(model.getTabStopSequence().size() > 0); fModel= model; fTargets= targets; fCurrentTarget= targets[0]; fIterator= new TabStopIterator(fModel.getTabStopSequence()); fIterator.setCycling(!fModel.isNested()); fModel.addLinkingListener(fLinkedListener); fAssistant= new ContentAssistant2(); fAssistant.addProposalListener(fProposalListener); // TODO find a way to set up content assistant. // fAssistant.setDocumentPartitioning(IJavaPartitions.JAVA_PARTITIONING); fCaretPosition.delete(); }
} else { position.delete();
} else { position.delete();
} else { position.delete();
} else { position.delete();
} else { position.delete();
} else { position.delete();
} else { position.delete();
} else { position.delete();