mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Cleanup (migrating from deprecated API; formatting)
GitOrigin-RevId: 53c26f168047e478dde0b42c5396a76cc1b65e7e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b70d71eda2
commit
35fc1fef47
@@ -10,7 +10,6 @@ import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.application.ApplicationActivationListener;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
final class UnscrambleAction extends AnAction implements DumbAware {
|
||||
@@ -18,19 +17,6 @@ final class UnscrambleAction extends AnAction implements DumbAware {
|
||||
ApplicationManager.getApplication().getMessageBus().connect().subscribe(ApplicationActivationListener.TOPIC, new UnscrambleListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
Project project = e.getData(CommonDataKeys.PROJECT);
|
||||
if (project == null) return;
|
||||
String message = e.getData(IdeErrorsDialog.CURRENT_TRACE_KEY);
|
||||
if (message != null) {
|
||||
AnalyzeStacktraceUtil.addConsole(project, null, JavaBundle.message("unscramble.unscrambled.stacktrace.tab"), message);
|
||||
}
|
||||
else {
|
||||
new UnscrambleDialog(project).show();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent event) {
|
||||
event.getPresentation().setEnabled(event.getProject() != null);
|
||||
@@ -40,4 +26,18 @@ final class UnscrambleAction extends AnAction implements DumbAware {
|
||||
public @NotNull ActionUpdateThread getActionUpdateThread() {
|
||||
return ActionUpdateThread.BGT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(@NotNull AnActionEvent e) {
|
||||
var project = e.getData(CommonDataKeys.PROJECT);
|
||||
if (project == null) return;
|
||||
|
||||
var message = e.getData(IdeErrorsDialog.CURRENT_TRACE_KEY);
|
||||
if (message != null) {
|
||||
AnalyzeStacktraceUtil.addConsole(project, null, JavaBundle.message("unscramble.unscrambled.stacktrace.tab"), message);
|
||||
}
|
||||
else {
|
||||
new UnscrambleDialog(project).show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2059,7 +2059,7 @@ c:com.intellij.diagnostic.ITNReporter
|
||||
c:com.intellij.diagnostic.IdeErrorsDialog
|
||||
- com.intellij.openapi.ui.DialogWrapper
|
||||
- com.intellij.diagnostic.MessagePoolListener
|
||||
- com.intellij.openapi.actionSystem.UiCompatibleDataProvider
|
||||
- com.intellij.openapi.actionSystem.UiDataProvider
|
||||
- sf:CURRENT_TRACE_KEY:com.intellij.openapi.actionSystem.DataKey
|
||||
- sf:Companion:com.intellij.diagnostic.IdeErrorsDialog$Companion
|
||||
- sf:ERROR_HANDLER_EP:com.intellij.openapi.extensions.ExtensionPointName
|
||||
|
||||
@@ -69,8 +69,8 @@ import javax.swing.text.JTextComponent
|
||||
open class IdeErrorsDialog internal constructor(
|
||||
private val myMessagePool: MessagePool,
|
||||
private val myProject: Project?,
|
||||
defaultMessage: LogMessage?,
|
||||
) : DialogWrapper(myProject, true), MessagePoolListener, UiCompatibleDataProvider {
|
||||
defaultMessage: LogMessage?
|
||||
) : DialogWrapper(myProject, true), MessagePoolListener, UiDataProvider {
|
||||
@Suppress("KotlinConstantConditions")
|
||||
private val myAssigneeVisible: Boolean =
|
||||
false && // disabling the Assignee field for now (the corresponding endpoint is no longer available) todo [r.sh]
|
||||
@@ -656,8 +656,7 @@ open class IdeErrorsDialog internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
private inner class AnalyzeAction(analyze: AnAction) : AbstractAction(ActionsBundle.actionText(
|
||||
ActionManager.getInstance().getId(analyze))) {
|
||||
private inner class AnalyzeAction(analyze: AnAction) : AbstractAction(ActionsBundle.actionText(ActionManager.getInstance().getId(analyze))) {
|
||||
private val myAnalyze: AnAction
|
||||
|
||||
init {
|
||||
@@ -667,7 +666,7 @@ open class IdeErrorsDialog internal constructor(
|
||||
|
||||
override fun actionPerformed(e: ActionEvent) {
|
||||
val ctx = DataManager.getInstance().getDataContext(e.source as Component)
|
||||
val event = AnActionEvent.createFromAnAction(myAnalyze, null, ActionPlaces.UNKNOWN, ctx)
|
||||
val event = AnActionEvent.createEvent(myAnalyze, ctx, null, ActionPlaces.UNKNOWN, ActionUiKind.NONE, null)
|
||||
myAnalyze.actionPerformed(event)
|
||||
doCancelAction()
|
||||
}
|
||||
@@ -883,11 +882,9 @@ open class IdeErrorsDialog internal constructor(
|
||||
private const val ACCEPTED_NOTICES_SEPARATOR = ":"
|
||||
private const val DISABLE_PLUGIN_URL = "#disable"
|
||||
private const val LAST_OK_ACTION = "IdeErrorsDialog.LAST_OK_ACTION"
|
||||
@JvmField
|
||||
val ERROR_HANDLER_EP: ExtensionPointName<ErrorReportSubmitter> = create("com.intellij.errorHandler")
|
||||
|
||||
@JvmField
|
||||
val CURRENT_TRACE_KEY: DataKey<String> = DataKey.create("current_stack_trace_key")
|
||||
@JvmField val ERROR_HANDLER_EP: ExtensionPointName<ErrorReportSubmitter> = create("com.intellij.errorHandler")
|
||||
@JvmField val CURRENT_TRACE_KEY: DataKey<String> = DataKey.create("current_stack_trace_key")
|
||||
|
||||
@JvmStatic
|
||||
fun confirmDisablePlugins(project: Project?, pluginsToDisable: List<IdeaPluginDescriptor>) {
|
||||
|
||||
Reference in New Issue
Block a user