Skip to content

Commit

Permalink
clean up DirectoryDiffView
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Apr 16, 2024
1 parent cae8694 commit 8e7344e
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions src/main/java/gui/webdiff/DirectoryDiffView.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,19 @@
import org.rendersnake.Renderable;

import java.io.IOException;
import java.util.Enumeration;
import java.util.Map;
import java.util.Set;

import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.TreeNode;

import static org.rendersnake.HtmlAttributesFactory.*;

public class DirectoryDiffView implements Renderable {


private final DirComparator comperator;

public DirectoryDiffView(DirComparator comperator) {
this.comperator = comperator;
}



@Override
public void renderOn(HtmlCanvas html) throws IOException {
html
Expand Down Expand Up @@ -81,9 +74,6 @@ public void renderOn(HtmlCanvas html) throws IOException {
}

private static class ModifiedFiles implements Renderable {
// private List<Pair<File, File>> files;

private Map<String,String> diffInfos;
private final DefaultMutableTreeNode root;

private ModifiedFiles(DirComparator comparator) {
Expand All @@ -105,7 +95,7 @@ private void renderNode(HtmlCanvas ul, DefaultMutableTreeNode node) throws IOExc
TreeNodeInfo nodeInfo = (TreeNodeInfo) node.getUserObject();
if (node.isLeaf()) {
ul.tr()
.td().content(nodeInfo.getName()) //TODO:
.td().content(nodeInfo.getName())
.td()
.div(class_("btn-toolbar justify-content-end"))
.div(class_("btn-group"))
Expand Down Expand Up @@ -159,13 +149,6 @@ public void renderOn(HtmlCanvas html) throws IOException {
ul._ul()._div();
}
}

private String properText(String nameBefore, String nameAfter) {
if (nameBefore.equals(nameAfter))
return nameAfter;
else
return nameBefore + " -> " + nameAfter;
}
}

private static class AddedOrDeletedFiles implements Renderable {
Expand Down

0 comments on commit 8e7344e

Please sign in to comment.