mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[IFT] Refactor: extract getCallBackActionId to Utils
GitOrigin-RevId: 798a1d1aaca11f9e5c207d9ea20b01867b91eb32
This commit is contained in:
committed by
intellij-monorepo-bot
parent
428ce848ab
commit
b3315624bb
-5
@@ -305,11 +305,6 @@ class JavaOnboardingTourLesson : KLesson("java.onboarding", JavaLessonsBundle.me
|
||||
return JavaProjectUtil.getEffectiveJdk(project)?.let { JavaSdk.getInstance().getVersionString(it) } ?: "none"
|
||||
}
|
||||
|
||||
private fun getCallBackActionId(@Suppress("SameParameterValue") actionId: String): String {
|
||||
val action = getActionById(actionId)
|
||||
return LearningUiManager.addCallback { invokeActionForFocusContext(action) }
|
||||
}
|
||||
|
||||
private fun LessonContext.debugTasks() {
|
||||
clearBreakpoints()
|
||||
|
||||
|
||||
@@ -155,6 +155,11 @@ fun invokeActionForFocusContext(action: AnAction) {
|
||||
}
|
||||
}
|
||||
|
||||
fun getCallBackActionId(actionId: String): String {
|
||||
val action = getActionById(actionId)
|
||||
return LearningUiManager.addCallback { invokeActionForFocusContext(action) }
|
||||
}
|
||||
|
||||
fun openLinkInBrowser(link: String) {
|
||||
val desktop = if (Desktop.isDesktopSupported()) Desktop.getDesktop() else null
|
||||
if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
|
||||
|
||||
-5
@@ -216,11 +216,6 @@ class PythonOnboardingTourLesson :
|
||||
}
|
||||
}
|
||||
|
||||
private fun getCallBackActionId(@Suppress("SameParameterValue") actionId: String): String {
|
||||
val action = getActionById(actionId)
|
||||
return LearningUiManager.addCallback { invokeActionForFocusContext(action) }
|
||||
}
|
||||
|
||||
private fun LessonContext.debugTasks() {
|
||||
clearBreakpoints()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user