svn commit: r14581 - trunk/src/argouml-app/src/org/argouml/ui/cmd/LastRecentlyUsedMenuList.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
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());
+        }
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.