Skip to content

Instantly share code, notes, and snippets.

@vexus2
Last active December 18, 2015 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vexus2/5802607 to your computer and use it in GitHub Desktop.
Save vexus2/5802607 to your computer and use it in GitHub Desktop.
open PhpNewFileDialog.
protected dialog(AnActionEvent e) throws Exception {
Project project = e.getProject();
DataContext dataContext = e.getDataContext();
IdeView view = LangDataKeys.IDE_VIEW.getData(dataContext);
if (view == null) {
return;
}
Project project = PlatformDataKeys.PROJECT.getData(dataContext);
PsiDirectory dir = view.getOrChooseDirectory();
if (dir == null || project == null) return;
new PhpNewFileDialog(project, dir).show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment