mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
FilePropertyPusher - cleanup FilePropertyPusher#initExtra method API (remove MessageBus parameter)
we do not have any usages of the method with messageBus parameter, added new method without it and delegated to the previous one for backward compatibility GitOrigin-RevId: 2bf2eb051adc81ad386c1f06288b5fd889d16514
This commit is contained in:
committed by
intellij-monorepo-bot
parent
345de40d63
commit
5933433cd5
+1
-1
@@ -149,7 +149,7 @@ public final class PushedFilePropertiesUpdaterImpl extends PushedFilePropertiesU
|
||||
@Override
|
||||
public void initializeProperties() {
|
||||
FilePropertyPusher.EP_NAME.forEachExtensionSafe(pusher -> {
|
||||
pusher.initExtra(myProject, myProject.getMessageBus());
|
||||
pusher.initExtra(myProject);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
+15
-18
@@ -1,18 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
|
||||
package com.intellij.openapi.roots.impl;
|
||||
|
||||
@@ -67,7 +53,9 @@ import java.io.IOException;
|
||||
public interface FilePropertyPusher<T> {
|
||||
ExtensionPointName<FilePropertyPusher<?>> EP_NAME = ExtensionPointName.create("com.intellij.filePropertyPusher");
|
||||
|
||||
default void initExtra(@NotNull Project project, @NotNull MessageBus bus) { }
|
||||
default void initExtra(@NotNull Project project) {
|
||||
initExtra(project, project.getMessageBus());
|
||||
}
|
||||
|
||||
default void afterRootsChanged(@NotNull Project project) {}
|
||||
|
||||
@@ -105,8 +93,7 @@ public interface FilePropertyPusher<T> {
|
||||
//<editor-fold desc="Deprecated APIs" defaultState="collapsed">
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* use {@link FilePropertyPusher#initExtra(Project, MessageBus)} instead
|
||||
* @deprecated use {@link FilePropertyPusher#initExtra(Project)} instead
|
||||
*/
|
||||
@ApiStatus.ScheduledForRemoval(inVersion = "2021.3")
|
||||
@Deprecated
|
||||
@@ -135,5 +122,15 @@ public interface FilePropertyPusher<T> {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #initExtra(Project)}
|
||||
*/
|
||||
@Deprecated
|
||||
@SuppressWarnings({"unused", "DeprecatedIsStillUsed"})
|
||||
default void initExtra(@NotNull Project project, @NotNull MessageBus bus) {
|
||||
DeprecatedMethodException.report("Please override FilePropertyPusher#initExtra(Project)");
|
||||
}
|
||||
|
||||
//</editor-fold>
|
||||
}
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ public class PythonLanguageLevelPusher implements FilePropertyPusher<LanguageLev
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initExtra(@NotNull Project project, @NotNull MessageBus bus) {
|
||||
public void initExtra(@NotNull Project project) {
|
||||
final Map<Module, Sdk> moduleSdks = getPythonModuleSdks(project);
|
||||
final Set<Sdk> distinctSdks = StreamEx.ofValues(moduleSdks).nonNull().collect(Collectors.toCollection(LinkedHashSet::new));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user