if (p == null) {
throw new IllegalStateException("Project cannot be null.");
}
Collection<JavaPackage> packages = ProjectUtils.getSourcePackages(p, true);
JavaPackageComboBoxModel model = new JavaPackageComboBoxModel();
model.addAll(packages);
packageCombo.setModel(model);
if (model.getSize() > 0) {
DataObject data = PackageUtils.getSelectedPackage();
if (data != null) {
try {