@Test public void testDisabled() { AntTargetNote.ENABLED = false; assertEquals("TARGET:", annotate("TARGET:")); }
@Override public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) { if (!ENABLED) return null; MarkupText.SubText t = text.findToken(Pattern.compile(".*(?=:)")); if (t!=null) t.addMarkup(0,t.length(),"<b class=ant-target>","</b>"); return null; }
AntTargetNote extends ConsoleNote { @Override public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) { if (!ENABLED) return null; MarkupText.SubText t = text.findToken(Pattern.compile(".*(?=:)")); if (t!=null) t.addMarkup(0,t.length(),"<b class=ant-target>","</b>"); return null; } }
AntTargetNote extends ConsoleNote { @Override public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) { if (!ENABLED) return null; MarkupText.SubText t = text.findToken(Pattern.compile(".*(?=:)")); if (t!=null) t.addMarkup(0,t.length(),"<b class=ant-target>","</b>"); return null; } AntTargetNote(); }
AntTargetNote extends ConsoleNote { @Override public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) { if (!ENABLED) return null; MarkupText.SubText t = text.findToken(Pattern.compile(".*(?=:)")); if (t!=null) t.addMarkup(0,t.length(),"<b class=ant-target>","</b>"); return null; } AntTargetNote(); @Override ConsoleAnnotator annotate(Object context, MarkupText text, int charPos); }
AntTargetNote extends ConsoleNote { @Override public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) { if (!ENABLED) return null; MarkupText.SubText t = text.findToken(Pattern.compile(".*(?=:)")); if (t!=null) t.addMarkup(0,t.length(),"<b class=ant-target>","</b>"); return null; } AntTargetNote(); @Override ConsoleAnnotator annotate(Object context, MarkupText text, int charPos); static boolean ENABLED; }