You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a java project to let the Java Language Server start up
Create a new folder, the folder path is belong to one of the project's PackageFragmentRoot
Create a Java file in that folder
Then, when we get a IJavaProject instance in the Java side, and inspect the PackageFragment, there is no entry for the new created one. (You can call project.getPackageFragmentRoots() first, after find the right root, call getChildren() over it)
This bug affects several scenario, like:
Cannot move a compilation unit to a newly created package (gif above)
Could not find or load main class xxx when debugging a main class in newly created package
Java dependency viewer cannot show the newly created package and its members in the explorer
Java Test explorer cannot show the newly created package and its members in the explorer
The text was updated successfully, but these errors were encountered:
We always refresh the parent with zero depth. After this operation, the parent of the newly created package is still not aware of the existence of its new member. Maybe we need to use DEPTH_ONE here?
Repro steps:
project.getPackageFragmentRoots()
first, after find the right root, callgetChildren()
over it)This bug affects several scenario, like:
The text was updated successfully, but these errors were encountered: