jbang-idea icon indicating copy to clipboard operation
jbang-idea copied to clipboard

JBang tool window

Open linux-china opened this issue 3 years ago • 8 comments

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

button group:

  • run button
  • sync dependencies buttons: sync to gradle, sync from gradle, sync to module
  • invalid script cache
  • export button

linux-china avatar Dec 29 '21 20:12 linux-china

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

maxandersen avatar Dec 29 '21 21:12 maxandersen

What is "invalid script cache" ? clearing cache ?

maxandersen avatar Dec 29 '21 21:12 maxandersen

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 avatar Dec 29 '21 21:12 linux-china

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.

linux-china avatar Dec 29 '21 21:12 linux-china

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 ?

maxandersen avatar Dec 29 '21 22:12 maxandersen

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.

linux-china avatar Dec 29 '21 23:12 linux-china

Yes. So that is what jbang cache clear does.

maxandersen avatar Dec 29 '21 23:12 maxandersen

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

linux-china avatar Feb 08 '22 07:02 linux-china