use of com.intellij.framework.FrameworkVersion in project intellij-community by JetBrains.
the class FrameworkSupportModelBase method setSelectedVersion.
public void setSelectedVersion(@NotNull String frameworkOrGroupId, @NotNull FrameworkVersion version) {
FrameworkVersion oldVersion = mySelectedVersions.put(frameworkOrGroupId, version);
if (!Comparing.equal(oldVersion, version)) {
for (Map.Entry<String, FrameworkSupportNode> entry : mySettingsMap.entrySet()) {
if (hasParentWithId(entry.getValue(), frameworkOrGroupId)) {
if (!entry.getValue().getId().equals(frameworkOrGroupId)) {
FrameworkSupportOptionsComponent component = myOptionsComponentsMap.get(entry.getKey());
if (component != null) {
component.updateVersionsComponent();
}
}
updateFrameworkLibraryComponent(entry.getKey());
}
}
}
myVersionEventDispatcher.getMulticaster().versionChanged(version);
}
use of com.intellij.framework.FrameworkVersion in project intellij-community by JetBrains.
the class FrameworkSupportModelBase method setFrameworkComponentEnabled.
public void setFrameworkComponentEnabled(@NotNull @NonNls final String providerId, final boolean enable) {
final FrameworkSupportNode node = mySettingsMap.get(providerId);
if (node != null && enable != node.isChecked()) {
node.setChecked(enable);
// ensure configurable to be created and registered to disposer
node.getConfigurable();
if (myFrameworkVersions.get(providerId) == null) {
for (FrameworkVersion version : node.getUserObject().getFrameworkType().getVersions()) {
if (version.getAvailabilityCondition().isAvailableFor(this)) {
setSelectedVersion(providerId, version);
}
}
}
}
}
use of com.intellij.framework.FrameworkVersion in project intellij-community by JetBrains.
the class FrameworkVersionComponent method updateVersionsList.
public void updateVersionsList() {
FrameworkVersion oldSelection = getSelectedVersion();
List<? extends FrameworkVersion> versions = computeAvailableVersions();
myVersionsBox.removeAllItems();
for (FrameworkVersion version : versions) {
myVersionsBox.addItem(version);
}
myVersionsPanel.setVisible(!versions.isEmpty());
if (!versions.isEmpty()) {
FrameworkVersion toSelect = oldSelection != null && versions.contains(oldSelection) ? oldSelection : versions.get(versions.size() - 1);
myVersionsBox.setSelectedItem(toSelect);
myModel.setSelectedVersion(myFrameworkOrGroupId, toSelect);
}
}
Aggregations