-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e258c81
commit 2f10e83
Showing
9 changed files
with
121 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
src/main/java/org/kdb/inside/brains/lang/binding/EditorsBindingListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.kdb.inside.brains.lang.binding; | ||
|
||
import com.intellij.openapi.fileEditor.FileEditorManager; | ||
import com.intellij.openapi.fileEditor.FileEditorManagerEvent; | ||
import com.intellij.openapi.fileEditor.FileEditorManagerListener; | ||
import com.intellij.openapi.project.Project; | ||
import com.intellij.openapi.vfs.VirtualFile; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class EditorsBindingListener implements FileEditorManagerListener { | ||
private final EditorsBindingService service; | ||
|
||
public EditorsBindingListener(Project project) { | ||
service = project.getService(EditorsBindingService.class); | ||
} | ||
|
||
@Override | ||
public void fileOpened(@NotNull FileEditorManager source, @NotNull VirtualFile file) { | ||
service.editorOpened(file); | ||
} | ||
|
||
@Override | ||
public void fileClosed(@NotNull FileEditorManager source, @NotNull VirtualFile file) { | ||
service.editorClosed(file); | ||
} | ||
|
||
@Override | ||
public void selectionChanged(@NotNull FileEditorManagerEvent event) { | ||
final VirtualFile newFile = event.getNewFile(); | ||
if (newFile != null) { | ||
service.editorActivated(newFile); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pluginVersion=5.5.1 | ||
pluginVersion=5.5.2 |