Project project = getSelectedProject(builder);
if (project != null && project.hasFacet(JavaSourceFacet.class))
{
final Set<String> packageNames = new TreeSet<>();
final JavaSourceFacet javaSourceFacet = project.getFacet(JavaSourceFacet.class);
javaSourceFacet.visitJavaSources(new JavaResourceVisitor()
{
@Override
public void visit(VisitContext context, JavaResource javaResource)
{
String packageName = javaSourceFacet.calculatePackage(javaResource);