public class DBLanguageFileEditorListener implements FileEditorManagerListener{
public void fileOpened(@NotNull FileEditorManager source, @NotNull VirtualFile file) {
if (file.isInLocalFileSystem() && file.getFileType() instanceof DBLanguageFileType) {
FileEditor fileEditor = source.getSelectedEditor(file);
if (fileEditor != null) {
DBLanguageFileEditorToolbarForm toolbarForm = new DBLanguageFileEditorToolbarForm(source.getProject(), file, fileEditor.getComponent());
fileEditor.getComponent().add(toolbarForm.getComponent(), BorderLayout.NORTH);
fileEditor.putUserData(DBLanguageFileEditorToolbarForm.USER_DATA_KEY, toolbarForm);
}
}
}