File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed
src/main/java/io/github/linyimin/plugin/ui Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 2121import io .github .linyimin .plugin .configuration .model .MybatisSqlConfiguration ;
2222import io .github .linyimin .plugin .constant .Constant ;
2323import io .github .linyimin .plugin .pojo2json .DefaultPOJO2JSONParser ;
24- import io .github .linyimin .plugin .pojo2json .RandomPOJO2JSONParser ;
2524import io .github .linyimin .plugin .sql .checker .Checker ;
2625import io .github .linyimin .plugin .sql .checker .CheckerHolder ;
2726import io .github .linyimin .plugin .sql .checker .Report ;
Original file line number Diff line number Diff line change @@ -88,6 +88,16 @@ public MybatisSqlViewerToolWindow(Project project) {
8888
8989 this .totalTabbedPanel .addMouseListener (new MouseCursorAdapter (this .totalTabbedPanel ));
9090
91+ this .totalTabbedPanel .addMouseListener (new MouseAdapter () {
92+ @ Override
93+ public void mouseClicked (MouseEvent event ) {
94+ int index = totalTabbedPanel .indexOfTab (TabbedComponentType .project .name ());
95+ if (event .getClickCount () == 2 && totalTabbedPanel .indexAtLocation (event .getX (), event .getY ()) == index ) {
96+ mybatisSqlScannerPanel .listen ();
97+ }
98+ }
99+ });
100+
91101 }
92102
93103 /**
@@ -137,15 +147,6 @@ private void addComponentListener() {
137147 // 监听tabbedpane点击事件
138148 totalTabbedPanel .addChangeListener (e -> totalTabbedPanelListener ());
139149
140- this .totalTabbedPanel .addMouseListener (new MouseAdapter () {
141- @ Override
142- public void mouseClicked (MouseEvent event ) {
143- if (event .getClickCount () == 2 && totalTabbedPanel .indexAtLocation (event .getX (), event .getY ()) < TabbedComponentType .project .index ) {
144- mybatisSqlScannerPanel .listen ();
145- }
146- }
147- });
148-
149150 }
150151
151152 private void mybatisModeCheckBoxListener () {
You can’t perform that action at this time.
0 commit comments