use of org.erlide.engine.model.root.PathResolver in project erlide_eclipse by erlang.
the class ErlProject method addExternals.
private void addExternals(final List<IErlElement> children) {
final ErlangProjectProperties myProperties = getProperties();
final String externalIncludes = myProperties.getExternalIncludes();
final String externalModules = myProperties.getExternalModules();
final Collection<IPath> includeDirs = myProperties.getIncludeDirs();
final List<String> projectIncludes = Lists.newArrayList();
for (final IPath path : new PathResolver().resolvePaths(includeDirs)) {
if (path.isAbsolute() && !fProject.getLocation().isPrefixOf(path)) {
final Collection<String> includes = ErlangEngine.getInstance().getOpenService().getIncludesInDir(path.toPortableString());
if (includes != null) {
for (final String include : includes) {
projectIncludes.add(path.append(include).toPortableString());
}
}
}
}
if (!externalIncludes.isEmpty() || !externalModules.isEmpty() || !projectIncludes.isEmpty()) {
final IErlExternalRoot external = new ErlExternalReferenceEntryList(this, "Externals", externalIncludes, projectIncludes, externalModules);
children.add(external);
}
}
Aggregations