/** * Removes a line highlight. * * @param tag The tag of the line highlight to remove. * @see #removeAllLineHighlights() * @see #addLineHighlight(int, Color) */ public void removeLineHighlight(Object tag) { if (lineHighlightManager!=null) { lineHighlightManager.removeLineHighlight(tag); } }
/** * Removes a line highlight. * * @param tag The tag of the line highlight to remove. * @see #removeAllLineHighlights() * @see #addLineHighlight(int, Color) */ public void removeLineHighlight(Object tag) { if (lineHighlightManager!=null) { lineHighlightManager.removeLineHighlight(tag); } }
/** * Removes a line highlight. * * @param tag The tag of the line highlight to remove. * @see #removeAllLineHighlights() * @see #addLineHighlight(int, Color) */ public void removeLineHighlight(Object tag) { if (lineHighlightManager!=null) { lineHighlightManager.removeLineHighlight(tag); } }
/** * Removes a line highlight. * * @param tag The tag of the line highlight to remove. * @see #removeAllLineHighlights() * @see #addLineHighlight(int, Color) */ public void removeLineHighlight(Object tag) { if (lineHighlightManager!=null) { lineHighlightManager.removeLineHighlight(tag); } }
@Test public void testAddLineHighlight_removeOneOfTwoOnOneLine() throws BadLocationException { Object tag1 = lhm.addLineHighlight(1, Color.BLUE); Object tag2 = lhm.addLineHighlight(1, Color.RED); Assert.assertEquals(2, lhm.getLineHighlightCount()); // We're testing a bug here with LineHighlightInfo's equals() method, // so we use a foolproof method of telling the two tags apart. lhm.removeLineHighlight(tag1); List<Object> remainingTags = lhm.getCurrentLineHighlightTags(); Assert.assertEquals(1, remainingTags.size()); Assert.assertTrue(tag2 == remainingTags.get(0)); }