|
1 | 1 | package edu.berkeley.cs61b.plugin;
|
2 | 2 |
|
| 3 | +import java.io.BufferedReader; |
| 4 | +import java.io.File; |
| 5 | +import java.io.IOException; |
| 6 | +import java.io.InputStream; |
| 7 | +import java.io.InputStreamReader; |
| 8 | +import java.nio.file.Path; |
| 9 | +import java.nio.file.Paths; |
| 10 | +import java.util.ArrayList; |
| 11 | +import java.util.Collections; |
| 12 | +import java.util.LinkedList; |
| 13 | +import java.util.List; |
| 14 | + |
| 15 | +import org.jetbrains.annotations.NotNull; |
| 16 | +import org.xml.sax.InputSource; |
| 17 | + |
3 | 18 | import com.intellij.execution.filters.OpenFileHyperlinkInfo;
|
4 | 19 | import com.intellij.execution.ui.ConsoleView;
|
5 | 20 | import com.intellij.execution.ui.ConsoleViewContentType;
|
| 21 | +import com.intellij.openapi.actionSystem.ActionUpdateThread; |
6 | 22 | import com.intellij.openapi.actionSystem.AnAction;
|
7 | 23 | import com.intellij.openapi.actionSystem.AnActionEvent;
|
8 | 24 | import com.intellij.openapi.actionSystem.CommonDataKeys;
|
|
20 | 36 | import com.puppycrawl.tools.checkstyle.api.AuditEvent;
|
21 | 37 | import com.puppycrawl.tools.checkstyle.api.AuditListener;
|
22 | 38 | import com.puppycrawl.tools.checkstyle.api.Configuration;
|
23 |
| -import org.xml.sax.InputSource; |
24 |
| - |
25 |
| -import java.io.BufferedReader; |
26 |
| -import java.io.File; |
27 |
| -import java.io.IOException; |
28 |
| -import java.io.InputStream; |
29 |
| -import java.io.InputStreamReader; |
30 |
| -import java.nio.file.Path; |
31 |
| -import java.nio.file.Paths; |
32 |
| -import java.util.ArrayList; |
33 |
| -import java.util.Collections; |
34 |
| -import java.util.LinkedList; |
35 |
| -import java.util.List; |
36 | 39 |
|
37 | 40 | public class CheckStyleAction extends AnAction {
|
38 | 41 | private static final String CONFIG_ROOT = "style_config/";
|
@@ -84,6 +87,11 @@ public void actionPerformed(AnActionEvent event) {
|
84 | 87 | }
|
85 | 88 | }
|
86 | 89 |
|
| 90 | + @Override |
| 91 | + public @NotNull ActionUpdateThread getActionUpdateThread() { |
| 92 | + return ActionUpdateThread.BGT; |
| 93 | + } |
| 94 | + |
87 | 95 | private void collectFiles(VirtualFile[] parent, List<File> list) {
|
88 | 96 | LinkedList<VirtualFile> sources = new LinkedList<>();
|
89 | 97 | Collections.addAll(sources, parent);
|
|
0 commit comments