});
Collection<ElementHandle<TypeElement>> main = SourceUtils.getMainClasses(_current);
String newMainClass = null;
if (!main.isEmpty()) {
ElementHandle mainHandle = main.iterator().next();
newMainClass = mainHandle.getQualifiedName();
}
if (newMainClass != null && !newMainClass.equals(oldMainClass) && helper.requestUpdate() && // XXX ##84806: ideally should update nbproject/configs/*.properties in this case:
eval.getProperty(J2SEConfigurationProvider.PROP_CONFIG) == null) {
final String newMainClassFinal = newMainClass;
ProjectManager.mutex().writeAccess(new Mutex.ExceptionAction<Void>() {