The rules for part-name resolution specify the search order that the compiler follows to resolve a part reference; for example, in a variable declaration. The compiler considers the current package directory, the repositories in the EGL build path, and the EGL system package. The compiler stops the search only when the same-named part is found or, if no part is found, only after all locations are searched.
The rest of this description assumes that the compiler is seeking the myPart part in the myPkg package.
Here are the rules:
import myPkg.myPart;
The compiler seeks the part in the current directory; then in every repository in the EGL build path, in build-path order; and then in the EGL system package.
The compiler seeks the part in the current directory and then in every repository in the EGL build path, in build-path order.
import myPkg.*;
The compiler seeks the part in the current directory and then in every repository in the EGL build path, in build-path order, and then in the EGL system package. The search ends as soon as a part is found. However, if multiple on-demand import statements reference the same part, the search results in an error.