Package floobits.actions

Source Code of floobits.actions.SelectRecentWorkspace

package floobits.actions;

import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.Project;
import floobits.common.PersistentJson;
import floobits.common.Workspace;

import java.util.LinkedList;

public class SelectRecentWorkspace extends CanFloobits {

    public static void joinRecent(Project project) {
        PersistentJson persistentJson = PersistentJson.getInstance();
        LinkedList<String> recent = new LinkedList<String>();
        for (Workspace workspace : persistentJson.recent_workspaces) {
            recent.add(workspace.url);
        }
        floobits.dialogs.SelectRecentWorkspace selectRecentWorkspace = new floobits.dialogs.SelectRecentWorkspace(project, recent);
        selectRecentWorkspace.createCenterPanel();
        selectRecentWorkspace.show();
    }

    public void actionPerformed(AnActionEvent e) {
        joinRecent(e.getProject());
    }
}
TOP

Related Classes of floobits.actions.SelectRecentWorkspace

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.