Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/TableCommandStackExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/TableCommandStackExtension.java	(revision 46038)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app.document.table.app/org.gvsig.app.document.table.app.mainplugin/src/main/java/org/gvsig/app/extension/TableCommandStackExtension.java	(revision 46039)
@@ -60,8 +60,8 @@
 			CommandStackDialog csd = new CommandStackDialog();
 
 			csd.setModel(featureStore);
-
-			PluginServices.getMDIManager().addWindow(csd);
+                        csd.setLabelModel(featureStore.getName());
+                	PluginServices.getMDIManager().addWindow(csd);
 		}
 	}
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/command/CommandStackDialog.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/command/CommandStackDialog.java	(revision 46038)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/gui/command/CommandStackDialog.java	(revision 46039)
@@ -39,6 +39,7 @@
 import javax.swing.SwingUtilities;
 import javax.swing.table.DefaultTableCellRenderer;
 import javax.swing.table.TableColumn;
+import org.apache.commons.lang3.StringUtils;
 
 import org.gvsig.andami.IconThemeHelper;
 import org.gvsig.andami.PluginServices;
@@ -51,6 +52,8 @@
 import org.gvsig.app.project.documents.view.ViewManager;
 import org.gvsig.fmap.dal.feature.FeatureStoreNotification;
 import org.gvsig.gui.beans.DefaultBean;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
 import org.gvsig.tools.observer.Observable;
 import org.gvsig.tools.observer.Observer;
 import org.gvsig.tools.undo.UndoRedoInfo;
@@ -79,6 +82,7 @@
 	private static final ImageIcon idel = IconThemeHelper.getImageIcon("edit-undo-redo-actions-delete");
 
 	private CommandTableModel commandTableModel = null;
+    private String labelModel;
 	/**
 	 * This is the default constructor
 	 */
