Skip to content

Commit 528da71

Browse files
committed
Checkstyle fixes
1 parent f292da8 commit 528da71

File tree

4 files changed

+45
-36
lines changed

4 files changed

+45
-36
lines changed

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/GraphConsoleView.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,16 +160,20 @@ public void mouseReleased(MouseEvent e) {
160160
}
161161

162162
@Override
163-
public void mouseClicked(MouseEvent e) {}
163+
public void mouseClicked(MouseEvent e) {
164+
}
164165

165166
@Override
166-
public void mousePressed(MouseEvent e) {}
167+
public void mousePressed(MouseEvent e) {
168+
}
167169

168170
@Override
169-
public void mouseEntered(MouseEvent e) {}
171+
public void mouseEntered(MouseEvent e) {
172+
}
170173

171174
@Override
172-
public void mouseExited(MouseEvent e) {}
175+
public void mouseExited(MouseEvent e) {
176+
}
173177
});
174178
}
175179

@@ -193,7 +197,7 @@ private void initializeWidgets(Project project) {
193197
}
194198

195199
private void createNewQueryPlanTab(String originalQuery,
196-
GraphQueryResult result, int tabId) {
200+
GraphQueryResult result, int tabId) {
197201
JPanel panel = new JPanel();
198202
panel.setLayout(new BorderLayout(0, 3));
199203

@@ -204,6 +208,7 @@ private void createNewQueryPlanTab(String originalQuery,
204208
DefaultActionGroup tabActions = new DefaultActionGroup(new QueryPlanPanel.CloseTab() {
205209
@Override
206210
public void actionPerformed(AnActionEvent e) {
211+
super.actionPerformed(e);
207212
consoleTabs.removeTab(tabInfo);
208213
}
209214
});

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/plan/ColumnDefinitions.java

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,31 @@
1616
import static java.util.stream.Collectors.toSet;
1717

1818
class ColumnDefinitions {
19+
static ColumnInfo[] getQueryPlanColumns() {
20+
return new ColumnInfo[]{
21+
OPERATOR_COL,
22+
ESTIMATED_ROWS_COL,
23+
ARGUMENTS_COL,
24+
IDENTIFIERS_COL
25+
};
26+
}
27+
28+
static ColumnInfo[] getProfileQueryPlanColumns() {
29+
return new ColumnInfo[]{
30+
OPERATOR_COL,
31+
ROWS_COL,
32+
DB_HITS_COL,
33+
ESTIMATED_ROWS_COL,
34+
ARGUMENTS_COL,
35+
IDENTIFIERS_COL
36+
};
37+
}
38+
1939
private static final Set<String> RESERVED_KEYS = Stream.of(QueryPlanArgumentKeys.values())
2040
.map(QueryPlanArgumentKeys::getKey)
2141
.collect(toSet());
2242

23-
private final static ColumnInfo<DefaultMutableTreeNode, String> OPERATOR_COL =
43+
private static final ColumnInfo<DefaultMutableTreeNode, String> OPERATOR_COL =
2444
new ColumnInfo<DefaultMutableTreeNode, String>("Operator") {
2545
@Override
2646
public Class<?> getColumnClass() {
@@ -34,16 +54,16 @@ public String valueOf(DefaultMutableTreeNode o) {
3454
}
3555
};
3656

37-
private final static ColumnInfo<DefaultMutableTreeNode, String> ESTIMATED_ROWS_COL =
57+
private static final ColumnInfo<DefaultMutableTreeNode, String> ESTIMATED_ROWS_COL =
3858
getArgumentColumn("Estimated rows", ESTIMATED_ROWS.getKey(), "0");
3959

40-
private final static ColumnInfo<DefaultMutableTreeNode, String> DB_HITS_COL =
60+
private static final ColumnInfo<DefaultMutableTreeNode, String> DB_HITS_COL =
4161
getArgumentColumn("DB Hits", DB_HITS.getKey(), "0");
4262

43-
private final static ColumnInfo<DefaultMutableTreeNode, String> ROWS_COL =
63+
private static final ColumnInfo<DefaultMutableTreeNode, String> ROWS_COL =
4464
getArgumentColumn("Rows", ROWS.getKey(), "0");
4565

46-
private final static ColumnInfo<DefaultMutableTreeNode, String> ARGUMENTS_COL =
66+
private static final ColumnInfo<DefaultMutableTreeNode, String> ARGUMENTS_COL =
4767
new ColumnInfo<DefaultMutableTreeNode, String>("Arguments") {
4868
@Nullable
4969
@Override
@@ -56,7 +76,7 @@ public String valueOf(DefaultMutableTreeNode o) {
5676
}
5777
};
5878

59-
private final static ColumnInfo<DefaultMutableTreeNode, String> IDENTIFIERS_COL =
79+
private static final ColumnInfo<DefaultMutableTreeNode, String> IDENTIFIERS_COL =
6080
new ColumnInfo<DefaultMutableTreeNode, String>("Identifiers") {
6181
@Nullable
6282
@Override
@@ -66,26 +86,6 @@ public String valueOf(DefaultMutableTreeNode o) {
6686
}
6787
};
6888

69-
static ColumnInfo[] getQueryPlanColumns() {
70-
return new ColumnInfo[]{
71-
OPERATOR_COL,
72-
ESTIMATED_ROWS_COL,
73-
ARGUMENTS_COL,
74-
IDENTIFIERS_COL
75-
};
76-
}
77-
78-
static ColumnInfo[] getProfileQueryPlanColumns() {
79-
return new ColumnInfo[]{
80-
OPERATOR_COL,
81-
ROWS_COL,
82-
DB_HITS_COL,
83-
ESTIMATED_ROWS_COL,
84-
ARGUMENTS_COL,
85-
IDENTIFIERS_COL
86-
};
87-
}
88-
8989
@NotNull
9090
private static <T> ColumnInfo<DefaultMutableTreeNode, T> getArgumentColumn(String title, String argumentKey,
9191
T defaultValue) {

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/plan/QueryPlanArgumentKeys.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ enum QueryPlanArgumentKeys {
1111
RUNTIME_IMPL("runtime-impl"),
1212
PLANNER("planner"),
1313
VERSION("version");
14-
14+
1515
private String key;
1616

1717
QueryPlanArgumentKeys(String key) {
@@ -22,5 +22,5 @@ public String getKey() {
2222
return key;
2323
}
2424

25-
25+
2626
}

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/console/plan/QueryPlanPanel.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ public Component getTreeCellRendererComponent(JTree tree, Object value, boolean
8686
.map(col -> col.valueOf(value))
8787
.orElseThrow(() ->
8888
new ShouldNeverHappenException("Sergey Ishchenko",
89-
"columns are statically defined, and each column set should contain " +
90-
"operator column"));
89+
"columns are statically defined, and each column set should contain "
90+
+ "operator column"));
9191

9292
JComponent result = (JComponent) myBaseRenderer.getTreeCellRendererComponent(tree,
9393
transformedValue, selected, expanded, leaf, row, hasFocus);
@@ -146,7 +146,11 @@ private static String getStatusText(GraphQueryResult result) {
146146
return sb.toString();
147147
}
148148

149-
public static abstract class CloseTab extends AnAction implements DumbAware {
149+
public static class CloseTab extends AnAction implements DumbAware {
150+
151+
@Override
152+
public void actionPerformed(AnActionEvent e) {
153+
}
150154

151155
@Override
152156
public void update(final AnActionEvent e) {

0 commit comments

Comments
 (0)