IScriptProject scriptProject = DLTKCore.create(project);
if (!project.getFile(BUILDPATH).exists()) {
IDLTKLanguageToolkit toolkit = getLanguageToolkit(getNatureId());
BuildpathDetector detector = new BuildpathDetector(project, toolkit);
detector.detectBuildpath(null);
IBuildpathEntry[] detected = detector.getBuildpath();
// remove any entries the detector may have added that are not valid for
// this project (currently happens on php projects with the
// org.eclipse.dltk.launching.INTERPRETER_CONTAINER entry).
ArrayList<IBuildpathEntry> entries = new ArrayList<IBuildpathEntry>();