Skip to content

Commit 4042412

Browse files
jreznotintellij-monorepo-bot
authored andcommitted
[plugins] IJPL-148225 Do not show "No license" info for freemium plugins in the Plugin Manager
(cherry picked from commit 59ce007b063310bb975ee3f2befdc2023f263ab8) IJ-CR-160790 GitOrigin-RevId: d2d98123bf4d2bce1b750a7d951c1e974a0f89ff
1 parent a51a141 commit 4042412

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

platform/platform-impl/src/com/intellij/ide/plugins/newui/ListPluginComponent.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,11 @@ private void createLicensePanel() {
473473
setTagTooltip(IdeBundle.message("label.text.plugin.eap.license.not.required"));
474474
return;
475475
}
476+
477+
if (myPlugin.isLicenseOptional()) {
478+
return; // do not show "No License" for Freemium plugins
479+
}
480+
476481
licensePanel.setText(IdeBundle.message("label.text.plugin.no.license"), true, false);
477482
}
478483
else {
@@ -1617,7 +1622,7 @@ public String getAccessibleDescription() {
16171622
description.add(IdeBundle.message("plugins.configurable.list.component.accessible.description.install.available"));
16181623
}
16191624
else if (!myInstallButton.isEnabled() && !isDefaultText) {
1620-
// Install button contains status text when it's disabled and its text is not default.
1625+
// Install button contains status text when it is disabled and its text is not default.
16211626
// Disabled buttons are not focusable, so this information can be missed by screen reader users.
16221627
description.add(myInstallButton.getText());
16231628
}

platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginDetailsPageComponent.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ class PluginDetailsPageComponent @JvmOverloads constructor(
13091309
licensePanel.showBuyPluginWithText(
13101310
message, false, false,
13111311
{ descriptor }, false,
1312-
!requiresCommercialIde // if the descriptor requires a commercial IDE, we do not show trial/price message
1312+
!requiresCommercialIde // if the descriptor requires a commercial IDE, we do not show the trial/price message
13131313
)
13141314
}
13151315
else {
@@ -1321,11 +1321,17 @@ class PluginDetailsPageComponent @JvmOverloads constructor(
13211321

13221322
val stamp = instance.getConfirmationStamp(productCode)
13231323
if (stamp == null) {
1324-
if (ApplicationManager.getApplication().isEAP) {
1324+
if (ApplicationManager.getApplication().isEAP && !java.lang.Boolean.getBoolean("eap.require.license")) {
13251325
tagPanel!!.setFirstTagTooltip(IdeBundle.message("tooltip.license.not.required.for.eap.version"))
13261326
licensePanel.hideWithChildren()
13271327
return
13281328
}
1329+
1330+
if (descriptor.isLicenseOptional()) {
1331+
licensePanel.hideWithChildren()
1332+
return; // do not show "No License" for Freemium plugins
1333+
}
1334+
13291335
licensePanel.setText(IdeBundle.message("label.text.plugin.no.license"), true, false)
13301336
}
13311337
else {

0 commit comments

Comments
 (0)