mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[plugins] performance tests fixed #IDEA-270430
GitOrigin-RevId: c239333f3fc77476ae95d3051243442f24cba557
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6ff83f3b52
commit
fe9f836b96
+13
-8
@@ -19,7 +19,7 @@ import java.util.function.BiConsumer;
|
||||
|
||||
public class InstalledPluginsTableModel {
|
||||
|
||||
private static final boolean HIDE_IMPLEMENTATION_DETAILS = !Boolean.getBoolean("startup.performance.framework");
|
||||
protected static final boolean HIDE_IMPLEMENTATION_DETAILS = !Boolean.getBoolean("startup.performance.framework");
|
||||
private static final InstalledPluginsState ourState = InstalledPluginsState.getInstance();
|
||||
|
||||
protected final List<IdeaPluginDescriptor> view = new ArrayList<>();
|
||||
@@ -121,11 +121,8 @@ public class InstalledPluginsTableModel {
|
||||
for (final IdeaPluginDescriptor rootDescriptor : view) {
|
||||
final PluginId pluginId = rootDescriptor.getPluginId();
|
||||
myDependentToRequiredListMap.remove(pluginId);
|
||||
if (rootDescriptor instanceof IdeaPluginDescriptorImpl && ((IdeaPluginDescriptorImpl)rootDescriptor).isDeleted()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isDisabled(pluginId)) {
|
||||
if (isDeleted(rootDescriptor) ||
|
||||
isDisabled(pluginId)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -363,8 +360,16 @@ public class InstalledPluginsTableModel {
|
||||
return enabledMap.get(pluginId) != null;
|
||||
}
|
||||
|
||||
protected static boolean isDeleted(@NotNull IdeaPluginDescriptor descriptor) {
|
||||
return descriptor instanceof IdeaPluginDescriptorImpl && ((IdeaPluginDescriptorImpl)descriptor).isDeleted();
|
||||
}
|
||||
|
||||
protected static boolean isHiddenImplementationDetail(@NotNull IdeaPluginDescriptor descriptor) {
|
||||
return HIDE_IMPLEMENTATION_DETAILS && descriptor.isImplementationDetail();
|
||||
}
|
||||
|
||||
protected static boolean isHidden(@NotNull IdeaPluginDescriptor descriptor) {
|
||||
return (descriptor instanceof IdeaPluginDescriptorImpl) && ((IdeaPluginDescriptorImpl)descriptor).isDeleted() ||
|
||||
HIDE_IMPLEMENTATION_DETAILS && descriptor.isImplementationDetail();
|
||||
return isDeleted(descriptor) ||
|
||||
isHiddenImplementationDetail(descriptor);
|
||||
}
|
||||
}
|
||||
@@ -219,8 +219,8 @@ public class MyPluginModel extends InstalledPluginsTableModel implements PluginE
|
||||
PluginEnabledState oldState = pair.getSecond();
|
||||
PluginEnabledState newState = getState(pluginId);
|
||||
|
||||
if ((descriptor instanceof IdeaPluginDescriptorImpl) && ((IdeaPluginDescriptorImpl)descriptor).isDeleted() ||
|
||||
(descriptor.isImplementationDetail() && !newState.isEnabled()) ||
|
||||
if (isDeleted(descriptor) ||
|
||||
(isHiddenImplementationDetail(descriptor) && newState.isDisabled()) ||
|
||||
!isLoaded(pluginId) /* if enableMap contains null for id => enable/disable checkbox don't touch */) {
|
||||
continue;
|
||||
}
|
||||
@@ -1024,7 +1024,7 @@ public class MyPluginModel extends InstalledPluginsTableModel implements PluginE
|
||||
|
||||
public @NotNull List<? extends HtmlChunk> getErrors(@NotNull IdeaPluginDescriptor descriptor) {
|
||||
PluginId pluginId = descriptor.getPluginId();
|
||||
if (descriptor instanceof IdeaPluginDescriptorImpl && ((IdeaPluginDescriptorImpl)descriptor).isDeleted() ||
|
||||
if (isDeleted(descriptor) ||
|
||||
InstalledPluginsState.getInstance().wasUninstalledWithoutRestart(pluginId) ||
|
||||
InstalledPluginsState.getInstance().wasInstalledWithoutRestart(pluginId)) {
|
||||
// we'll actually install the plugin when the configurable is closed; at this time we don't know if there's any loadingError
|
||||
|
||||
Reference in New Issue
Block a user