mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Extract method which could be overridden in Upsource
This commit is contained in:
@@ -112,19 +112,7 @@ public class CompilerConfigurationImpl extends CompilerConfiguration implements
|
||||
|
||||
public CompilerConfigurationImpl(Project project) {
|
||||
myProject = project;
|
||||
myExcludesConfiguration = new ExcludedEntriesConfiguration(project.getMessageBus().syncPublisher(ExcludedEntriesListener.TOPIC));
|
||||
Disposer.register(project, myExcludesConfiguration);
|
||||
project.getMessageBus().connect().subscribe(ExcludedEntriesListener.TOPIC, new ExcludedEntriesListener() {
|
||||
@Override
|
||||
public void onEntryAdded(@NotNull ExcludeEntryDescription description) {
|
||||
BuildManager.getInstance().clearState(myProject);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntryRemoved(@NotNull ExcludeEntryDescription description) {
|
||||
BuildManager.getInstance().clearState(myProject);
|
||||
}
|
||||
});
|
||||
myExcludesConfiguration = createExcludedEntriesConfiguration(project);
|
||||
MessageBusConnection connection = project.getMessageBus().connect(project);
|
||||
connection.subscribe(ProjectTopics.MODULES, new ModuleListener() {
|
||||
@Override
|
||||
@@ -139,6 +127,25 @@ public class CompilerConfigurationImpl extends CompilerConfiguration implements
|
||||
});
|
||||
}
|
||||
|
||||
// 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) {
|
||||
BuildManager.getInstance().clearState(project);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntryRemoved(@NotNull ExcludeEntryDescription description) {
|
||||
BuildManager.getInstance().clearState(project);
|
||||
}
|
||||
});
|
||||
return cfg;
|
||||
}
|
||||
|
||||
private static class State {
|
||||
public String DEFAULT_COMPILER = JavaCompilers.JAVAC_ID;
|
||||
public int BUILD_PROCESS_HEAP_SIZE = DEFAULT_BUILD_PROCESS_HEAP_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user