// Path: src/main/java/org/jmeterplugins/repository/exception/DownloadException.java
// public class DownloadException extends RuntimeException {
//     public DownloadException() {
//     }
// 
//     public DownloadException(String message) {
//         super(message);
//     }
// 
//     public DownloadException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }


import org.apache.jmeter.gui.GuiPackage;
import org.apache.jmeter.gui.action.ActionNames;
import org.apache.jmeter.gui.action.ActionRouter;
import org.apache.jmeter.gui.util.EscapeDialog;
import org.apache.jorphan.gui.ComponentUtil;
import org.jmeterplugins.repository.exception.DownloadException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.LinkedList;
        statusLabel.setForeground(Color.BLACK);
        enableComponents(false);
        new Thread() {
            @Override
            public void run() {
                // FIXME: what to do when user presses "cancel" on save test plan dialog?
                GenericCallback<String> statusChanged = new GenericCallback<String>() {
                    @Override
                    public void notify(final String s) {
                        SwingUtilities.invokeLater(
                                new Runnable() {

                                    @Override
                                    public void run() {
                                        statusLabel.setText(s);
                                        repaint();
                                    }
                                });
                    }
                };
                try {
                    LinkedList<String> options = null;
                    String testPlan = GuiPackage.getInstance().getTestPlanFile();
                    if (testPlan != null) {
                        options = new LinkedList<>();
                        options.add("-t");
                        options.add(testPlan);
                    }
                    manager.applyChanges(statusChanged, true, options);
                    ActionRouter.getInstance().actionPerformed(new ActionEvent(this, 0, ActionNames.EXIT));
// Path: src/main/java/org/jmeterplugins/repository/exception/DownloadException.java
// public class DownloadException extends RuntimeException {
//     public DownloadException() {
//     }
// 
//     public DownloadException(String message) {
//         super(message);
//     }
// 
//     public DownloadException(String message, Throwable cause) {
//         super(message, cause);
//     }
// }


// Path: src/main/java/org/jmeterplugins/repository/PluginManagerDialog.java
import org.apache.jmeter.gui.GuiPackage;
import org.apache.jmeter.gui.action.ActionNames;
import org.apache.jmeter.gui.action.ActionRouter;
import org.apache.jmeter.gui.util.EscapeDialog;
import org.apache.jorphan.gui.ComponentUtil;
import org.jmeterplugins.repository.exception.DownloadException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.HyperlinkEvent;
import javax.swing.event.HyperlinkListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.LinkedList;

        statusLabel.setForeground(Color.BLACK);
        enableComponents(false);
        new Thread() {
            @Override
            public void run() {
                // FIXME: what to do when user presses "cancel" on save test plan dialog?
                GenericCallback<String> statusChanged = new GenericCallback<String>() {
                    @Override
                    public void notify(final String s) {
                        SwingUtilities.invokeLater(
                                new Runnable() {

                                    @Override
                                    public void run() {
                                        statusLabel.setText(s);
                                        repaint();
                                    }
                                });
                    }
                };
                try {
                    LinkedList<String> options = null;
                    String testPlan = GuiPackage.getInstance().getTestPlanFile();
                    if (testPlan != null) {
                        options = new LinkedList<>();
                        options.add("-t");
                        options.add(testPlan);
                    }
                    manager.applyChanges(statusChanged, true, options);
                    ActionRouter.getInstance().actionPerformed(new ActionEvent(this, 0, ActionNames.EXIT));
                } catch (DownloadException ex) {