use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManager method updateWithOriginalDependency.
private void updateWithOriginalDependency(final NormalEnhancedDependency enhancedDependency) {
final Dependency originalDependency = originalSetOfDependencies.get(enhancedDependency.getDependency());
enhancedDependency.setDependency(originalDependency);
}
use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManager method onEnhancedDependenciesUpdated.
void onEnhancedDependenciesUpdated(final EnhancedDependencies loadedEnhancedDependencies) {
for (final EnhancedDependency enhancedDependency : loadedEnhancedDependencies) {
updateOriginal(enhancedDependency);
updateEnhanced(enhancedDependency);
}
callback.callback(this.enhancedDependencies);
}
use of org.kie.workbench.common.services.shared.dependencies.EnhancedDependency in project kie-wb-common by kiegroup.
the class EnhancedDependenciesManager_onEchancedDependenciesLoadedTest method testEditingEnhancedUpdatesOriginal.
@Test
public void testEditingEnhancedUpdatesOriginal() throws Exception {
final EnhancedDependencies loadedEnhancedDependencies = new EnhancedDependencies();
loadedEnhancedDependencies.add(new NormalEnhancedDependency(makeDependency("org.junit", "junit", "1.0"), new HashSet<String>()));
enhancedDependenciesManager.onEnhancedDependenciesUpdated(loadedEnhancedDependencies);
final EnhancedDependency enhancedDependency = shownDependencies.asList().get(0);
enhancedDependency.getDependency().setArtifactId("newId");
assertEquals("newId", junit.getArtifactId());
}
Aggregations