|
|
|
@ -6,6 +6,7 @@ import com.fr.design.dialog.FineJOptionPane;
|
|
|
|
|
import com.fr.design.extra.PluginConstants; |
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.general.CloudCenter; |
|
|
|
|
import com.fr.general.IOUtils; |
|
|
|
@ -22,6 +23,8 @@ import javax.swing.JFrame;
|
|
|
|
|
import javax.swing.JOptionPane; |
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import javax.swing.JProgressBar; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
import java.io.File; |
|
|
|
|
import java.io.FileOutputStream; |
|
|
|
|
import java.io.InputStream; |
|
|
|
@ -76,10 +79,18 @@ public class DownloadOnlineSourcesHelper implements DownloadSourcesEvent {
|
|
|
|
|
try { |
|
|
|
|
httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind(siteKind)); |
|
|
|
|
} catch (SiteBlockedException e) { |
|
|
|
|
FineJOptionPane.showConfirmDialog(null, |
|
|
|
|
FineJOptionPane.showConfirmDialogWithOkListener(null, |
|
|
|
|
e.getMessage(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Alert"), JOptionPane.DEFAULT_OPTION, |
|
|
|
|
FineJOptionPane.WARNING_MESSAGE, null, OPTION_OK_CANCEL, null); |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Alert"), null, null, |
|
|
|
|
new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
DesignUtils.visitEnvServerByParameters( |
|
|
|
|
"#management/system/normal", |
|
|
|
|
null, |
|
|
|
|
null); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (httpClient.getResponseCode() != HttpURLConnection.HTTP_OK) { |
|
|
|
|