cleanup [*]: dropping deprecated ApplicationInfoEx methods and corresponding schema parts

GitOrigin-RevId: 354f3454a897c53e42efbc3d321f82471478b2b3
This commit is contained in:
Roman Shevchenko
2026-02-13 10:57:24 +01:00
committed by intellij-monorepo-bot
parent 0d0a148541
commit 9e19f7b4a6
12 changed files with 46 additions and 628 deletions

View File

@@ -10,5 +10,5 @@
<essential-plugin>com.intellij.java</essential-plugin>
<essential-plugin>com.intellij.java.ide</essential-plugin>
<plugins url="https://plugins.jetbrains.com/" builtin-url="__BUILTIN_PLUGINS_URL__"/>
<plugins url="https://plugins.jetbrains.com/"/>
</component>

View File

@@ -584,8 +584,6 @@ a:com.intellij.openapi.application.ApplicationInfo
- getSplashImageUrl():java.lang.String
- a:getStrictVersion():java.lang.String
- a:getVersionName():java.lang.String
- a:hasContextHelp():Z
- a:hasHelp():Z
- s:helpAvailable():Z
- isEAP():Z
c:com.intellij.openapi.application.ApplicationManager

View File

@@ -433,6 +433,9 @@ com.intellij.openapi.application.Application
- a:runWriteAction(com.intellij.openapi.util.ThrowableComputable):java.lang.Object
- a:runWriteAction(java.lang.Runnable):V
- a:saveSettings():V
a:com.intellij.openapi.application.ApplicationInfo
- hasContextHelp():Z
- hasHelp():Z
com.intellij.openapi.application.ApplicationListener
- java.util.EventListener
- afterWriteActionFinished(java.lang.Object):V

View File

