-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPluginTestView.java
More file actions
32 lines (30 loc) · 1.13 KB
/
PluginTestView.java
File metadata and controls
32 lines (30 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package actions;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.ui.Messages;
import org.jetbrains.annotations.NotNull;
import services.FlServiceImpl;
import services.Resources;
import ui.ViewTest;
public class PluginTestView extends DumbAwareAction {
/**
* When you click on the menu item, then this will show the table data.
* If the Fault localization has been run, then it will just open the data with the results
* Otherwise it presents an error message.
* @param e
*/
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
FlServiceImpl flService = new FlServiceImpl();
if (flService.isTestDataCollected()) {
flService.setViewTestTableDialogOpened(true);
new ViewTest().show();
} else {
Messages.showMessageDialog(
e.getProject(),
Resources.get("errors", "run_tests_error"),
Resources.get("titles", "data_not_collected_title"),
Messages.getErrorIcon());
}
}
}