@@ -193,13 +197,20 @@
 	public WindowInfo getWindowInfo() {
 		WindowInfo m_viewinfo = new WindowInfo(WindowInfo.ICONIFIABLE |
 				WindowInfo.MODELESSDIALOG | WindowInfo.RESIZABLE | WindowInfo.PALETTE);
-		m_viewinfo.setTitle(PluginServices.getText(this,
-				"pila_de_comandos"));
+                I18nManager i18n = ToolsLocator.getI18nManager();
+                if(StringUtils.isBlank(this.labelModel)){
+                    m_viewinfo.setTitle(i18n.getTranslation("pila_de_comandos"));
+                } else {
+                    m_viewinfo.setTitle(
+                            i18n.getTranslation("pila_de_comandos")+
+                                    " - "+this.labelModel
+                    );
+                }
 		return m_viewinfo;
 	}
 
 	public Object getWindowModel() {
-		return commandTableModel.getClass().getName();
+		return this.undoRedoStack;
 	}
 
 	public void windowActivated() {
@@ -419,4 +430,8 @@
 	public Object getWindowProfile() {
 		return WindowInfo.DIALOG_PROFILE;
 	}
+        
+        public void setLabelModel (String labelModel) {
+            this.labelModel = labelModel;
+        }
 }  
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ViewCommandStackExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ViewCommandStackExtension.java	(revision 46038)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/ViewCommandStackExtension.java	(revision 46039)
@@ -1,133 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.app.extension;
-
-import org.gvsig.andami.IconThemeHelper;
-import org.gvsig.andami.PluginServices;
-import org.gvsig.andami.plugins.Extension;
-import org.gvsig.app.gui.command.CommandStackDialog;
-import org.gvsig.app.project.documents.view.ViewDocument;
-import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
-import org.gvsig.fmap.dal.feature.FeatureStore;
-import org.gvsig.fmap.mapcontext.MapContext;
-import org.gvsig.fmap.mapcontext.layers.FLayer;
-import org.gvsig.fmap.mapcontext.layers.FLayers;
-import org.gvsig.fmap.mapcontext.layers.LayersIterator;
-import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
-
-
-/**
- * DOCUMENT ME!
- *
- * @author Vicente Caballero Navarro
- */
-public class ViewCommandStackExtension extends Extension {
-
-	public static CommandStackDialog csd=null;
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#initialize()
-	 */
-	public void initialize() {
-        IconThemeHelper.registerIcon("action", "edit-undo-redo-actions", this);
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String)
-	 */
-	public void execute(String s) {
-		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
-				.getActiveWindow();
-
-		DefaultViewPanel vista = (DefaultViewPanel) f;
-		ViewDocument model = vista.getModel();
-		MapContext mapa = model.getMapContext();
-		FLayers layers = mapa.getLayers();
-		if (s.equals("edit-undo-redo-actions-layer")) {
-			for (int i =0;i<layers.getLayersCount();i++){
-				if (layers.getLayer(i) instanceof FLyrVect){
-					FLyrVect lyrVect=(FLyrVect)layers.getLayer(i);
-					if (lyrVect.isEditing() && lyrVect.isActive()){
-						FeatureStore featureStore=lyrVect.getFeatureStore();
-						csd=new CommandStackDialog();
-						csd.setModel(featureStore);
-						PluginServices.getMDIManager().addWindow(csd);
-						return;
-					}
-				}
-			}
-		}
-
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#isEnabled()
-	 */
-	public boolean isEnabled() {
-
-		return true;
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#isVisible()
-	 */
-    public boolean isVisible() {
-
-        org.gvsig.andami.ui.mdiManager.IWindow f =
-            PluginServices.getMDIManager().getActiveWindow();
-        if (f == null) {
-            return false;
-        }
-
-        if (f instanceof DefaultViewPanel) {
-            DefaultViewPanel vista = (DefaultViewPanel) f;
-            ViewDocument model = vista.getViewDocument();
-            MapContext mapa = model.getMapContext();
-
-            FLayers capas = mapa.getLayers();
-
-            int numActiveVectorial = 0;
-            int numActiveVectorialEditable = 0;
-
-            LayersIterator iter = new LayersIterator(capas);
-
-            FLayer capa;
-            while (iter.hasNext()) {
-                capa = iter.nextLayer();
-                if (capa instanceof FLyrVect && capa.isActive()
-                    && capa.isAvailable()) {
-                    numActiveVectorial++;
-                    if (capa.isEditing())
-                        numActiveVectorialEditable++;
-                }
-
-            }
-
-            if (numActiveVectorialEditable == 1 && numActiveVectorial == 1) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoViewExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoViewExtension.java	(revision 46038)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoViewExtension.java	(revision 46039)
@@ -1,143 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.app.extension;
-
-import org.gvsig.andami.IconThemeHelper;
-import org.gvsig.andami.PluginServices;
-import org.gvsig.andami.messages.NotificationManager;
-import org.gvsig.andami.plugins.Extension;
-import org.gvsig.app.ApplicationLocator;
-import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
-import org.gvsig.fmap.mapcontext.layers.FLayer;
-import org.gvsig.fmap.mapcontext.layers.FLayers;
-import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
-import org.gvsig.fmap.mapcontrol.MapControl;
-import org.gvsig.tools.undo.UndoException;
-
-
-
-/**
- * Extensión encargada de gestionar el deshacer los comandos anteriormente
- * aplicados.
- *
- * @author Vicente Caballero Navarro
- */
-public class UndoViewExtension extends Extension {
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#initialize()
-	 */
-	public void initialize() {
-        IconThemeHelper.registerIcon("action", "edit-undo", this);
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String)
-	 */
-	public void execute(String s) {
-		DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow();
-
-
-		if (s.compareTo("edit-undo-layer") == 0) {
-			undo(vista);
-
-		}
-	}
-
-	private void undo(DefaultViewPanel vista) {
-		MapControl mapControl = vista.getMapControl();
-		try {
-			FLayers layers=mapControl.getMapContext().getLayers();
-			for (int i=0;i<layers.getLayersCount();i++){
-				if (layers.getLayer(i) instanceof FLyrVect && layers.getLayer(i).isEditing() && layers.getLayer(i).isActive()){
-					((FLyrVect)layers.getLayer(i)).getFeatureStore().undo();
-					mapControl.drawMap(false);
-					ApplicationLocator.getManager().refreshMenusAndToolBars();
-				}
-			}
-		} catch (UndoException e) {
-			NotificationManager.addError(e.getMessage(),e);
-		}
-
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#isEnabled()
-	 */
-	public boolean isEnabled() {
-		DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow();
-		MapControl mapControl = vista.getMapControl();
-		FLayers layers=mapControl.getMapContext().getLayers();
-		for (int i=0;i<layers.getLayersCount();i++){
-//			try {
-				if (layers.getLayer(i) instanceof FLyrVect && ((FLyrVect)layers.getLayer(i)).getFeatureStore().isEditing() && layers.getLayer(i).isActive()){
-					return ((FLyrVect)layers.getLayer(i)).getFeatureStore().canUndo();
-//				VectorialEditableAdapter vea=(VectorialEditableAdapter)((FLyrVect)layers.getLayer(i)).getSource();
-//				if (vea==null)return false;
-//				return vea.getCommandRecord().moreUndoCommands();
-				}
-//			} catch (ReadException e) {
-//				// TODO Auto-generated catch block
-//				e.printStackTrace();
-//			} catch (DataException e) {
-//				// TODO Auto-generated catch block
-//				e.printStackTrace();
-//			}
-
-		}
-		return false;
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#isVisible()
-	 */
-	public boolean isVisible() {
-		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
-															 .getActiveWindow();
-
-		if (f == null) {
-			return false;
-		}
-
-		if (f instanceof DefaultViewPanel) {
-			MapControl mapControl = ((DefaultViewPanel)f).getMapControl();
-			FLayer[] layers=mapControl.getMapContext().getLayers().getActives();
-			FLayer layer;
-			for (int i=0;i<layers.length;i++){
-				layer = layers[i];
-				if (!layer.isAvailable()){
-					continue;
-				}
-//				try {
-					if (layer instanceof FLyrVect && ((FLyrVect)layer).getFeatureStore().isEditing()){
-						return true;
-					}
-//				} catch (ReadException e) {
-//					// TODO Auto-generated catch block
-//					e.printStackTrace();
-//				}
-			}
-		}
-		return false;
-	}
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/RedoViewExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/RedoViewExtension.java	(revision 46038)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/RedoViewExtension.java	(revision 46039)
@@ -1,134 +0,0 @@
-/**
- * gvSIG. Desktop Geographic Information System.
- *
- * Copyright (C) 2007-2013 gvSIG Association.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 3
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA  02110-1301, USA.
- *
- * For any additional information, do not hesitate to contact us
- * at info AT gvsig.com, or visit our website www.gvsig.com.
- */
-package org.gvsig.app.extension;
-
-import org.gvsig.andami.IconThemeHelper;
-import org.gvsig.andami.PluginServices;
-import org.gvsig.andami.messages.NotificationManager;
-import org.gvsig.andami.plugins.Extension;
-import org.gvsig.app.ApplicationLocator;
-import org.gvsig.app.project.documents.view.gui.DefaultViewPanel;
-import org.gvsig.fmap.mapcontext.layers.FLayer;
-import org.gvsig.fmap.mapcontext.layers.FLayers;
-import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
-import org.gvsig.fmap.mapcontrol.MapControl;
-import org.gvsig.tools.undo.RedoException;
-
-
-
-/**
- * Extensión encargada de gestionar el rehacer un comando anteriormente
- * deshecho.
- *
- * @author Vicente Caballero Navarro
- */
-public class RedoViewExtension extends Extension {
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#initialize()
-	 */
-	public void initialize() {
-        IconThemeHelper.registerIcon("action", "edit-redo", this);
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#execute(java.lang.String)
-	 */
-	public void execute(String s) {
-		DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow();
-		MapControl mapControl = vista.getMapControl();
-
-		if (s.compareTo("edit-redo-layer") == 0) {
-			try {
-					FLayers layers=mapControl.getMapContext().getLayers();
-					for (int i=0;i<layers.getLayersCount();i++){
-						if (layers.getLayer(i) instanceof FLyrVect && layers.getLayer(i).isEditing() && layers.getLayer(i).isActive()){
-							((FLyrVect)layers.getLayer(i)).getFeatureStore().redo();
-							mapControl.drawMap(false);
-							ApplicationLocator.getManager().refreshMenusAndToolBars();
-						}
-
-					}
-			} catch (RedoException e) {
-				NotificationManager.addError(e.getMessage(),e);
-			}
-		}
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#isEnabled()
-	 */
-	public boolean isEnabled() {
-		DefaultViewPanel vista = (DefaultViewPanel) PluginServices.getMDIManager().getActiveWindow();
-		MapControl mapControl = vista.getMapControl();
-		FLayers layers=mapControl.getMapContext().getLayers();
-		for (int i=0;i<layers.getLayersCount();i++){
-//			try {
-				if (layers.getLayer(i) instanceof FLyrVect && ((FLyrVect)layers.getLayer(i)).getFeatureStore().isEditing() && layers.getLayer(i).isActive()){
-					return ((FLyrVect)layers.getLayer(i)).getFeatureStore().canRedo();
-				}
-//			} catch (ReadException e) {
-//				// TODO Auto-generated catch block
-//				e.printStackTrace();
-//			} catch (DataException e) {
-//				// TODO Auto-generated catch block
-//				e.printStackTrace();
-//			}
-
-		}
-		return false;
-	}
-
-	/**
-	 * @see org.gvsig.andami.plugins.IExtension#isVisible()
-	 */
-	public boolean isVisible() {
-		org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager()
-															 .getActiveWindow();
-
-		if (f == null) {
-			return false;
-		}
-
-		if (f instanceof DefaultViewPanel) {
-			MapControl mapControl = ((DefaultViewPanel)f).getMapControl();
-			FLayer[] layers=mapControl.getMapContext().getLayers().getActives();
-			FLayer layer;
-			for (int i=0;i<layers.length;i++){
-				layer = layers[i];
-				if (!layer.isAvailable()){
-					continue;
-				}
-//				try {
-					if (layer instanceof FLyrVect && ((FLyrVect)layer).getFeatureStore().isEditing()){
-						return true;
-					}
-//				} catch (ReadException e) {
-//					// TODO Auto-generated catch block
-//					e.printStackTrace();
-//				}
-			}
-		}
-		return false;
-	}
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoRedoViewExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoRedoViewExtension.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoRedoViewExtension.java	(revision 46039)
@@ -0,0 +1,189 @@
+/**
+ * gvSIG. Desktop Geographic Information System.
+ *
+ * Copyright (C) 2007-2013 gvSIG Association.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA  02110-1301, USA.
+ *
+ * For any additional information, do not hesitate to contact us
+ * at info AT gvsig.com, or visit our website www.gvsig.com.
+ */
+package org.gvsig.app.extension;
+
+import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginServices;
+import org.gvsig.andami.plugins.Extension;
+import org.gvsig.andami.ui.mdiManager.MDIManager;
+import org.gvsig.andami.ui.mdiManager.SingletonWindow;
+import org.gvsig.app.ApplicationLocator;
+import org.gvsig.app.ApplicationManager;
+import org.gvsig.app.gui.command.CommandStackDialog;
+import org.gvsig.app.project.documents.view.gui.IView;
+import org.gvsig.fmap.dal.feature.FeatureStore;
+import org.gvsig.fmap.mapcontext.layers.FLayer;
+import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
+import org.gvsig.fmap.mapcontrol.MapControl;
+import org.gvsig.tools.undo.RedoException;
+import org.gvsig.tools.undo.UndoException;
+
+/**
+ * Extensión encargada de gestionar el deshacer los comandos anteriormente
+ * aplicados.
+ *
+ * @author Vicente Caballero Navarro
+ */
+public class UndoRedoViewExtension extends Extension {
+
+    @Override
+    public void initialize() {
+        IconThemeHelper.registerIcon("action", "edit-undo", this);
+        IconThemeHelper.registerIcon("action", "edit-redo", this);
+        IconThemeHelper.registerIcon("action", "edit-undo-redo-actions", this);        
+    }
+
+    @Override
+    public void execute(String s) {
+        switch (s) {
+            case "edit-undo-layer":
+                undo();
+                break;
+            case "edit-redo-layer":
+                redo();
+                break;
+            case "edit-undo-redo-actions-layer":
+                showHistory();
+                break;
+                
+        }
+    }
+
+    private void undo() {
+        try {
+            FLyrVect layer = getActiveAndEditingLayer();
+            if (layer == null) {
+                return;
+            }
+            if (!layer.getFeatureStore().canUndo()) {
+                return;
+            }
+            ApplicationManager application = ApplicationLocator.getApplicationManager();
+            IView vista = (IView) application.getActiveWindow();
+            layer.getFeatureStore().undo();
+            vista.getMapControl().drawMap(false);
+            application.refreshMenusAndToolBars();
+        } catch (UndoException ex) {
+            logger.warn("Can't undo", ex);
+        }
+    }
+    
+    private void showHistory() {
+        FLyrVect layer = getActiveAndEditingLayer();
+        if (layer == null) {
+            return;
+        }
+        ApplicationManager application = ApplicationLocator.getApplicationManager();
+        MDIManager uiManager = application.getUIManager();
+        FeatureStore featureStore = layer.getFeatureStore();
+        CommandStackDialog csd = new CommandStackDialog();
+        csd.setModel(featureStore);
+        csd.setLabelModel(featureStore.getName());
+        uiManager.addWindow(csd);
+
+    }
+    
+    private void redo() {
+        try {
+            FLyrVect layer = getActiveAndEditingLayer();
+            if (layer == null) {
+                return;
+            }
+            if (!layer.getFeatureStore().canRedo()) {
+                return;
+            }
+            ApplicationManager application = ApplicationLocator.getApplicationManager();
+            IView vista = (IView) application.getActiveWindow();
+            layer.getFeatureStore().redo();
+            vista.getMapControl().drawMap(false);
+            application.refreshMenusAndToolBars();
+        } catch (RedoException ex) {
+            logger.warn("Can't undo", ex);
+        }
+    }
+
+    @Override
+    public boolean canQueryByAction() {
+        return true;
+    }
+
+    
+    @Override
+    public boolean isEnabled(String action) {
+        FLyrVect layer = getActiveAndEditingLayer();
+        switch (action) {
+            case "edit-undo-layer":
+                if (layer == null) {
+                    return false;
+                }
+                return layer.getFeatureStore().canUndo();
+            case "edit-redo-layer":
+                if (layer == null) {
+                    return false;
+                }
+                return layer.getFeatureStore().canRedo();
+            case "edit-undo-redo-actions-layer":
+                return true;
+            default:
+                return false;
+        }
+
+    }
+
+    private FLyrVect getActiveAndEditingLayer() {
+        ApplicationManager application = ApplicationLocator.getApplicationManager();
+        IView vista = (IView) application.getActiveWindow();
+        MapControl mapControl = vista.getMapControl();
+        FLayer[] activeLayers = mapControl.getMapContext().getLayers().getActives();
+        if (activeLayers.length != 1) {
+            return null;
+        }
+        FLayer layer = activeLayers[0];
+        if (layer instanceof FLyrVect && ((FLyrVect) layer).getFeatureStore().isEditing()) {
+            return (FLyrVect) layer;
+        }
+        return null;
+
+    }
+
+    @Override
+    public boolean isVisible(String action) {
+        ApplicationManager application = ApplicationLocator.getApplicationManager();
+        if(!(application.getActiveWindow() instanceof IView)) {
+            return false;
+        }
+
+        return getActiveAndEditingLayer()!=null;
+    }
+    
+    @Override
+    public boolean isEnabled() {
+        return true;
+    }
+
+    @Override
+    public boolean isVisible() {
+        return true;
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/java/org/gvsig/app/extension/UndoRedoViewExtension.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml	(revision 46038)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.app/org.gvsig.app.mainplugin/src/main/resources-plugin/config.xml	(revision 46039)
@@ -1311,9 +1311,9 @@
         </extension>
 
 
-            <extension class-name="org.gvsig.app.extension.UndoViewExtension"
-      description="Extensión encargada de deshacer la edición sobre la capa activa."
-      active="true" >
+    <extension class-name="org.gvsig.app.extension.UndoRedoViewExtension"
+            description="Extensión encargada de hacer/deshacer la edición sobre la capa activa y mostrar el histórico."
+            active="true" >
 
             <action
                 name="edit-undo-layer"
@@ -1325,21 +1325,6 @@
                 accelerator=""
                 />
 
-            <menu
-                name="edit-undo-layer"
-                text="Edit/_Undo"
-                />
-
-            <tool-bar name="edit">
-                <action-tool name="edit-undo-layer"/>
-            </tool-bar>
-
-    </extension>
-
-    <extension class-name="org.gvsig.app.extension.RedoViewExtension"
-            description="Extensión encargada de rehacer la edición sobre la capa activa."
-            active="true">
-
             <action
                 name="edit-redo-layer"
                 label="_Redo"
@@ -1350,22 +1335,7 @@
                 accelerator=""
                 />
 
-            <menu
-                name="edit-redo-layer"
-                text="Edit/_Redo"
-                />
-
-            <tool-bar name="edit">
-                <action-tool name="edit-redo-layer"/>
-            </tool-bar>
-
-        </extension>
-
-    <extension class-name="org.gvsig.app.extension.ViewCommandStackExtension"
-      description="Extensión encargada de administrar la pila de comados de edición sobre una vista."
-      active="true">
-
-            <action
+                <action
                 name="edit-undo-redo-actions-layer"
                 label="_Undo_redo_history"
                 tooltip="_Undo_redo_history"
@@ -1376,14 +1346,25 @@
                 />
 
             <menu
+                name="edit-undo-layer"
+                text="Edit/_Undo"
+                />
+
+            <menu
+                name="edit-redo-layer"
+                text="Edit/_Redo"
+                />
+
+            <menu
                 name="edit-undo-redo-actions-layer"
                 text="Edit/_Undo_redo_history"
                 />
-
+            
             <tool-bar name="edit">
+                <action-tool name="edit-undo-layer"/>
+                <action-tool name="edit-redo-layer"/>
                 <action-tool name="edit-undo-redo-actions-layer"/>
             </tool-bar>
-
     </extension>
 
 
@@ -1420,31 +1401,6 @@
             </tool-bar>
         </extension>
 
-<!--        <extension class-name="org.gvsig.app.extension.clipboard.PasteFeaturesFromClipboardExtension"
-            description="Paste features from system clipboard into editing layer"
-            active="true">
-
-            <action
-                name="layer-modify-clipboard-paste"
-                label="_Paste_features_from_clipboard"
-                tooltip="_Paste_features_from_clipboard"
-                position="601105100"
-                action-command="layer-modify-clipboard-paste"
-                icon="layer-modify-clipboard-paste"
-                accelerator=""
-                />
-
-            <menu
-                name="layer-modify-clipboard-paste"
-                text="Layer/Modify/_Paste_features_from_clipboard"
-                />
-
-            <tool-bar name="edit">
-                <action-tool
-                    name="layer-modify-clipboard-paste"
-                    />
-            </tool-bar>
-        </extension>-->
        <extension class-name="org.gvsig.app.extension.clipboard.PasteAlphanumericValuesFromClipboardExtension"
             description="Paste alphanumeric values from system clipboard into editing feature"
             active="true">
