1
我正在開發一個IntelliJ IDE插件,我想顯示屬於當前項目的依賴關係。 有沒有辦法通過IntelliJ open api獲取依賴列表?如何通過IntelliJ打開api獲取依賴列表
我正在開發一個IntelliJ IDE插件,我想顯示屬於當前項目的依賴關係。 有沒有辦法通過IntelliJ open api獲取依賴列表?如何通過IntelliJ打開api獲取依賴列表
對於你的項目,你可以使用ModuleRootManager
每個模塊獲得的依賴關係:
// get the modules on which it depends
ModuleRootManager.getInstance(module).getDependencies()
// get the libraries on which it depends
ModuleRootManager.getInstance(module).getModifiableModel().getModuleLibraryTable()