void () { final boolean allPackagesInProject = packagesInProject.isSelected() && packagePanel.isVisible(); moduleClasspath.setEnabled(!allPackagesInProject); if (allPackagesInProject) { moduleClasspath.getComponent().setSelectedItem(null); } }