Skip to content

Commit d2017d9

Browse files
committed
fixed version problem
fixed incompatibility with WebStorm
1 parent 1261b35 commit d2017d9

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies {
1818
}
1919

2020
intellij {
21-
version '2018.1'
21+
updateSinceUntilBuild false
2222
}
2323
patchPluginXml {
2424
changeNotes """

src/main/java/QuickSwitchAction.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import com.intellij.openapi.actionSystem.AnAction;
22
import com.intellij.openapi.actionSystem.AnActionEvent;
3-
import com.intellij.openapi.actionSystem.DataKeys;
43
import com.intellij.openapi.fileEditor.FileEditorManager;
54
import com.intellij.openapi.fileEditor.OpenFileDescriptor;
65
import com.intellij.openapi.project.Project;
7-
import com.intellij.openapi.ui.Messages;
86
import com.intellij.openapi.vfs.LocalFileSystem;
97
import com.intellij.openapi.vfs.VirtualFile;
108

@@ -25,7 +23,7 @@ public QuickSwitchAction() {
2523
public void actionPerformed(AnActionEvent event) {
2624
this.latestEvent = event;
2725

28-
VirtualFile currentFile = DataKeys.VIRTUAL_FILE.getData(event.getDataContext());
26+
VirtualFile currentFile = (VirtualFile) event.getDataContext().getData("virtualFile");
2927
if (currentFile == null) return;
3028

3129
String currentFilePath = currentFile.getCanonicalPath();
@@ -79,15 +77,4 @@ private VirtualFile getFileByPath(String path) {
7977
return LocalFileSystem.getInstance().findFileByPath(path);
8078
}
8179

82-
private void showMessage(String message) {
83-
Project project = this.latestEvent.getProject();
84-
if (project == null) return;
85-
Messages.showMessageDialog(
86-
project,
87-
message,
88-
"Info",
89-
Messages.getInformationIcon()
90-
);
91-
}
92-
9380
}

0 commit comments

Comments
 (0)