cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1001026 - in /cayenne/main/branches/STABLE-3.0: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
Date Fri, 24 Sep 2010 18:51:12 GMT
Author: aadamchik
Date: Fri Sep 24 18:51:12 2010
New Revision: 1001026

URL: http://svn.apache.org/viewvc?rev=1001026&view=rev
Log:
CAY-1485 Memory information for about dialog

* patch by Andrei Veprev, transferred to 3.0

Modified:
    cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java

Modified: cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1001026&r1=1001025&r2=1001026&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/branches/STABLE-3.0/docs/doc/src/main/resources/RELEASE-NOTES.txt Fri Sep
24 18:51:12 2010
@@ -8,6 +8,13 @@ To browse individual bug reports check o
 http://issues.apache.org/cayenne/
 
 ----------------------------------
+Release: 3.0.2
+Date: 
+----------------------------------
+
+CAY-1485 Memory information for about dialog
+
+----------------------------------
 Release: 3.0.1
 Date: 
 ----------------------------------

Modified: cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java?rev=1001026&r1=1001025&r2=1001026&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
(original)
+++ cayenne/main/branches/STABLE-3.0/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/AboutDialog.java
Fri Sep 24 18:51:12 2010
@@ -67,6 +67,10 @@ public class AboutDialog extends JFrame 
      */
     static synchronized String getInfoString() {
         if (infoString == null) {
+            double maxMemory = (double) Runtime.getRuntime().maxMemory() / 1024 / 1024;
+            double totalMemory = (double) Runtime.getRuntime().totalMemory() / 1024 / 1024;
+            double freeMemory = (double) Runtime.getRuntime().freeMemory() / 1024 / 1024;
+            
             StringBuffer buffer = new StringBuffer();
             buffer.append("<html>");
             buffer.append("<font size='-1' face='Arial,Helvetica'>");
@@ -76,6 +80,10 @@ public class AboutDialog extends JFrame 
             buffer.append("<font size='-2' face='Arial,Helvetica'>");
             buffer.append("<br>JVM: " + System.getProperty("java.vm.name") + " " +

                     System.getProperty("java.version"));
+            buffer.append(String.format(
+                    "<br>Memory: used %.2f MB, max %.2f MB",
+                    totalMemory - freeMemory,
+                    maxMemory));
             
             String version = LocalizedStringsHandler.getString("cayenne.version");
             if (version != null) {



Mime
View raw message