package de.renew.gui;

import CH.ifa.draw.util.Command;
import de.renew.gui.configure.RemoteServerController;

/**
 * Connects to another simulation server.
 *
 * @author Thomas Jacob
 */
public class OpenServerFrameCommand extends Command {
    private RemoteServerController _controller = null;

    public OpenServerFrameCommand(String name) {
        super(name);
    }

    @Override
    public void execute() {
        if (_controller == null) {
            CPNApplication editor = GuiPlugin.getCurrent().getGui();
            _controller = new RemoteServerController(editor);
        }
        _controller.show();
    }
}