use of com.github.sdedwards.m2e_nar.internal.model.NarLib in project m2e-nar by maven-nar.
the class AbstractSettingsSynchroniser method setLibraries.
private void setLibraries(final ICConfigurationDescription conf, final NarBuildArtifact settings) throws CoreException {
final ICLanguageSetting[] languageSettings = conf.getRootFolderDescription().getLanguageSettings();
final List<ICLibraryFileEntry> libraryEntries = new ArrayList<ICLibraryFileEntry>();
for (final NarLib lib : settings.getDependencyLibs()) {
final ICLibraryFileEntry library = CDataUtil.createCLibraryFileEntry(lib.getName(), 0);
libraryEntries.add(library);
}
for (final NarSysLib syslib : settings.getDependencySysLibs()) {
final ICLibraryFileEntry library = CDataUtil.createCLibraryFileEntry(syslib.getName(), 0);
libraryEntries.add(library);
}
for (final NarLib lib : settings.getLinkerSettings().getLibs()) {
final ICLibraryFileEntry library = CDataUtil.createCLibraryFileEntry(lib.getName(), 0);
libraryEntries.add(library);
}
for (final NarSysLib syslib : settings.getLinkerSettings().getSysLibs()) {
final ICLibraryFileEntry library = CDataUtil.createCLibraryFileEntry(syslib.getName(), 0);
libraryEntries.add(library);
}
/*
* for (String path : settings.getLibraries()) { ICLibraryFileEntry
* library = CDataUtil.createCLibraryFileEntry(lib, 0);
* libraryPathEntries.add(library); }
*/
for (final ICLanguageSetting setting : languageSettings) {
final List<ICLanguageSettingEntry> l = setting.getSettingEntriesList(ICSettingEntry.LIBRARY_FILE);
l.clear();
l.addAll(libraryEntries);
setting.setSettingEntries(ICSettingEntry.LIBRARY_FILE, l);
}
}
Aggregations