@@ -1,7 +1,6 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.openapi.application;
import com.intellij.diagnostic.LoadingState;
import com.intellij.openapi.extensions.PluginId;
import com.intellij.openapi.util.BuildNumber;
import com.intellij.openapi.util.NlsSafe;
@@ -87,9 +86,19 @@ public abstract class ApplicationInfo {
public abstract String getCompanyURL();
public abstract boolean hasHelp();
/** @deprecated always {@code true} */
@Deprecated
@ApiStatus.ScheduledForRemoval
public boolean hasHelp() {
return true;
}
public abstract boolean hasContextHelp();
/** @deprecated always {@code true} */
@Deprecated
@ApiStatus.ScheduledForRemoval
public boolean hasContextHelp() {
return true;
}
public abstract @NlsSafe @NotNull String getFullVersion();
@@ -102,20 +111,18 @@ public abstract class ApplicationInfo {
public abstract @NlsSafe @NotNull String getStrictVersion();
/** @deprecated always {@code true} */
@Deprecated
@ApiStatus.ScheduledForRemoval
public static boolean helpAvailable() {
if (!LoadingState.COMPONENTS_LOADED.isOccurred()) {
return false;
}
ApplicationInfo info = getInstance();
return info != null && info.hasHelp();
return true;
}
/** @deprecated always {@code true} */
@Deprecated
@ApiStatus.ScheduledForRemoval
public static boolean contextHelpAvailable() {
if (!LoadingState.COMPONENTS_LOADED.isOccurred()) {
return false;
}
ApplicationInfo info = getInstance();
return info != null && info.hasContextHelp();
return true;
}
public boolean isEAP() {

View File

@@ -48,82 +48,6 @@ public abstract class ApplicationInfoEx extends ApplicationInfo {
@ApiStatus.Internal
public abstract @Nullable String getFullIdeProductCode();
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getDownloadPageUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public final @Nullable String getDownloadUrl() {
String productUrl = getProductUrl();
return productUrl != null ? productUrl + "download/" : null;
}
/**
* @deprecated use properties from {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getProductUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getYouTubeChannelUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getJetBrainsTvUrl() {
return null;
}
@ApiStatus.Internal
public @Nullable UpdateUrls getUpdateUrls() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getGettingStartedPageUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getDocumentationUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getTechnicalSupportUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getSupportUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getBugReportUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getYoutrackUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getFeedbackReporter()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getFeedbackUrl() {
return null;
}
/**
* Returns URL to plugins repository without a trailing slash.
*/
@@ -135,85 +59,6 @@ public abstract class ApplicationInfoEx extends ApplicationInfo {
public abstract @NotNull String getPluginDownloadUrl();
/**
* @deprecated use {@link com.intellij.ide.plugins.RepositoryHelper#CUSTOM_BUILT_IN_PLUGIN_REPOSITORY_PROPERTY} system property to pass
* URL of the built-in custom plugin repository instead
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getBuiltinPluginsUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getHelpPageUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getWebHelpUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getWhatIsNewPageUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getWhatsNewUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.ide.actions.WhatsNewUtil#isWhatsNewAvailable()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public boolean isShowWhatsNewOnUpdate() {
return false;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getKeyboardShortcutsPdfUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getWinKeymapUrl() {
return null;
}
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getKeyboardShortcutsPdfUrl()} instead
*/
@ApiStatus.Internal
@ApiStatus.ScheduledForRemoval
@Deprecated
public @Nullable String getMacKeymapUrl() {
return null;
}
@ApiStatus.Internal
public interface UpdateUrls {
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#getUpdateMetadataUrl()} instead
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
String getCheckingUrl();
/**
* @deprecated use {@link com.intellij.platform.ide.customization.ExternalProductResourceUrls#computePatchUrl} instead
*/
@ApiStatus.ScheduledForRemoval
@Deprecated
String getPatchesUrl();
}
public abstract String getSubscriptionFormId();
public abstract boolean areSubscriptionTipsAvailable();

View File

@@ -32,7 +32,8 @@ import java.util.Calendar;
import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.Objects;
import static java.util.Objects.requireNonNull;
/**
* Provides access to content of *ApplicationInfo.xml file.
@@ -81,26 +82,11 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
private ZonedDateTime buildTime;
private ZonedDateTime majorReleaseBuildDate;
private String myProductUrl;
private UpdateUrls myUpdateUrls;
private String myDocumentationUrl;
private String mySupportUrl;
private String myYoutrackUrl;
private String myFeedbackUrl;
private String myPluginManagerUrl;
private String myPluginsListUrl;
private String pluginDownloadUrl;
private String myBuiltinPluginsUrl;
private String myWhatsNewUrl;
private boolean myShowWhatsNewOnUpdate;
private String myWinKeymapUrl;
private String myMacKeymapUrl;
private boolean isEap;
private boolean myHasHelp = true;
private boolean myHasContextHelp = true;
private String myWebHelpUrl = "https://www.jetbrains.com/idea/webhelp/";
private final List<PluginId> essentialPluginIds = new ArrayList<>();
private String myJetBrainsTvUrl;
private String mySubscriptionFormId;
private boolean mySubscriptionTipsAvailable;
@@ -182,67 +168,11 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
}
break;
case "productUrl": {
myProductUrl = child.getAttributeValue("url");
}
break;
case "help": {
String webHelpUrl = getAttributeValue(child, "webhelp-url");
if (webHelpUrl != null) {
myWebHelpUrl = webHelpUrl;
}
String attValue = child.getAttributeValue("has-help");
myHasHelp = attValue == null || Boolean.parseBoolean(attValue); // Default is true
attValue = child.getAttributeValue("has-context-help");
myHasContextHelp = attValue == null || Boolean.parseBoolean(attValue); // Default is true
}
break;
case "update-urls": {
myUpdateUrls = new UpdateUrlsImpl(child);
}
break;
case "documentation": {
myDocumentationUrl = child.getAttributeValue("url");
}
break;
case "support": {
mySupportUrl = child.getAttributeValue("url");
}
break;
case "youtrack": {
myYoutrackUrl = child.getAttributeValue("url");
}
break;
case "feedback": {
myFeedbackUrl = child.getAttributeValue("url");
}
break;
case "whatsnew": {
myWhatsNewUrl = child.getAttributeValue("url");
myShowWhatsNewOnUpdate = Boolean.parseBoolean(child.getAttributeValue("show-on-update"));
}
break;
case "plugins": {
readPluginInfo(child);
}
break;
case "keymap": {
myWinKeymapUrl = child.getAttributeValue("win");
myMacKeymapUrl = child.getAttributeValue("mac");
}
break;
case "essential-plugin": {
String id = child.content;
if (id != null && !id.isEmpty()) {
@@ -251,11 +181,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
}
break;
case "jetbrains-tv": {
myJetBrainsTvUrl = child.getAttributeValue("url");
}
break;
case "subscriptions": {
//noinspection SpellCheckingInspection
mySubscriptionFormId = child.getAttributeValue("formid");
@@ -293,21 +218,12 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
readPluginInfo(null);
}
Objects.requireNonNull(svgIconUrl, "Missing attribute: //icon@svg");
Objects.requireNonNull(mySmallSvgIconUrl, "Missing attribute: //icon@svg-small");
overrideFromProperties();
requireNonNull(svgIconUrl, "Missing attribute: //icon@svg");
requireNonNull(mySmallSvgIconUrl, "Missing attribute: //icon@svg-small");
essentialPluginIds.sort(null);
}
private void overrideFromProperties() {
String youTrackUrlOverride = System.getProperty("application.info.youtrack.url");
if (youTrackUrlOverride != null) {
myYoutrackUrl = youTrackUrlOverride;
}
}
public static @NotNull ApplicationInfoEx getShadowInstance() {
return getShadowInstanceImpl();
}
@@ -366,7 +282,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
@Override
public @NotNull BuildNumber getBuild() {
return Objects.requireNonNull(BuildNumber.fromString(myBuildNumber));
return requireNonNull(BuildNumber.fromString(myBuildNumber));
}
@Override
@@ -382,17 +298,9 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
@Override
public @NotNull BuildNumber getApiVersionAsNumber() {
BuildNumber build = getBuild();
if (LOG.isDebugEnabled()) {
LOG.debug("getApiVersionAsNumber: build=" + build.asString());
}
if (myApiVersion != null) {
if (LOG.isDebugEnabled()) {
LOG.debug("getApiVersionAsNumber: myApiVersion=" + build.asString());
}
BuildNumber api = BuildNumber.fromStringWithProductCode(myApiVersion, build.getProductCode());
if (api != null) {
return api;
}
if (api != null) return api;
}
return build;
}
@@ -527,36 +435,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
return System.getProperty("intellij.platform.full.ide.product.code");
}
@Override
public String getProductUrl() {
return myProductUrl;
}
@Override
public @Nullable UpdateUrls getUpdateUrls() {
return myUpdateUrls;
}
@Override
public String getDocumentationUrl() {
return myDocumentationUrl;
}
@Override
public String getSupportUrl() {
return mySupportUrl;
}
@Override
public String getYoutrackUrl() {
return myYoutrackUrl;
}
@Override
public String getFeedbackUrl() {
return myFeedbackUrl;
}
@Override
public @NotNull String getPluginManagerUrl() {
return myPluginManagerUrl;
@@ -577,46 +455,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
return pluginDownloadUrl;
}
@Override
public String getBuiltinPluginsUrl() {
return myBuiltinPluginsUrl;
}
@Override
public String getWebHelpUrl() {
return myWebHelpUrl;
}
@Override
public boolean hasHelp() {
return myHasHelp;
}
@Override
public boolean hasContextHelp() {
return myHasContextHelp;
}
@Override
public String getWhatsNewUrl() {
return myWhatsNewUrl;
}
@Override
public boolean isShowWhatsNewOnUpdate() {
return myShowWhatsNewOnUpdate;
}
@Override
public String getWinKeymapUrl() {
return myWinKeymapUrl;
}
@Override
public String getMacKeymapUrl() {
return myMacKeymapUrl;
}
@Override
public String getFullApplicationName() {
return getVersionName() + " " + getFullVersion();
@@ -627,11 +465,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
return myCopyrightStart;
}
@Override
public String getJetBrainsTvUrl() {
return myJetBrainsTvUrl;
}
@Override
public String getSubscriptionFormId() {
return mySubscriptionFormId;
@@ -656,7 +489,7 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
LOG.debug("getPluginsCompatibleBuildAsNumber: version=" + version.asString());
}
BuildNumber buildNumber = BuildNumber.fromStringWithProductCode(version.asString(), getBuild().getProductCode());
return Objects.requireNonNull(buildNumber);
return requireNonNull(buildNumber);
}
private static @Nullable String getAttributeValue(XmlElement element, String name) {
@@ -700,11 +533,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
if (downloadUrl != null) {
pluginDownloadUrl = downloadUrl;
}
String builtinPluginsUrl = element.getAttributeValue("builtin-url");
if (builtinPluginsUrl != null && !builtinPluginsUrl.isEmpty()) {
myBuiltinPluginsUrl = builtinPluginsUrl;
}
}
String pluginHost = System.getProperty(IDEA_PLUGINS_HOST_PROPERTY);
@@ -721,7 +549,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
}
// copy of ApplicationInfoProperties.shortenCompanyName
@SuppressWarnings("SSBasedInspection")
private static String shortenCompanyName(String name) {
if (name.endsWith(" s.r.o.")) name = name.substring(0, name.length() - " s.r.o.".length());
if (name.endsWith(" Inc.")) name = name.substring(0, name.length() - " Inc.".length());
@@ -800,26 +627,6 @@ public final class ApplicationInfoImpl extends ApplicationInfoEx {
return simplifiedSplashImageUrl != null;
}
private static final class UpdateUrlsImpl implements UpdateUrls {
private final String myCheckingUrl;
private final String myPatchesUrl;
private UpdateUrlsImpl(XmlElement element) {
myCheckingUrl = element.getAttributeValue("check");
myPatchesUrl = element.getAttributeValue("patches");
}
@Override
public String getCheckingUrl() {
return myCheckingUrl;
}
@Override
public String getPatchesUrl() {
return myPatchesUrl;
}
}
/** @deprecated Use {@link ApplicationManagerEx#isInStressTest} */
@Deprecated
@ApiStatus.ScheduledForRemoval

View File

@@ -2,7 +2,6 @@
package com.intellij.ide.actions;
import com.intellij.idea.AppMode;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.updateSettings.UpdateStrategyCustomization;
import com.intellij.platform.ide.customization.ExternalProductResourceUrls;
import org.jetbrains.annotations.ApiStatus;
@@ -11,8 +10,8 @@ import org.jetbrains.annotations.ApiStatus;
public final class WhatsNewUtil {
@ApiStatus.Internal
public static boolean isWhatsNewAvailable() {
return (UpdateStrategyCustomization.getInstance().getShowWhatIsNewPageAfterUpdate() || ApplicationInfoEx.getInstanceEx().isShowWhatsNewOnUpdate())
return UpdateStrategyCustomization.getInstance().getShowWhatIsNewPageAfterUpdate()
&& ExternalProductResourceUrls.getInstance().getWhatIsNewPageUrl() != null
&& !AppMode.isRemoteDevHost();
}
}
}

View File

@@ -10,7 +10,6 @@ import com.intellij.ide.plugins.newui.PluginUiModel;
import com.intellij.ide.plugins.newui.PluginUiModelAdapter;
import com.intellij.ide.plugins.newui.PluginUiModelBuilderFactory;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.application.impl.ApplicationInfoImpl;
import com.intellij.openapi.components.impl.stores.ComponentStorageUtil;
import com.intellij.openapi.diagnostic.Logger;
@@ -55,7 +54,7 @@ public final class RepositoryHelper {
/** Duplicates VmOptionsGenerator.CUSTOM_BUILT_IN_PLUGIN_REPOSITORY_PROPERTY */
private static final String CUSTOM_BUILT_IN_PLUGIN_REPOSITORY_PROPERTY = "intellij.plugins.custom.built.in.repository.url";
@SuppressWarnings("SpellCheckingInspection") private static final String PLUGIN_LIST_FILE = "availables.xml";
private static final String PLUGIN_LIST_FILE = "availables.xml";
/**
* Returns a list of configured custom plugin repository hosts.
@@ -70,12 +69,7 @@ public final class RepositoryHelper {
hosts.addAll(UpdateSettingsProvider.getRepositoriesFromProviders());
@SuppressWarnings("deprecation") var pluginsUrl = ApplicationInfoEx.getInstanceEx().getBuiltinPluginsUrl();
if (pluginsUrl != null && !"__BUILTIN_PLUGINS_URL__".equals(pluginsUrl)) {
hosts.add(pluginsUrl);
}
pluginsUrl = System.getProperty(CUSTOM_BUILT_IN_PLUGIN_REPOSITORY_PROPERTY);
var pluginsUrl = System.getProperty(CUSTOM_BUILT_IN_PLUGIN_REPOSITORY_PROPERTY);
if (pluginsUrl != null) {
hosts.addAll(Arrays.asList(pluginsUrl.split(",")));
}
@@ -197,7 +191,9 @@ public final class RepositoryHelper {
if (model.getName() == null) {
var url = model.getDownloadUrl();
model.setName(FileUtilRt.getNameWithoutExtension(url.substring(url.lastIndexOf('/') + 1)));
if (url != null) {
model.setName(FileUtilRt.getNameWithoutExtension(url.substring(url.lastIndexOf('/') + 1)));
}
}
var previous = result.get(pluginId);
@@ -235,6 +231,7 @@ public final class RepositoryHelper {
@ApiStatus.Internal
@Deprecated(forRemoval = true)
@SuppressWarnings("DeprecatedIsStillUsed")
public static @NotNull Collection<PluginNode> mergePluginsFromRepositories(
@NotNull List<PluginNode> marketplacePlugins,
@NotNull List<PluginNode> customPlugins,
@@ -305,7 +302,7 @@ public final class RepositoryHelper {
* Looks for the given plugins in the Marketplace and custom repositories. Only compatible plugins are returned.
*/
public static @NotNull Collection<PluginNode> loadPlugins(@NotNull Set<PluginId> pluginIds) {
var mpPlugins = MarketplaceRequests.loadLastCompatiblePluginDescriptors(pluginIds);
@SuppressWarnings("deprecation") var mpPlugins = MarketplaceRequests.loadLastCompatiblePluginDescriptors(pluginIds);
var customPlugins = loadPluginsFromCustomRepositories(null).stream().filter(p -> pluginIds.contains(p.getPluginId())).toList();
return mergePluginsFromRepositories(mpPlugins, customPlugins, true);
}

View File

@@ -24,10 +24,6 @@ internal class ApplicationInfoServiceDelegate : ApplicationInfoEx() {
override fun getCompanyName(): String? = delegate.companyName
override fun getShortCompanyName(): String? = delegate.shortCompanyName
override fun getCompanyURL(): String? = delegate.companyURL
override fun getProductUrl(): String? = delegate.productUrl
override fun getJetBrainsTvUrl(): String? = delegate.jetBrainsTvUrl
override fun hasHelp(): Boolean = delegate.hasHelp()
override fun hasContextHelp(): Boolean = delegate.hasContextHelp()
override fun getFullVersion(): String = delegate.fullVersion
override fun getStrictVersion(): String = delegate.strictVersion
override fun getFullApplicationName(): String? = delegate.fullApplicationName
@@ -38,21 +34,10 @@ internal class ApplicationInfoServiceDelegate : ApplicationInfoEx() {
override fun isMajorEAP(): Boolean = delegate.isMajorEAP()
override fun isPreview(): Boolean = delegate.isPreview()
override fun getFullIdeProductCode(): String? = delegate.fullIdeProductCode
override fun getUpdateUrls(): UpdateUrls? = delegate.updateUrls
override fun getDocumentationUrl(): String? = delegate.documentationUrl
override fun getSupportUrl(): String? = delegate.supportUrl
override fun getYoutrackUrl(): String? = delegate.youtrackUrl
override fun getFeedbackUrl(): String? = delegate.feedbackUrl
override fun getPluginManagerUrl(): String = delegate.pluginManagerUrl
override fun usesJetBrainsPluginRepository(): Boolean = delegate.usesJetBrainsPluginRepository()
override fun getPluginsListUrl(): String = delegate.pluginsListUrl
override fun getPluginDownloadUrl(): String = delegate.pluginDownloadUrl
override fun getBuiltinPluginsUrl(): String? = delegate.builtinPluginsUrl
override fun getWebHelpUrl(): String? = delegate.webHelpUrl
override fun getWhatsNewUrl(): String? = delegate.whatsNewUrl
override fun isShowWhatsNewOnUpdate(): Boolean = delegate.isShowWhatsNewOnUpdate()
override fun getWinKeymapUrl(): String? = delegate.winKeymapUrl
override fun getMacKeymapUrl(): String? = delegate.macKeymapUrl
override fun isEssentialPlugin(pluginId: String): Boolean = delegate.isEssentialPlugin(pluginId)
override fun isEssentialPlugin(pluginId: PluginId): Boolean = delegate.isEssentialPlugin(pluginId)
override fun getSubscriptionFormId(): String? = delegate.subscriptionFormId
@@ -66,4 +51,4 @@ internal class ApplicationInfoServiceDelegate : ApplicationInfoEx() {
override fun isEAP(): Boolean = delegate.isEAP
override fun getSplashImageUrl(): String? = delegate.splashImageUrl
override fun isSimplifiedSplashSupported(): Boolean = delegate.isSimplifiedSplashSupported
}
}

View File

@@ -1,20 +1,11 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.platform.ide.impl.customization
import com.intellij.openapi.application.ApplicationInfo
import com.intellij.openapi.application.ex.ApplicationInfoEx
import com.intellij.openapi.diagnostic.thisLogger
import com.intellij.openapi.updateSettings.impl.UpdateRequestParametersProvider
import com.intellij.openapi.util.BuildNumber
import com.intellij.openapi.util.SystemInfo
import com.intellij.platform.ide.customization.ExternalProductResourceUrls
import com.intellij.platform.ide.customization.FeedbackReporter
import com.intellij.ui.LicensingFacade
import com.intellij.util.Url
import com.intellij.util.Urls
import com.intellij.util.io.URLUtil
import org.jetbrains.annotations.ApiStatus
import java.util.regex.Pattern
@ApiStatus.Internal
@Suppress("DEPRECATION")
@@ -28,94 +19,6 @@ class LegacyExternalProductResourceUrls : ExternalProductResourceUrls {
|""".trimMargin())
}
override val updateMetadataUrl: Url?
get() {
val customUrl = System.getProperty("idea.updates.url")
if (customUrl != null) {
return Urls.newFromEncoded(customUrl)
}
val baseUrl = ApplicationInfoEx.getInstanceEx().updateUrls?.checkingUrl ?: return null
return UpdateRequestParametersProvider.passUpdateParameters(Urls.newFromEncoded(baseUrl))
}
override fun computePatchUrl(from: BuildNumber, to: BuildNumber): Url? {
val customUrl = computeCustomPatchDownloadUrl(from, to)
if (customUrl != null) {
return customUrl
}
val baseUrl = ApplicationInfoEx.getInstanceEx().updateUrls?.patchesUrl ?: return null
return Urls.newFromEncoded(baseUrl).resolve(computePatchFileName(from, to))
}
override val bugReportUrl: ((String) -> Url)?
get() {
val youtrackUrl = ApplicationInfoEx.getInstanceEx().youtrackUrl ?: return null
return { description -> Urls.newFromEncoded(youtrackUrl.replace("\$DESCR", URLUtil.encodeURIComponent(description))) }
}
override val technicalSupportUrl: ((description: String) -> Url)?
get() {
val urlTemplate = ApplicationInfoEx.getInstanceEx().supportUrl ?: return null
return { _ ->
val url = urlTemplate
.replace("\$BUILD", ApplicationInfo.getInstance().getBuild().asStringWithoutProductCode())
.replace("\$OS", currentOsNameForIntelliJSupport())
.replace("\$TIMEZONE", System.getProperty("user.timezone"))
Urls.newFromEncoded(url)
}
}
override val feedbackReporter: FeedbackReporter?
get() {
val urlTemplate = ApplicationInfoEx.getInstanceEx().feedbackUrl ?: return null
return object : FeedbackReporter {
override val destinationDescription: String
get() {
val uriPattern = Pattern.compile("[^:/?#]+://(?:www\\.)?([^/?#]*).*", Pattern.DOTALL)
val matcher = uriPattern.matcher(urlTemplate)
return if (matcher.matches()) matcher.group(1) else ApplicationInfo.getInstance().companyName
}
override fun feedbackFormUrl(description: String): Url {
val appInfo = ApplicationInfoEx.getInstanceEx()
val build = appInfo.getBuild()
val url = urlTemplate
.replace("\$BUILD", URLUtil.encodeURIComponent(if (appInfo.isEAP) build.asStringWithoutProductCode() else build.asString()))
.replace("\$TIMEZONE", URLUtil.encodeURIComponent(System.getProperty("user.timezone", "")))
.replace("\$VERSION", URLUtil.encodeURIComponent(appInfo.getFullVersion()))
.replace("\$EVAL", URLUtil.encodeURIComponent((LicensingFacade.getInstance()?.isEvaluationLicense == true).toString()))
.replace("\$DESCR", URLUtil.encodeURIComponent(description))
return Urls.newFromEncoded(url)
}
}
}
override val downloadPageUrl: Url?
get() = ApplicationInfoEx.getInstanceEx().downloadUrl?.let { Urls.newFromEncoded(it) }
override val youTubeChannelUrl: Url?
get() = ApplicationInfoEx.getInstanceEx().jetBrainsTvUrl?.let { Urls.newFromEncoded(it) }
override val keyboardShortcutsPdfUrl: Url?
get() {
val appInfo = ApplicationInfoEx.getInstanceEx()
val url = if (SystemInfo.isMac) appInfo.getMacKeymapUrl() else appInfo.getWinKeymapUrl()
return url?.let { Urls.newFromEncoded(url) }
}
override val whatIsNewPageUrl: Url?
get() = ApplicationInfoEx.getInstanceEx().whatsNewUrl?.let { Urls.newFromEncoded(it) }
override val gettingStartedPageUrl: Url?
get() = ApplicationInfoEx.getInstanceEx().documentationUrl?.let { Urls.newFromEncoded(it) }
override val helpPageUrl: ((topicId: String) -> Url)?
get() {
val baseHelpUrl = ApplicationInfoEx.getInstanceEx().webHelpUrl ?: return null
return { topicId ->
Urls.newFromEncoded(baseHelpUrl).resolve("${ApplicationInfo.getInstance().shortVersion}/").addParameters(mapOf(
topicId to ""
))
}
}
}
override val updateMetadataUrl: Url? = null
override fun computePatchUrl(from: BuildNumber, to: BuildNumber): Url? = null
}

View File

@@ -14,13 +14,6 @@
<xs:element type="iconType" name="icon"/>
<xs:element type="iconEapType" name="icon-eap" minOccurs="0"/>
<xs:element type="namesType" name="names"/>
<xs:element type="productUrlType" name="productUrl" minOccurs="0">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.downloadPageUrl instead.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="essentialPluginType" name="essential-plugin" minOccurs="0" maxOccurs="unbounded"/>
<xs:element type="pluginsType" name="plugins" minOccurs="0">
<xs:annotation>
@@ -30,45 +23,6 @@
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="update-urlsType" name="update-urls" minOccurs="0"/>
<xs:element type="helpType" name="help" minOccurs="0"/>
<xs:element type="urlType" name="documentation" minOccurs="0">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.gettingStartedPageUrl instead.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="urlType" name="support" minOccurs="0">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.technicalSupportUrl instead.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="urlType" name="youtrack" minOccurs="0">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.bugReportUrl instead.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="zendeskFormType" name="feedback" minOccurs="0"/>
<xs:element type="whatsNewUrlType" name="whatsnew" minOccurs="0"/>
<xs:element type="keymapType" name="keymap" minOccurs="0">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.keyboardShortcutsPdfUrl instead.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="urlType" name="jetbrains-tv" minOccurs="0">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.youTubeChannelUrl instead.
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element type="subscriptionsType" name="subscriptions" minOccurs="0"/>
<xs:element type="default-lafType" name="default-laf" minOccurs="0"/>
</xs:sequence>
@@ -134,9 +88,6 @@
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="productUrlType">
<xs:attribute type="xs:anyURI" name="url" use="required"/>
</xs:complexType>
<xs:complexType name="companyType">
<xs:attribute type="xs:string" name="name" use="required">
<xs:annotation>
@@ -267,52 +218,9 @@
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="helpType">
<xs:attribute type="xs:string" name="webhelp-url">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.helpPageUrl instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:boolean" name="has-help"/>
<xs:attribute type="xs:boolean" name="has-context-help"/>
</xs:complexType>
<xs:complexType name="update-urlsType">
<xs:attribute type="xs:anyURI" name="check">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.updateMetadataUrl instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:anyURI" name="patches">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.computePatchUrl instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="urlType">
<xs:attribute type="xs:string" name="url" use="required"/>
</xs:complexType>
<xs:complexType name="whatsNewUrlType">
<xs:attribute type="xs:anyURI" name="url">
<xs:annotation>
<xs:documentation>
Deprecated: override ExternalProductResourceUrls.whatIsNewPageUrl instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute type="xs:boolean" name="show-on-update">
<xs:annotation>
<xs:documentation>
Deprecated: override UpdateStrategyCustomization.showWhatIsNewPageAfterUpdate instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="pluginsType">
<xs:attribute type="xs:anyURI" name="url">
<xs:annotation>
@@ -323,18 +231,6 @@
</xs:attribute>
<xs:attribute type="xs:string" name="list-url"/>
<xs:attribute type="xs:string" name="download-url"/>
<xs:attribute type="xs:string" name="builtin-url">
<xs:annotation>
<xs:documentation>
Deprecated since 2023.3.
Use 'intellij.plugins.custom.built.in.repository.url' system property to pass URL of built-in custom plugin repository instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="keymapType">
<xs:attribute type="xs:string" name="win" use="required"/>
<xs:attribute type="xs:string" name="mac" use="required"/>
</xs:complexType>
<xs:complexType name="subscriptionsType">
<xs:attribute type="xs:string" name="formid"/>
@@ -346,18 +242,4 @@
<xs:attribute type="xs:string" name="light-classic"/>
<xs:attribute type="xs:string" name="dark-classic"/>
</xs:complexType>
<xs:complexType name="zendeskFormType">
<xs:attribute type="xs:string" name="url">
<xs:annotation>
<xs:documentation>
Deprecated: override FeedbackReporter.feedbackFormUrl instead.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="zendeskFieldType">
<xs:attribute type="xs:long" name="id" use="required"/>
<xs:attribute type="xs:string" name="type"/>
<xs:attribute type="xs:string" name="value"/>
</xs:complexType>
</xs:schema>

View File

@@ -7,7 +7,6 @@ import com.intellij.ide.actions.WhatsNewUtil
import com.intellij.idea.AppMode
import com.intellij.internal.performanceTests.ProjectInitializationDiagnosticService
import com.intellij.openapi.actionSystem.ActionManager
import com.intellij.openapi.application.ex.ApplicationInfoEx
import com.intellij.openapi.client.ClientKind
import com.intellij.openapi.client.ClientSessionsManager
import com.intellij.openapi.components.Service
@@ -51,17 +50,10 @@ private class WhatsNewEnvironmentAccessorImpl : WhatsNewEnvironmentAccessor {
override fun isDefaultWhatsNewEnabledAndReadyToShow(): Boolean {
val updateStrategyCustomization = UpdateStrategyCustomization.getInstance()
val enabledModernWay = updateStrategyCustomization.showWhatIsNewPageAfterUpdate
@Suppress("DEPRECATION") val enabledLegacyWay = ApplicationInfoEx.getInstanceEx().isShowWhatsNewOnUpdate
if (enabledModernWay || enabledLegacyWay) {
if (enabledModernWay) {
val problem = "This could lead to issues with the Vision-based What's New. Mixing of web-based and Vision-based What's New is not supported."
if (enabledModernWay) {
logger.error("${updateStrategyCustomization.javaClass}'s showWhatIsNewPageAfterUpdate is overridden to true. $problem")
}
if (enabledLegacyWay) {
logger.error("show-on-update attribute on the <whatsnew> element in the application info XML is set. $problem")
}
logger.error("${updateStrategyCustomization.javaClass}'s showWhatIsNewPageAfterUpdate is overridden to true. $problem")
if (WhatsNewUtil.isWhatsNewAvailable()) { // if we are really able to show old What's New here, then terminate.
return true