mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
WEB-10924 Bower: provide indication for loading description
This commit is contained in:
@@ -458,7 +458,7 @@ public class ManagePackagesDialog extends DialogWrapper {
|
||||
myVersionCheckBox.setSelected(false);
|
||||
myVersionComboBox.setEnabled(false);
|
||||
myOptionsField.setEnabled(false);
|
||||
myDescriptionTextArea.setText("");
|
||||
myDescriptionTextArea.setText("<html><body style='text-align: center;padding-top:20px;'>Loading...</body></html>");
|
||||
|
||||
setDownloadStatus(true);
|
||||
final Object pyPackage = myPackages.getSelectedValue();
|
||||
@@ -493,14 +493,17 @@ public class ManagePackagesDialog extends DialogWrapper {
|
||||
myController.fetchPackageDetails(packageName, new CatchingConsumer<String, Exception>() {
|
||||
@Override
|
||||
public void consume(final String details) {
|
||||
ApplicationManager.getApplication().invokeLater(new Runnable() {
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (myPackages.getSelectedValue() == pyPackage) {
|
||||
myDescriptionTextArea.setText(details);
|
||||
}
|
||||
myDescriptionTextArea.setCaretPosition(0);
|
||||
}/* else {
|
||||
do nothing, because other package gets selected
|
||||
}*/
|
||||
}
|
||||
}, ModalityState.any());
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -511,6 +514,7 @@ public class ManagePackagesDialog extends DialogWrapper {
|
||||
}
|
||||
else {
|
||||
myInstallButton.setEnabled(false);
|
||||
myDescriptionTextArea.setText("");
|
||||
}
|
||||
setDownloadStatus(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user