@@ -0,0 +1,3006 @@
+/*%0A * Copyright 2000-2014 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.intellij.util.net;%0A%0Aimport com.intellij.CommonBundle;%0Aimport com.intellij.openapi.options.ShowSettingsUtil;%0Aimport com.intellij.openapi.project.Project;%0Aimport com.intellij.openapi.ui.DialogWrapper;%0Aimport com.intellij.openapi.util.Ref;%0Aimport com.intellij.ui.GuiUtils;%0Aimport com.intellij.util.ObjectUtil;%0Aimport consulo.logging.Logger;%0A%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0Aimport javax.swing.*;%0Aimport java.awt.event.ActionEvent;%0Aimport java.lang.reflect.InvocationTargetException;%0A%0Apublic class IOExceptionDialog extends DialogWrapper %7B%0A  private static final Logger LOG = Logger.getInstance(IOExceptionDialog.class);%0A  private final JTextArea myErrorLabel;%0A%0A  public IOExceptionDialog(String title, String errorText)  %7B%0A    super((Project)null, true);%0A    setTitle(title);%0A    setOKButtonText(CommonBundle.message(%22dialog.ioexception.tryagain%22));%0A%0A    myErrorLabel = new JTextArea();%0A    myErrorLabel.setText(errorText);%0A    myErrorLabel.setFont(UIManager.getFont(%22Label.font%22));%0A    myErrorLabel.setBackground(UIManager.getColor(%22Label.background%22));%0A    myErrorLabel.setForeground(UIManager.getColor(%22Label.foreground%22));%0A%0A    init();%0A  %7D%0A%0A  @Nullable%0A  @Override%0A  protected JComponent createCenterPanel() %7B%0A    return myErrorLabel;%0A  %7D%0A%0A  @Nonnull%0A  @Override%0A  protected Action%5B%5D createLeftSideActions() %7B%0A    return new Action%5B%5D %7B%0A      new AbstractAction(CommonBundle.message(%22dialog.ioexception.proxy%22)) %7B%0A        @Override%0A        public void actionPerformed(@Nonnull ActionEvent e) %7B%0A          ShowSettingsUtil.getInstance().editConfigurable(ObjectUtil.tryCast(e.getSource(), JComponent.class), new HttpProxyConfigurable());%0A        %7D%0A      %7D%0A    %7D;%0A  %7D%0A%0A  /**%0A   * Show the dialog%0A   * @return %3Ccode%3Etrue%3C/code%3E if %22Try Again%22 button pressed and %3Ccode%3Efalse%3C/code%3E if %22Cancel%22 button pressed%0A   */%0A  public static boolean showErrorDialog(final String title, final String text) %7B%0A    final Ref%3CBoolean%3E ok = Ref.create(false);%0A    try %7B%0A      GuiUtils.runOrInvokeAndWait(new Runnable() %7B%0A        @Override%0A        public void run() %7B%0A          IOExceptionDialog dialog = new IOExceptionDialog(title, text);%0A          dialog.show();%0A          ok.set(dialog.isOK());%0A        %7D%0A      %7D);%0A    %7D%0A    catch (InterruptedException e) %7B%0A      LOG.info(e);%0A    %7D%0A    catch (InvocationTargetException e) %7B%0A      LOG.info(e);%0A    %7D%0A%0A    return ok.get();%0A  %7D%0A%7D%0A

Revert "drop old io exception dialog"