Package floobits.common.protocol.handlers

Examples of floobits.common.protocol.handlers.FlooHandler


        if (!API.workspaceExists(flooUrl, this)) {
            errorMessage(String.format("The workspace %s does not exist!", flooUrl.toString()));
            return;
        }

        if (setupHandler(new FlooHandler(this, flooUrl, upload, path, auth))) {
            setListener(true);
            return;
        }

        String title = String.format("Really leave %s?", handler.url.workspace);
View Full Code Here


            return;
        }
        context.setTimeout(100, new Runnable() {
            @Override
            public void run() {
                FlooHandler flooHandler = context.getFlooHandler();
                if (flooHandler == null) {
                    return;
                }
                flooHandler.editorEventHandler.upload(virtualFile);
            }
View Full Code Here

    public abstract void actionPerformed(AnActionEvent e, EditorEventHandler editorEventHandler);

    @Override
    public void actionPerformedHasAccount(AnActionEvent e) {
        FloobitsPlugin floobitsPlugin;
        FlooHandler flooHandler;
        IContext context = null;
        try {
            floobitsPlugin = FloobitsPlugin.getInstance(e.getProject());
            if (floobitsPlugin == null) {
                Flog.log("no floobits plugin, aborting.");
View Full Code Here

    @Override
    public void update(AnActionEvent e) {
        super.update(e);
        FloobitsPlugin floobitsPlugin;
        FlooHandler flooHandler;
        floobitsPlugin = FloobitsPlugin.getInstance(e.getProject());
        if (floobitsPlugin == null) {
            Flog.log("No floobits plugin, aborting update.");
            return;
        }
View Full Code Here

    protected boolean isEnabled(FloobitsPlugin floobitsPlugin) {
        if (!super.isEnabled(floobitsPlugin)) {
            return false;
        }
        FlooHandler flooHandler = floobitsPlugin.context.getFlooHandler();
        return flooHandler != null && !flooHandler.state.can("patch") && flooHandler.state.can("request_perms");

    }
View Full Code Here

        Content content = ContentFactory.SERVICE.getInstance().createContent(chatForm.getChatPanel(), "", true);
        toolWindow.getContentManager().addContent(content);
    }

    public void openChat() {
        FlooHandler flooHandler = context.getFlooHandler();
        if (flooHandler == null) {
            return;
        }
        try {
            toolWindow.show(null);
        } catch (NullPointerException e) {
            Flog.warn("Could not open chat window.");
            return;
        }
        FlooUrl url = flooHandler.getUrl();
        toolWindow.setTitle(String.format("- %s", url.toString()));
    }
View Full Code Here

                SetPermissionsDialog setPermissionsDialog = new SetPermissionsDialog(
                        new RunLater<String[]>() {
                            @Override
                            public void run(String[] permissions) {
                                Flog.info("Submitting permission changes.");
                                FlooHandler flooHandler = context.getFlooHandler();
                                if (flooHandler == null) {
                                    return;
                                }
                                flooHandler.editorEventHandler.changePerms(userId, permissions);
                            }
                        },
                        permissions.contains("get_buf"),
                        permissions.contains("request_perms"),
                        permissions.contains("patch"),
                        permissions.contains("kick")
                );
                setPermissionsDialog.setUsername(client.username);
                setPermissionsDialog.createCenterPanel();
                setPermissionsDialog.show();
            }
        });
        popupMenu.add(adminMenuItem);
        popupMenu.addPopupMenuListener(new PopupMenuListener() {
            @Override
            public void popupMenuWillBecomeVisible(PopupMenuEvent e) {
                FlooHandler floohandler = context.getFlooHandler();
                if (floohandler == null) {
                    return;
                }
                kickMenuItem.setEnabled(floohandler.state.can("kick"));
                adminMenuItem.setEnabled(floohandler.state.can("kick"));
View Full Code Here

        });
        clients.setComponentPopupMenu(popupMenu);
    }

    private void sendChatContents() {
        FlooHandler flooHandler = context.getFlooHandler();
        if (flooHandler == null) {
            return;
        }
        String chatContents = chatInput.getText().trim();
        if (chatContents.length() < 1) {
View Full Code Here

        String messageFormat = "%s<b><i><span style=\"color:red\">%s</span></i></b><br/>";
        addMessage(String.format(messageFormat, stampMessage("*error*", null), message));
    }

    public void chatMessage(String username, String msg, Date messageDate) {
        FlooHandler flooHandler = context.getFlooHandler();
        if (flooHandler == null) {
            return;
        }
        addMessage(String.format("%s%s<br/>", stampMessage(username, messageDate), msg));
    }
View Full Code Here

    protected class ClientChatActionListener implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            FlooHandler flooHandler = context.getFlooHandler();
            if (flooHandler == null) {
                return;
            }
            ClientModelItem client = (ClientModelItem) clients.getSelectedValue();
            if (client == null) {
View Full Code Here

TOP

Related Classes of floobits.common.protocol.handlers.FlooHandler

Copyright © 2018 www.massapicom. 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.