Search in sources :

Example 1 with DebuggerClassFilterProvider

use of com.intellij.ui.classFilter.DebuggerClassFilterProvider in project kotlin by JetBrains.

the class DebuggerSteppingHelper method getActiveFilters.

// copied from DebugProcessImpl.getActiveFilters
@NotNull
private static List<ClassFilter> getActiveFilters() {
    List<ClassFilter> activeFilters = new ArrayList<ClassFilter>();
    DebuggerSettings settings = DebuggerSettings.getInstance();
    if (settings.TRACING_FILTERS_ENABLED) {
        for (ClassFilter filter : settings.getSteppingFilters()) {
            if (filter.isEnabled()) {
                activeFilters.add(filter);
            }
        }
    }
    for (DebuggerClassFilterProvider provider : Extensions.getExtensions(DebuggerClassFilterProvider.EP_NAME)) {
        for (ClassFilter filter : provider.getFilters()) {
            if (filter.isEnabled()) {
                activeFilters.add(filter);
            }
        }
    }
    return activeFilters;
}
Also used : DebuggerSettings(com.intellij.debugger.settings.DebuggerSettings) DebuggerClassFilterProvider(com.intellij.ui.classFilter.DebuggerClassFilterProvider) ClassFilter(com.intellij.ui.classFilter.ClassFilter) ArrayList(java.util.ArrayList) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with DebuggerClassFilterProvider

use of com.intellij.ui.classFilter.DebuggerClassFilterProvider in project intellij-community by JetBrains.

the class DebugProcessImpl method getActiveFilters.

@NotNull
private static List<ClassFilter> getActiveFilters() {
    DebuggerSettings settings = DebuggerSettings.getInstance();
    StreamEx<ClassFilter> stream = StreamEx.of(Extensions.getExtensions(DebuggerClassFilterProvider.EP_NAME)).flatCollection(DebuggerClassFilterProvider::getFilters);
    if (settings.TRACING_FILTERS_ENABLED) {
        stream = stream.prepend(settings.getSteppingFilters());
    }
    return stream.filter(ClassFilter::isEnabled).toList();
}
Also used : DebuggerSettings(com.intellij.debugger.settings.DebuggerSettings) DebuggerClassFilterProvider(com.intellij.ui.classFilter.DebuggerClassFilterProvider) ClassFilter(com.intellij.ui.classFilter.ClassFilter) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

DebuggerSettings (com.intellij.debugger.settings.DebuggerSettings)2 ClassFilter (com.intellij.ui.classFilter.ClassFilter)2 DebuggerClassFilterProvider (com.intellij.ui.classFilter.DebuggerClassFilterProvider)2 NotNull (org.jetbrains.annotations.NotNull)2 ArrayList (java.util.ArrayList)1