Package floobits.actions

Source Code of floobits.actions.JoinWorkspace

package floobits.actions;

import com.intellij.openapi.actionSystem.AnActionEvent;
import floobits.FloobitsApplication;
import floobits.FloobitsPlugin;
import floobits.common.DotFloo;
import floobits.common.FlooUrl;
import floobits.impl.ContextImpl;

import javax.swing.*;


public class JoinWorkspace extends CanFloobits {

    public void actionPerformed(AnActionEvent e) {
        String url = "https://floobits.com/";
        FloobitsPlugin floobitsPlugin = FloobitsPlugin.getInstance(e.getProject());
        if (floobitsPlugin == null) {
            return;
        }
        ContextImpl context = floobitsPlugin.context;
        FlooUrl floourl = DotFloo.read(context.project.getBasePath());
        if (floourl != null) {
            url = floourl.toString();
        }
        String inputValue = JOptionPane.showInputDialog("Workspace URL", url);
        if (inputValue == null) {
            return;
        }

        FloobitsApplication.self.joinWorkspace(context, inputValue);
    }
}
TOP

Related Classes of floobits.actions.JoinWorkspace

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.