Search in sources :

Example 1 with ExcludedEntriesConfiguration

use of com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration in project intellij-community by JetBrains.

the class CompilerConfigurationImpl method createExcludedEntriesConfiguration.

// Overridden in Upsource
@NotNull
protected ExcludedEntriesConfiguration createExcludedEntriesConfiguration(@NotNull Project project) {
    final ExcludedEntriesConfiguration cfg = new ExcludedEntriesConfiguration(project.getMessageBus().syncPublisher(ExcludedEntriesListener.TOPIC));
    Disposer.register(project, cfg);
    project.getMessageBus().connect().subscribe(ExcludedEntriesListener.TOPIC, new ExcludedEntriesListener() {

        @Override
        public void onEntryAdded(@NotNull ExcludeEntryDescription description) {
            clearState();
        }

        @Override
        public void onEntryRemoved(@NotNull ExcludeEntryDescription description) {
            clearState();
        }

        private void clearState() {
            if (project.isOpen()) {
                BuildManager.getInstance().clearState(project);
            }
        }
    });
    return cfg;
}
Also used : ExcludeEntryDescription(com.intellij.openapi.compiler.options.ExcludeEntryDescription) ExcludedEntriesListener(com.intellij.openapi.compiler.options.ExcludedEntriesListener) ExcludedEntriesConfiguration(com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

ExcludeEntryDescription (com.intellij.openapi.compiler.options.ExcludeEntryDescription)1 ExcludedEntriesConfiguration (com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration)1 ExcludedEntriesListener (com.intellij.openapi.compiler.options.ExcludedEntriesListener)1 NotNull (org.jetbrains.annotations.NotNull)1