mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-167520 No "for current project" indicator, when registering a "projectConfigurable"
This commit is contained in:
+2
-2
@@ -354,13 +354,13 @@ public class ConfigurableExtensionPointUtil {
|
||||
Application application = ApplicationManager.getApplication();
|
||||
if (application != null) {
|
||||
for (ConfigurableEP<Configurable> extension : application.getExtensions(Configurable.APPLICATION_CONFIGURABLE)) {
|
||||
addValid(list, ConfigurableWrapper.wrapConfigurable(extension), null);
|
||||
addValid(list, ConfigurableWrapper.wrapConfigurable(extension, true), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (project != null && !project.isDisposed()) {
|
||||
for (ConfigurableEP<Configurable> extension : project.getExtensions(Configurable.PROJECT_CONFIGURABLE)) {
|
||||
addValid(list, ConfigurableWrapper.wrapConfigurable(extension), project);
|
||||
addValid(list, ConfigurableWrapper.wrapConfigurable(extension, true), project);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@@ -38,10 +38,15 @@ public class ConfigurableWrapper implements SearchableConfigurable, Weighted {
|
||||
|
||||
@Nullable
|
||||
public static <T extends UnnamedConfigurable> T wrapConfigurable(@NotNull ConfigurableEP<T> ep) {
|
||||
return wrapConfigurable(ep, false);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static <T extends UnnamedConfigurable> T wrapConfigurable(@NotNull ConfigurableEP<T> ep, boolean settings) {
|
||||
if (!ep.canCreateConfigurable()) {
|
||||
return null;
|
||||
}
|
||||
if (ep.displayName != null || ep.key != null || ep.parentId != null || ep.groupId != null) {
|
||||
if (settings || ep.displayName != null || ep.key != null || ep.parentId != null || ep.groupId != null) {
|
||||
//noinspection unchecked
|
||||
return (T)(!ep.dynamic && ep.children == null && ep.childrenEPName == null ? new ConfigurableWrapper(ep) : new CompositeWrapper(ep));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user