logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r777386 - in /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw: LogPanel.java LogUI.java
Date Fri, 22 May 2009 05:51:34 GMT
Author: sdeboy
Date: Fri May 22 05:51:34 2009
New Revision: 777386

URL: http://svn.apache.org/viewvc?rev=777386&view=rev
Log:
Goto line now works when table results are being filtered (via refine focus or the tree)

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java?rev=777386&r1=777385&r2=777386&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogPanel.java Fri May 22
05:51:34 2009
@@ -1814,8 +1814,9 @@
    *
    * @param eventNumber
    */
-  void setSelectedEvent(int eventNumber){
-      table.scrollTo(eventNumber - 1, 0);
+  void setSelectedEvent(int eventNumber) {
+      int row = tableModel.find(ExpressionRule.getRule("prop.log4jid == " + eventNumber),
0, true);
+      table.scrollTo(row, 0);
   }
 
   /**

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java?rev=777386&r1=777385&r2=777386&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/LogUI.java Fri May 22 05:51:34
2009
@@ -792,7 +792,7 @@
           String inputLine = JOptionPane.showInputDialog(LogUI.this, "Enter the line number
to go:", "Goto Line", -1);
           try {
         	  int lineNumber = Integer.parseInt(inputLine);
-              List eventList = getCurrentLogPanel().getFilteredEvents();
+              List eventList = getCurrentLogPanel().getEvents();
 
               if (lineNumber > 0 && lineNumber <= eventList.size()) {
                   getCurrentLogPanel().setSelectedEvent(lineNumber);



Mime
View raw message