mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[threading] IJPL-223866: Add write-intent into MethodCellRenderer
GitOrigin-RevId: 9cfeee76a7f4c352cfb801e62381610a4ac94e39
This commit is contained in:
committed by
intellij-monorepo-bot
parent
98252655a7
commit
dee0916560
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2025 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.refactoring.ui;
|
||||
|
||||
import com.intellij.openapi.application.ReadAction;
|
||||
import com.intellij.openapi.util.Iconable;
|
||||
import com.intellij.psi.PsiMethod;
|
||||
import com.intellij.psi.PsiSubstitutor;
|
||||
@@ -22,10 +23,12 @@ public class MethodCellRenderer extends DefaultListCellRenderer {
|
||||
|
||||
PsiMethod method = (PsiMethod) value;
|
||||
|
||||
final String text = PsiFormatUtil.formatMethod(method, PsiSubstitutor.EMPTY,
|
||||
PsiFormatUtilBase.SHOW_CONTAINING_CLASS | PsiFormatUtilBase.SHOW_NAME |
|
||||
PsiFormatUtilBase.SHOW_PARAMETERS,
|
||||
PsiFormatUtilBase.SHOW_TYPE);
|
||||
final String text = ReadAction.compute(() ->
|
||||
PsiFormatUtil.formatMethod(method, PsiSubstitutor.EMPTY,
|
||||
PsiFormatUtilBase.SHOW_CONTAINING_CLASS | PsiFormatUtilBase.SHOW_NAME |
|
||||
PsiFormatUtilBase.SHOW_PARAMETERS,
|
||||
PsiFormatUtilBase.SHOW_TYPE));
|
||||
|
||||
setText(text);
|
||||
|
||||
Icon icon = method.getIcon(Iconable.ICON_FLAG_VISIBILITY);
|
||||
|
||||
Reference in New Issue
Block a user