mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed duplicate warning
GitOrigin-RevId: d5c3949e1be6249f6f4996cea45ba00580035571
This commit is contained in:
committed by
intellij-monorepo-bot
parent
35d82f3e41
commit
4d7c03c5e3
+22
-21
@@ -237,17 +237,11 @@ class XThreadsFramesView(val debugTab: XDebugSessionTab3) : XDebugView() {
|
||||
})
|
||||
|
||||
myThreadsList.addMouseListener(object : MouseAdapter() {
|
||||
// not mousePressed here, otherwise click in unfocused frames list transfers focus to the new opened editor
|
||||
// not mousePressed here, otherwise click in an unfocused frames list transfers focus to the new opened editor
|
||||
override fun mouseReleased(e: MouseEvent) {
|
||||
if (!myListenersEnabled) return
|
||||
|
||||
val i = myThreadsList.locationToIndex(e.point)
|
||||
if (i == -1 || !myThreadsList.isSelectedIndex(i)) return
|
||||
|
||||
val session = getSession(e) ?: return
|
||||
val stack = myThreadsList.selectedValue?.stack ?: return
|
||||
|
||||
stack.setActive(session)
|
||||
processMouseEvent(e) { session, stack, _ ->
|
||||
stack.setActive(session)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -270,22 +264,29 @@ class XThreadsFramesView(val debugTab: XDebugSessionTab3) : XDebugView() {
|
||||
})
|
||||
|
||||
myFramesList.addMouseListener(object : MouseAdapter() {
|
||||
// not mousePressed here, otherwise click in unfocused frames list transfers focus to the new opened editor
|
||||
// not mousePressed here, otherwise click in an unfocused frames list transfers focus to the new opened editor
|
||||
override fun mouseReleased(e: MouseEvent) {
|
||||
if (!myListenersEnabled) return
|
||||
|
||||
val i = myFramesList.locationToIndex(e.point)
|
||||
if (i == -1 || !myFramesList.isSelectedIndex(i)) return
|
||||
|
||||
val session = getSession(e) ?: return
|
||||
val stack = myThreadsList.selectedValue?.stack ?: return
|
||||
val frame = myFramesList.selectedValue as? XStackFrame ?: return
|
||||
|
||||
session.setCurrentStackFrame(stack, frame)
|
||||
processMouseEvent(e) { session, stack, frame ->
|
||||
frame ?: return@processMouseEvent
|
||||
session.setCurrentStackFrame(stack, frame)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private inline fun processMouseEvent(e: MouseEvent, action: (XDebugSession, XExecutionStack, XStackFrame?) -> Unit) {
|
||||
if (!myListenersEnabled) return
|
||||
|
||||
val i = myFramesList.locationToIndex(e.point)
|
||||
if (i == -1 || !myFramesList.isSelectedIndex(i)) return
|
||||
|
||||
val session = getSession(e) ?: return
|
||||
val stack = myThreadsList.selectedValue?.stack ?: return
|
||||
val frame = myFramesList.selectedValue as? XStackFrame
|
||||
|
||||
action(session, stack, frame)
|
||||
}
|
||||
|
||||
private fun setActiveThreadDescription(@Nls text: String) {
|
||||
myCurrentThreadDescriptionComponent.paragraphs = listOf(TextParagraph(listOf(RegularTextPart(text).apply {
|
||||
this.editAttributes {
|
||||
|
||||
Reference in New Issue
Block a user