Detect and use an SDK when using 'Import from existing sources' feature of PHPStorm
Hello,
The golang plugin for IntelliJ bumped into a new issue :D
We've added support for non-IDEA IDEs but then there's a new issue that came up.
How can we detect that a new project created from existing sources should have the Go SDK enabled for it at import time?
Thank you.
请先登录再写评论。
Please check out com.intellij.projectImport.ProjectOpenProcessor
Hello Yann,
Thanks for the answer but unfortunately it's a bit too generic for me right now.
Could you please be more specific? I'm a total noob in this area (Java + IDEA plugins).
Also, happy holidays!
Thank you very much,
Florin
You need to provide an extension point in your plugin.xml to your implementation (extending com.intellij.projectImport.ProjectOpenProcessorBase)
For example, see org.jetbrains.idea.eclipse.importWizard.EclipseProjectOpenProcessor#doQuickImport, passed in argument com.intellij.ide.util.projectWizard.WizardContext can be used to manipulate initial project configuration.
Thank you very much for your help Yann!