Search in sources :

Example 1 with SendCodePointerCommand

use of jetbrains.communicator.commands.SendCodePointerCommand in project intellij-plugins by JetBrains.

the class SendCodePointerAction method prepareCommand.

protected void prepareCommand(FileCommand command, Editor editor, MutablePicoContainer container) {
    CodePointer codePointer = ActionUtil.getCodePointer(editor);
    ((SendCodePointerCommand) command).setCodePointer(codePointer);
}
Also used : SendCodePointerCommand(jetbrains.communicator.commands.SendCodePointerCommand) CodePointer(jetbrains.communicator.core.vfs.CodePointer)

Example 2 with SendCodePointerCommand

use of jetbrains.communicator.commands.SendCodePointerCommand in project intellij-plugins by JetBrains.

the class SendToAction method doActionCommand.

protected void doActionCommand(final User user, final VirtualFile file, final Editor editor) {
    VFile vFile = VFSUtil.createFileFrom(file, editor.getProject());
    if (vFile == null) {
        LOG.info("Unable to send code pointer for " + file);
        return;
    }
    CodePointer codePointer = ActionUtil.getCodePointer(editor);
    SendCodePointerCommand command = Pico.getCommandManager().getCommand(SendCodePointerCommand.class, BaseAction.getContainer(editor.getProject()));
    command.setCodePointer(codePointer);
    command.setVFile(vFile);
    command.setUser(user);
    command.execute();
}
Also used : SendCodePointerCommand(jetbrains.communicator.commands.SendCodePointerCommand) CodePointer(jetbrains.communicator.core.vfs.CodePointer) VFile(jetbrains.communicator.core.vfs.VFile)

Aggregations

SendCodePointerCommand (jetbrains.communicator.commands.SendCodePointerCommand)2 CodePointer (jetbrains.communicator.core.vfs.CodePointer)2 VFile (jetbrains.communicator.core.vfs.VFile)1