From 2b620276e047adfa60f7a66a0b99ecb517a0384e Mon Sep 17 00:00:00 2001 From: Andrew Kozlov Date: Sun, 10 Jan 2021 20:27:23 +0100 Subject: [PATCH] [dynamic plugins] text should fit (#IDEA-257906, IDEA-257857) fixed GitOrigin-RevId: 9a2e1d08e1e34b48ea5ff106b1ea52f010fe1129 --- platform/platform-api/resources/messages/IdeBundle.properties | 2 +- .../ide/plugins/newui/PluginDetailsPageComponent.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/resources/messages/IdeBundle.properties b/platform/platform-api/resources/messages/IdeBundle.properties index e9bbc1fed912..54c8a0079364 100644 --- a/platform/platform-api/resources/messages/IdeBundle.properties +++ b/platform/platform-api/resources/messages/IdeBundle.properties @@ -1385,7 +1385,7 @@ plugins.configurable.disabled.for.all.projects=Disabled for all projects plugins.configurable.disable.for.current.project=Disable for Current Project plugins.configurable.disable.for.current.project.only=Disable for Current Project Only plugins.configurable.disabled.for.current.project=Disabled for the current project -plugins.configurable.loaded.for.projects={0}.
Loaded because enabled for another open project:
{1} +plugins.configurable.loaded.for.projects={0}.
Loaded due to being enabled for:
{1} plugins.configurable.show=Show plugins.configurable.search.options=Search Options plugins.configurable.other.bundled=Other Tools diff --git a/platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginDetailsPageComponent.java b/platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginDetailsPageComponent.java index 6ae4fe9d5dd8..c81bda502695 100644 --- a/platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginDetailsPageComponent.java +++ b/platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginDetailsPageComponent.java @@ -46,6 +46,7 @@ import java.awt.event.FocusAdapter; import java.awt.event.FocusEvent; import java.io.IOException; import java.util.List; +import java.util.Objects; import java.util.function.Consumer; /** @@ -290,6 +291,7 @@ public class PluginDetailsPageComponent extends MultiPanel { myAuthor = new LinkPanel(panel1, false, true, null, TextHorizontalLayout.FIX_LABEL); myEnabledForProject = new JLabel(); + myEnabledForProject.add(createDescriptionComponent(null)); myEnabledForProject.setHorizontalTextPosition(SwingConstants.LEFT); myEnabledForProject.setForeground(ListPluginComponent.GRAY_COLOR); setFont(myEnabledForProject); @@ -808,7 +810,7 @@ public class PluginDetailsPageComponent extends MultiPanel { } private void updateEnabledForProject() { - ProjectDependentPluginEnabledState state = myPluginModel.getProjectDependentState(myPlugin); + ProjectDependentPluginEnabledState state = myPluginModel.getProjectDependentState(Objects.requireNonNull(myPlugin)); myEnabledForProject.setText(state.toString()); myEnabledForProject.setIcon(state.getIcon()); }