Index: InitializeApplicationExtension.java
===================================================================
--- InitializeApplicationExtension.java	(revision 44403)
+++ InitializeApplicationExtension.java	(revision 44404)
@@ -29,7 +29,9 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.StringWriter;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.prefs.Preferences;
@@ -53,6 +55,9 @@
 import org.gvsig.app.project.documents.view.gui.IView;
 import org.gvsig.app.project.documents.view.toolListeners.InfoListener;
 import org.gvsig.app.util.BaseOpenErrorHandler;
+import org.gvsig.expressionevaluator.Expression;
+import org.gvsig.expressionevaluator.ExpressionEvaluatorLocator;
+import org.gvsig.expressionevaluator.ExpressionEvaluatorManager;
 import org.gvsig.fmap.dal.DALLocator;
 import org.gvsig.fmap.dal.DataManager;
 import org.gvsig.fmap.dal.OpenErrorHandler;
@@ -65,6 +70,9 @@
 import org.gvsig.installer.lib.api.InstallerManager;
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.bookmarksandhistory.Bookmark;
+import org.gvsig.tools.bookmarksandhistory.Bookmarks;
+import org.gvsig.tools.bookmarksandhistory.History;
 import org.gvsig.tools.dynobject.DynObject;
 import org.gvsig.tools.dynobject.Tags;
 import org.gvsig.tools.folders.FoldersManager;
@@ -86,14 +94,14 @@
     public static final String TEMPLATES_FOLDER_PROPERTY_NAME = "TemplatesFolder";
     public static final String SYMBOL_LIBRARY_FOLDER_PROPERTY_NAME = "SymbolLibraryFolder";
 
-        private OpenErrorHandler openErrorHandler = null;
+    private OpenErrorHandler openErrorHandler = null;
 
     private static class SimpleImageDataProfile extends AbstractDataProfile {
 
         public SimpleImageDataProfile() {
             super("Image", SimpleImage.class);
         }
-        
+
         @Override
         public Object createData(Object data, Tags tags) {
             final ToolsSwingManager toolsSwingManager = ToolsSwingLocator.getToolsSwingManager();
@@ -101,26 +109,83 @@
             return image;
         }
     }
-    
+
     @Override
     public void initialize() {
         DALLocator.registerFeatureTypeDefinitionsManager(DefaultFeatureTypeDefinitionsManager.class);
-        
+
         DataManager dataManager = DALLocator.getDataManager();
         dataManager.registerDataProfile(new SimpleImageDataProfile());
-        
+
         InfoListener.initializeExtensionPoint();
-        
+
         initLastPath();
         registerIcons();
+        loadExpressionBookmarks();
+        loadExpressionHistory();
+    }
 
+    public void loadExpressionHistory() {
+        PluginsManager pluginManager = PluginsLocator.getManager();
+        final PluginServices plugin = pluginManager.getPlugin(this);
+        DynObject pluginProperties = plugin.getPluginProperties();
+        List<Expression> dynBookmarks = (List<Expression>) pluginProperties.getDynValue("expressionHistory");
+        if (dynBookmarks == null) {
+            return;
+        }
+        final ExpressionEvaluatorManager expressionManager = ExpressionEvaluatorLocator.getExpressionEvaluatorManager();
+        History<Expression> history = expressionManager.getHistory();
+        for (Expression expression : dynBookmarks) {
+            history.add(expression);
+        }
+        pluginManager.addShutdownTask("saveExpressionHistory", new Runnable() {
+            @Override
+            public void run() {
+                DynObject properties = plugin.getPluginProperties();
+                ArrayList<Expression> var = new ArrayList<>();
+                for (Expression expression : history) {
+                    var.add(expression);
+                }
+                properties.setDynValue("expressionHistory", var);
+            }
+        }, false, 100);
+
+
     }
-    
+
+    public void loadExpressionBookmarks() {
+        PluginsManager pluginManager = PluginsLocator.getManager();
+        final PluginServices plugin = pluginManager.getPlugin(this);
+        DynObject pluginProperties = plugin.getPluginProperties();
+        Map<String, Expression> dynBookmarks = (Map<String, Expression>) pluginProperties.getDynValue("expressionBookmarks");
+        if (dynBookmarks == null) {
+            return;
+        }
+        final ExpressionEvaluatorManager expressionManager = ExpressionEvaluatorLocator.getExpressionEvaluatorManager();
+        Bookmarks<Expression> bookmarks = expressionManager.getBookmarks();
+        for (String key : dynBookmarks.keySet()) {
+            Expression bookmark = dynBookmarks.get(key);
+            bookmarks.add(bookmark);
+        }
+        pluginManager.addShutdownTask("saveExpressionBookmarks", new Runnable() {
+            @Override
+            public void run() {
+                DynObject properties = plugin.getPluginProperties();
+                Map<String, Expression> var = new HashMap<>();
+                for (Bookmark<Expression> bookmark : bookmarks) {
+                    var.put(bookmark.getName(), bookmark.getValue());
+                }
+                properties.setDynValue("expressionBookmarks", var);
+            }
+        }, false, 100);
+
+    }
+
     private void initLastPath() {
-        Preferences prefs = Preferences.userRoot().node( "gvsig.foldering" );
+        Preferences prefs = Preferences.userRoot().node("gvsig.foldering");
         FoldersManager folderManager = ToolsLocator.getFoldersManager();
         String v;
-        
+
         v = prefs.get(DATA_FOLDER_PROPERTY_NAME, folderManager.getHome().getAbsolutePath());
         folderManager.setLastPath(OPEN_LAYER_FILE_CHOOSER_ID, new File(v));
 
@@ -153,14 +218,14 @@
             );
         }
         pluginManager.addStartupTask("OpenLayerOnStart", new OpenLayerOnStart(), true, 740);
-        
+
         pluginManager.addStartupTask("ApplicationStartedMessage", new Runnable() {
             @Override
             public void run() {
                 I18nManager i18n = ToolsLocator.getI18nManager();
                 ApplicationManager application = ApplicationLocator.getManager();
                 application.message(
-                        i18n.getTranslation("StatusBar.Aplicacion_iniciada"), 
+                        i18n.getTranslation("StatusBar.Aplicacion_iniciada"),
                         JOptionPane.INFORMATION_MESSAGE
                 );
             }
