Home > Back-end >  The Idea of plug-in development problems
The Idea of plug-in development problems

Time:11-14

Public void actionPerformed (@ NotNull AnActionEvent event) {
Project=event. GetData (PlatformDataKeys. Project);

//get the selected directory
ActionEnvContext ActionEnvContext=new ActionEnvContext ();
PsiDirectory directory=null;
Try {
IdeView IdeView=event. GetRequiredData (LangDataKeys. IDE_VIEW);
The directory=ideView. GetOrChooseDirectory ();
} the catch (Exception e) {
e.printStackTrace();
}
}

The above code, the code of the plugin action events, IdeView IdeView=event. GetRequiredData (LangDataKeys. IDE_VIEW); Returns null error here, the masters, please give directions, thank you
  • Related