void (@NotNull TodoPattern @NotNull [] todoPatterns, boolean shouldNotifyIndices) { TodoPattern[] oldTodoPatterns = myTodoPatterns; IndexPattern[] oldIndexPatterns = myIndexPatterns; myTodoPatterns = todoPatterns; buildIndexPatterns(); // only trigger index refresh actual index patterns have changed if (shouldNotifyIndices && !Arrays.deepEquals(myIndexPatterns, oldIndexPatterns)) { PropertyChangeEvent event = new PropertyChangeEvent(this, IndexPatternProvider.PROP_INDEX_PATTERNS, oldTodoPatterns, todoPatterns); getPublisher(IndexPatternProvider.INDEX_PATTERNS_CHANGED).propertyChange(event); } // only trigger gui and code daemon refresh when either the index patterns or presentation attributes have changed if (!Arrays.deepEquals(myTodoPatterns, oldTodoPatterns)) { getPublisher(PROPERTY_CHANGE).propertyChange(new PropertyChangeEvent(this, PROP_TODO_PATTERNS, oldTodoPatterns, todoPatterns)); } }