jbangdev / jbang

Unleash the power of Java - JBang Lets Students, Educators and Professional Developers create, edit and run self-contained source-only Java programs with unprecedented ease.
https://jbang.dev
MIT License
1.43k stars 159 forks source link

new files not showing up after running jbang edit #750

Open maxandersen opened 3 years ago

maxandersen commented 3 years ago

have a x.java, run jbang edit x.java have x.java have //SOURCES *.java

touch Other.java

run jbang edit x.java

IDE or at least filesystem should now have symbolic link for the file.

mbechto commented 8 months ago

I have experienced the same with a sources folder //SOURCES src. Would be really nice if it worked, currently I am copying files from my temporary IntelliJ workspace back into the source dir 😃

maxandersen commented 8 months ago

Have you tried using the ide plugin directly so you dont need symbolic link tree at all?

mbechto commented 8 months ago

Have you tried using the ide plugin directly so you dont need symbolic link tree at all?

Good point, just tried that. Maybe I am doing something wrong, but I can't make it work:

When I open a JBang script file, the plugin shows me the script name & dependency list in a tool window on the right (all my //DEPS). I can also run the script using the IntelliJ run line action. But when I start to type code, auto-completion is not showing anything ("No suggestions"). Placing the cursor on a type from a dependency e.g. I type YamlPath. it's as if the type does not exist.

This works just fine with jbang edit since it creates a Gradle project that IntelliJ understands and can derive the classpath from I guess.

maxandersen commented 8 months ago

Yeah. Intellij is not being as automatic as vscode and eclipse. Right click In the source editor and click synchronize jbang. Then things should work.

See https://github.com/jbangdev/jbang-idea/issues/102 and add your voice here :)