Author: tfmorris
Date: 2008-05-01 15:44:53-0700
New Revision: 14581

Modified:
   trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java

Log:
Restore deleted code

Modified: 
trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java?view=diff&rev=14581&p1=trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java&p2=trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java&r1=14580&r2=14581
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java  
(original)
+++ trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java  
2008-05-01 15:44:53-0700
@@ -29,7 +29,7 @@
 import org.argouml.application.api.Argo;
 import org.argouml.configuration.Configuration;
 import org.argouml.configuration.ConfigurationKey;
-//import org.argouml.uml.ui.ActionReopenProject;
+import org.argouml.uml.ui.ActionReopenProject;
 import java.io.File;
 
 // TODO: This class is part of a dependency cycle with ProjectBrowser and
@@ -100,8 +100,8 @@
         // the text is used by the event handler for opening the project
         File f = new File(filename);
         //JMenuItem item = _fileMenu.add(new ActionReopenProject(filename));
-//        JMenuItem item =
-//            fileMenu.insert(new ActionReopenProject(filename), addAt);
+        JMenuItem item =
+            fileMenu.insert(new ActionReopenProject(filename), addAt);
 
         // set maximum length of menu entry
         String entryName = f.getName();
@@ -110,11 +110,10 @@
         }
 
         // text is short, tooltip is long
-//        item.setText(entryName);
-//        item.setToolTipText(filename);
-//
-//        return item;
-        return null;
+        item.setText(entryName);
+        item.setToolTipText(filename);
+
+        return item;
     }
 
     /**
@@ -180,11 +179,11 @@
         // real file names, not action names !
 
         String[] tempNames = new String[maxCount];
-//        for (int i = 0; i < lruCount; i++) {
-//            ActionReopenProject action =
-//                (ActionReopenProject) menuItems[i].getAction();
-//            tempNames[i] = action.getFilename();
-//        }
+        for (int i = 0; i < lruCount; i++) {
+            ActionReopenProject action =
+                (ActionReopenProject) menuItems[i].getAction();
+            tempNames[i] = action.getFilename();
+        }
 
         // delete all existing entries
         for (int i = 0; i < lruCount; i++) {
@@ -210,10 +209,10 @@
         lruCount = j;
 
         // and store configuration props
-//        for (int k = 0; k < lruCount; k++) {
-//            ActionReopenProject action =
-//                (ActionReopenProject) menuItems[k].getAction();
-//            Configuration.setString(confKeys[k], action.getFilename());
-//        }
+        for (int k = 0; k < lruCount; k++) {
+            ActionReopenProject action =
+                (ActionReopenProject) menuItems[k].getAction();
+            Configuration.setString(confKeys[k], action.getFilename());
+        }
     }
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to