[vcs-log] remove redundant text parameter that is not actually used
authorJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Sun, 16 Oct 2016 00:29:48 +0000 (03:29 +0300)
committerJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Sun, 16 Oct 2016 04:54:43 +0000 (07:54 +0300)
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/VcsLogGraphTable.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/render/GraphCommitCellRenderer.java

index eeac9e9bdd041b09e053bbdcbe8eded427c8ab37..698ebd3ec0f08edea8680f1e9a9a03b1e3e612a4 100644 (file)
@@ -186,7 +186,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
         for (int row = 0; row < maxRowsToCheck; row++) {
           String value = getModel().getValueAt(row, i).toString();
           Font font = tableFont;
-          VcsLogHighlighter.TextStyle style = getStyle(row, i, value, false, false).getTextStyle();
+          VcsLogHighlighter.TextStyle style = getStyle(row, i, false, false).getTextStyle();
           if (BOLD.equals(style)) {
             font = tableFont.deriveFont(Font.BOLD);
           }
@@ -336,13 +336,13 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
     myHighlighters.clear();
   }
 
+  @NotNull
   public SimpleTextAttributes applyHighlighters(@NotNull Component rendererComponent,
                                                 int row,
                                                 int column,
-                                                String text,
                                                 boolean hasFocus,
                                                 final boolean selected) {
-    VcsLogHighlighter.VcsCommitStyle style = getStyle(row, column, text, hasFocus, selected);
+    VcsLogHighlighter.VcsCommitStyle style = getStyle(row, column, hasFocus, selected);
 
     assert style.getBackground() != null && style.getForeground() != null && style.getTextStyle() != null;
 
@@ -359,14 +359,14 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
     return SimpleTextAttributes.REGULAR_ATTRIBUTES;
   }
 
-  public VcsLogHighlighter.VcsCommitStyle getBaseStyle(int row, int column, String text, boolean hasFocus, boolean selected) {
-    Component dummyRendererComponent = myDummyRenderer.getTableCellRendererComponent(this, text, selected, hasFocus, row, column);
+  public VcsLogHighlighter.VcsCommitStyle getBaseStyle(int row, int column, boolean hasFocus, boolean selected) {
+    Component dummyRendererComponent = myDummyRenderer.getTableCellRendererComponent(this, "", selected, hasFocus, row, column);
     return VcsCommitStyleFactory
       .createStyle(dummyRendererComponent.getForeground(), dummyRendererComponent.getBackground(), VcsLogHighlighter.TextStyle.NORMAL);
   }
 
-  private VcsLogHighlighter.VcsCommitStyle getStyle(int row, int column, String text, boolean hasFocus, boolean selected) {
-    VcsLogHighlighter.VcsCommitStyle baseStyle = getBaseStyle(row, column, text, hasFocus, selected);
+  private VcsLogHighlighter.VcsCommitStyle getStyle(int row, int column, boolean hasFocus, boolean selected) {
+    VcsLogHighlighter.VcsCommitStyle baseStyle = getBaseStyle(row, column, hasFocus, selected);
 
     VisibleGraph<Integer> visibleGraph = getVisibleGraph();
     if (row < 0 || row >= visibleGraph.getVisibleCommitCount()) {
@@ -549,7 +549,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
   protected void paintFooter(@NotNull Graphics g, int x, int y, int width, int height) {
     int lastRow = getRowCount() - 1;
     if (lastRow >= 0) {
-      g.setColor(getStyle(lastRow, GraphTableModel.COMMIT_COLUMN, "", hasFocus(), false).getBackground());
+      g.setColor(getStyle(lastRow, GraphTableModel.COMMIT_COLUMN, hasFocus(), false).getBackground());
       g.fillRect(x, y, width, height);
       if (myUi.isMultipleRoots()) {
         g.setColor(getRootBackgroundColor(getModel().getRoot(lastRow), myUi.getColorManager()));
@@ -561,7 +561,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
       }
     }
     else {
-      g.setColor(getBaseStyle(lastRow, GraphTableModel.COMMIT_COLUMN, "", hasFocus(), false).getBackground());
+      g.setColor(getBaseStyle(lastRow, GraphTableModel.COMMIT_COLUMN, hasFocus(), false).getBackground());
       g.fillRect(x, y, width, height);
     }
   }
@@ -626,7 +626,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
       }
 
       myColor = color;
-      Color background = ((VcsLogGraphTable)table).getStyle(row, column, text, hasFocus, isSelected).getBackground();
+      Color background = ((VcsLogGraphTable)table).getStyle(row, column, hasFocus, isSelected).getBackground();
       assert background != null;
       myBorderColor = background;
       setForeground(UIUtil.getTableForeground(false));
@@ -655,7 +655,7 @@ public class VcsLogGraphTable extends TableWithProgress implements DataProvider,
       if (value == null) {
         return;
       }
-      append(value.toString(), applyHighlighters(this, row, column, value.toString(), hasFocus, selected));
+      append(value.toString(), applyHighlighters(this, row, column, hasFocus, selected));
     }
 
     public int getHorizontalTextPadding() {
index 0591dd7ac0bb3f56788244806f550c1244c62f0d..1aaf1f8235077c245973eec28b2827c3e9969b44 100644 (file)
@@ -135,10 +135,10 @@ public class GraphCommitCellRenderer extends ColoredTableCellRenderer {
       graphPadding = 0;
     }
 
-    SimpleTextAttributes style = myGraphTable.applyHighlighters(this, row, column, "", hasFocus, isSelected);
+    SimpleTextAttributes style = myGraphTable.applyHighlighters(this, row, column, hasFocus, isSelected);
 
     Collection<VcsRef> refs = cell.getRefsToThisCommit();
-    Color foreground = ObjectUtils.assertNotNull(myGraphTable.getBaseStyle(row, column, "", hasFocus, isSelected).getForeground());
+    Color foreground = ObjectUtils.assertNotNull(myGraphTable.getBaseStyle(row, column, hasFocus, isSelected).getForeground());
     myExpanded = myGraphTable.getExpandableItemsHandler().getExpandedItems().contains(new TableCell(row, column));
     if (myFadeOutPainter != null) {
       myFadeOutPainter.customize(refs, row, column, table, foreground);