mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[terminal] copy output command
GitOrigin-RevId: 3a825a91c45a037deae3806a0d127a5fff958605
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5782a99eb6
commit
88c96a7fba
+19
@@ -0,0 +1,19 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package org.jetbrains.plugins.terminal.action
|
||||
|
||||
import com.intellij.ide.CopyPasteUtil
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys
|
||||
import com.intellij.openapi.project.DumbAwareAction
|
||||
|
||||
/**
|
||||
* @author Konstantin Bulenkov
|
||||
*/
|
||||
class CopyTerminalOutputAction : DumbAwareAction() {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val output = e.getData(PlatformDataKeys.EDITOR)?.document?.text
|
||||
if (output != null) {
|
||||
CopyPasteUtil.copyTextToClipboard(output)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user