private void createAnnotationModel() { if (fCurrentTarget.fAnnotationModel == null) { LinkedPositionAnnotations lpa= new LinkedPositionAnnotations(); if (fSimple) { lpa.markExitTarget(true); lpa.markFocus(false); lpa.markSlaves(false); lpa.markTargets(false); } lpa.setTargets(fIterator.getPositions()); lpa.setExitTarget(fExitPosition); lpa.connect(fCurrentTarget.getViewer().getDocument()); fCurrentTarget.fAnnotationModel= lpa; } }
/** * Sets the position that should be highlighted as the exit position, i.e. * as the position whose changes are propagated to all its linked positions * by the linked environment. * * @param position the new exit position, or <code>null</code> if no focus is set. * @throws BadLocationException in case <code>position</code> is invalid */ private void setExitPosition(Position position) throws BadLocationException { if (fMarkExitTarget && getPosition(fExitAnnotation) != position) { removeAnnotation(fExitAnnotation, false); if (position != null) { fExitAnnotation= new Annotation(EXIT_ANNOTATION_TYPE, false, ""); //$NON-NLS-1$ addAnnotation(fExitAnnotation, position, false); } else fExitAnnotation= null; } }
(position != null && getPosition(fFocusAnnotation) == position) || (position == null && fFocusAnnotation == null)) return; targets.remove(position); group.remove(position); prune(targets); prune(group); setFocusPosition(position); setExitPosition(exit); setGroupPositions(group); setTargetPositions(targets); } catch (BadLocationException e) { fireModelChanged();
fCurrentTarget.fAnnotationModel.removeAllAnnotations(); disconnect(); fTargets[i].fAnnotationModel.removeAllAnnotations(); fTargets[i].fAnnotationModel.disconnect(fTargets[i].getViewer().getDocument()); fTargets[i].fAnnotationModel= null;
(position != null && getPosition(fFocusAnnotation) == position) || (position == null && fFocusAnnotation == null)) return; targets.remove(position); group.remove(position); prune(targets); prune(group); setFocusPosition(position); setExitPosition(exit); setGroupPositions(group); setTargetPositions(targets); } catch (BadLocationException e) { fireModelChanged();
fCurrentTarget.fAnnotationModel.removeAllAnnotations(); disconnect(); fTargets[i].fAnnotationModel.removeAllAnnotations(); fTargets[i].fAnnotationModel.disconnect(fTargets[i].getViewer().getDocument()); fTargets[i].fAnnotationModel= null;
private void createAnnotationModel() { if (fCurrentTarget.fAnnotationModel == null) { LinkedPositionAnnotations lpa= new LinkedPositionAnnotations(); if (fSimple) { lpa.markExitTarget(true); lpa.markFocus(false); lpa.markSlaves(false); lpa.markTargets(false); } lpa.setTargets(fIterator.getPositions()); lpa.setExitTarget(fExitPosition); lpa.connect(fCurrentTarget.getViewer().getDocument()); fCurrentTarget.fAnnotationModel= lpa; } }
/** * Sets the position that should be highlighted as the exit position, i.e. * as the position whose changes are propagated to all its linked positions * by the linked environment. * * @param position the new exit position, or <code>null</code> if no focus is set. * @throws BadLocationException in case <code>position</code> is invalid */ private void setExitPosition(Position position) throws BadLocationException { if (fMarkExitTarget && getPosition(fExitAnnotation) != position) { removeAnnotation(fExitAnnotation, false); if (position != null) { fExitAnnotation= new Annotation(EXIT_ANNOTATION_TYPE, false, ""); //$NON-NLS-1$ addAnnotation(fExitAnnotation, position, false); } else fExitAnnotation= null; } }
/** * Sets the position that should be highlighted as the focus position, i.e. * as the position whose changes are propagated to all its linked positions * by the linked environment. * * @param position the new focus position, or <code>null</code> if no focus is set. * @throws BadLocationException if <code>position</code> is invalid */ private void setFocusPosition(Position position) throws BadLocationException { if (fMarkFocus && getPosition(fFocusAnnotation) != position) { removeAnnotation(fFocusAnnotation, false); if (position != null) { fFocusAnnotation= new Annotation(FOCUS_ANNOTATION_TYPE, false, ""); //$NON-NLS-1$ addAnnotation(fFocusAnnotation, position, false); } else fFocusAnnotation= null; } }
/** * Sets the position that should be highlighted as the focus position, i.e. * as the position whose changes are propagated to all its linked positions * by the linked environment. * * @param position the new focus position, or <code>null</code> if no focus is set. * @throws BadLocationException if <code>position</code> is invalid */ private void setFocusPosition(Position position) throws BadLocationException { if (fMarkFocus && getPosition(fFocusAnnotation) != position) { removeAnnotation(fFocusAnnotation, false); if (position != null) { fFocusAnnotation= new Annotation(FOCUS_ANNOTATION_TYPE, false, ""); //$NON-NLS-1$ addAnnotation(fFocusAnnotation, position, false); } else fFocusAnnotation= null; } }