[devkit] IJPL-156272 Remove duplicated freeze icons

GitOrigin-RevId: 2bd54574b982680c4a7db3be95e7a93bd08c1f02
This commit is contained in:
Yuriy Artamonov
2024-11-09 13:04:08 +01:00
committed by intellij-monorepo-bot
parent 469b04f5ce
commit bb1ea0941d
7 changed files with 14 additions and 44 deletions

View File

@@ -18,7 +18,6 @@ public final class DevKitIcons {
return IconManager.getInstance().loadRasterizedIcon(path, expUIPath, DevKitIcons.class.getClassLoader(), cacheKey, flags);
}
/** 16x16 */ public static final @NotNull Icon Add_sdk = load("icons/expui/addSDK.svg", "icons/add_sdk.svg", 641117830, 2);
/** 16x16 */ public static final @NotNull Icon Freeze = load("icons/expui/freeze.svg", "icons/freeze.svg", 754396711, 2);
public static final class Gutter {
/** 12x12 */ public static final @NotNull Icon DescriptionFile = load("icons/expui/gutter/descriptionFile@14x14.svg", "icons/gutter/descriptionFile.svg", 1318760137, 2);

View File

@@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.49971 1C7.77586 1 7.99971 1.22386 7.99971 1.5V2.56574L8.72236 2.08397C8.95213 1.9308 9.26256 1.99289 9.41574 2.22265C9.56892 2.45241 9.50683 2.76285 9.27706 2.91603L7.99971 3.76759V7.13413L10.9154 5.45076L11.0142 3.91876C11.032 3.64319 11.2698 3.43421 11.5453 3.45198C11.8209 3.46975 12.0299 3.70755 12.0121 3.98312L11.9562 4.84984L12.8792 4.31697C13.1183 4.1789 13.4241 4.26083 13.5622 4.49998C13.7003 4.73913 13.6183 5.04492 13.3792 5.18299L12.4562 5.71586L13.2348 6.10081C13.4823 6.22321 13.5837 6.52309 13.4614 6.77063C13.339 7.01817 13.0391 7.11962 12.7915 6.99722L11.4154 6.31679L8.49965 8.00019L11.4147 9.68321L12.7909 9.00278C13.0384 8.88038 13.3383 8.98183 13.4607 9.22937C13.5831 9.4769 13.4817 9.77679 13.2341 9.89919L12.4556 10.2841L13.3785 10.817C13.6177 10.9551 13.6996 11.2609 13.5615 11.5C13.4235 11.7392 13.1177 11.8211 12.8785 11.683L11.9556 11.1502L12.0115 12.0169C12.0292 12.2924 11.8203 12.5302 11.5447 12.548C11.2691 12.5658 11.0313 12.3568 11.0135 12.0812L10.9147 10.5492L7.99971 8.86625V12.2324L9.27706 13.084C9.50683 13.2372 9.56892 13.5476 9.41574 13.7774C9.26256 14.0071 8.95213 14.0692 8.72236 13.916L7.99971 13.4343V14.5C7.99971 14.7761 7.77586 15 7.49971 15C7.22357 15 6.99971 14.7761 6.99971 14.5V13.4343L6.27706 13.916C6.0473 14.0692 5.73687 14.0071 5.58369 13.7774C5.43051 13.5476 5.4926 13.2372 5.72236 13.084L6.99971 12.2324V8.86618L4.08464 10.5492L3.98583 12.0812C3.96806 12.3568 3.73026 12.5658 3.45469 12.548C3.17912 12.5302 2.97013 12.2924 2.98791 12.0168L3.0438 11.1501L2.12085 11.683C1.8817 11.8211 1.5759 11.7391 1.43783 11.5C1.29976 11.2608 1.3817 10.955 1.62085 10.817L2.5438 10.2841L1.76526 9.89915C1.51772 9.77675 1.41627 9.47687 1.53867 9.22933C1.66106 8.98179 1.96095 8.88034 2.20848 9.00274L3.58464 9.68317L6.49965 8.00019L3.58399 6.31683L2.20784 6.99726C1.9603 7.11966 1.66041 7.01821 1.53802 6.77067C1.41563 6.52313 1.51708 6.22325 1.76461 6.10085L2.54316 5.7159L1.6202 5.18303C1.38105 5.04496 1.29912 4.73917 1.43719 4.50002C1.57526 4.26087 1.88105 4.17894 2.1202 4.31701L3.04316 4.84988L2.98726 3.98316C2.96949 3.70759 3.17848 3.46979 3.45405 3.45202C3.72962 3.43425 3.96742 3.64323 3.98519 3.9188L4.08399 5.4508L6.99971 7.1342V3.76759L5.72236 2.91603C5.4926 2.76285 5.43051 2.45241 5.58369 2.22265C5.73687 1.99289 6.0473 1.9308 6.27706 2.08397L6.99971 2.56574V1.5C6.99971 1.22386 7.22357 1 7.49971 1Z" fill="#3574F0"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -1,10 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_7133_52115)">
<path d="M7.49971 1C7.77586 1 7.99971 1.22386 7.99971 1.5V2.56574L8.72236 2.08397C8.95213 1.9308 9.26256 1.99289 9.41574 2.22265C9.56892 2.45241 9.50683 2.76285 9.27706 2.91603L7.99971 3.76759V7.13413L10.9154 5.45076L11.0142 3.91876C11.032 3.64319 11.2698 3.43421 11.5453 3.45198C11.8209 3.46975 12.0299 3.70755 12.0121 3.98312L11.9562 4.84984L12.8792 4.31697C13.1183 4.1789 13.4241 4.26083 13.5622 4.49998C13.7003 4.73913 13.6183 5.04492 13.3792 5.18299L12.4562 5.71586L13.2348 6.10081C13.4823 6.22321 13.5837 6.52309 13.4614 6.77063C13.339 7.01817 13.0391 7.11962 12.7915 6.99722L11.4154 6.31679L8.49965 8.00019L11.4147 9.68321L12.7909 9.00278C13.0384 8.88038 13.3383 8.98183 13.4607 9.22937C13.5831 9.4769 13.4817 9.77679 13.2341 9.89919L12.4556 10.2841L13.3785 10.817C13.6177 10.9551 13.6996 11.2609 13.5615 11.5C13.4235 11.7392 13.1177 11.8211 12.8785 11.683L11.9556 11.1502L12.0115 12.0169C12.0292 12.2924 11.8203 12.5302 11.5447 12.548C11.2691 12.5658 11.0313 12.3568 11.0135 12.0812L10.9147 10.5492L7.99971 8.86625V12.2324L9.27706 13.084C9.50683 13.2372 9.56892 13.5476 9.41574 13.7774C9.26256 14.0071 8.95213 14.0692 8.72236 13.916L7.99971 13.4343V14.5C7.99971 14.7761 7.77586 15 7.49971 15C7.22357 15 6.99971 14.7761 6.99971 14.5V13.4343L6.27706 13.916C6.0473 14.0692 5.73687 14.0071 5.58369 13.7774C5.43051 13.5476 5.4926 13.2372 5.72236 13.084L6.99971 12.2324V8.86618L4.08464 10.5492L3.98583 12.0812C3.96806 12.3568 3.73026 12.5658 3.45469 12.548C3.17912 12.5302 2.97013 12.2924 2.98791 12.0168L3.0438 11.1501L2.12085 11.683C1.8817 11.8211 1.5759 11.7391 1.43783 11.5C1.29976 11.2608 1.3817 10.955 1.62085 10.817L2.5438 10.2841L1.76526 9.89915C1.51772 9.77675 1.41627 9.47687 1.53867 9.22933C1.66106 8.98179 1.96095 8.88034 2.20848 9.00274L3.58464 9.68317L6.49965 8.00019L3.58399 6.31683L2.20784 6.99726C1.9603 7.11966 1.66041 7.01821 1.53802 6.77067C1.41563 6.52313 1.51708 6.22325 1.76461 6.10085L2.54316 5.7159L1.6202 5.18303C1.38105 5.04496 1.29912 4.73917 1.43719 4.50002C1.57526 4.26087 1.88105 4.17894 2.1202 4.31701L3.04316 4.84988L2.98726 3.98316C2.96949 3.70759 3.17848 3.46979 3.45405 3.45202C3.72962 3.43425 3.96742 3.64323 3.98519 3.9188L4.08399 5.4508L6.99971 7.1342V3.76759L5.72236 2.91603C5.4926 2.76285 5.43051 2.45241 5.58369 2.22265C5.73687 1.99289 6.0473 1.9308 6.27706 2.08397L6.99971 2.56574V1.5C6.99971 1.22386 7.22357 1 7.49971 1Z" fill="#548AF7"/>
</g>
<defs>
<clipPath id="clip0_7133_52115">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -1,3 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.00003 9.73202V15H9.00003V9.73206L13.5622 12.366L14.5622 10.634L9.99999 7.99999L14.5622 5.36602L13.5622 3.63397L9.00003 6.26792V1H7.00003V6.26796L2.43783 3.63398L1.43783 5.36603L5.99999 7.99999L1.43781 10.634L2.43781 12.366L7.00003 9.73202Z" fill="#389FD6"/>
</svg>

Before

Width:  |  Height:  |  Size: 373 B

View File

@@ -1,10 +0,0 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_8253_2564)">
<path d="M7.00003 9.73202V15H9.00003V9.73206L13.5622 12.366L14.5622 10.634L9.99999 7.99999L14.5622 5.36602L13.5622 3.63397L9.00003 6.26792V1H7.00003V6.26796L2.43783 3.63398L1.43783 5.36603L5.99999 7.99999L1.43781 10.634L2.43781 12.366L7.00003 9.73202Z" fill="#3592C4"/>
</g>
<defs>
<clipPath id="clip0_8253_2564">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 519 B

