[push] rename class to a simpler name

This commit is contained in:
Kirill Likhodedov
2014-09-23 16:15:02 +04:00
parent 45ee5e5aa6
commit 0d9145383f
3 changed files with 8 additions and 8 deletions
@@ -387,7 +387,7 @@ public class PushController implements Disposable {
Function<VcsFullCommitDetails, DefaultMutableTreeNode> commitToNode = new Function<VcsFullCommitDetails, DefaultMutableTreeNode>() {
@Override
public DefaultMutableTreeNode fun(VcsFullCommitDetails commit) {
return new VcsFullCommitDetailsNode(project, commit);
return new CommitNode(project, commit);
}
};
List<DefaultMutableTreeNode> childrenToShown = new ArrayList<DefaultMutableTreeNode>();
@@ -26,12 +26,12 @@ import org.jetbrains.annotations.NotNull;
import javax.swing.tree.DefaultMutableTreeNode;
public class VcsFullCommitDetailsNode extends DefaultMutableTreeNode implements CustomRenderedTreeNode, TooltipNode {
public class CommitNode extends DefaultMutableTreeNode implements CustomRenderedTreeNode, TooltipNode {
@NotNull private final Project myProject;
private final VcsFullCommitDetails myCommit;
@NotNull private final VcsFullCommitDetails myCommit;
public VcsFullCommitDetailsNode(@NotNull Project project, @NotNull VcsFullCommitDetails commit) {
public CommitNode(@NotNull Project project, @NotNull VcsFullCommitDetails commit) {
super(commit, false);
myProject = project;
myCommit = commit;
@@ -171,8 +171,8 @@ public class PushLog extends JPanel implements TypeSafeDataProvider {
if (nodes != null) {
ArrayList<Change> changes = new ArrayList<Change>();
for (TreePath path : nodes) {
if (path.getLastPathComponent() instanceof VcsFullCommitDetailsNode) {
VcsFullCommitDetailsNode commitDetailsNode = (VcsFullCommitDetailsNode)path.getLastPathComponent();
if (path.getLastPathComponent() instanceof CommitNode) {
CommitNode commitDetailsNode = (CommitNode)path.getLastPathComponent();
changes.addAll(commitDetailsNode.getUserObject().getChanges());
}
else if (path.getLastPathComponent() instanceof RepositoryNode) {
@@ -194,8 +194,8 @@ public class PushLog extends JPanel implements TypeSafeDataProvider {
for (DefaultMutableTreeNode childNode = (DefaultMutableTreeNode)rootNode.getFirstChild();
childNode != null;
childNode = (DefaultMutableTreeNode)rootNode.getChildAfter(childNode)) {
if (childNode instanceof VcsFullCommitDetailsNode) {
changes.addAll(((VcsFullCommitDetailsNode)childNode).getUserObject().getChanges());
if (childNode instanceof CommitNode) {
changes.addAll(((CommitNode)childNode).getUserObject().getChanges());
}
}
return changes;