// Path: src/krasa/frameswitcher/FrameSwitcherApplicationService.java
// @State(name = "FrameSwitcherSettings", storages = {@Storage("FrameSwitcherSettings.xml")})
// public class FrameSwitcherApplicationService implements PersistentStateComponent<FrameSwitcherSettings>, Disposable {
// 
// 	private static final Logger LOG = Logger.getInstance(FrameSwitcherApplicationService.class);
// 
// 	public static final String IDE_MAX_RECENT_PROJECTS = "ide.max.recent.projects";
// 
// 
// 	private FrameSwitcherSettings settings=new FrameSwitcherSettings();
// 	private RemoteInstancesState remoteInstancesState = new RemoteInstancesState();
// 	private ProjectFocusMonitor projectFocusMonitor=new ProjectFocusMonitor();
// 	private RemoteSender remoteSender;
// 	boolean initialized;
// 
// 	public static FrameSwitcherApplicationService getInstance() {
// 		FrameSwitcherApplicationService service = ServiceManager.getService(FrameSwitcherApplicationService.class);
// 		if (!service.initialized) {
// 			service.initComponent();
// 		}
// 		return service;
// 	}
// 
// 	public FrameSwitcherApplicationService() {
// 	}
// 
// 	public void initComponent() {
// 		long start = System.currentTimeMillis();
// 		initialized = true;
// 		initRemoting();
// 		LOG.debug("initComponent done in ", System.currentTimeMillis() - start, "ms");
// 	}
// 
// 	private synchronized void initRemoting() {
// 		if (this.settings.isRemoting()) {
// 			if (!(remoteSender instanceof RemoteSenderImpl)) {
// 				try {
// 					UUID uuid = getState().getOrInitializeUuid();
// 					remoteSender = new RemoteSenderImpl(this, uuid, new Receiver(uuid, this), getState().getPort());
// 				} catch (Throwable e) {
// 					remoteInstancesState = new RemoteInstancesState();
// 					remoteSender = new DummyRemoteSender();
// 					LOG.error(e);
// 				}
// 			}
// 		} else {
// 			if (remoteSender instanceof RemoteSenderImpl) {
// 				remoteSender.dispose();
// 			}
// 
// 			if (!(remoteSender instanceof DummyRemoteSender)) {
// 				remoteInstancesState = new RemoteInstancesState();
// 				remoteSender = new DummyRemoteSender();
// 			}
// 		}
// 
// 	}
// 
// 	public ProjectFocusMonitor getProjectFocusMonitor() {
// 		return projectFocusMonitor;
// 	}
// 
// 
// 	@NotNull
// 	@Override
// 	public FrameSwitcherSettings getState() {
// 		return settings;
// 	}
// 
// 	@Override
// 	public void loadState(FrameSwitcherSettings frameSwitcherSettings) {
// 		this.settings = frameSwitcherSettings;
// 		frameSwitcherSettings.applyMaxRecentProjectsToRegistry();
// 	}
// 
// 	public void updateSettings(FrameSwitcherSettings settings) {
// 		this.settings = settings;
// 		this.settings.applyOrResetMaxRecentProjectsToRegistry();
// 		initRemoting();
// 	}
// 
// 	public RemoteInstancesState getRemoteInstancesState() {
// 		return remoteInstancesState;
// 	}
// 
// 	public RemoteSender getRemoteSender() {
// 		return remoteSender;
// 	}
// 
// 	@Override
// 	public void dispose() {
// 		long start = System.currentTimeMillis();
// 		if (getRemoteSender() != null) {
// 			getRemoteSender().dispose();
// 		}
// 		LOG.debug("disposeComponent done in ", System.currentTimeMillis() - start, "ms");
// 	}
// }


import com.intellij.notification.*;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import krasa.frameswitcher.FrameSwitcherApplicationService;
package krasa.frameswitcher.networking;


/**
 * @author Vojtech Krasa
 */
