Search in sources :

Example 1 with ShowDiffCommand

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

the class DiffAction method update.

public void update(AnActionEvent e) {
    e.getPresentation().setText(StringUtil.getMsg("diff.action.text"));
    e.getPresentation().setDescription(StringUtil.getMsg("diff.action.description"));
    e.getPresentation().setIcon(AllIcons.Actions.Diff);
    ShowDiffCommand showDiffCommand = getCommand(e);
    if (showDiffCommand != null) {
        showDiffCommand.setVFile(BaseVFileAction.getVFile(myFileTree));
        showDiffCommand.setUser(getUser());
    }
    super.update(e);
}
Also used : ShowDiffCommand(jetbrains.communicator.commands.ShowDiffCommand)

Example 2 with ShowDiffCommand

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

the class ShowRemoteDiffAction 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 get file " + file);
        return;
    }
    ShowDiffCommand command = Pico.getCommandManager().getCommand(ShowDiffCommand.class, BaseAction.getContainer(editor.getProject()));
    command.setUser(user);
    command.setVFile(vFile);
    command.execute();
}
Also used : ShowDiffCommand(jetbrains.communicator.commands.ShowDiffCommand) VFile(jetbrains.communicator.core.vfs.VFile)

Aggregations

ShowDiffCommand (jetbrains.communicator.commands.ShowDiffCommand)2 VFile (jetbrains.communicator.core.vfs.VFile)1