How to reimport a Java source file?

What is the best way to reimport a Java source file after changing the Java source?

If I delete the old model and then import (using New Models from Java Sources), the old model remains displayed in the editor.

If I import first (creating a duplicate model) and then delete the old model, the new model has a duplicated name error that does not go away.
4 comments
Correction... sometimes the duplicate name error goes away.
0
In the option when you first delete the old model, what exactly is the problem? The roots that were opened remain opened, as I understand... ok. That's not perfect. But does it cause any problems for subsequent java import?
0
When I import the new model and view it in the editor, I see the old model.
0
I would try to invalidate caches. In 3.0.4, we often find that we need to do that when we import new versions of jar files, so invalidate may be needed as well with new version of source code. See File > Invalidate Caches.
0

Please sign in to leave a comment.