MessageBusConnection myConnection = finalProject.getMessageBus().connect(finalProject);
myConnection.subscribe(FileEditorManagerListener.FILE_EDITOR_MANAGER, getListener(finalProject, myConnection));
}
private FileEditorManagerListener getListener(final Project finalProject, final MessageBusConnection myConnection) {
return new FileEditorManagerListener() {
boolean hasBuiltTable = false;
@Override
public void fileOpened(@Nonnull FileEditorManager source, @Nonnull VirtualFile file) {