use of org.eclipse.cdt.core.settings.model.ICLibraryPathEntry in project m2e-nar by maven-nar.
the class AbstractSettingsSynchroniser method setLibraryPaths.
private void setLibraryPaths(final ICConfigurationDescription conf, final NarBuildArtifact settings) throws CoreException {
final ICLanguageSetting[] languageSettings = conf.getRootFolderDescription().getLanguageSettings();
final List<ICLibraryPathEntry> libraryPathEntries = new ArrayList<ICLibraryPathEntry>();
for (final NarLib lib : settings.getDependencyLibs()) {
ICLibraryPathEntry libraryPath = createLibraryPathEntry(lib.getDirectory().getPath(), 0);
libraryPathEntries.add(libraryPath);
}
for (final NarLib lib : settings.getLinkerSettings().getLibs()) {
ICLibraryPathEntry libraryPath = createLibraryPathEntry(lib.getDirectory().getPath(), 0);
libraryPathEntries.add(libraryPath);
}
for (final ICLanguageSetting setting : languageSettings) {
final List<ICLanguageSettingEntry> l = setting.getSettingEntriesList(ICSettingEntry.LIBRARY_PATH);
l.clear();
l.addAll(libraryPathEntries);
setting.setSettingEntries(ICSettingEntry.LIBRARY_PATH, l);
}
}
Aggregations