How to know when copy pasted document have finished processing?

I often copy paste code from one JS file to another. Almost every time copy pasted code contains some modules that have to be imported. But if I press Option+Enter just after inserting new code I don't have option to import missing modules. I have to wait some time I guess while my WebStorm processing new content and find all needed dependencies. 

I understand that it takes some time but I would like to have some visual confirmation when process is finished. Otherwise  now I'm just sitting and pressing Opt+Enter 10-20 times every 2 seconds until import statement will be available.

9 comments
Comment actions Permalink

Normally, when the IDE is analyzing a newly added code, you can see "Analyzing..." in the upper right corner; once it completes, auto-imports should work. Also, the IDE has "import on paste" functionality, so most imports are added immediately once the code is pasted

0
Comment actions Permalink

I don't see any "Analyzing..." label in any of the corners. 

Also I don't have "import on paste" option in my preferences

I'm using WebStorm 2022.1

0
Comment actions Permalink

there are no options for this, it should just work. If it doesn't, please create a ticket in youtrack, https://youtrack.jetbrains.com/issues/WEB, providing code snippets + steps to repeat

0
Comment actions Permalink

Sorry, I'm not sure we are talking about same thing.

Are you saying that when pasting JS code with some dependencies WebStorm will paste all `import` lines by default and there is no choice to turn it off? 

0
Comment actions Permalink

yes, when pasting, the IDE adds unambiguous imports of modules used in the pasted code snippet

0
Comment actions Permalink

I'm using WebStorm, IDEA or Python for a few years and never saw this functionality. I'm sure we are talking about different things

0
Comment actions Permalink

I use plain JS, not Typescript

0
Comment actions Permalink

where do you see plain JS? This functionality works for both JS and TS

0

Please sign in to leave a comment.