Skip to content

Commit

Permalink
ASTDiff GUI: Fix the tool name
Browse files Browse the repository at this point in the history
  • Loading branch information
pouryafard75 committed Aug 11, 2024
1 parent 0d42115 commit 2b30f7f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/gui/webdiff/rest/AbstractMenuBar.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ public abstract class AbstractMenuBar implements Renderable {
private final int numOfDiffs;
private final String routePath;
private final boolean isMovedDiff;
private boolean showToolName = true;
private static final String BACK_BUTTON_TEXT = "Overview";
private static final String PREV_BUTTON_TEXT = "Prev";
private static final String NEXT_BUTTON_TEXT = "Next";
private static final String QUIT_BUTTON_TEXT = "Quit";
private static final String movedDiffWarningText = "This diff only shows the moves between these two files";

public void setShowToolName(boolean showToolName) {
this.showToolName = showToolName;
}

private String getPrevButtonText() {
String txt = PREV_BUTTON_TEXT;
int rem = id;
Expand Down Expand Up @@ -53,7 +58,7 @@ public void renderOn(HtmlCanvas html) throws IOException {
boolean shouldDisablePrev = id == 0;
boolean shouldDisableNext = id == numOfDiffs - 1;
html
// .div(class_("col")).content("Generated by " + toolName)
.if_(showToolName).div(class_("col")).content("Generated by " + toolName)._if()
// .if_(isMovedDiff).div(class_("col")).content(movedDiffWarningText)._if()
.div(class_("col"))
.div(class_("btn-toolbar justify-content-end"))
Expand Down

0 comments on commit 2b30f7f

Please sign in to comment.