mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
DRY bug fixed
*event presentation should be modified, not templatePresentation
This commit is contained in:
@@ -69,8 +69,8 @@ public abstract class HgLogSingleCommitAction extends DumbAwareAction {
|
||||
public void update(AnActionEvent e) {
|
||||
Data data = Data.collect(e);
|
||||
boolean enabled = data.isValid() && data.log.getSelectedCommits().size() == 1;
|
||||
getTemplatePresentation().setVisible(data.isValid());
|
||||
getTemplatePresentation().setEnabled(enabled);
|
||||
e.getPresentation().setVisible(data.isValid());
|
||||
e.getPresentation().setEnabled(enabled);
|
||||
}
|
||||
|
||||
private static class Data {
|
||||
|
||||
@@ -19,6 +19,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.zmlx.hg4idea.execution.HgCommandException;
|
||||
import org.zmlx.hg4idea.execution.HgCommandExecutor;
|
||||
import org.zmlx.hg4idea.execution.HgCommandResultHandler;
|
||||
import org.zmlx.hg4idea.repo.HgRepositoryManager;
|
||||
import org.zmlx.hg4idea.util.HgUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -48,5 +50,9 @@ public class HgTagCreateCommand {
|
||||
arguments.add(revisionNumberOrHash);
|
||||
}
|
||||
new HgCommandExecutor(project).execute(repo, "tag", arguments, resultHandler);
|
||||
if (!project.isDisposed()) {
|
||||
HgRepositoryManager manager = HgUtil.getRepositoryManager(project);
|
||||
manager.updateRepository(repo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user