IPath location = fPHPLocationGroup.getLocation();
if (fPHPLocationGroup.isInWorkspace()) {
if (!isValidProjectName(fGroupName.getName())) {
fDetect = false;
} else {
IEnvironment environment = fPHPLocationGroup
.getEnvironment();
final IFileHandle directory = environment.getFile(location
.append(fGroupName.getName()));
fDetect = directory.isDirectory();
}
} else {
IEnvironment environment = fPHPLocationGroup.getEnvironment();
if (location.toPortableString().length() > 0) {
final IFileHandle directory = environment.getFile(location);
fDetect = directory.isDirectory()
&& directory.getPath().toFile().exists();
}
}
if (oldDetectState != fDetect) {