fixed libraries for ejb version without ejb-jar.xml (IDEA-71718)

This commit is contained in:
nik
2011-07-05 11:54:40 +04:00
parent a11547d016
commit df2e5b595a
2 changed files with 11 additions and 9 deletions
@@ -73,15 +73,13 @@ public class LibraryCompositionSettings implements Disposable {
public void updateDownloadableVersions(@Nullable FrameworkVersion version) {
myCurrentFrameworkVersion = version;
if (version != null && myDownloadSettings != null) {
if (!myDownloadSettings.getVersion().isCompatibleWith(version)) {
final FrameworkLibraryVersion newLibraryVersion = ContainerUtil.getFirstItem(getCompatibleVersions());
if (newLibraryVersion != null) {
myDownloadSettings = createDownloadSettings(newLibraryVersion);
}
else {
myDownloadSettings = null;
}
if (version != null && (myDownloadSettings == null || !myDownloadSettings.getVersion().isCompatibleWith(version))) {
final FrameworkLibraryVersion newLibraryVersion = ContainerUtil.getFirstItem(getCompatibleVersions());
if (newLibraryVersion != null) {
myDownloadSettings = createDownloadSettings(newLibraryVersion);
}
else {
myDownloadSettings = null;
}
}
}
@@ -290,6 +290,10 @@ public class LibraryOptionsPanel implements Disposable {
private void updateState() {
myMessageLabel.setIcon(null);
myConfigureButton.setVisible(true);
myDownloadRadioButton.setEnabled(mySettings.getDownloadSettings() != null);
if (!myDownloadRadioButton.isEnabled() && myDownloadRadioButton.isSelected() && myUseLibraryRadioButton.isVisible()) {
myUseLibraryRadioButton.setSelected(true);
}
String message = "";
boolean showConfigurePanel = true;
switch (myButtonEnumModel.getSelected()) {