Search in sources :

Example 1 with TodoConfiguration

use of com.intellij.ide.todo.TodoConfiguration in project intellij-community by JetBrains.

the class TodoConfigurable method areFiltersModified.

protected boolean areFiltersModified() {
    TodoConfiguration todoConfiguration = TodoConfiguration.getInstance();
    TodoFilter[] initialFilters = todoConfiguration.getTodoFilters();
    if (initialFilters.length != myFilters.size()) {
        return true;
    }
    for (TodoFilter initialFilter : initialFilters) {
        if (!myFilters.contains(initialFilter)) {
            return true;
        }
    }
    return false;
}
Also used : TodoFilter(com.intellij.ide.todo.TodoFilter) TodoConfiguration(com.intellij.ide.todo.TodoConfiguration)

Example 2 with TodoConfiguration

use of com.intellij.ide.todo.TodoConfiguration in project intellij-community by JetBrains.

the class TodoConfigurable method reset.

@Override
public void reset() {
    // Patterns
    myPatterns.clear();
    TodoConfiguration todoConfiguration = TodoConfiguration.getInstance();
    TodoPattern[] patterns = getTodoPatternsToDisplay(todoConfiguration);
    for (TodoPattern pattern : patterns) {
        myPatterns.add(pattern.clone());
    }
    myPatternsModel.fireTableDataChanged();
    // Filters
    myFilters.clear();
    TodoFilter[] filters = todoConfiguration.getTodoFilters();
    for (TodoFilter filter : filters) {
        myFilters.add(filter.clone());
    }
    myFiltersModel.fireTableDataChanged();
}
Also used : TodoFilter(com.intellij.ide.todo.TodoFilter) TodoPattern(com.intellij.psi.search.TodoPattern) TodoConfiguration(com.intellij.ide.todo.TodoConfiguration)

Example 3 with TodoConfiguration

use of com.intellij.ide.todo.TodoConfiguration in project intellij-community by JetBrains.

the class TodoConfigurable method arePatternsModified.

private boolean arePatternsModified() {
    TodoConfiguration todoConfiguration = TodoConfiguration.getInstance();
    TodoPattern[] initialPatterns = getTodoPatternsToDisplay(todoConfiguration);
    if (initialPatterns.length != myPatterns.size()) {
        return true;
    }
    for (TodoPattern initialPattern : initialPatterns) {
        if (!myPatterns.contains(initialPattern)) {
            return true;
        }
    }
    return false;
}
Also used : TodoPattern(com.intellij.psi.search.TodoPattern) TodoConfiguration(com.intellij.ide.todo.TodoConfiguration)

Aggregations

TodoConfiguration (com.intellij.ide.todo.TodoConfiguration)3 TodoFilter (com.intellij.ide.todo.TodoFilter)2 TodoPattern (com.intellij.psi.search.TodoPattern)2