// an erlang project and an external file not in any project
final String externalFileName = "external.hrl";
externalFile = createTmpFile(externalFileName, "-define(E, hej).\n");
final String absolutePath = externalFile.getAbsolutePath();
final List<IPath> newIncludeDirs = Lists.newArrayList(includeDirs);
aProject.open(null);
final Collection<IErlModule> otpIncludes = aProject.getExternalIncludes();
final IPath absoluteDir = new Path(absolutePath).removeLastSegments(1);
newIncludeDirs.add(absoluteDir);
((ErlProject) aProject).setIncludeDirs(newIncludeDirs);
aProject.open(null);