if (packagePath != null && packagePath.isDirectory()) {
return new GoPackageImpl(packagePath, sourceRoot, PsiManager.getInstance(myProject));
}
}
Sdk projectSdk = ProjectRootManagerEx.getInstanceEx(myProject).getProjectSdk();
if ( projectSdk == null )
return null;
VirtualFile[] sdkSourceRoots = projectSdk.getRootProvider().getFiles(OrderRootType.SOURCES);
for (VirtualFile sourceRoot : sdkSourceRoots) {
VirtualFile packagePath = sourceRoot.findFileByRelativePath(path);
if ( packagePath != null && packagePath.isDirectory()) {
return new GoPackageImpl(packagePath, sourceRoot, PsiManager.getInstance(myProject));