View File

@@ -2,6 +2,7 @@
package org.jetbrains.idea.devkit.stacktrace
import com.intellij.execution.ui.RunContentDescriptor
import com.intellij.icons.AllIcons
import com.intellij.openapi.application.EDT
import com.intellij.openapi.project.Project
import com.intellij.platform.diagnostic.freezeAnalyzer.FreezeAnalyzer
@@ -9,26 +10,22 @@ import com.intellij.unscramble.AnalyzeStacktraceUtil
import com.intellij.unscramble.StacktraceTabContentProvider
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.jetbrains.idea.devkit.DevKitIcons
object FreezeDescriptor {
suspend fun getFreezeRunDescriptor(text: String, project: Project): RunContentDescriptor? = withContext(Dispatchers.Default) {
FreezeAnalyzer.analyzeFreeze(text)?.let { result ->
withContext(Dispatchers.EDT) {
AnalyzeStacktraceUtil.addConsole(
project, null,
DevKitStackTraceBundle.message("tab.title.freeze.analyzer"),
"${result.message}\n${result.additionalMessage ?: ""}\n======= Stack Trace: ========= \n${result.threads.joinToString { it -> it.stackTrace }}",
DevKitIcons.Freeze, false
)
}
internal suspend fun getFreezeRunDescriptor(text: String, project: Project): RunContentDescriptor? = withContext(Dispatchers.Default) {
FreezeAnalyzer.analyzeFreeze(text)?.let { result ->
withContext(Dispatchers.EDT) {
AnalyzeStacktraceUtil.addConsole(
project, null,
DevKitStackTraceBundle.message("tab.title.freeze.analyzer"),
"${result.message}\n${result.additionalMessage ?: ""}\n======= Stack Trace: ========= \n${result.threads.joinToString { it -> it.stackTrace }}",
AllIcons.Debugger.Freeze, false
)
}
}
}
class FreezeTabContentProvider : StacktraceTabContentProvider {
internal class FreezeTabContentProvider : StacktraceTabContentProvider {
override suspend fun createRunTabDescriptor(project: Project, text: String): RunContentDescriptor? {
return FreezeDescriptor.getFreezeRunDescriptor(text, project)
return getFreezeRunDescriptor(text, project)
}
}

View File

@@ -28,7 +28,7 @@ import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.debounce
import org.jetbrains.idea.devkit.stacktrace.DevKitStackTraceBundle
import org.jetbrains.idea.devkit.stacktrace.FreezeDescriptor
import org.jetbrains.idea.devkit.stacktrace.getFreezeRunDescriptor
import org.jetbrains.idea.devkit.stacktrace.util.StackTracePluginScope
import java.awt.BorderLayout
import java.beans.PropertyChangeListener
@@ -116,7 +116,7 @@ class StackTraceFileEditor(private val project: Project, private val file: Virtu
}
private suspend fun addFreezeAnalysisContent(contentManager: ContentManager) {
FreezeDescriptor.getFreezeRunDescriptor(document.text, project)?.let { freezeDescriptor ->
getFreezeRunDescriptor(document.text, project)?.let { freezeDescriptor ->
contentManager.addContent(createNewContent(freezeDescriptor).apply {
executionId = freezeDescriptor.executionId
component = freezeDescriptor.component