public class DiagnosticAction extends AnAction {
	@Override
	public void actionPerformed(AnActionEvent e) {
		final RemoteSender remoteSender1 = FrameSwitcherApplicationService.getInstance().getRemoteSender();
		if (remoteSender1 instanceof RemoteSenderImpl) {
			final RemoteSenderImpl remoteSender = (RemoteSenderImpl) remoteSender1;
			String content = remoteSender.getChannel().getProperties().replace(";", "\n");
			
// Path: src/krasa/frameswitcher/FrameSwitcherApplicationService.java
// @State(name = "FrameSwitcherSettings", storages = {@Storage("FrameSwitcherSettings.xml")})
// public class FrameSwitcherApplicationService implements PersistentStateComponent<FrameSwitcherSettings>, Disposable {
// 
// 	private static final Logger LOG = Logger.getInstance(FrameSwitcherApplicationService.class);
// 
// 	public static final String IDE_MAX_RECENT_PROJECTS = "ide.max.recent.projects";
// 
// 
// 	private FrameSwitcherSettings settings=new FrameSwitcherSettings();
// 	private RemoteInstancesState remoteInstancesState = new RemoteInstancesState();
// 	private ProjectFocusMonitor projectFocusMonitor=new ProjectFocusMonitor();
// 	private RemoteSender remoteSender;
// 	boolean initialized;
// 
// 	public static FrameSwitcherApplicationService getInstance() {
// 		FrameSwitcherApplicationService service = ServiceManager.getService(FrameSwitcherApplicationService.class);
// 		if (!service.initialized) {
// 			service.initComponent();
// 		}
// 		return service;
// 	}
// 
// 	public FrameSwitcherApplicationService() {
// 	}
// 
// 	public void initComponent() {
// 		long start = System.currentTimeMillis();
// 		initialized = true;
// 		initRemoting();
// 		LOG.debug("initComponent done in ", System.currentTimeMillis() - start, "ms");
// 	}
// 
// 	private synchronized void initRemoting() {
// 		if (this.settings.isRemoting()) {
// 			if (!(remoteSender instanceof RemoteSenderImpl)) {
// 				try {
// 					UUID uuid = getState().getOrInitializeUuid();
// 					remoteSender = new RemoteSenderImpl(this, uuid, new Receiver(uuid, this), getState().getPort());
// 				} catch (Throwable e) {
// 					remoteInstancesState = new RemoteInstancesState();
// 					remoteSender = new DummyRemoteSender();
// 					LOG.error(e);
// 				}
// 			}
// 		} else {
// 			if (remoteSender instanceof RemoteSenderImpl) {
// 				remoteSender.dispose();
// 			}
// 
// 			if (!(remoteSender instanceof DummyRemoteSender)) {
// 				remoteInstancesState = new RemoteInstancesState();
// 				remoteSender = new DummyRemoteSender();
// 			}
// 		}
// 
// 	}
// 
// 	public ProjectFocusMonitor getProjectFocusMonitor() {
// 		return projectFocusMonitor;
// 	}
// 
// 
// 	@NotNull
// 	@Override
// 	public FrameSwitcherSettings getState() {
// 		return settings;
// 	}
// 
// 	@Override
// 	public void loadState(FrameSwitcherSettings frameSwitcherSettings) {
// 		this.settings = frameSwitcherSettings;
// 		frameSwitcherSettings.applyMaxRecentProjectsToRegistry();
// 	}
// 
// 	public void updateSettings(FrameSwitcherSettings settings) {
// 		this.settings = settings;
// 		this.settings.applyOrResetMaxRecentProjectsToRegistry();
// 		initRemoting();
// 	}
// 
// 	public RemoteInstancesState getRemoteInstancesState() {
// 		return remoteInstancesState;
// 	}
// 
// 	public RemoteSender getRemoteSender() {
// 		return remoteSender;
// 	}
// 
// 	@Override
// 	public void dispose() {
// 		long start = System.currentTimeMillis();
// 		if (getRemoteSender() != null) {
// 			getRemoteSender().dispose();
// 		}
// 		LOG.debug("disposeComponent done in ", System.currentTimeMillis() - start, "ms");
// 	}
// }


// Path: src/krasa/frameswitcher/networking/DiagnosticAction.java
import com.intellij.notification.*;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import krasa.frameswitcher.FrameSwitcherApplicationService;

package krasa.frameswitcher.networking;


/**
 * @author Vojtech Krasa
 */
public class DiagnosticAction extends AnAction {
	@Override
	public void actionPerformed(AnActionEvent e) {
		final RemoteSender remoteSender1 = FrameSwitcherApplicationService.getInstance().getRemoteSender();
		if (remoteSender1 instanceof RemoteSenderImpl) {
			final RemoteSenderImpl remoteSender = (RemoteSenderImpl) remoteSender1;
			String content = remoteSender.getChannel().getProperties().replace(";", "\n");
			
			NotificationGroup group = NotificationGroupManager.getInstance().getNotificationGroup("Frame Switcher plugin");