Closed dorukguner closed 3 months ago
@dorukguner Sorry, but I'm not able to reproduce it. Could you prepare a minimal reproducible example?
@hsz This seems to be only occurring on windows, and is reproducible using the steps outlined above.
While the runIde task is running, the plugin jar inside the sandbox directory is locked by the process, and so the step that copies the new plugin jar to the sandbox directory during the prepareSandbox task fails.
It is the call to the windows native copy method that's failing.
As a workaround, deleting all jars before prepareSandbox
seems to work:
prepareSandbox {
doFirst {
delete(fileTree(defaultDestinationDir))
}
}
AFAIU this might be specific to your plugin and not a general problem on Win https://stackoverflow.com/questions/4179145/release-java-file-lock-in-windows
meet same error. OS: Windows 10
meet same error. OS: Windows 11
AFAIU this might be specific to your plugin and not a general problem on Win https://stackoverflow.com/questions/4179145/release-java-file-lock-in-windows
Is it possible to run IDE in wsl, maybe? I tried a lot of things but to no avail. Even with the bare minimum of code.
When i add a simple toolWindow
extension, it does not work.
class OverlayToolWindowFactory : ToolWindowFactory {
override fun createToolWindowContent(project: Project, toolWindow: ToolWindow) {
val contentManager = toolWindow.contentManager
val content = contentManager.factory.createContent(JPanel(), "", false)
contentManager.addContent(content)
}
}
Also i tried to unload the plugin manually from IDE but after buildPlugin
i got that message:
2023-12-11 17:05:48,219 [ 203335] INFO - #c.i.i.p.PluginManager - Using cached broken plugins file
Plugin is enabled as i can see, but not initialized properly
Obsolete in 2.0
I'm unable to auto reload any intellij plugin projects due to the prepareSandbox task failing whenever buildPlugin is run. Running the prepareSandbox task by itself while runIde is running also results in the same error.
I've attempted this on both the IntelliJ Platform Plugin Template and a newly created IDE plugin project.
Execution failed for task ':prepareSandbox'.
The above stacktrace states the cause is a FileNotFoundException, however I can see that the file exists in windows explorer and the file does exist when attempting to reference it in another java project.
To Reproduce
Expected behavior As referenced by the IntelliJ Platform Plugin SDK docs I'm expecting this to auto reload the changes I've made to the project
Environment:
Temporary fix Move the problematic jar file to another directory, this allows the prepareSandbox task to complete.