void () { TodoConfiguration todo = TodoConfiguration.getInstance(); TodoPattern[] oldPatterns = todo.getTodoPatterns(); try { todo.setTodoPatterns(new TodoPattern[]{new TodoPattern("\\btodo comment\\b.*", TodoAttributesUtil.createDefault(), false)}); PlatformTestUtil.dispatchAllEventsInIdeEventQueue(); doTest("[//]: #s (todo comment)", 1); } finally { todo.setTodoPatterns(oldPatterns); } }