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);
}
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();
}
Aggregations