matthiasblaesing commented on code in PR #7128:
URL: https://github.com/apache/netbeans/pull/7128#discussion_r1530865426


##########
ide/versioning.util/src/org/netbeans/modules/versioning/history/SummaryCellRenderer.java:
##########
@@ -714,16 +735,20 @@ private String prepareText (String text) {
     private class EventRenderer extends JPanel implements ListCellRenderer {
         
         private boolean lastSelection = false;
+        private String lastSearch = null;
+        private int lastShowingFiles = -1;
         private final JLabel pathLabel;
         private final JLabel actionLabel;
         private final JButton actionButton;
         private String id;
         private final String PATH_COLOR = 
getColorString(lessInteresting(UIManager.getColor("List.foreground"), 
UIManager.getColor("List.background"))); //NOI18N
+        private final String SEARCH_COLOR_BG = getColorString((Color) 
Objects.requireNonNullElse(searchHiliteAttrs.getAttribute(StyleConstants.Background),
 Color.BLUE)); //NOI18N
+        private final String SEARCH_COLOR_FG = getColorString((Color) 
Objects.requireNonNullElse(searchHiliteAttrs.getAttribute(StyleConstants.Foreground),
 UIManager.getColor("List.foreground"))); //NOI18N
 
         public EventRenderer () {
             pathLabel = new JLabel();
             actionLabel = new JLabel();
-            actionButton = new LinkButton("..."); //NOI18N
+            actionButton = new LinkButton("=>"); //NOI18N

Review Comment:
   I had serious trouble to understanding this. I saw this:
   
   
![image](https://github.com/apache/netbeans/assets/2179736/a1b15c1b-fcc4-4878-92fb-cc8065a8a279)
   
   and wondered: Is this a bug? A rename without a target? What does NetBeans 
want to tell me? Just by luck I clicked on this and then I understood. The 
ellipsis symbol is not perfect, but to me it captures the intended meaning 
better.



##########
ide/git/src/org/netbeans/modules/git/ui/history/RevisionNode.java:
##########
@@ -157,17 +193,22 @@ public PropertyEditor getPropertyEditor() {
         }
     }
     
-    private static String highlight (String author, String needle, String 
bgColor, String fgColor) {
+    private static String escape(String text) {
+        return text.replace("<", "&lt;");

Review Comment:
   NetBeans has a more complete implementation that is already being used in 
`DiffTreeTable`
   
   ```suggestion
           try {
               return XMLUtil.toElementContent(text);
           } catch (CharConversionException e1) {
               Logger.getLogger(RevisionNode.class.getName()).log(Level.INFO, 
"Can not HTML escape: ", text);  //NOI18N
           }
   ```



##########
ide/git/src/org/netbeans/modules/git/ui/history/RevisionNode.java:
##########
@@ -78,31 +94,59 @@ public RevisionNode(RepositoryRevision.Event revision, 
SearchHistoryPanel master
         initProperties();
     }
 
-    RepositoryRevision getContainer() {
-        return container;
-    }
-
     RepositoryRevision.Event getEvent() {
         return event;
     }
 
+    @Override
+    public String getHtmlDisplayName() {
+        if (isCommitNode()) {
+            return "<b>"+getName()+"</b>";
+        } else {
+            String c = annotationColorForAction(event.getAction());
+            return c != null ? "<font color="+c+">"+getName()+"</font>" : 
getName();
+        }
+    }

Review Comment:
   ```suggestion
       @Override
       public String getHtmlDisplayName() {
           if (isCommitNode()) {
               return "<b>" + escape(getName()) + "</b>";
           } else {
               String c = annotationColorForAction(event.getAction());
               return c != null ? "<font color=" + escape(c) + ">" + 
escape(getName()) + "</font>" : escape(getName());
           }
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to