GutterIconNavigationHandler Right Click not work
已回答
I am trying to create RelatedItemLineMarkerInfo instance with its constructor, using custom MyGutterIconHandler like belows:
static class MyGutterIconHandler implements GutterIconNavigationHandler<PsiElement> {
@Override
public void navigate(MouseEvent mouseEvent, PsiElement element) {
System.out.println(mouseEvent.getButton());
if (mouseEvent.getButton() == MouseEvent.BUTTON1) {
// do something...
} else if (mouseEvent.getButton() == MouseEvent.BUTTON2) {
// do something...
} else if (mouseEvent.getButton() == MouseEvent.BUTTON3) {
// do something...
}
}
}when i click the mouse with the primary button, it works fine, but when i right clicked, failed. it seems that when i right click the mouse, the navigate method is not called.
this is my intellij platform sdk version in build.gradle.kts
plugins {
java // jdk8
kotlin("jvm") version "1.4.32"
id("org.jetbrains.intellij") version "0.7.2"
}thanks for your help.
请先登录再写评论。
i find a way to meet my needs. here is an example: