jbangdev / jbang-idea

IntelliJ IDEA plugin for JBang
https://plugins.jetbrains.com/plugin/18257-jbang
MIT License
20 stars 9 forks source link

JBang tool window #13

Open linux-china opened 2 years ago

linux-china commented 2 years ago

The tool window includes a panel to display ScriptInfo for JBang script and a button group.

button group:

maxandersen commented 2 years ago

If that can work even when project has no java info that would be awesome.

maxandersen commented 2 years ago

What is "invalid script cache" ? clearing cache ?

linux-china commented 2 years ago

What is "invalid script cache" ? clearing cache ?

is it necessary? Some developers worry about local scripts with sensitive data, such as jar generated from build command.

linux-china commented 2 years ago

I have no idea about new JBang script from tool window, for example if developers click new script button from tool window in any project, and JBang plugin will setup a new IDEA module for the script and developers can edit script immediately with code completion.

It's like Scratch files, but some different. Developers can write JBang scripts on any legacy/existing projects, and don't worry about to modifiy current maven/gradle file. But not clear now.

maxandersen commented 2 years ago

What is "invalid script cache" ? clearing cache ?

is it necessary? Some developers worry about local scripts with sensitive data, such as jar generated from build command.

I don't understand your question ...I'm asking if you by "invalid script cache" refer to the jbang cache clear command or something else ?

linux-china commented 2 years ago

For example. I have a HelloWorld.java then I use jbang run HelloWorld.java to run the script. After run JBang will generate a jar file /Users/username/.jbang/cache/jars/HelloWorld.java.c563d28e87f5d2c3b493ac303c00d9d0abc9e19eb41b6d6dc410596fa3eea5c5.jar and cached by JBang. Some developers want to delete files related with this script because of some sensitive info in the jar.

maxandersen commented 2 years ago

Yes. So that is what jbang cache clear does.

linux-china commented 2 years ago

JBang ToolWindow listener added: refresh JBang script info when the toolwindow clicked.