-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create jbang script ux issues #21
Comments
Now it's some hard because JBang scripts were created by CLI, and lots of work for IDEA.
My suggestion is to put some JBang templates under
We can use CLI to generate the scripts during project/module creation, and that's good. For opened project, we should choose fileTemplates to create JBang scripts, and it's normal way in IDEA. Now we can have some options:
|
Not seeing that as a lot of work for the plug-in. It just need to run async via invoke later and we can add better output to jbang if necessary. What is worse will be if jbang idea now starts having its own set of templates and have to be maintained. That is a lot more work imo. |
Refresh the dest directory synchronously and open all new files now. It may be blocked for a while if dest directory contains lots of files. VfsUtil.markDirtyAndRefresh(false, true, true, directory)
val fileEditorManager = FileEditorManager.getInstance(project)
//iterate all files and open new files
VfsUtil.iterateChildrenRecursively(
directory,
VirtualFileFilter.ALL
) {
if (!it.isDirectory && !currentFiles.contains(it)) {
fileEditorManager.openFile(it, true)
}
true
} |
Opening all new files is not a good approach IMO. Just search for the file name given to the init; if found open if not select new files but don't open. Then you avoid any blocking operations. |
@maxandersen a question, developers can use JBang template to generate mulit files, and input name just part of file names. For example:
If you input |
But not expected to have multiple files open. Annoying to users having to close what they don't need open. |
Got. I will modify the logic and only open one new file by ext name match, and just let developers know that JBang script files have been created successfully. |
The text was updated successfully, but these errors were encountered: