From 16e582a11290c8bcfef2534873d449fe814e9381 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 21 Apr 2017 16:15:06 +0200 Subject: [PATCH] reduce usage of BrowserHyperlinkInfo --- platform/configuration-store-impl/src/ProjectStoreImpl.kt | 3 +-- .../intellij/execution/filters/BrowserHyperlinkInfo.java | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/configuration-store-impl/src/ProjectStoreImpl.kt b/platform/configuration-store-impl/src/ProjectStoreImpl.kt index b8302c51327c..ff81040c7c54 100644 --- a/platform/configuration-store-impl/src/ProjectStoreImpl.kt +++ b/platform/configuration-store-impl/src/ProjectStoreImpl.kt @@ -122,8 +122,7 @@ abstract class ProjectStoreBase(override final val project: ProjectImpl) : Compo fun convertProfiles(profileIterator: MutableIterator, isInspection: Boolean) { for (profile in profileIterator) { - val schemeName = profile.getChildren("option").find { it.getAttributeValue("name") == "myName" }?.getAttributeValue( - "value") ?: continue + val schemeName = profile.getChildren("option").find { it.getAttributeValue("name") == "myName" }?.getAttributeValue("value") ?: continue profileIterator.remove() val wrapper = Element("component").attribute("name", if (isInspection) "InspectionProjectProfileManager" else "CopyrightManager") diff --git a/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java b/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java index cf1129ae9219..2420dbf30ab0 100644 --- a/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java +++ b/platform/platform-api/src/com/intellij/execution/filters/BrowserHyperlinkInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2006 JetBrains s.r.o. + * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ import com.intellij.ide.BrowserUtil; import com.intellij.openapi.project.Project; /** - * @author Kir + * Consider to use OpenUrlHyperlinkInfo. */ public class BrowserHyperlinkInfo implements HyperlinkInfo { private final String myUrl; @@ -29,9 +29,10 @@ public class BrowserHyperlinkInfo implements HyperlinkInfo { } public void navigate(Project project) { - openUrl(myUrl); + BrowserUtil.browse(myUrl); } + @Deprecated public static void openUrl(String url) { BrowserUtil.browse(url); }