openNextTab(e.getProject(), e.getDataContext(), fileByUrl);
}
}
private void openNextTab(Project project, DataContext dataContext, VirtualFile file) {
FileEditorManagerEx fileEditorManagerEx = FileEditorManagerEx.getInstanceEx(project);
fileEditorManagerEx.createSplitter(1, EditorWindow.DATA_KEY.getData(dataContext));
final FileEditorManagerEx fileEditorManager = FileEditorManagerEx.getInstanceEx(project);
switch (openType) {
case HORIZONTAL:
fileEditorManagerEx.changeSplitterOrientation();
}
final EditorWindow activeWindow = EditorWindow.DATA_KEY.getData(dataContext);
if (activeWindow == null)
return;
final EditorWindow nextWindow = fileEditorManager.getNextWindow(activeWindow);
if (nextWindow == null)
return;
nextWindow.getManager().openFileImpl2(nextWindow, file, false);
nextWindow.closeAllExcept(file);
}