public void actionPerformed(@NotNull AnActionEvent event) {
project = event.getData(PlatformDataKeys.PROJECT);
//獲取選中的目錄
ActionEnvContext actionEnvContext = new ActionEnvContext();
PsiDirectory directory = null;
try {
IdeView ideView = event.getRequiredData(LangDataKeys.IDE_VIEW);
directory = ideView.getOrChooseDirectory();
} catch (Exception e) {
e.printStackTrace();
}
}
如上代碼,代碼插件的action事件,IdeView ideView = event.getRequiredData(LangDataKeys.IDE_VIEW);這里回傳null的錯誤,請大師們指點,謝謝
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/214163.html
標籤:Java相關
上一篇:javax.xml.ws.Service 動態創建service的時候,怎么設定請求超時時間(webservice))
