netbeans-gradle-project
netbeans-gradle-project copied to clipboard
Need to keep entire project open
I always run into a situation where something is missing in "find usages" results because somebody added another subproject and I don't have it open. I need NetBeans to keep the entire project open no matter how the code is distributed to subprojects.
Keeping all the projects open is rather expensive because it will force NB to index all the classes. Though I can see your problem. For now, you can do what I do in situations like this: Create a "Project group" named "Refactor - MyBuild". Open the root project and on its "Subprojects" node select "Open Subprojects". And wait until NB indexes them all. This way, you only have to pay the indexing price when doing refactoring.
I know this solution is suboptimal for you. For a long term solution, I'll think of a more efficient solution (though it is not trivial). For example, have refactor toggle button on the toolbar which only makes projects visible for refactoring if they depend on at least one of the opened projects.
It seems to me you are addressing a different problem. My problem is in no way restricted to refactoring, "find usages" is not a refactoring feature. I'm using it all the time. When I need to change a method's behavior, I very often need to see who uses it and how. I really want something to always have the entire project open and all the classes indexed.
I see, though the "long term solution" I have described should solve your issue. Anyway, this isn't necessarily trivial, so it probably won't make it in the next release. Until then, you can only select "Open Subprojects" on the root project after reloading (or the initial project load).