- @Override\r
- public void setPartialRange(IDocument document, int offset, int length,\r
- String contentType, int partitionOffset) {\r
- \r
- // Get all supplemental texts in the partial range\r
- supplementalTexts = new HashMap<Integer, String>();\r
- LineAnnotationModel model = (LineAnnotationModel) sourceViewer.getAnnotationModel();\r
- Iterator iter = model.getAnnotationIterator(offset, length, true, true);\r
- while (iter.hasNext()) {\r
- Object next = iter.next();\r
- if (next instanceof LineAnnotation) {\r
- Object entity = ((LineAnnotation) next).getEntity();\r
- String supplementalText = lineDisplayStrategy.getSupplementalText(entity);\r
- if (supplementalText != null && supplementalText.length() > 0) {\r
- try {\r
- int line = document.getLineOfOffset(model.getPosition((LineAnnotation) next).getOffset());\r
- supplementalTexts.put(line, supplementalText);\r
- } catch (BadLocationException e) {\r
- // TODO Auto-generated catch block\r
- e.printStackTrace();\r
- }\r
- \r
- }\r
- }\r
- }\r
- this.document = (Document) document; \r
- super.setPartialRange(document, offset, length, contentType, partitionOffset);\r