Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageServiceFrame.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageServiceFrame.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageServiceFrame.java	(revision 43126)
@@ -35,8 +35,8 @@
 import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
 import org.gvsig.installer.main.utils.FrameWizardListener;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
 import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
+import org.gvsig.installer.swing.api.execution.InstallWizardPanel;
 import org.gvsig.tools.locator.LocatorException;
 
 /**
@@ -45,24 +45,24 @@
 public class InstallPackageServiceFrame extends JFrame {
 
 	private static final long serialVersionUID = -5107758157530922356L;
-	private AbstractInstallPackageWizard installerExecutionWizard;
+        private final InstallWizardPanel installerExecutionWizard;
 
 	public InstallPackageServiceFrame(File applicationFolder, File installFolder)
 			throws LocatorException, InstallPackageWizardException {
 		super();
 		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-		installerExecutionWizard = SwingInstallerLocator
+		this.installerExecutionWizard = SwingInstallerLocator
 				.getSwingInstallerManager().createInstallPackageWizard(
 						applicationFolder, installFolder);
 		installerExecutionWizard
 				.setWizardActionListener(new FrameWizardListener(this));
-		this.add(installerExecutionWizard);
+		this.add(installerExecutionWizard.asJComponent());
 		pack();
 	}
 
-	public void installFromDefaultDirectory()
-			throws InstallPackageServiceException {
-		installerExecutionWizard.installFromDefaultDirectory();
-	}
+//	public void installFromDefaultDirectory()
+//			throws InstallPackageServiceException {
+//		installerExecutionWizard.installFromDefaultDirectory();
+//	}
 
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardFromDefaultDirectoryLauncher.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardFromDefaultDirectoryLauncher.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/execution/InstallPackageWizardFromDefaultDirectoryLauncher.java	(revision 43126)
@@ -55,7 +55,7 @@
 
 		InstallPackageServiceFrame frame = new InstallPackageServiceFrame(
 				getApplicationFolder(), getInstallFolder());
-		frame.installFromDefaultDirectory();
+//		frame.installFromDefaultDirectory();
 		frame.setVisible(true);
 	}
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageFrame.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageFrame.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.main/src/main/java/org/gvsig/installer/main/creation/MakePluginPackageFrame.java	(revision 43126)
@@ -55,7 +55,7 @@
 						applicationFolder, installFolder);
 		installerCreationWizard
 				.setWizardActionListener(new FrameWizardListener(this));
-		this.add(installerCreationWizard);
+		this.add(installerCreationWizard.asJComponent());
 		pack();
 	}
 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/execution/InstallPackageService.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/execution/InstallPackageService.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/execution/InstallPackageService.java	(revision 43126)
@@ -31,6 +31,7 @@
 import java.io.File;
 import java.net.URL;
 import java.util.List;
+import java.util.Properties;
 
 import org.gvsig.installer.lib.api.InstallerManager;
 import org.gvsig.installer.lib.api.PackageInfo;
@@ -62,12 +63,12 @@
 	 * bundle is a compressed zip file with a structure defined in the
 	 * {@link InstallerManager} class.
 	 * 
-	 * @param bundleURI
-	 *            the URI of a bundle.
+         * @param bundleFile
+         * @param taskStatus
 	 * @throws InstallPackageServiceException
 	 *             it is thrown if there is an exception reading the URI.
 	 */
-	public void addBundle(File bundleFile)
+	public void addBundle(File bundleFile, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException;
 
 	/**
@@ -77,11 +78,12 @@
 	 * 
 	 * @param bundleURL
 	 *            the {@link URL} of a bundle.
+         * @param taskStatus
 	 * @throws InstallPackageServiceException
 	 *             it is thrown if there is an exception reading the {@link URL}
 	 *             .
 	 */
-	public void addBundle(URL bundleURL) throws InstallPackageServiceException;
+	public void addBundle(URL bundleURL, SimpleTaskStatus taskStatus) throws InstallPackageServiceException;
 
 	/**
 	 * In reads a directory and reads all the bundles. This method retrieve all
@@ -90,10 +92,11 @@
 	 * 
 	 * @param bundlesDirectory
 	 *            a directory that contains bundles.
+         * @param taskStatus
 	 * @throws InstallPackageServiceException
 	 *             If there is any problem reading the directory of bundles.
 	 */
-	public void addBundlesFromDirectory(File bundlesDirectory)
+	public void addBundlesFromDirectory(File bundlesDirectory, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException;
 
 	/**
@@ -172,14 +175,17 @@
 			SimpleTaskStatus taskStatus) throws InstallPackageServiceException;
 
 	/**
-     * 
-     */
-	// public void resetPackages();
-
-	/**
 	 * @return
 	 */
 	public List<String> getDefaultSelectedPackagesIDs();
+        
+        /**
+         * Get the proprties associates to this bundle.
+         * Return an empty Propertis if the bundle dont have a properties.
+         * 
+         * @return 
+         */
+        public Properties getProperties();
 
 	/**
 	 * Gets the list of all the categories of *all* the packages.
@@ -194,4 +200,8 @@
 	 * @return a list with the types of packages.
 	 */
 	public List<String> getTypes();
+        
+        public boolean needInstallPackageProviders();
+        
+        public void installPackageProviders(SimpleTaskStatus taskStatus);
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.spi/src/main/java/org/gvsig/installer/lib/spi/InstallPackageProviderServices.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.spi/src/main/java/org/gvsig/installer/lib/spi/InstallPackageProviderServices.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.spi/src/main/java/org/gvsig/installer/lib/spi/InstallPackageProviderServices.java	(revision 43126)
@@ -33,11 +33,13 @@
 import java.io.OutputStream;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException;
 import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
 import org.gvsig.tools.service.spi.ProviderServices;
+import org.gvsig.tools.task.SimpleTaskStatus;
 
 /**
  * Services that can be used by the providers to create or exceute the bundle.
@@ -135,7 +137,7 @@
 	 */
 	public void readPackageSetInfo(InputStream is,
 			List<PackageInfo> packageInfos,
-			Map<PackageInfo, String> zipEntriesMap)
+			Map<PackageInfo, String> zipEntriesMap, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException;
 
 	/**
@@ -153,7 +155,7 @@
 	 *             if there is a problem reading the bundle.
 	 */
 	public void readPackageInfo(InputStream is, List<PackageInfo> packageInfos,
-			Map<PackageInfo, String> zipEntriesMap, String name)
+			Map<PackageInfo, String> zipEntriesMap, String name, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException;
 
 	/**
@@ -212,4 +214,5 @@
 
 	public List<String> getDefaultSelectedPackagesIDs();
 
+        public Properties getProperties();
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/utils/Decompress.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/utils/Decompress.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/utils/Decompress.java	(revision 43126)
@@ -37,6 +37,7 @@
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipException;
 import java.util.zip.ZipInputStream;
@@ -45,16 +46,15 @@
 import org.slf4j.LoggerFactory;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
 import org.gvsig.installer.lib.impl.DefaultPackageInfo;
 import org.gvsig.installer.lib.impl.info.InstallerInfoFileReader;
 import org.gvsig.installer.lib.spi.InstallerInfoFileException;
 import org.gvsig.installer.lib.spi.InstallerProviderLocator;
-import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.service.ServiceException;
 import org.gvsig.tools.task.SimpleTaskStatus;
-import org.gvsig.tools.task.TaskStatusManager;
 
 /**
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
@@ -77,11 +77,18 @@
 	private List<PackageInfo> selectedInstallerInfos = null;
 	private Map<PackageInfo, String> zipEntriesMap = null;
 	private List<String> defaultSelectedPackets = null;
-
+        private Properties properties;
+        private SimpleTaskStatus taskStatus = null;
+        
 	public Decompress() {
-
+            this.properties = new Properties();
 	}
-
+        
+	public Decompress(SimpleTaskStatus taskStatus) {
+            this();
+            this.taskStatus = taskStatus;
+        }
+        
 	public void decompressPlugins(InputStream is, File outputDirectory)
 			throws InstallPackageServiceException {
 		option = OPTION_DECOMPRESS;
@@ -231,7 +238,19 @@
 
 					defaultSelectedPackets = defaultPackagesList;
 					out.flush();
-				} else {
+                                } else if (entry.getName().equals("packages.properties") ) {
+                                    int count;
+                                    byte data[] = new byte[BUFFER];
+                                    ByteArrayOutputStream out = new ByteArrayOutputStream();
+
+                                    while ((count = zipInputStream.read(data, 0, BUFFER)) != -1) {
+                                            out.write(data, 0, count);
+                                    }
+                                    InputStream in = new ByteArrayInputStream(out.toByteArray());
+                                    properties.load(in);
+                                    IOUtils.closeQuietly(in);
+                                    IOUtils.closeQuietly(out);
+                                } else {
 //					logger.debug("Extracting all Plugins, plugin: " + name);
 					if (option == OPTION_INSTALL) {
 
@@ -318,29 +337,19 @@
 		byte data[] = new byte[BUFFER];
 		int count = 0;
 
-		TaskStatusManager manager = ToolsLocator.getTaskStatusManager();
-		SimpleTaskStatus taskStatus = manager
-				.createDefaultSimpleTaskStatus("Uncompressing...");
-		
-		manager.add(taskStatus);
 		int countRootFolders = 0;
 		String entryName = "(header)";
 		try {
 			long readed = 0;
-	
-			// // First read all the contents size
-			// zis = new ZipInputStream(inputStream);
-			// while ((entry = zis.getNextEntry()) != null) {
-			// count += entry.getSize();
-			// }
-			// // zis.close();
-			// taskStatus.setRangeOfValues(0, count);
-	
-			// Return the stream to the initial position
+                        if( taskStatus!=null ) {
+                            taskStatus.push();
+                        }
 			zis = new ZipInputStream(inputStream);
 			while ((entry = zis.getNextEntry()) != null) {
 				entryName = FilenameUtils.separatorsToSystem(entry.getName());
-				taskStatus.message(entryName);
+                                if( taskStatus!=null ) {
+                                    taskStatus.message(entryName);
+                                }
 	
 				File file = new File(outputDirectory, entryName);
 				if (file.exists()) {
@@ -365,7 +374,9 @@
 					while ((count = zis.read(data, 0, BUFFER)) != -1) {
 						fos.write(data, 0, count);
 						readed += count;
-						taskStatus.setCurValue(readed);
+                                                if( taskStatus!=null ) {
+                                                    taskStatus.setCurValue(readed);
+                                                }
 					}
 					fos.flush();
 					fos.close();
@@ -379,14 +390,11 @@
 		} catch(RuntimeException ex) {
 			logger.warn("Problems uncompresing plugin (last entry '"+entryName+"'.",ex);
 			throw ex;
-			
-		} finally {
-		    
-		    taskStatus.remove();
-		    
-		}
-		
-        
+                } finally {
+                    if( taskStatus!=null ) {
+                        taskStatus.pop();
+                    }
+                }
 	}
 
 	private void createParentFolder(File file) {
@@ -435,7 +443,9 @@
 		InstallerInfoFileReader installerInfoFileReader = new InstallerInfoFileReader();
 		installerInfoFileReader.read(installerInfo, new ByteArrayInputStream(
 				out.toByteArray()));
-
+                if( taskStatus!=null ) {                
+                    taskStatus.message(installerInfo.getName());
+                }
 		return installerInfo;
 	}
 
@@ -447,4 +457,8 @@
 	public List<String> getDefaultSelectedPackages() {
 		return defaultSelectedPackets;
 	}
+        
+	public Properties getProperties() {
+		return properties;
+	}
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/DefaultInstallerProviderServices.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/DefaultInstallerProviderServices.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/DefaultInstallerProviderServices.java	(revision 43126)
@@ -33,6 +33,7 @@
 import java.io.OutputStream;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException;
@@ -45,6 +46,7 @@
 import org.gvsig.installer.lib.spi.InstallerInfoFileException;
 import org.gvsig.installer.lib.spi.InstallerProviderLocator;
 import org.gvsig.tools.service.spi.AbstractProviderServices;
+import org.gvsig.tools.task.SimpleTaskStatus;
 
 /**
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
@@ -52,7 +54,8 @@
 public class DefaultInstallerProviderServices extends AbstractProviderServices
 		implements InstallPackageProviderServices {
 
-	private List<String> defaultSelectedPacketsIDs = null;
+    private List<String> defaultSelectedPacketsIDs = null;
+    private Properties properties;
 
 	// private static final Logger LOG = LoggerFactory
 	// .getLogger(DefaultInstallerProviderServices.class);
@@ -156,28 +159,36 @@
 		return decompress.searchPlugin(is, zipEntry);
 	}
 
+    @Override
 	public void readPackageSetInfo(InputStream is,
 			List<PackageInfo> installerInfos,
-			Map<PackageInfo, String> zipEntriesMap)
+			Map<PackageInfo, String> zipEntriesMap, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException {
-		Decompress decompress = new Decompress();
-		decompress
-				.readPackageSetInstallInfos(is, installerInfos, zipEntriesMap);
+		Decompress decompress = new Decompress(taskStatus);
+		decompress.readPackageSetInstallInfos(is, installerInfos, zipEntriesMap);
 
 		defaultSelectedPacketsIDs = decompress.getDefaultSelectedPackages();
+                properties = decompress.getProperties();
 	}
 
+    @Override
 	public void readPackageInfo(InputStream is,
 			List<PackageInfo> installerInfos,
-			Map<PackageInfo, String> zipEntriesMap, String name)
+			Map<PackageInfo, String> zipEntriesMap, String name, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException {
 
-		Decompress decompress = new Decompress();
+		Decompress decompress = new Decompress(taskStatus);
 		decompress.readPackageInstallInfo(is, installerInfos, zipEntriesMap,
 				name);
 	}
 
-	public List<String> getDefaultSelectedPackagesIDs() {
-		return defaultSelectedPacketsIDs;
-	}
+    @Override
+    public List<String> getDefaultSelectedPackagesIDs() {
+            return defaultSelectedPacketsIDs;
+    }
+
+    @Override
+    public Properties getProperties() {
+            return properties;
+    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/execution/DefaultInstallPackageService.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/execution/DefaultInstallPackageService.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/execution/DefaultInstallPackageService.java	(revision 43126)
@@ -3,29 +3,27 @@
  *
  * 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 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.
+ * 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.
+ * 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.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
 /*
  * AUTHORS (In addition to CIT):
  * 2010 {Prodevelop}   {Task}
  */
-
 package org.gvsig.installer.lib.impl.execution;
 
 import java.io.BufferedInputStream;
@@ -43,7 +41,9 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Properties;
 import java.util.Set;
+import org.apache.commons.lang3.StringUtils;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -68,518 +68,565 @@
 /**
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
  */
-
 public class DefaultInstallPackageService extends Thread implements
-		InstallPackageService {
+        InstallPackageService {
 
-	private static final Logger LOG = LoggerFactory
-			.getLogger(DefaultInstallPackageService.class);
-	
-	private static final String PACKAGE_FILE_NAME = "packages.gvspki";
+    private static final Logger LOG = LoggerFactory
+            .getLogger(DefaultInstallPackageService.class);
 
-	private Map<PackageInfo, File> packageInfoFileMap = null;
-	private Map<PackageInfo, String> zipEntriesMap = null;
-	private List<PackageInfo> packageInfos = null;
-	private InstallerManager manager;
-	private InstallPackageProviderServices installerProviderServices = null;
+    private static final String PACKAGE_FILE_NAME = "packages.gvspki";
 
-	public DefaultInstallPackageService(DefaultInstallerManager manager) {
-		super();
-		this.manager = manager;
-		this.reset();
-	}
+    private Map<PackageInfo, File> packageInfoFileMap = null;
+    private Map<PackageInfo, String> zipEntriesMap = null;
+    private List<PackageInfo> packageInfos = null;
+    private InstallerManager manager;
+    private InstallPackageProviderServices installerProviderServices = null;
 
-	public void reset() {
-		packageInfoFileMap = new HashMap<PackageInfo, File>();
-		packageInfos = new ArrayList<PackageInfo>();
-		zipEntriesMap = new HashMap<PackageInfo, String>();
-		installerProviderServices = InstallerProviderLocator
-				.getProviderManager().createInstallerProviderServices();
-	}
+    public DefaultInstallPackageService(DefaultInstallerManager manager) {
+        super();
+        this.manager = manager;
+        this.reset();
+    }
 
-	public class InstallerApplicationDirectoryNotFoundException extends
-			InstallPackageServiceException {
+    public void reset() {
+        packageInfoFileMap = new HashMap<PackageInfo, File>();
+        packageInfos = new ArrayList<PackageInfo>();
+        zipEntriesMap = new HashMap<PackageInfo, String>();
+        installerProviderServices = InstallerProviderLocator
+                .getProviderManager().createInstallerProviderServices();
+    }
 
-		private static final long serialVersionUID = -1130408094135962456L;
+    public class InstallerApplicationDirectoryNotFoundException extends
+            InstallPackageServiceException {
 
-		private static final String message = "Aplication directory '%(directory)s' not found";
+        private static final long serialVersionUID = -1130408094135962456L;
 
-		private static final String KEY = "_aplication_directory_XdirectoryX_not_found";
+        private static final String message = "Aplication directory '%(directory)s' not found";
 
-		public InstallerApplicationDirectoryNotFoundException(File file) {
-			super(message, KEY, serialVersionUID);
-			setValue("directory", file.toString());
-		}
+        private static final String KEY = "_aplication_directory_XdirectoryX_not_found";
 
-	}
+        public InstallerApplicationDirectoryNotFoundException(File file) {
+            super(message, KEY, serialVersionUID);
+            setValue("directory", file.toString());
+        }
 
-	public class InstallerNoDirectoryException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = -8685263049644983769L;
+    public class InstallerNoDirectoryException extends
+            InstallPackageServiceException {
 
-		private static final String message = "'%(directory)s' is not a directory";
+        private static final long serialVersionUID = -8685263049644983769L;
 
-		private static final String KEY = "_XdirectoryX_is_not_a_directory";
+        private static final String message = "'%(directory)s' is not a directory";
 
-		public InstallerNoDirectoryException(File file) {
-			super(message, KEY, serialVersionUID);
-			setValue("directory", file.toString());
-		}
+        private static final String KEY = "_XdirectoryX_is_not_a_directory";
 
-	}
+        public InstallerNoDirectoryException(File file) {
+            super(message, KEY, serialVersionUID);
+            setValue("directory", file.toString());
+        }
 
-	public class InstallerFileNotFoundException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = 556517830330132149L;
+    public class InstallerFileNotFoundException extends
+            InstallPackageServiceException {
 
-		private static final String message = "File '%(file)s' not found";
+        private static final long serialVersionUID = 556517830330132149L;
 
-		private static final String KEY = "_file_XfileX_not_found";
+        private static final String message = "File '%(file)s' not found";
 
-		public InstallerFileNotFoundException(File file) {
-			super(message, KEY, serialVersionUID);
-			setValue("file", file.toString());
-		}
+        private static final String KEY = "_file_XfileX_not_found";
 
-	}
+        public InstallerFileNotFoundException(File file) {
+            super(message, KEY, serialVersionUID);
+            setValue("file", file.toString());
+        }
 
-	public class InstallerBundleNotFoundException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = 5065410511582625301L;
+    public class InstallerBundleNotFoundException extends
+            InstallPackageServiceException {
 
-		private static final String message = "File '%(file)s' not found";
+        private static final long serialVersionUID = 5065410511582625301L;
 
-		private static final String KEY = "_file_XfileX_not_found";
+        private static final String message = "File '%(file)s' not found";
 
-		public InstallerBundleNotFoundException(File file,
-				FileNotFoundException e) {
-			super(message, e, KEY, serialVersionUID);
-			setValue("file", file.toString());
-		}
+        private static final String KEY = "_file_XfileX_not_found";
 
-	}
+        public InstallerBundleNotFoundException(File file,
+                FileNotFoundException e) {
+            super(message, e, KEY, serialVersionUID);
+            setValue("file", file.toString());
+        }
 
-	public class InstallerIOException extends InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = 3153613550157712363L;
+    public class InstallerIOException extends InstallPackageServiceException {
 
-		private static final String message = "IO error installing the file '%(file)s'";
+        private static final long serialVersionUID = 3153613550157712363L;
 
-		private static final String KEY = "_IO_error installing_file_XfileX_";
+        private static final String message = "IO error installing the file '%(file)s'";
 
-		public InstallerIOException(File file, IOException e) {
-			super(message, e, KEY, serialVersionUID);
-			setValue("file", file.toString());
-		}
+        private static final String KEY = "_IO_error installing_file_XfileX_";
 
-	}
+        public InstallerIOException(File file, IOException e) {
+            super(message, e, KEY, serialVersionUID);
+            setValue("file", file.toString());
+        }
 
-	public class InstallerFileDownloadException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = 8640183295766490512L;
+    public class InstallerFileDownloadException extends
+            InstallPackageServiceException {
 
-		private static final String message = "File '%(url)s' download error";
+        private static final long serialVersionUID = 8640183295766490512L;
 
-		private static final String KEY = "_File_XurlX_download_error";
+        private static final String message = "File '%(url)s' download error";
 
-		public InstallerFileDownloadException(URL url, IOException e) {
-			super(message, e, KEY, serialVersionUID);
-			setValue("url", url.toString());
-		}
+        private static final String KEY = "_File_XurlX_download_error";
 
-	}
+        public InstallerFileDownloadException(URL url, IOException e) {
+            super(message, e, KEY, serialVersionUID);
+            setValue("url", url.toString());
+        }
 
-	public class InstallerPackageNotFoundException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = 1726608498886963868L;
+    public class InstallerPackageNotFoundException extends
+            InstallPackageServiceException {
 
-		private static final String message = "Package not found";
+        private static final long serialVersionUID = 1726608498886963868L;
 
-		private static final String KEY = "_package_not_found";
+        private static final String message = "Package not found";
 
-		public InstallerPackageNotFoundException() {
-			super(message, KEY, serialVersionUID);
-		}
+        private static final String KEY = "_package_not_found";
 
-	}
+        public InstallerPackageNotFoundException() {
+            super(message, KEY, serialVersionUID);
+        }
 
-	public class InstallerNoPackageException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = -2292735515704746966L;
+    public class InstallerNoPackageException extends
+            InstallPackageServiceException {
 
-		private static final String message = "Package does not exist";
+        private static final long serialVersionUID = -2292735515704746966L;
 
-		private static final String KEY = "_package__does_not_exist";
+        private static final String message = "Package does not exist";
 
-		public InstallerNoPackageException() {
-			super(message, KEY, serialVersionUID);
-		}
+        private static final String KEY = "_package__does_not_exist";
 
-	}
+        public InstallerNoPackageException() {
+            super(message, KEY, serialVersionUID);
+        }
 
-	public class InstallerProviderCreationException extends
-			InstallPackageServiceException {
+    }
 
-		private static final long serialVersionUID = -7985786807492393584L;
+    public class InstallerProviderCreationException extends
+            InstallPackageServiceException {
 
-		private static final String message = "Error creating the provider";
+        private static final long serialVersionUID = -7985786807492393584L;
 
-		private static final String KEY = "_Error_creating_the_provider";
+        private static final String message = "Error creating the provider";
 
-		public InstallerProviderCreationException(ServiceException e) {
-			super(message, e, KEY, serialVersionUID);
-		}
+        private static final String KEY = "_Error_creating_the_provider";
 
-	}
+        public InstallerProviderCreationException(ServiceException e) {
+            super(message, e, KEY, serialVersionUID);
+        }
 
-	public void installPackage(File applicationDirectory,
-			PackageInfo packageInfo) throws InstallPackageServiceException {
-		if (!applicationDirectory.exists()) {
-			LOG.warn("Can install package '"+packageInfo.getCode()+"', application folder '"+applicationDirectory.toString()+"' does not exits.");
-			throw new InstallerApplicationDirectoryNotFoundException(
-					applicationDirectory);
-		}
-		if (!packageInfoFileMap.containsKey(packageInfo)) {
-			LOG.warn("Can install package '"+packageInfo.getCode()+"', package not found.");
-			throw new InstallerPackageNotFoundException();
-		}
+    }
 
-		InstallPackageProvider installerExecutionProvider = createProvider(packageInfo);
+    public void installPackage(File applicationDirectory,
+            PackageInfo packageInfo) throws InstallPackageServiceException {
+        if (!applicationDirectory.exists()) {
+            LOG.warn("Can install package '" + packageInfo.getCode() + "', application folder '" + applicationDirectory.toString() + "' does not exits.");
+            throw new InstallerApplicationDirectoryNotFoundException(
+                    applicationDirectory);
+        }
+        if (!packageInfoFileMap.containsKey(packageInfo)) {
+            LOG.warn("Can install package '" + packageInfo.getCode() + "', package not found.");
+            throw new InstallerPackageNotFoundException();
+        }
 
-		// Get the package or package set file
-		File file = packageInfoFileMap.get(packageInfo);
-		if (file == null) {
-			if (packageInfo.getDownloadURL() == null) {
-				throw new InstallerPackageNotFoundException();
-			}
-			this.downloadPackage(packageInfo);
-			file = packageInfoFileMap.get(packageInfo);
-		}
+        InstallPackageProvider installerExecutionProvider = createProvider(packageInfo);
 
-		// Open and install the package or package set file
-		try {
+        // Get the package or package set file
+        File file = packageInfoFileMap.get(packageInfo);
+        if (file == null) {
+            if (packageInfo.getDownloadURL() == null) {
+                throw new InstallerPackageNotFoundException();
+            }
+            this.downloadPackage(packageInfo);
+            file = packageInfoFileMap.get(packageInfo);
+        }
 
-			InputStream packageStream;
-			InputStream fis = new FileInputStream(file);
-			InputStream bis = new BufferedInputStream(fis);
-			if (isPackage(file)) {
-				packageStream = bis;
-			} else {
-				if (!isPackageSet(file)) {
-					LOG.info("Trying to install a package file ({0}) "
-							+ "without a known file extension. Will try "
-							+ "to install it as a package set", file);
-				}
-				packageStream = installerProviderServices.searchPackage(bis,
-						zipEntriesMap.get(packageInfo));
-			}
+        // Open and install the package or package set file
+        try {
 
-			try {
-				installerExecutionProvider.install(applicationDirectory,
-						packageStream, packageInfo);
-			} catch (InstallPackageServiceException e) {
+            InputStream packageStream;
+            InputStream fis = new FileInputStream(file);
+            InputStream bis = new BufferedInputStream(fis);
+            if (isPackage(file)) {
+                packageStream = bis;
+            } else {
+                if (!isPackageSet(file)) {
+                    LOG.info("Trying to install a package file ({0}) "
+                            + "without a known file extension. Will try "
+                            + "to install it as a package set", file);
+                }
+                packageStream = installerProviderServices.searchPackage(bis,
+                        zipEntriesMap.get(packageInfo));
+            }
 
-				packageStream.close();
-				if (bis != packageStream) {
-					bis.close();
-				}
-				fis.close();
+            try {
+                installerExecutionProvider.install(applicationDirectory,
+                        packageStream, packageInfo);
+            } catch (InstallPackageServiceException e) {
 
-				// if fails the installation, zip files need to be reopen
-				// the package will be installed into the update folder for
-				// installation after a gvSIG restart
+                packageStream.close();
+                if (bis != packageStream) {
+                    bis.close();
+                }
+                fis.close();
 
-				fis = new FileInputStream(file);
-				bis = new BufferedInputStream(fis);
-				if (isPackage(file)) {
-					packageStream = bis;
-				} else {
-					if (!isPackageSet(file)) {
-						LOG.info("Trying to install a package file ({0}) "
-								+ "without a known file extension. Will try "
-								+ "to install it as a package set", file);
-					}
-					packageStream = installerProviderServices.searchPackage(
-							bis, zipEntriesMap.get(packageInfo));
-				}
-				installerExecutionProvider.installLater(applicationDirectory,
-						packageStream, packageInfo);
-			}
+                // if fails the installation, zip files need to be reopen
+                // the package will be installed into the update folder for
+                // installation after a gvSIG restart
+                fis = new FileInputStream(file);
+                bis = new BufferedInputStream(fis);
+                if (isPackage(file)) {
+                    packageStream = bis;
+                } else {
+                    if (!isPackageSet(file)) {
+                        LOG.info("Trying to install a package file ({0}) "
+                                + "without a known file extension. Will try "
+                                + "to install it as a package set", file);
+                    }
+                    packageStream = installerProviderServices.searchPackage(
+                            bis, zipEntriesMap.get(packageInfo));
+                }
+                installerExecutionProvider.installLater(applicationDirectory,
+                        packageStream, packageInfo);
+            }
 
-			packageStream.close();
-			if (bis != packageStream) {
-				bis.close();
-			}
-			fis.close();
+            packageStream.close();
+            if (bis != packageStream) {
+                bis.close();
+            }
+            fis.close();
 
-		} catch (FileNotFoundException e) {
-			throw new InstallerFileNotFoundException(file);
-		} catch (IOException e) {
-			throw new InstallerIOException(file, e);
-		}
+        } catch (FileNotFoundException e) {
+            throw new InstallerFileNotFoundException(file);
+        } catch (IOException e) {
+            throw new InstallerIOException(file, e);
+        }
 
-	}
+    }
 
-	public void installPackage(File applicationDirectory, String packageCode)
-			throws InstallPackageServiceException {
-		PackageInfo packageInfo = getPackageInfo(packageCode);
-		if (packageInfo == null) {
-			throw new InstallerNoPackageException();
-		}
-		installPackage(applicationDirectory, packageInfo);
-	}
+    public void installPackage(File applicationDirectory, String packageCode)
+            throws InstallPackageServiceException {
+        PackageInfo packageInfo = getPackageInfo(packageCode);
+        if (packageInfo == null) {
+            throw new InstallerNoPackageException();
+        }
+        installPackage(applicationDirectory, packageInfo);
+    }
 
-	private InstallPackageProvider createProvider(PackageInfo packageInfo)
-			throws InstallPackageServiceException {
-		InstallerProviderManager installerProviderManager = (InstallerProviderManager) ((DefaultInstallerManager) manager)
-				.getProviderManager();
+    private InstallPackageProvider createProvider(PackageInfo packageInfo)
+            throws InstallPackageServiceException {
+        InstallerProviderManager installerProviderManager = (InstallerProviderManager) ((DefaultInstallerManager) manager)
+                .getProviderManager();
 
-		try {
-			return installerProviderManager.createExecutionProvider(packageInfo
-					.getType());
-		} catch (ServiceException e) {
-			throw new InstallerProviderCreationException(e);
-		}
-	}
+        try {
+            return installerProviderManager.createExecutionProvider(packageInfo
+                    .getType());
+        } catch (ServiceException e) {
+            throw new InstallerProviderCreationException(e);
+        }
+    }
 
-	public PackageInfo getPackageInfo(int index) {
-		if (index >= packageInfos.size()) {
-			return null;
-		}
-		return packageInfos.get(index);
-	}
+    public PackageInfo getPackageInfo(int index) {
+        if (index >= packageInfos.size()) {
+            return null;
+        }
+        return packageInfos.get(index);
+    }
 
-	public PackageInfo getPackageInfo(String packageCode) {
-		for (int i = 0; i < getPackageCount(); i++) {
-			if (packageInfos.get(i).getCode().equals(packageCode)) {
-				return packageInfos.get(i);
-			}
-		}
-		return null;
-	}
+    public PackageInfo getPackageInfo(String packageCode) {
+        for (int i = 0; i < getPackageCount(); i++) {
+            if (packageInfos.get(i).getCode().equals(packageCode)) {
+                return packageInfos.get(i);
+            }
+        }
+        return null;
+    }
 
-	public void addBundle(File bundle) throws InstallPackageServiceException {
+    @Override
+    public void addBundle(File bundle, SimpleTaskStatus taskStatus) throws InstallPackageServiceException {
 
-		if (!bundle.exists()) {
-			throw new InstallPackageServiceException();
-		}
+        if (!bundle.exists()) {
+            throw new InstallPackageServiceException();
+        }
 
-		int packageInfoCount = packageInfos.size();
+        int packageInfoCount = packageInfos.size();
 
-		FileInputStream fis;
-		try {
-			fis = new FileInputStream(bundle);
-		} catch (FileNotFoundException e) {
-			throw new InstallerBundleNotFoundException(bundle, e);
-		}
-		BufferedInputStream bis = new BufferedInputStream(fis);
-		if (isPackage(bundle)) {
-			installerProviderServices.readPackageInfo(bis, packageInfos,
-					zipEntriesMap, bundle.getName());
-		} else {
-			if (!isPackageSet(bundle)) {
-				LOG
-						.info(
-								"Trying to add a package file ({0}) without a known "
-										+ "file extension. Will try to add it as a package set",
-								bundle);
-			}
-			installerProviderServices.readPackageSetInfo(fis, packageInfos,
-					zipEntriesMap);
-		}
-		try {
-			bis.close();
-			fis.close();
-		} catch (IOException e) {
-			LOG.info("Error closing the input streams of the package file: "
-					+ bundle, e);
-		}
+        FileInputStream fis;
+        try {
+            fis = new FileInputStream(bundle);
+        } catch (FileNotFoundException e) {
+            throw new InstallerBundleNotFoundException(bundle, e);
+        }
+        BufferedInputStream bis = new BufferedInputStream(fis);
+        if (isPackage(bundle)) {
+            installerProviderServices.readPackageInfo(bis, packageInfos,
+                    zipEntriesMap, bundle.getName(), taskStatus);
+        } else {
+            if (!isPackageSet(bundle)) {
+                LOG
+                        .info(
+                                "Trying to add a package file ({0}) without a known "
+                                + "file extension. Will try to add it as a package set",
+                                bundle);
+            }
+            installerProviderServices.readPackageSetInfo(fis, packageInfos,
+                    zipEntriesMap, taskStatus);
+        }
+        try {
+            bis.close();
+            fis.close();
+        } catch (IOException e) {
+            LOG.info("Error closing the input streams of the package file: "
+                    + bundle, e);
+        }
 
-		for (int i = packageInfoCount; i < packageInfos.size(); i++) {
-			packageInfoFileMap.put(packageInfos.get(i), bundle);
-		}
-	}
+        for (int i = packageInfoCount; i < packageInfos.size(); i++) {
+            packageInfoFileMap.put(packageInfos.get(i), bundle);
+        }
+    }
 
-	private boolean isPackageSet(File file) {
-		return file.getName().endsWith(
-				manager.getDefaultPackageSetFileExtension());
-	}
+    private boolean isPackageSet(File file) {
+        return file.getName().endsWith(
+                manager.getDefaultPackageSetFileExtension());
+    }
 
-	private boolean isPackage(File file) {
-		return file.getName()
-				.endsWith(manager.getDefaultPackageFileExtension());
-	}
+    private boolean isPackage(File file) {
+        return file.getName()
+                .endsWith(manager.getDefaultPackageFileExtension());
+    }
 
-	public void addBundle(URL bundleURL) throws InstallPackageServiceException {
-		File bundle;
-		String urlString = bundleURL.toString(); 
-		if (urlString.endsWith(InstallerManager.PACKAGE_EXTENSION) || urlString.endsWith(InstallerManager.PACKAGE_INDEX_EXTENSION)) {
+    @Override
+    public void addBundle(URL bundleURL, SimpleTaskStatus taskStatus) throws InstallPackageServiceException {
+        File bundle;
+        String urlString = bundleURL.toString();
+        if (urlString.endsWith(InstallerManager.PACKAGE_EXTENSION) || urlString.endsWith(InstallerManager.PACKAGE_INDEX_EXTENSION)) {
             manager.setDownloadBaseURL(bundleURL);
-			bundle = downloadFile(bundleURL, PACKAGE_FILE_NAME);
-			addBundle(bundle);
-		} else {
-			if (!urlString.endsWith("/")) {
-				urlString += "/";
-			}
-			
-			Version version = manager.getVersionEx(); 
-			urlString += ("dists/"
-			+ version.getMayor() + "." + version.getMinor() + "."
-			+ version.getRevision() + "/" + PACKAGE_FILE_NAME);
-			
+            bundle = downloadFile(bundleURL, PACKAGE_FILE_NAME);
+            addBundle(bundle,taskStatus);
+        } else {
+            if (!urlString.endsWith("/")) {
+                urlString += "/";
+            }
 
-			URL completeURL;
-			try {
-				completeURL = new URL(urlString);
-			} catch (MalformedURLException e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-				return;
-			}
+            Version version = manager.getVersionEx();
+            urlString += ("dists/"
+                    + version.getMayor() + "." + version.getMinor() + "."
+                    + version.getRevision() + "/" + PACKAGE_FILE_NAME);
 
+            URL completeURL;
+            try {
+                completeURL = new URL(urlString);
+            } catch (MalformedURLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+                return;
+            }
+
             manager.setDownloadBaseURL(completeURL);
-			bundle = downloadFile(completeURL, PACKAGE_FILE_NAME);
-			addBundle(bundle);
-		}
+            bundle = downloadFile(completeURL, PACKAGE_FILE_NAME);
+            addBundle(bundle,taskStatus);
+        }
 
-	}
+    }
 
-	private File downloadFile(URL bundleURL, String defaultFileName)
-			throws InstallPackageServiceException {
-		try {
-			Download download = new Download();
-			return download.downloadFile(bundleURL, defaultFileName);
-		} catch (IOException e) {
-			throw new InstallerFileDownloadException(bundleURL, e);
-		}
-	}
+    private File downloadFile(URL bundleURL, String defaultFileName)
+            throws InstallPackageServiceException {
+        try {
+            Download download = new Download();
+            return download.downloadFile(bundleURL, defaultFileName);
+        } catch (IOException e) {
+            throw new InstallerFileDownloadException(bundleURL, e);
+        }
+    }
 
-	public void addBundlesFromDirectory(File directory)
-			throws InstallPackageServiceException {
-		if (!directory.isDirectory()) {
-			throw new InstallerNoDirectoryException(directory);
-		}
-		List<File> files = new ArrayList<File>();
+    @Override
+    public void addBundlesFromDirectory(File directory, SimpleTaskStatus taskStatus)
+            throws InstallPackageServiceException {
+        if (!directory.isDirectory()) {
+            throw new InstallerNoDirectoryException(directory);
+        }
+        List<File> files = new ArrayList<File>();
 
-		listRecursively(directory, new FileFilter() {
+        listRecursively(directory, new FileFilter() {
 
-			private String packageExt = manager
-					.getDefaultPackageFileExtension();
-			private String packageSetExt = manager
-					.getDefaultPackageSetFileExtension();
+            private String packageExt = manager
+                    .getDefaultPackageFileExtension();
+            private String packageSetExt = manager
+                    .getDefaultPackageSetFileExtension();
 
-			public boolean accept(File file) {
-				String name = file.getName().toLowerCase();
-				return file.isDirectory() || name.endsWith(packageExt)
-						|| name.endsWith(packageSetExt);
-			}
-		}, files);
-		for (int i = 0; i < files.size(); i++) {
-			if (files.get(i).isFile()) {
-				addBundle(files.get(i));
-			}
-		}
-	}
+            public boolean accept(File file) {
+                String name = file.getName().toLowerCase();
+                return file.isDirectory() || name.endsWith(packageExt)
+                        || name.endsWith(packageSetExt);
+            }
+        }, files);
+        for (int i = 0; i < files.size(); i++) {
+            if (files.get(i).isFile()) {
+                addBundle(files.get(i),taskStatus);
+            }
+        }
+    }
 
-	private void listRecursively(File fileOrDir, FileFilter filter,
-			List<File> files) {
-		files.add(fileOrDir);
+    private void listRecursively(File fileOrDir, FileFilter filter,
+            List<File> files) {
+        files.add(fileOrDir);
 
-		if (fileOrDir.isDirectory()) {
+        if (fileOrDir.isDirectory()) {
 
-			File[] dirContents = fileOrDir.listFiles(filter);
+            File[] dirContents = fileOrDir.listFiles(filter);
 
-			for (File f : dirContents) {
-				listRecursively(f, filter, files); // Recursively list.
-			}
-		} else {
-			files.add(fileOrDir);
-		}
-	}
+            for (File f : dirContents) {
+                listRecursively(f, filter, files); // Recursively list.
+            }
+        } else {
+            files.add(fileOrDir);
+        }
+    }
 
-	public int getPackageCount() {
-		if (packageInfos == null) {
-			return 0;
-		}
-		return packageInfos.size();
-	}
+    public int getPackageCount() {
+        if (packageInfos == null) {
+            return 0;
+        }
+        return packageInfos.size();
+    }
 
-	public Manager getManager() {
-		return this.manager;
-	}
+    public Manager getManager() {
+        return this.manager;
+    }
 
-	public void downloadPackage(PackageInfo packageInfo)
-			throws InstallPackageServiceException {
-		this.downloadPackage(packageInfo, null);
-	}
+    public void downloadPackage(PackageInfo packageInfo)
+            throws InstallPackageServiceException {
+        this.downloadPackage(packageInfo, null);
+    }
 
-	public void downloadPackage(PackageInfo packageInfo,
-			SimpleTaskStatus taskStatus) throws InstallPackageServiceException {
-	    
-		File file = null;
-		
-		try {
-            file = packageInfo.downloadFile(taskStatus);
-        } catch (BaseException e) {
-            throw new InstallPackageServiceException(e);
+    public void downloadPackage(PackageInfo packageInfo,
+            SimpleTaskStatus taskStatus) throws InstallPackageServiceException {
+
+        File file = packageInfoFileMap.get(packageInfo);
+        if (file == null) {
+            try {
+                file = packageInfo.downloadFile(taskStatus);
+            } catch (BaseException e) {
+                throw new InstallPackageServiceException(e);
+            }
+            this.packageInfoFileMap.put(packageInfo, file);
         }
-		this.packageInfoFileMap.put(packageInfo, file);
-	}
+    }
 
-	public List<String> getDefaultSelectedPackagesIDs() {
-		return installerProviderServices.getDefaultSelectedPackagesIDs();
-	}
+    public List<String> getDefaultSelectedPackagesIDs() {
+        return installerProviderServices.getDefaultSelectedPackagesIDs();
+    }
 
-	public List<String> getCategories() {
-		Set<String> categories = new HashSet<String>();
+    @Override
+    public Properties getProperties() {
+        return installerProviderServices.getProperties();
+    }
 
-		for (int i = 0; i < packageInfos.size(); i++) {
-			PackageInfo pkginfo = packageInfos.get(i);
-			List<String> pkgcategories = pkginfo.getCategories();
-			categories.addAll(pkgcategories);
-		}
-		try {
-			PackageInfo[] pkgs = manager.getInstalledPackages();
-			for (int i = 0; i < pkgs.length; i++) {
-				PackageInfo pkginfo = pkgs[i];
-				List<String> pkgcategories = pkginfo.getCategories();
-				categories.addAll(pkgcategories);
-			}
-			
-		} catch (MakePluginPackageServiceException e) {
-			// Ignore exceptions
-		}
-		ArrayList<String> l = new ArrayList<String>(categories);
-		Collections.sort(l);
-		return l;
-	}
+    public List<String> getCategories() {
+        Set<String> categories = new HashSet<String>();
 
-	public List<String> getTypes() {
-		Set<String> types = new HashSet<String>();
+        for (int i = 0; i < packageInfos.size(); i++) {
+            PackageInfo pkginfo = packageInfos.get(i);
+            List<String> pkgcategories = pkginfo.getCategories();
+            categories.addAll(pkgcategories);
+        }
+        try {
+            PackageInfo[] pkgs = manager.getInstalledPackages();
+            for (int i = 0; i < pkgs.length; i++) {
+                PackageInfo pkginfo = pkgs[i];
+                List<String> pkgcategories = pkginfo.getCategories();
+                categories.addAll(pkgcategories);
+            }
 
-		for (int i = 0; i < packageInfos.size(); i++) {
-			PackageInfo pkginfo = packageInfos.get(i);
-			types.add(pkginfo.getType());
-		}
-		try {
-			PackageInfo[] pkgs = manager.getInstalledPackages();
-			for (int i = 0; i < pkgs.length; i++) {
-				PackageInfo pkginfo = pkgs[i];
-				types.add(pkginfo.getType());
-			}
-			
-		} catch (MakePluginPackageServiceException e) {
-			// Ignore exceptions
-		}
-		ArrayList<String> l = new ArrayList<String>(types);
-		Collections.sort(l);
-		return l;
-	}
+        } catch (MakePluginPackageServiceException e) {
+            // Ignore exceptions
+        }
+        ArrayList<String> l = new ArrayList<String>(categories);
+        Collections.sort(l);
+        return l;
+    }
 
+    public List<String> getTypes() {
+        Set<String> types = new HashSet<String>();
+
+        for (int i = 0; i < packageInfos.size(); i++) {
+            PackageInfo pkginfo = packageInfos.get(i);
+            types.add(pkginfo.getType());
+        }
+        try {
+            PackageInfo[] pkgs = manager.getInstalledPackages();
+            for (int i = 0; i < pkgs.length; i++) {
+                PackageInfo pkginfo = pkgs[i];
+                types.add(pkginfo.getType());
+            }
+
+        } catch (MakePluginPackageServiceException e) {
+            // Ignore exceptions
+        }
+        List<String> l = new ArrayList<>(types);
+        Collections.sort(l);
+        return l;
+    }
+
+    @Override
+    public boolean needInstallPackageProviders() {
+        boolean need = false;
+        String ss = this.getProperties().getProperty("installers");
+        if (ss != null) {
+            String[] installerNames = StringUtils.split(ss);
+            for (String installerName : installerNames) {
+                InstallerProviderInstallers installer = new InstallerProviderInstallers(this, installerName);
+                if( !installer.isAlreadyRegistered() ) {
+                    need = true;
+                    break;
+                }
+            }
+        }
+        return need;
+    }
+
+    @Override
+    public void installPackageProviders(SimpleTaskStatus taskStatus) {
+        Properties props = this.getProperties();
+        String ss = props.getProperty("installers");
+        if (ss == null) {
+            return;
+        }
+
+        try {
+            String[] installerNames = StringUtils.split(ss);
+            taskStatus.setRangeOfValues(0, installerNames.length);
+            int count=0;
+            for (String installerName : installerNames) {
+                taskStatus.message(installerName);
+                taskStatus.setCurValue(count++);
+                InstallerProviderInstallers installer = new InstallerProviderInstallers(this, installerName);
+                installer.install();
+            }
+            taskStatus.setCurValue(count++);
+        } finally {
+            taskStatus.terminate();
+        }
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceDumb.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceDumb.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceDumb.java	(revision 43126)
@@ -26,6 +26,7 @@
 import java.io.File;
 import java.net.URL;
 import java.util.List;
+import java.util.Properties;
 
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.execution.InstallPackageService;
@@ -35,60 +36,89 @@
 
 public class InstallPackageServiceDumb implements InstallPackageService {
 
+        @Override
 	public Manager getManager() {
 		return null;
 	}
 
+        @Override
 	public void reset() {
 	}
 
-	public void addBundle(File bundleFile)
+        @Override
+	public void addBundle(File bundleFile, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException {
 	}
 
-	public void addBundle(URL bundleURL) throws InstallPackageServiceException {
+        @Override
+	public void addBundle(URL bundleURL, SimpleTaskStatus taskStatus) throws InstallPackageServiceException {
 	}
 
-	public void addBundlesFromDirectory(File bundlesDirectory)
+        @Override
+	public void addBundlesFromDirectory(File bundlesDirectory, SimpleTaskStatus taskStatus)
 			throws InstallPackageServiceException {
 	}
 
+        @Override
 	public void installPackage(File applicationDirectory,
 			PackageInfo packageInfo) throws InstallPackageServiceException {
 	}
 
+        @Override
 	public void installPackage(File applicationDirectory, String packageCode)
 			throws InstallPackageServiceException {
 	}
 
+        @Override
 	public int getPackageCount() {
 		return 0;
 	}
 
+        @Override
 	public PackageInfo getPackageInfo(int index) {
 		return null;
 	}
 
+        @Override
 	public PackageInfo getPackageInfo(String packageCode) {
 		return null;
 	}
 
+        @Override
 	public void downloadPackage(PackageInfo packageInfo,
 			SimpleTaskStatus taskStatus) throws InstallPackageServiceException {
 	}
 
+        @Override
 	public List<String> getDefaultSelectedPackagesIDs() {
 		return null;
 	}
 
+        @Override
 	public List<String> getCategories() {
 		// TODO Auto-generated method stub
 		return null;
 	}
 
+        @Override
 	public List<String> getTypes() {
 		// TODO Auto-generated method stub
 		return null;
 	}
 
+    @Override
+    public Properties getProperties() {
+        return new Properties();
+    }
+
+    @Override
+    public boolean needInstallPackageProviders() {
+        return false;
+    }
+
+    @Override
+    public void installPackageProviders(SimpleTaskStatus taskStatus) {
+    }
+
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceTest.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceTest.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/execution/InstallPackageServiceTest.java	(revision 43126)
@@ -60,7 +60,7 @@
 
 		InstallPackageService installPackageService = InstallerLocator
 				.getInstallerManager().getInstallPackageService();
-		installPackageService.addBundlesFromDirectory(installersDirectory);
+		installPackageService.addBundlesFromDirectory(installersDirectory, null);
 
 		Assert.assertEquals(3, installPackageService.getPackageCount());
 
@@ -90,7 +90,7 @@
 
 		InstallPackageService installerExecutionService = InstallerLocator
 				.getInstallerManager().getInstallPackageService();
-		installerExecutionService.addBundlesFromDirectory(installersDirectory);
+		installerExecutionService.addBundlesFromDirectory(installersDirectory, null);
 
 		PackageInfo packageInfo = installerExecutionService
 				.getPackageInfo("org.gvsig.plugin1");
@@ -117,7 +117,7 @@
 
 		InstallPackageService installerExecutionService = InstallerLocator
 				.getInstallerManager().getInstallPackageService();
-		installerExecutionService.addBundle(externalInstallationFile);
+		installerExecutionService.addBundle(externalInstallationFile, null);
 
 		PackageInfo packageInfo = installerExecutionService
 				.getPackageInfo("org.gvsig.plugin1");
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/creation/MakePluginPackageServiceTest.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/creation/MakePluginPackageServiceTest.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/test/java/org/gvsig/installer/lib/impl/creation/MakePluginPackageServiceTest.java	(revision 43126)
@@ -106,7 +106,7 @@
 		InstallPackageService installPackageService = InstallerLocator
 				.getInstallerManager().getInstallPackageService();
 
-		installPackageService.addBundle(installerFile);
+		installPackageService.addBundle(installerFile, null);
 		assertEquals(1, installPackageService.getPackageCount());
 		PackageInfo newInstallerInfo = makePluginPackageService
 				.getPluginPackageInfo(0);
@@ -133,7 +133,7 @@
 		// decompress the plugin and read the plugin information
 		InstallPackageService installPackageService = InstallerLocator
 				.getInstallerManager().getInstallPackageService();
-		installPackageService.addBundle(installerFile);
+		installPackageService.addBundle(installerFile, null);
 		assertEquals(1, installPackageService.getPackageCount());
 		PackageInfo newInstallerInfo = makePluginPackageService
 				.getPluginPackageInfo(0);
@@ -162,7 +162,7 @@
 		// decompress the plugin and read the plugin information
 		InstallPackageService installPackageService = InstallerLocator
 				.getInstallerManager().getInstallPackageService();
-		installPackageService.addBundle(installerFile);
+		installPackageService.addBundle(installerFile, null);
 		assertEquals(1, installPackageService.getPackageCount());
 		PackageInfo newInstallerInfo = makePluginPackageService
 				.getPluginPackageInfo(0);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/AbstractInstallPackageWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/AbstractInstallPackageWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/AbstractInstallPackageWizard.java	(revision 43126)
@@ -1,125 +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.
- */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-
-package org.gvsig.installer.swing.api.execution;
-
-import java.io.File;
-import java.util.List;
-
-import org.gvsig.installer.lib.api.PackageInfo;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
-import org.gvsig.installer.swing.api.wizard.AbstractInstallerWizard;
-
-/**
- * <p>
- * Wizard that is used to open a bundle file to install one or more packages in
- * a valid gvSIG directory. This class receive a directory where gvSIG is
- * installed and it allows to select from the user interface the packages to
- * install.
- * </p>
- * <p>
- * All the classes that inherit if this abstract class have to have a
- * constructor with an argument of type {@link File}, that is the application
- * directory.
- * </p>
- * 
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public abstract class AbstractInstallPackageWizard extends
-		AbstractInstallerWizard {
-
-	private static final long serialVersionUID = -758246118332926598L;
-
-	/**
-	 * Constructor
-	 * 
-	 * @see AbstractInstallerWizard#AbstractInstallerWizard(File, File)
-	 */
-	public AbstractInstallPackageWizard(File applicationFolder,
-			File installFolder) {
-		super(applicationFolder, installFolder);
-	}
-
-	/**
-	 * If this method is selected the first window of the wizard is not visible
-	 * and the installation process takes the installers form the default
-	 * directory.
-	 * 
-	 * @throws InstallPackageServiceException
-	 *             if there an error reading the default directory.
-	 */
-	public abstract void installFromDefaultDirectory()
-			throws InstallPackageServiceException;
-
-	/**
-	 * @return the installerExecutionService
-	 */
-	public abstract InstallPackageService getInstallerExecutionService();
-
-	/**
-	 * @return the installersToInstall
-	 */
-	public abstract List<PackageInfo> getInstallersToInstall();
-
-	public abstract void setNextButtonEnabled(boolean isEnabled);
-
-	public abstract void setFinishButtonVisible(boolean isVisible);
-
-	public abstract void setCancelButtonEnabled(boolean isEnabled);
-
-	public abstract void setBackButtonEnabled(boolean isEnabled);
-
-	/**
-	 * It will ask the user to select the installation mode to Typical or
-	 * Advanced.
-	 * 
-	 * @param askIt
-	 *            True or False if the option will be shown to the user or not.
-	 */
-	public abstract void setAskTypicalOrCustom(boolean askIt);
-
-	/**
-	 * To know if the question is set to be shown or not.
-	 * 
-	 * @return True if the question is set to be shown or false if not.
-	 */
-	public abstract boolean getAskTypicalOrCustom();
-
-	public abstract void setSelectDefaultPackages(boolean isActivated);
-
-	public abstract boolean getSelectDefaultPackages();
-	
-	   
-	public boolean needsToRestartApplicationAfterFinish() {
-	    // installers need to restart
-	    return true;
-	}
-
-        public abstract void setSkipBundleSelection(boolean skipBundleSelection);
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/InstallWizardPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/InstallWizardPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/InstallWizardPanel.java	(revision 43126)
@@ -0,0 +1,56 @@
+/**
+ * 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.installer.swing.api.execution;
+
+import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
+
+public interface InstallWizardPanel
+        extends
+        InstallerWizardPanel {
+
+    public void setSkipSelectBundleWizardPage(boolean skip);
+    
+    public boolean getSkipSelectBundleWizardPage();
+    
+    /**
+     * Set if the TypicalOrAdvanced wizard page can be show.
+     *
+     * @param skip True skip the TypicalOrAdvanced wizard.
+     */
+    public void setSkipTypicalOrAdvancedWizardPage(boolean skip);
+
+    /**
+     * To know if the TypicalOrAdvanced wizard page show.
+     *
+     * @return True skip the TypicalOrAdvanced wizard.
+     */
+    public boolean getSkipTypicalOrAdvancedWizardPage();
+
+    public PackageFilter getPackageFilter();
+
+    public void setPackageFilter(PackageFilter filter);
+    
+    public void setSelectDefaultPackages(boolean isActivated);
+
+    public boolean getSelectDefaultPackages();    
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/InstallWizardPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/PackageFilter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/PackageFilter.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/PackageFilter.java	(revision 43126)
@@ -0,0 +1,36 @@
+/**
+ * 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.installer.swing.api.execution;
+
+import org.gvsig.installer.lib.api.PackageInfo;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ * 
+ */
+public interface PackageFilter {
+
+	public boolean match(PackageInfo pkg);
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/execution/PackageFilter.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/MakePluginPackageWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/MakePluginPackageWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/creation/MakePluginPackageWizard.java	(revision 43126)
@@ -21,47 +21,12 @@
  * For any additional information, do not hesitate to contact us
  * at info AT gvsig.com, or visit our website www.gvsig.com.
  */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
 
 package org.gvsig.installer.swing.api.creation;
 
-import java.io.File;
+import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
 
-import org.gvsig.installer.lib.api.PackageInfo;
-import org.gvsig.installer.swing.api.wizard.AbstractInstallerWizard;
 
-/**
- * <p>
- * Wizard that is used to create a bundle with a package of type plugin from a
- * gvSIG directory. This class receive a gvSIG root directory and allows to the
- * user to select the plugin that is used to create the bundle.
- * </p>
- * <p>
- * The user can also set some plugin properties, like the version of the
- * installer, the build number... The definition of all these properties can be
- * found in {@link PackageInfo}.
- * </p>
- * <p>
- * All the classes that inherit if this abstract class have to have a
- * constructor with an argument of type {@link File}, that is the application
- * directory.
- * </p>
- * 
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public abstract class MakePluginPackageWizard extends AbstractInstallerWizard {
+public interface MakePluginPackageWizard extends InstallerWizardPanel {
 
-	private static final long serialVersionUID = 6387360455696226183L;
-
-	/**
-	 * Constructor
-	 * 
-	 * @see AbstractInstallerWizard#AbstractInstallerWizard(File, File)
-	 */
-	public MakePluginPackageWizard(File applicationFolder, File installFolder) {
-		super(applicationFolder, installFolder);
-	}
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/SwingInstallerManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/SwingInstallerManager.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/SwingInstallerManager.java	(revision 43126)
@@ -3,29 +3,27 @@
  *
  * 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 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.
+ * 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.
+ * 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.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
 /*
  * AUTHORS (In addition to CIT):
  * 2010 {Prodevelop}   {Task}
  */
-
 package org.gvsig.installer.swing.api;
 
 import java.io.File;
@@ -34,6 +32,7 @@
 import java.util.List;
 
 import javax.swing.JPanel;
+import org.gvsig.installer.lib.api.Dependencies;
 
 import org.gvsig.installer.lib.api.InstallerManager;
 import org.gvsig.installer.lib.api.PackageInfo;
@@ -41,181 +40,187 @@
 import org.gvsig.installer.swing.api.creation.JPackageInfoPanel;
 import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard;
 import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
 import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
+import org.gvsig.installer.swing.api.execution.InstallWizardPanel;
 import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel;
 import org.gvsig.installer.swing.api.execution.JShowPackagesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.JShowRequiredPackagesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.JShowUnresolvedDependenciesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.swing.api.packagebuilder.PackageBuildder;
+import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
+
 /**
- * 
+ *
  * <p>
  * This manager is used to register and create the wizards that are used to
  * create and execute an installer. These wizards are classes that inherit of
  * {@link JPanel}.
  * </p>
- * 
+ *
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
  */
 public interface SwingInstallerManager {
 
+    public interface UrlAndLabel {
 
-	public interface UrlAndLabel {
-		/**
-		 * Return the url.
-		 * 
-		 * @return the url
-		 */
-		public URL getURL();
-		
-		/**
-		 * Return the url associated to the url or null
-		 * if the url don't have a label.
-		 *  
-		 * @return the label or null
-		 */
-		public String getLabel();
-		
-		/**
-		 * Return a string with the label and the url like:
-		 *   "label - http://..."
-		 *   
-		 * @return the label and url
-		 */
-		public String toString(); // Return "label - url"
-	}
-	
-	/**
-	 * Registers a class that implements a wizard to create an installer of a
-	 * plugin from a gvSIG installation directory.
-	 * 
-	 * @param clazz
-	 *            Class that inherits of the {@link MakePluginPackageWizard}
-	 *            abstract class.
-	 */
-	public void registerMakePluginPackageWizardInstallerCreationWizard(
-			Class<? extends MakePluginPackageWizard> clazz);
+        /**
+         * Return the url.
+         *
+         * @return the url
+         */
+        public URL getURL();
 
-	/**
-	 * This method returns a class that is used to create an installer from a
-	 * gvSIG installation directory.
-	 * 
-	 * @return The wizard to create an installer.
-	 * @throws MakePluginPackageWizardException
-	 *             If there is a problem creating the wizard.
-	 */
-	public MakePluginPackageWizard createMakePluginPackageWizard(
-			File applicationDirectory, File installFolder)
-			throws MakePluginPackageWizardException;
+        /**
+         * Return the url associated to the url or null if the url don't have a
+         * label.
+         *
+         * @return the label or null
+         */
+        public String getLabel();
 
-	/**
-	 * Registers a class that implements a wizard to execte an installer to
-	 * install a set of plugins in a gvSIG installation directory.
-	 * 
-	 * @param clazz
-	 *            Class that inherits of the
-	 *            {@link AbstractInstallPackageWizard} abstract class.
-	 */
-	public void registerInstallPackageWizard(
-			Class<? extends AbstractInstallPackageWizard> clazz);
+        /**
+         * Return a string with the label and the url like: "label - http://..."
+         *
+         * @return the label and url
+         */
+        public String toString(); // Return "label - url"
+    }
 
-	/**
-	 * This method returns a class that is used to execute an installer to
-	 * install a set of plugins in a gvSIG installation directory.
-	 * 
-	 * @return The wizard to execute an installer.
-	 * @throws InstallPackageWizardException
-	 *             If there is a problem creating the wizard.
-	 */
-	public AbstractInstallPackageWizard createInstallPackageWizard(
-			File applicationDirectory, File installFolder)
-			throws InstallPackageWizardException;
+    /**
+     * Registers a class that implements a wizard to create an installer of a
+     * plugin from a gvSIG installation directory.
+     *
+     * @param clazz Class that inherits of the {@link MakePluginPackageWizard}
+     * abstract class.
+     */
+    public void registerMakePluginPackageWizardInstallerCreationWizard(
+            Class<? extends MakePluginPackageWizard> clazz);
 
-	/**
-	 * Returns the current application version.
-	 * 
-	 * @return the current application version
-	 */
-	public String getApplicationVersion();
+    /**
+     * This method returns a class that is used to create an installer from a
+     * gvSIG installation directory.
+     *
+     * @return The wizard to create an installer.
+     * @throws MakePluginPackageWizardException If there is a problem creating
+     * the wizard.
+     */
+    public MakePluginPackageWizard createMakePluginPackageWizard(
+            File applicationDirectory, File installFolder)
+            throws MakePluginPackageWizardException;
 
-	/**
-	 * Sets the current application version.
-	 * 
-	 * @param gvSIGVersion
-	 *            the current application version
-	 */
-	public void setApplicationVersion(String gvSIGVersion);
+    /**
+     * Registers a class that implements a wizard to execte an installer to
+     * install a set of plugins in a gvSIG installation directory.
+     *
+     * @param clazz Class that inherits of the
+     * {@link AbstractInstallPackageWizard} abstract class.
+     */
+    public void registerInstallPackageWizard(
+            Class<? extends InstallerWizardPanel> clazz);
 
-	/**
-	 * Returns the default URL to download packages from.
-	 * 
-	 * @return the default URL to download packages from
-	 */
-	public URL getDefaultDownloadURL();
+    /**
+     * This method returns a class that is used to execute an installer to
+     * install a set of plugins in a gvSIG installation directory.
+     *
+     * @return The wizard to execute an installer.
+     * @throws InstallPackageWizardException If there is a problem creating the
+     * wizard.
+     */
+    public InstallWizardPanel createInstallPackageWizard(
+            File applicationDirectory, File installFolder)
+            throws InstallPackageWizardException;
 
-	/**
-	 * Sets the default URL to download packages from
-	 * 
-	 * @param defaultDownloadURL
-	 *            the default URL to download packages from
-	 */
-	public void setDefaultDownloadURL(URL defaultDownloadURL);
+    /**
+     * Returns the current application version.
+     *
+     * @return the current application version
+     */
+    public String getApplicationVersion();
 
-	/**
-	 * Translate a key in a text using the current application language
-	 * 
-	 * @param key
-	 *            The key to translate
-	 * @return The translated key
-	 */
-	public String getText(String key);
+    /**
+     * Sets the current application version.
+     *
+     * @param gvSIGVersion the current application version
+     */
+    public void setApplicationVersion(String gvSIGVersion);
 
-	/**
-	 * Returns a reference to the {@link InstallerManager}.
-	 * 
-	 * @return a reference to the {@link InstallerManager}
-	 */
-	public InstallerManager getInstallerManager();
+    /**
+     * Returns the default URL to download packages from.
+     *
+     * @return the default URL to download packages from
+     */
+    public URL getDefaultDownloadURL();
 
-	public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
-			List<PackageInfo> packages, String message);
+    /**
+     * Sets the default URL to download packages from
+     *
+     * @param defaultDownloadURL the default URL to download packages from
+     */
+    public void setDefaultDownloadURL(URL defaultDownloadURL);
 
-	public JShowPackagesAndAskContinuePanel createJShowTroubledPackagesAndAskContinuePanel(
-			List<PackageInfo> packages, String message);
-	
-	public JPackageInfoPanel createPackageInfoPanel();
+    /**
+     * Translate a key in a text using the current application language
+     *
+     * @param key The key to translate
+     * @return The translated key
+     */
+    public String getText(String key);
 
-	public JPackageInfoPanel createPackageInfoPanel(String packageType);
+    /**
+     * Returns a reference to the {@link InstallerManager}.
+     *
+     * @return a reference to the {@link InstallerManager}
+     */
+    public InstallerManager getInstallerManager();
 
-	public JOutputPanel createOutputPanel();
+    public JShowPackageStatusAndAskContinuePanel createJShowPackageStatusAndAskContinuePanel(
+            List<PackageInfo> packages, String message);
 
-	public JProgressPanel createProgressPanel();
+    public JShowPackagesAndAskContinuePanel createJShowTroubledPackagesAndAskContinuePanel(
+            List<PackageInfo> packages, String message);
 
-	public void setDefaultDownloadURL(String defaultDownloadURLs);
+    public JShowRequiredPackagesAndAskContinuePanel createJShowRequiredPackagesAndAskContinuePanel(
+            List<PackageInfo> packages, String message);
 
-	public void setDefaultDownloadURL(File defaultDownloadURLs);
+    public JShowUnresolvedDependenciesAndAskContinuePanel createJShowUnresolvedDependenciesAndAskContinuePanel(
+            Dependencies dependencies, String message);
 
-	public void addDefaultDownloadURL(URL url);
+    public JPackageInfoPanel createPackageInfoPanel();
 
-	public void addDefaultDownloadURL(URL url, String label);
-	
-	public void addDefaultDownloadURL(String url) throws MalformedURLException;
+    public JPackageInfoPanel createPackageInfoPanel(String packageType);
 
-	/**
-	 * Return the list of default URL used to retrieve the package.gvspki
-	 * 
-	 * @return list of defaults urls
-	 * @deprecated use getDefaultDownloadUrlAndLabels
-	 */
-	public List<URL> getDefaultDownloadURLs();
-	
-	/**
-	 * Return the list of default URL used to retrieve the package.gvspki
-	 * the list contains the URLs and their labels.
-	 *  
-	 * @return list of default urls and their labels
-	 */
-	public List<UrlAndLabel> getDefaultDownloadUrlAndLabels();
-        
-        public PackageBuildder createPackagerPanel(String packageType, File selectionFolder, File outputFolder);
+    public JOutputPanel createOutputPanel();
 
+    public JProgressPanel createProgressPanel();
+
+    public void setDefaultDownloadURL(String defaultDownloadURLs);
+
+    public void setDefaultDownloadURL(File defaultDownloadURLs);
+
+    public void addDefaultDownloadURL(URL url);
+
+    public void addDefaultDownloadURL(URL url, String label);
+
+    public void addDefaultDownloadURL(String url) throws MalformedURLException;
+
+    /**
+     * Return the list of default URL used to retrieve the package.gvspki
+     *
+     * @return list of defaults urls
+     * @deprecated use getDefaultDownloadUrlAndLabels
+     */
+    public List<URL> getDefaultDownloadURLs();
+
+    /**
+     * Return the list of default URL used to retrieve the package.gvspki the
+     * list contains the URLs and their labels.
+     *
+     * @return list of default urls and their labels
+     */
+    public List<UrlAndLabel> getDefaultDownloadUrlAndLabels();
+
+    public PackageBuildder createPackagerPanel(String packageType, File selectionFolder, File outputFolder);
+
+    public PackageFilter createPackageTypeFilter(String type) ;
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/AbstractInstallerWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/AbstractInstallerWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/AbstractInstallerWizard.java	(revision 43126)
@@ -1,96 +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.
- */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-
-package org.gvsig.installer.swing.api.wizard;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JPanel;
-
-import org.gvsig.tools.task.CancellableTask;
-
-/**
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public abstract class AbstractInstallerWizard extends JPanel implements
-		InstallerWizardPanel {
-
-	private static final long serialVersionUID = 5609799260650093733L;
-	protected InstallerWizardActionListener wizardActionListener = null;
-	private final File applicationFolder;
-	private final File installFolder;
-	private List<CancellableTask> cancelableTasks;
-
-	/**
-	 * Constructor.
-	 * 
-	 * @param applicationFolder
-	 *            the main root application folder
-	 * @param installFolder
-	 *            the default bundle files location folder
-	 */
-	public AbstractInstallerWizard(File applicationFolder, File installFolder) {
-		super();
-		this.applicationFolder = applicationFolder;
-		this.installFolder = installFolder;
-		this.cancelableTasks = new ArrayList<CancellableTask>();
-	}
-
-	public void addCancellableTask(CancellableTask task) {
-		this.cancelableTasks.add(task);
-	}
-
-	public List<CancellableTask> getCancellableTasks() {
-		return this.cancelableTasks;
-	}
-
-	public void setWizardActionListener(
-			InstallerWizardActionListener wizardActionListener) {
-		this.wizardActionListener = wizardActionListener;
-	}
-
-	public InstallerWizardActionListener getWizardActionListener() {
-		return wizardActionListener;
-	}
-
-	public File getApplicationFolder() {
-		return applicationFolder;
-	}
-
-	public File getInstallFolder() {
-		return installFolder;
-	}
-	
-	public boolean needsToRestartApplicationAfterFinish() {
-	    // false by default
-	    // to be overriden by subclasses
-	    return false;
-	}
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/InstallerWizardPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/InstallerWizardPanel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.api/src/main/java/org/gvsig/installer/swing/api/wizard/InstallerWizardPanel.java	(revision 43126)
@@ -3,65 +3,72 @@
  *
  * 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 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.
+ * 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.
+ * 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.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-
 package org.gvsig.installer.swing.api.wizard;
 
+import java.io.File;
 import java.util.List;
+import org.gvsig.tools.swing.api.Component;
 
 import org.gvsig.tools.task.CancellableTask;
 
-/**
- * This interface must be implemented by all the wizards. It just have a methods
- * to manage the events that the wizard throws.
- * 
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public interface InstallerWizardPanel {
+public interface InstallerWizardPanel extends Component {
 
-	/**
-	 * @param wizardActionListener
-	 *            sets the listener for the action events.
-	 */
-	public void setWizardActionListener(
-			InstallerWizardActionListener wizardActionListener);
+    /**
+     * @param wizardActionListener sets the listener for the action events.
+     */
+    public void setWizardActionListener(
+            InstallerWizardActionListener wizardActionListener);
 
-	/**
-	 * @return the listener for the action events
-	 */
-	public InstallerWizardActionListener getWizardActionListener();
+    /**
+     * @return the listener for the action events
+     */
+    public InstallerWizardActionListener getWizardActionListener();
 
-	public List<CancellableTask> getCancellableTasks();
+    public List<CancellableTask> getCancellableTasks();
 
-	public void addCancellableTask(CancellableTask task);
-	
-	/**
-	 * Tells whether this install wizard needs to restart
-     * the app after install process has finished
-     * 
-	 * @return Whether this install wizard needs to restart
-	 * the app after install process has finished
-	 */
-	public boolean needsToRestartApplicationAfterFinish();
+    public void addCancellableTask(CancellableTask task);
+
+    /**
+     * Tells whether this install wizard needs to restart the app after install
+     * process has finished
+     *
+     * @return Whether this install wizard needs to restart the app after
+     * install process has finished
+     */
+    public boolean needsToRestartApplicationAfterFinish();
+
+    public File getApplicationFolder();
+
+    public File getInstallFolder();
+
+    public void setNextButtonEnabled(boolean isEnabled);
+
+    public void setFinishButtonEnabled(boolean isVisible);
+
+    public void setCancelButtonEnabled(boolean isEnabled);
+
+    public void setBackButtonEnabled(boolean isEnabled);
+
+    public void doAction(int action);
+
+    public void skip();
+
+    public int getDirection();
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallPackageWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallPackageWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallPackageWizard.java	(revision 43126)
@@ -1,227 +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.
- */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-
-package org.gvsig.installer.swing.impl.execution;
-
-import java.awt.BorderLayout;
-import java.io.File;
-import java.net.URL;
-import java.util.List;
-
-import jwizardcomponent.DefaultJWizardComponents;
-
-import org.gvsig.gui.beans.wizard.WizardPanel;
-import org.gvsig.gui.beans.wizard.WizardPanelActionListener;
-import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
-import org.gvsig.installer.lib.api.InstallerLocator;
-import org.gvsig.installer.lib.api.PackageInfo;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
-import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.SwingInstallerManager.UrlAndLabel;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
-import org.gvsig.installer.swing.impl.execution.wizard.DownloadProgressWizard;
-import org.gvsig.installer.swing.impl.execution.wizard.ProgressWizard;
-import org.gvsig.installer.swing.impl.execution.wizard.SelectBundlesWizard;
-import org.gvsig.installer.swing.impl.execution.wizard.SelectPackagesWizard;
-import org.gvsig.installer.swing.impl.execution.wizard.TypicalOrAdvancedWizard;
-import org.gvsig.installer.swing.impl.wizard.WizardListenerAdapter;
-
-/**
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public class DefaultInstallPackageWizard extends AbstractInstallPackageWizard
-		implements WizardPanel {
-
-	private static final long serialVersionUID = 554068938842141497L;
-	private static final int TYPICAL_MODE = 0;
-	private static final int ADVANCED_MODE = 1;
-
-	private int installationMode = ADVANCED_MODE;
-	private boolean askInstallationMode = false;
-	private boolean selectDefaultPackages;
-        private boolean goToSelectInstalationPackages = false;
-
-	private WizardPanelWithLogo wizardPanelWithLogo = null;
-	private InstallPackageService installerExecutionService = null;
-
-	// Wizards
-	private SelectBundlesWizard selectInstallersWizard = null;
-	private SelectPackagesWizard selectPluginsWizard = null;
-	private ProgressWizard progressWizard = null;
-	private DownloadProgressWizard downloadProgressWizard = null;
-	private TypicalOrAdvancedWizard typicalOrAdvancedWizard = null;
-
-	private WizardListenerAdapter wizardListenerAdapter = null;
-        private boolean skipBundleSelection = false;
-
-	public DefaultInstallPackageWizard(File applicationFolder,
-			File installFolder) throws InstallPackageServiceException {
-		super(applicationFolder, installFolder);
-
-		installerExecutionService = InstallerLocator.getInstallerManager()
-				.getInstallPackageService();
-
-		wizardPanelWithLogo = new WizardPanelWithLogo();
-
-		List<UrlAndLabel> downloadURLs = SwingInstallerLocator
-				.getSwingInstallerManager().getDefaultDownloadUrlAndLabels();
-		selectInstallersWizard = new SelectBundlesWizard(this, downloadURLs);
-		typicalOrAdvancedWizard = new TypicalOrAdvancedWizard(this);
-		selectPluginsWizard = new SelectPackagesWizard(this);
-		progressWizard = new ProgressWizard(this);
-		downloadProgressWizard = new DownloadProgressWizard(this);
-
-		addWizards();
-
-		// Adding the listeners
-		wizardPanelWithLogo.setWizardListener(this);
-
-		setFinishButtonVisible(false);
-
-		this.setLayout(new BorderLayout());
-		this.add(wizardPanelWithLogo, BorderLayout.CENTER);
-	}
-
-	public void doAction(int action) {
-		this.wizardPanelWithLogo.doAction(action);
-	}
-
-	private void addWizards() {
-		wizardPanelWithLogo.addOptionPanel(selectInstallersWizard);
-		wizardPanelWithLogo.addOptionPanel(typicalOrAdvancedWizard);
-		wizardPanelWithLogo.addOptionPanel(selectPluginsWizard);
-		wizardPanelWithLogo.addOptionPanel(downloadProgressWizard);
-		wizardPanelWithLogo.addOptionPanel(progressWizard);
-	}
-
-	public DefaultJWizardComponents getWizardComponents() {
-		return wizardPanelWithLogo.getWizardComponents();
-	}
-
-	/**
-	 * @return the installerExecutionService
-	 */
-	@Override
-	public InstallPackageService getInstallerExecutionService() {
-		return installerExecutionService;
-	}
-
-	/**
-	 * @return the installersToInstall
-	 */
-	@Override
-	public List<PackageInfo> getInstallersToInstall() {
-		return this.selectPluginsWizard.getPackagesToInstall();
-	}
-
-	@Override
-	public void setNextButtonEnabled(boolean isEnabled) {
-		getWizardComponents().getNextButton().setEnabled(isEnabled);
-	}
-
-	@Override
-	public void setFinishButtonVisible(boolean isVisible) {
-		getWizardComponents().getFinishButton().setEnabled(isVisible);
-	}
-
-	@Override
-	public void setCancelButtonEnabled(boolean isEnabled) {
-		getWizardComponents().getCancelButton().setEnabled(isEnabled);
-	}
-
-	@Override
-	public void setBackButtonEnabled(boolean isEnabled) {
-		getWizardComponents().getBackButton().setEnabled(isEnabled);
-	}
-
-	@Override
-	public void installFromDefaultDirectory()
-			throws InstallPackageServiceException {
-		getWizardComponents().removeWizardPanel(0);
-		installerExecutionService.addBundlesFromDirectory(getInstallFolder());
-		selectPluginsWizard.updatePanel();
-	}
-
-	public WizardPanelActionListener getWizardPanelActionListener() {
-		if (((wizardListenerAdapter == null) && (getWizardActionListener() != null))) {
-			wizardListenerAdapter = new WizardListenerAdapter(this);
-		}
-		return wizardListenerAdapter;
-	}
-
-	public void setWizardPanelActionListener(
-			WizardPanelActionListener wizardActionListener) {
-		// TODO Auto-generated method stub
-	}
-
-	@Override
-	public void setSelectDefaultPackages(boolean isActivated) {
-		this.selectDefaultPackages = isActivated;
-	}
-
-	@Override
-	public boolean getSelectDefaultPackages() {
-		return this.selectDefaultPackages;
-	}
-
-	public void setShowSelectPackagesPanel(boolean mode) {
-		if (mode) {
-			installationMode = ADVANCED_MODE;
-		} else {
-			installationMode = TYPICAL_MODE;
-			selectDefaultPackages = true;
-		}
-	}
-
-	public boolean showSelectPackagesPanel() {
-		return installationMode == ADVANCED_MODE;
-	}
-
-	@Override
-	public boolean getAskTypicalOrCustom() {
-		return askInstallationMode;
-	}
-
-	@Override
-	public void setAskTypicalOrCustom(boolean b) {
-		askInstallationMode = true;
-	}
-
-        public void setSkipBundleSelection(boolean skipBundleSelection) {
-            if( skipBundleSelection ) {
-                this.doAction(WizardPanelWithLogo.ACTION_NEXT);
-                this.setBackButtonEnabled(false);
-            }
-            this.skipBundleSelection = skipBundleSelection;
-        }
-        
-        public boolean getSkipBundleSelection() {
-            return this.skipBundleSelection;
-        }
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/InstallWizardPanel_ext.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/InstallWizardPanel_ext.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/InstallWizardPanel_ext.java	(revision 43126)
@@ -0,0 +1,66 @@
+/**
+ * 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.installer.swing.impl.execution;
+
+import java.util.List;
+import org.gvsig.gui.beans.wizard.WizardPanel;
+
+import org.gvsig.installer.lib.api.PackageInfo;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
+import org.gvsig.installer.swing.api.execution.InstallWizardPanel;
+import org.gvsig.installer.swing.impl.execution.panel.SelectBundlesPanel;
+
+public interface InstallWizardPanel_ext
+        extends
+        InstallWizardPanel, WizardPanel {
+
+    /**
+     * If this method is selected the first window of the wizard is not visible
+     * and the installation process takes the installers form the default
+     * directory.
+     *
+     * @throws InstallPackageServiceException if there an error reading the
+     * default directory.
+     */
+    public void installFromDefaultDirectory()
+            throws InstallPackageServiceException;
+
+    /**
+     * @return the installerExecutionService
+     */
+    public InstallPackageService getInstallerExecutionService();
+
+    /**
+     * @return the installersToInstall
+     */
+    public List<PackageInfo> getPackagesToInstall();
+
+    public SelectBundlesPanel getBundlesPanel();
+    
+    public String getTranslation(String key);
+
+    public void setSkipSelectPackagesWizardPage(boolean skip);
+    
+    public boolean getSkipSelectPackagesWizardPage();
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/InstallWizardPanel_ext.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallWizardPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallWizardPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallWizardPanel.java	(revision 43126)
@@ -0,0 +1,227 @@
+/**
+ * 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.
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Prodevelop}   {Task}
+ */
+package org.gvsig.installer.swing.impl.execution;
+
+import java.awt.BorderLayout;
+import java.io.File;
+import java.util.List;
+import javax.swing.JComponent;
+
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
+import org.gvsig.installer.lib.api.InstallerLocator;
+import org.gvsig.installer.lib.api.PackageInfo;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
+import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.SwingInstallerManager.UrlAndLabel;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
+import org.gvsig.installer.swing.impl.execution.panel.SelectBundlesPanel;
+import org.gvsig.installer.swing.impl.execution.wizard.DownloadProgressWizardPage;
+import org.gvsig.installer.swing.impl.execution.wizard.AddBundlesWizardPage;
+import org.gvsig.installer.swing.impl.execution.wizard.InstallersWizardPage;
+import org.gvsig.installer.swing.impl.execution.wizard.ProgressWizardPage;
+import org.gvsig.installer.swing.impl.execution.wizard.SelectBundlesWizardPage;
+import org.gvsig.installer.swing.impl.execution.wizard.SelectPackagesWizardPage;
+import org.gvsig.installer.swing.impl.execution.wizard.TypicalOrAdvancedWizardPage;
+import org.gvsig.installer.swing.impl.wizard.AbstractInstallerWizardPanel;
+import org.gvsig.tools.ToolsLocator;
+import org.gvsig.tools.i18n.I18nManager;
+
+public class DefaultInstallWizardPanel
+        extends
+        AbstractInstallerWizardPanel
+        implements
+        InstallWizardPanel_ext {
+
+    private static final long serialVersionUID = 554068938842141497L;
+    private static final int TYPICAL_MODE = 0;
+    private static final int ADVANCED_MODE = 1;
+
+    private int installationMode = ADVANCED_MODE;
+    
+    private boolean skipTypicalOrAdvancedWizardPage = false;
+    private boolean skipSelectBundleWizardPage = false;
+    
+    private boolean selectDefaultPackages;
+
+    private InstallPackageService installerExecutionService = null;
+
+    // Wizard pages
+    private SelectBundlesWizardPage selectInstallersWizard = null;
+    private InstallersWizardPage installersWizard = null;
+    private SelectPackagesWizardPage selectPluginsWizard = null;
+    private ProgressWizardPage progressWizard = null;
+    private DownloadProgressWizardPage downloadProgressWizard = null;
+    private TypicalOrAdvancedWizardPage typicalOrAdvancedWizard = null;
+    private final AddBundlesWizardPage addBundlesWizard;
+
+    private final I18nManager i18nManager;
+    private PackageFilter packageFilter;
+
+    public DefaultInstallWizardPanel(File applicationFolder,
+            File installFolder) throws InstallPackageServiceException {
+        super(applicationFolder, installFolder);
+
+        installerExecutionService = InstallerLocator.getInstallerManager()
+                .getInstallPackageService();
+
+        this.i18nManager = ToolsLocator.getI18nManager();
+        
+        List<UrlAndLabel> downloadURLs = SwingInstallerLocator
+                .getSwingInstallerManager().getDefaultDownloadUrlAndLabels();
+        selectInstallersWizard = new SelectBundlesWizardPage(this, downloadURLs);
+        addBundlesWizard = new AddBundlesWizardPage(this);
+        typicalOrAdvancedWizard = new TypicalOrAdvancedWizardPage(this);
+        selectPluginsWizard = new SelectPackagesWizardPage(this);
+        progressWizard = new ProgressWizardPage(this);
+        downloadProgressWizard = new DownloadProgressWizardPage(this);
+        installersWizard = new InstallersWizardPage(this);
+
+        addWizards();
+
+        setFinishButtonEnabled(false);
+
+        this.setLayout(new BorderLayout());
+        super.initComponents();
+    }
+
+    @Override
+    public SelectBundlesPanel getBundlesPanel() {
+        return this.selectInstallersWizard;
+    }
+
+    private void addWizards() {
+        this.addOptionPanel(typicalOrAdvancedWizard);
+        this.addOptionPanel(selectInstallersWizard);
+        this.addOptionPanel(addBundlesWizard);
+        this.addOptionPanel(installersWizard);
+        this.addOptionPanel(selectPluginsWizard);
+        this.addOptionPanel(downloadProgressWizard);
+        this.addOptionPanel(progressWizard);
+    }
+
+    /**
+     * @return the installerExecutionService
+     */
+    @Override
+    public InstallPackageService getInstallerExecutionService() {
+        return installerExecutionService;
+    }
+
+    /**
+     * @return the installersToInstall
+     */
+    @Override
+    public List<PackageInfo> getPackagesToInstall() {
+        return this.selectPluginsWizard.getPackagesToInstall();
+    }
+
+    @Override
+    public void installFromDefaultDirectory()
+            throws InstallPackageServiceException {
+        getWizardComponents().removeWizardPanel(0);
+        installerExecutionService.addBundlesFromDirectory(getInstallFolder(), null);
+        selectPluginsWizard.updatePanel();
+    }
+
+    @Override
+    public void setSelectDefaultPackages(boolean isActivated) {
+        this.selectDefaultPackages = isActivated;
+    }
+
+    @Override
+    public boolean getSelectDefaultPackages() {
+        return this.selectDefaultPackages;
+    }
+
+    @Override
+    public void setSkipSelectPackagesWizardPage(boolean skip) {
+        if (skip) {
+            installationMode = TYPICAL_MODE;
+            selectDefaultPackages = true;
+        } else {
+            installationMode = ADVANCED_MODE;
+        }
+    }
+
+    @Override
+    public boolean getSkipSelectPackagesWizardPage() {
+        return installationMode == TYPICAL_MODE;
+    }
+    
+    @Override
+    public boolean getSkipTypicalOrAdvancedWizardPage() {
+        return skipTypicalOrAdvancedWizardPage;
+    }
+
+    @Override
+    public void setSkipTypicalOrAdvancedWizardPage(boolean skip) {
+        skipTypicalOrAdvancedWizardPage = skip;
+        if( skip ) {
+            this.installationMode = TYPICAL_MODE;
+        }
+    }
+
+    @Override
+    public void setSkipSelectBundleWizardPage(boolean skip) {
+        this.skipSelectBundleWizardPage = skip;
+    }
+
+    @Override
+    public boolean getSkipSelectBundleWizardPage() {
+        if (installationMode == TYPICAL_MODE) {
+            return true;
+        }
+        return this.skipSelectBundleWizardPage;
+    }
+
+    @Override
+    public boolean needsToRestartApplicationAfterFinish() {
+        // installers need to restart
+        return true;
+    }
+
+    @Override
+    public String getTranslation(String key) {
+        return this.i18nManager.getTranslation(key);
+    }
+
+    @Override
+    public JComponent asJComponent() {
+        return this;
+    }
+
+    @Override
+    public PackageFilter getPackageFilter() {
+        return this.packageFilter;
+    }
+
+    @Override
+    public void setPackageFilter(PackageFilter type) {
+        this.packageFilter = type;
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/DefaultInstallWizardPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectBundlesPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectBundlesPanel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectBundlesPanel.java	(revision 43126)
@@ -3,29 +3,27 @@
  *
  * 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 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.
+ * 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.
+ * 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.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
 /*
  * AUTHORS (In addition to CIT):
  * 2010 {Prodevelop}   {Task}
  */
-
 package org.gvsig.installer.swing.impl.execution.panel;
 
 import java.awt.BorderLayout;
@@ -46,248 +44,260 @@
 import javax.swing.JTextField;
 import javax.swing.event.DocumentEvent;
 import javax.swing.event.DocumentListener;
+import org.apache.commons.lang3.StringUtils;
 
 import org.gvsig.gui.beans.openfile.FileFilter;
 import org.gvsig.gui.beans.openfile.FileTextField;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
 import org.gvsig.installer.swing.api.SwingInstallerManager.UrlAndLabel;
 import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
  */
 public class SelectBundlesPanel extends JPanel implements ItemListener,
-		DocumentListener {
+        DocumentListener {
 
-	/**
-     * 
+    /**
+     *
      */
-	private static final long serialVersionUID = -6580729307001414868L;
-	protected DefaultSwingInstallerManager swingInstallerManager = null;
-	private JRadioButton fileRadioButton;
-	private ButtonGroup buttonGroup;
-	private JPanel northPanel;
-	private FileTextField selectFileText;
-	private JRadioButton standardRadioButton;
-	private JComboBox downloadURL;
-	private JRadioButton urlRadioButton;
-	private final List<UrlAndLabel> defaultDownloadURL;
+    protected static final Logger LOG = LoggerFactory.getLogger(SelectBundlesPanel.class);
+    private static final long serialVersionUID = -6580729307001414868L;
+    protected DefaultSwingInstallerManager swingInstallerManager = null;
+    private JRadioButton fileRadioButton;
+    private ButtonGroup buttonGroup;
+    private JPanel northPanel;
+    private FileTextField selectFileText;
+    private JRadioButton standardRadioButton;
+    private JComboBox downloadURL;
+    private JRadioButton urlRadioButton;
+    private final List<UrlAndLabel> defaultDownloadURL;
 
-	public SelectBundlesPanel(List<UrlAndLabel> defaultDownloadURL2, File installFolder) {
-		super();
-		this.defaultDownloadURL = defaultDownloadURL2;
-		swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
-				.getSwingInstallerManager();
-		initComponents();
-		initListeners();
-		
-		String[] files = installFolder.list();
-		
-		if (files!=null && files.length >0){
-			standardRadioButton.setSelected(true);
-			urlRadioButton.setSelected(false);	
-		} else {
-			urlRadioButton.setSelected(true);	
-			standardRadioButton.setEnabled(false);
-		}
-	}
+    public SelectBundlesPanel(List<UrlAndLabel> defaultDownloadURL2, File installFolder) {
+        super();
+        this.defaultDownloadURL = defaultDownloadURL2;
+        swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
+                .getSwingInstallerManager();
+        initComponents();
+        initListeners();
 
-	private void initListeners() {
-		standardRadioButton.addItemListener(this);
-		fileRadioButton.addItemListener(this);
-		urlRadioButton.addItemListener(this);
-		Object obj = selectFileText.getComponent(0);
-		if ((obj != null) && (obj instanceof JTextField)) {
-			((JTextField) obj).getDocument().addDocumentListener(this);
-		}
-	}
+        String[] files = installFolder.list();
 
-	private void initComponents() {
-		java.awt.GridBagConstraints gridBagConstraints;
+        if (files != null && files.length > 0) {
+            standardRadioButton.setSelected(true);
+            urlRadioButton.setSelected(false);
+        } else {
+            urlRadioButton.setSelected(true);
+            standardRadioButton.setEnabled(false);
+        }
+    }
 
-		northPanel = new JPanel();
-		standardRadioButton = new JRadioButton();
-		fileRadioButton = new JRadioButton();
-		urlRadioButton = new JRadioButton();
-		selectFileText = new FileTextField();
-		selectFileText.setFileFilter(new FileFilter() {
+    private void initListeners() {
+        standardRadioButton.addItemListener(this);
+        fileRadioButton.addItemListener(this);
+        urlRadioButton.addItemListener(this);
+        Object obj = selectFileText.getComponent(0);
+        if ((obj != null) && (obj instanceof JTextField)) {
+            ((JTextField) obj).getDocument().addDocumentListener(this);
+        }
+    }
 
-			private String packageExt = swingInstallerManager
-					.getInstallerManager().getDefaultPackageFileExtension();
-			private String packageSetExt = swingInstallerManager
-					.getInstallerManager().getDefaultPackageSetFileExtension();
-			private String indexSetExt = swingInstallerManager
-					.getInstallerManager().getDefaultIndexSetFileExtension();
+    private void initComponents() {
+        java.awt.GridBagConstraints gridBagConstraints;
 
-			@Override
-			public String getDescription() {
-			    
-				return swingInstallerManager.getText(
-				    "_gvSIG_packages_and_packages_and_index_sets")
-				    + " (*." + packageExt + ", *." + packageSetExt
-				    + ", *." + indexSetExt + ")";
-			}
+        northPanel = new JPanel();
+        standardRadioButton = new JRadioButton();
+        fileRadioButton = new JRadioButton();
+        urlRadioButton = new JRadioButton();
+        selectFileText = new FileTextField();
+        selectFileText.setFileFilter(new FileFilter() {
 
-			@Override
-			public boolean accept(File file) {
-				if (file.isFile()) {
-					String name = file.getName().toLowerCase();
-					return name.endsWith(packageExt)
-							|| name.endsWith(packageSetExt)
-							|| name.endsWith(indexSetExt);
-				}
-				return true;
-			}
+            private String packageExt = swingInstallerManager
+                    .getInstallerManager().getDefaultPackageFileExtension();
+            private String packageSetExt = swingInstallerManager
+                    .getInstallerManager().getDefaultPackageSetFileExtension();
+            private String indexSetExt = swingInstallerManager
+                    .getInstallerManager().getDefaultIndexSetFileExtension();
 
-			@Override
-			public String getDefaultExtension() {
-				return packageSetExt;
-			}
-		});
+            @Override
+            public String getDescription() {
 
-		downloadURL = new JComboBox();
-		downloadURL.setEditable(true);
-		if (defaultDownloadURL != null) {
-			for (int i = 0; i < defaultDownloadURL.size(); i++) {
-				downloadURL.addItem(defaultDownloadURL.get(i));
-			}
-		}
+                return swingInstallerManager.getText(
+                        "_gvSIG_packages_and_packages_and_index_sets")
+                        + " (*." + packageExt + ", *." + packageSetExt
+                        + ", *." + indexSetExt + ")";
+            }
 
-		buttonGroup = new ButtonGroup();
+            @Override
+            public boolean accept(File file) {
+                if (file.isFile()) {
+                    String name = file.getName().toLowerCase();
+                    return name.endsWith(packageExt)
+                            || name.endsWith(packageSetExt)
+                            || name.endsWith(indexSetExt);
+                }
+                return true;
+            }
 
-		buttonGroup.add(standardRadioButton);
-		buttonGroup.add(fileRadioButton);
-		buttonGroup.add(urlRadioButton);
+            @Override
+            public String getDefaultExtension() {
+                return packageSetExt;
+            }
+        });
 
-		setLayout(new BorderLayout());
+        downloadURL = new JComboBox();
+        downloadURL.setEditable(true);
+        if (defaultDownloadURL != null) {
+            for (int i = 0; i < defaultDownloadURL.size(); i++) {
+                downloadURL.addItem(defaultDownloadURL.get(i));
+            }
+        }
 
-		northPanel.setLayout(new GridBagLayout());
+        buttonGroup = new ButtonGroup();
 
-		standardRadioButton.setText(swingInstallerManager
-				.getText("_standard_installation") +
-				" (" +
-				swingInstallerManager.getText("_install_addons_in_gvsig_standard_dist") +
-				")");
+        buttonGroup.add(standardRadioButton);
+        buttonGroup.add(fileRadioButton);
+        buttonGroup.add(urlRadioButton);
 
-		gridBagConstraints = new GridBagConstraints();
-		gridBagConstraints.anchor = GridBagConstraints.WEST;
-		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
-		northPanel.add(standardRadioButton, gridBagConstraints);
+        setLayout(new BorderLayout());
 
-		fileRadioButton.setText(swingInstallerManager
-				.getText("_installation_from_file") +
-		             " (" +
-		             swingInstallerManager.getText("_install_addons_in_gvspki_or_gvspks_file") +
-		             ")");
+        northPanel.setLayout(new GridBagLayout());
 
-		gridBagConstraints = new GridBagConstraints();
-		gridBagConstraints.gridx = 0;
-		gridBagConstraints.gridy = 1;
-		gridBagConstraints.anchor = GridBagConstraints.WEST;
-		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
-		northPanel.add(fileRadioButton, gridBagConstraints);
-		gridBagConstraints = new GridBagConstraints();
-		gridBagConstraints.gridx = 0;
-		gridBagConstraints.gridy = 2;
-		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
-		gridBagConstraints.weightx = 1.0;
-		gridBagConstraints.insets = new Insets(2, 20, 2, 2);
-		northPanel.add(selectFileText, gridBagConstraints);
+        standardRadioButton.setText(swingInstallerManager
+                .getText("_standard_installation")
+                + " ("
+                + swingInstallerManager.getText("_install_addons_in_gvsig_standard_dist")
+                + ")");
 
-		urlRadioButton.setText(swingInstallerManager
-				.getText("_installation_from_url") +
-	             " (" +
-	             swingInstallerManager.getText("_install_addons_from_remote_repo") +
-	             ")");
-		
-		gridBagConstraints = new GridBagConstraints();
-		gridBagConstraints.gridx = 0;
-		gridBagConstraints.gridy = 3;
-		gridBagConstraints.anchor = GridBagConstraints.WEST;
-		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
-		northPanel.add(urlRadioButton, gridBagConstraints);
-		gridBagConstraints = new GridBagConstraints();
-		gridBagConstraints.gridx = 0;
-		gridBagConstraints.gridy = 4;
-		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
-		gridBagConstraints.weightx = 1.0;
-		gridBagConstraints.insets = new Insets(2, 20, 2, 2);
-		northPanel.add(downloadURL, gridBagConstraints);
+        gridBagConstraints = new GridBagConstraints();
+        gridBagConstraints.anchor = GridBagConstraints.WEST;
+        gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+        northPanel.add(standardRadioButton, gridBagConstraints);
 
-		add(northPanel, java.awt.BorderLayout.NORTH);
-	}
+        fileRadioButton.setText(swingInstallerManager
+                .getText("_installation_from_file")
+                + " ("
+                + swingInstallerManager.getText("_install_addons_in_gvspki_or_gvspks_file")
+                + ")");
 
-	public void itemStateChanged(ItemEvent e) {
-		selectFileText.setEnabled(fileRadioButton.isSelected());
-		downloadURL.setEnabled(urlRadioButton.isSelected());
-		downloadURL.setEditable(urlRadioButton.isSelected());
-		checkNextButtonEnabled();
-	}
+        gridBagConstraints = new GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 1;
+        gridBagConstraints.anchor = GridBagConstraints.WEST;
+        gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+        northPanel.add(fileRadioButton, gridBagConstraints);
+        gridBagConstraints = new GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 2;
+        gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new Insets(2, 20, 2, 2);
+        northPanel.add(selectFileText, gridBagConstraints);
 
-	protected File getSelectedFile() {
-		return selectFileText.getSelectedFile();
-	}
+        urlRadioButton.setText(swingInstallerManager
+                .getText("_installation_from_url")
+                + " ("
+                + swingInstallerManager.getText("_install_addons_from_remote_repo")
+                + ")");
 
-	protected URL getSelectedURL() throws MalformedURLException {
-		Object value = downloadURL.getSelectedItem();
-		if( value instanceof UrlAndLabel) {
-			// clicked fron the combo
-			return ((UrlAndLabel)value).getURL();
-		} else {
-			// String entered in the text field
-			return new URL(value.toString());
-		}
+        gridBagConstraints = new GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 3;
+        gridBagConstraints.anchor = GridBagConstraints.WEST;
+        gridBagConstraints.insets = new Insets(2, 2, 2, 2);
+        northPanel.add(urlRadioButton, gridBagConstraints);
+        gridBagConstraints = new GridBagConstraints();
+        gridBagConstraints.gridx = 0;
+        gridBagConstraints.gridy = 4;
+        gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
+        gridBagConstraints.weightx = 1.0;
+        gridBagConstraints.insets = new Insets(2, 20, 2, 2);
+        northPanel.add(downloadURL, gridBagConstraints);
 
-	}
+        add(northPanel, java.awt.BorderLayout.NORTH);
+    }
 
-	protected boolean isStandardSelected() {
-		return standardRadioButton.isSelected();
-	}
+    public void itemStateChanged(ItemEvent e) {
+        selectFileText.setEnabled(fileRadioButton.isSelected());
+        downloadURL.setEnabled(urlRadioButton.isSelected());
+        downloadURL.setEditable(urlRadioButton.isSelected());
+        checkNextButtonEnabled();
+    }
 
-	protected boolean isFileSelected() {
-		return fileRadioButton.isSelected();
-	}
+    public File getSelectedFile() {
+        return selectFileText.getSelectedFile();
+    }
 
-	protected boolean isURLSelected() {
-		return urlRadioButton.isSelected();
-	}
+    public URL getSelectedURL()  {
+        
+        Object value = downloadURL.getSelectedItem();
+        if (value instanceof UrlAndLabel) {
+            // clicked fron the combo
+            return ((UrlAndLabel) value).getURL();
+        }
+        // String entered in the text field
+        if( value == null ) {
+            return null;
+        }
+        if( StringUtils.isEmpty(value.toString()) ) {
+            return null;
+        } 
+        try {
+            return new URL(value.toString());
+        } catch(Exception ex) {
+            LOG.warn("The entered url are not valid");
+            return null;
+        }
+    }
 
-	protected boolean isNextButtonEnabled() {
-		if (isStandardSelected()) {
-			return true;
-		}
-		if (isFileSelected()) {
-			File file = selectFileText.getSelectedFile();
-			if (file == null) {
-				return false;
-			}
-			return file.exists();
-		}
-		if (isURLSelected()) {
-			try {
-				getSelectedURL();
-				return true;
-			} catch (MalformedURLException e) {
-				return false;
-			}
-		}
-		return false;
-	}
+    public boolean isStandardSelected() {
+        return standardRadioButton.isSelected();
+    }
 
-	protected void checkNextButtonEnabled() {
+    public boolean isFileSelected() {
+        return fileRadioButton.isSelected();
+    }
 
-	}
+    public boolean isURLSelected() {
+        return urlRadioButton.isSelected();
+    }
 
-	public void changedUpdate(DocumentEvent e) {
-		checkNextButtonEnabled();
-	}
+    protected boolean isNextButtonEnabled() {
+        if (isStandardSelected()) {
+            return true;
+        }
+        if (isFileSelected()) {
+            File file = selectFileText.getSelectedFile();
+            if (file == null) {
+                return false;
+            }
+            return file.exists();
+        }
+        if (isURLSelected()) {
+            return getSelectedURL() != null;
+        }
+        return false;
+    }
 
-	public void insertUpdate(DocumentEvent e) {
-		checkNextButtonEnabled();
-	}
+    protected void checkNextButtonEnabled() {
 
-	public void removeUpdate(DocumentEvent e) {
-		checkNextButtonEnabled();
-	}
+    }
 
+    @Override
+    public void changedUpdate(DocumentEvent e) {
+        checkNextButtonEnabled();
+    }
+
+    @Override
+    public void insertUpdate(DocumentEvent e) {
+        checkNextButtonEnabled();
+    }
+
+    @Override
+    public void removeUpdate(DocumentEvent e) {
+        checkNextButtonEnabled();
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagePropertiesFilterPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagePropertiesFilterPanel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagePropertiesFilterPanel.java	(revision 43126)
@@ -44,7 +44,7 @@
 import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
 import org.gvsig.installer.swing.impl.execution.panel.filters.AllFilter;
 import org.gvsig.installer.swing.impl.execution.panel.filters.CategoryFilter;
-import org.gvsig.installer.swing.impl.execution.panel.filters.PackageFilter;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.swing.impl.execution.panel.filters.TypeFilter;
 
 /**
@@ -57,9 +57,9 @@
 
 	private static final long serialVersionUID = 3767011079359743742L;
 
-	public enum PropertiesFilter {
-		CATEGORIES, TYPES
-	}
+//	public enum PropertiesFilter {
+//		CATEGORIES, TYPES
+//	}
 
 	private PackagesTablePanel packagesTablePanel;
 
@@ -69,6 +69,7 @@
 	private DefaultListModel model = null;
 
 	private DefaultSwingInstallerManager manager;
+    private JButton typesButton;
 
 	public PackagePropertiesFilterPanel(PackagesTablePanel packagesTablePanel) {
 		this.packagesTablePanel = packagesTablePanel;
@@ -91,9 +92,9 @@
 		categoriesButton.setActionCommand("categories");
 		categoriesButton.addActionListener(this);
 
-		JButton typesButton = new JButton(manager.getText("_types"));
-		typesButton.setActionCommand("types");
-		typesButton.addActionListener(this);
+		this.typesButton = new JButton(manager.getText("_types"));
+		this.typesButton.setActionCommand("types");
+		this.typesButton.addActionListener(this);
 
 		this.setLayout(new GridBagLayout());
 
@@ -165,6 +166,10 @@
 		}
 	}
 
+        void setEnabledTypeFilter(boolean enabled) {
+            this.typesButton.setEnabled(enabled);
+        }
+
 	private class MyMouseListener implements MouseListener {
 
 		public void mouseClicked(MouseEvent e) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectPackagesPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectPackagesPanel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectPackagesPanel.java	(revision 43126)
@@ -3,29 +3,27 @@
  *
  * 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 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.
+ * 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.
+ * 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.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
 /*
  * AUTHORS (In addition to CIT):
  * 2010 {Prodevelop}   {Task}
  */
-
 package org.gvsig.installer.swing.impl.execution.panel;
 
 import java.awt.BorderLayout;
@@ -33,14 +31,16 @@
 import java.util.List;
 
 import javax.swing.JPanel;
+import org.apache.commons.lang3.StringUtils;
 
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.execution.InstallPackageService;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
+import org.gvsig.installer.swing.impl.execution.panel.filters.TypeFilter;
 import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel;
-import org.gvsig.installer.swing.impl.execution.wizard.SelectPackagesWizard;
+import org.gvsig.installer.swing.impl.execution.wizard.SelectPackagesWizardPage;
 
 /**
  * @author gvSIG Team
@@ -48,103 +48,107 @@
  */
 public class SelectPackagesPanel extends JPanel {
 
-	private SelectPackagesWizard wizard;
-	private static final long serialVersionUID = -7554097983061858479L;
-	protected DefaultSwingInstallerManager swingInstallerManager = null;
-	private PackagesTablePanel packagesTablePanel;
+    private SelectPackagesWizardPage wizard;
+    private static final long serialVersionUID = -7554097983061858479L;
+    protected DefaultSwingInstallerManager swingInstallerManager = null;
+    private PackagesTablePanel packagesTablePanel;
 
-	private PackagesTableModel pluginsTableModel = null;
+    private PackagesTableModel pluginsTableModel = null;
 
-	public SelectPackagesPanel(SelectPackagesWizard selectPackagesWizard) {
-		super();
-		this.wizard = selectPackagesWizard;
-		swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
-				.getSwingInstallerManager();
-		initComponents();
-	}
+    public SelectPackagesPanel(SelectPackagesWizardPage selectPackagesWizard) {
+        super();
+        this.wizard = selectPackagesWizard;
+        swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
+                .getSwingInstallerManager();
+        initComponents();
+    }
 
-	public JPanel getJPanel() {
-		return this;
-	}
+    public JPanel getJPanel() {
+        return this;
+    }
 
-	public void updateTableModel(PackagesTableModel pluginsTableModel) {
-		packagesTablePanel.setTableModel(pluginsTableModel);
-		add(packagesTablePanel, BorderLayout.CENTER);
-	}
+    public void updateTableModel(PackagesTableModel pluginsTableModel) {
+        packagesTablePanel.setTableModel(pluginsTableModel);
+        add(packagesTablePanel, BorderLayout.CENTER);
+    }
 
-	public void selectPackages() {
-		packagesTablePanel.selectPackages();
-	}
+    public void selectPackages() {
+        packagesTablePanel.selectPackages();
+    }
 
-	private void initComponents() {
-		setLayout(new BorderLayout(0, 0));
+    private void initComponents() {
+        setLayout(new BorderLayout(0, 0));
 
-		packagesTablePanel = new PackagesTablePanel(this);
-		add(packagesTablePanel, BorderLayout.CENTER);
-	}
+        packagesTablePanel = new PackagesTablePanel(this);
+        add(packagesTablePanel, BorderLayout.CENTER);
+    }
 
-	public List<PackageInfo> getPackagesToInstall() {
+    public List<PackageInfo> getPackagesToInstall() {
 
-		List<PackageInfo> packages = packagesTablePanel.getPackagesToInstall();
+        List<PackageInfo> packages = packagesTablePanel.getPackagesToInstall();
 
-		List<PackageInfo> packagesToInstall = new ArrayList<PackageInfo>();
-		packagesToInstall.addAll(packages);
-		return packagesToInstall;
-	}
+        List<PackageInfo> packagesToInstall = new ArrayList<PackageInfo>();
+        packagesToInstall.addAll(packages);
+        return packagesToInstall;
+    }
 
-	public boolean isPackageSelected() {
-		return packagesTablePanel.isPackageSelected();
-	}
+    public boolean isPackageSelected() {
+        return packagesTablePanel.isPackageSelected();
+    }
 
-	public void checkIfPluginSelected() {
-		wizard.checkIfPluginSelected();
-	}
+    public void checkIfPluginSelected() {
+        wizard.checkIfPluginSelected();
+    }
 
-	public void packageSelectionChanged(Object value, int row, int column) {
-	}
+    public void packageSelectionChanged(Object value, int row, int column) {
+    }
 
-	public void updatePanel() {
+    public void updatePanel() {
 
-		InstallPackageService installerExecutionService = wizard
-				.getDefaultInstallPackageWizard()
-				.getInstallerExecutionService();
+        InstallPackageService installerExecutionService = wizard
+                .getWizardPanel()
+                .getInstallerExecutionService();
 
-		if (pluginsTableModel == null) {
-			pluginsTableModel = new PackagesTableModel(swingInstallerManager,
-					installerExecutionService, true);
-		}
-		pluginsTableModel.updatePackages();
+        if (pluginsTableModel == null) {
+            pluginsTableModel = new PackagesTableModel(swingInstallerManager,
+                    installerExecutionService, true);
+        }
+        pluginsTableModel.updatePackages();
 
-		updateTableModel(pluginsTableModel);
+        updateTableModel(pluginsTableModel);
 
-		if (wizard.isDefaultPackagesSelectionSet()) {
-			pluginsTableModel.selectDefaultPackages();
-		}
-		
-		
-		
-		
+        if (wizard.isDefaultPackagesSelectionSet()) {
+            pluginsTableModel.selectDefaultPackages();
+        }
 
-	}
+    }
 
-	public DefaultInstallPackageWizard getDefaultInstallPackageWizard() {
-		return wizard.getDefaultInstallPackageWizard();
-	}
+    public PackagesTableModel getModel() {
+        return this.pluginsTableModel;
+    }
 
-	public PackagesTableModel getModel() {
-		return this.pluginsTableModel;
-	}
+    public void clearPanel() {
+        packagesTablePanel.clearAllPanels();
+    }
 
-	public void clearPanel() {
-		packagesTablePanel.clearAllPanels();
-	}
-
     /**
-     * 
+     *
      */
     public void setInitialFilter() {
         packagesTablePanel.setInitialFilter();
-        
+
     }
 
+    public void setBaseFilter(PackageFilter filter) {
+        if (filter == null) {
+            this.packagesTablePanel.setBaseFilter(null);
+            this.packagesTablePanel.setEnabledTypeFilter(true);
+        } else {
+            this.packagesTablePanel.setBaseFilter(filter);
+            if (filter instanceof TypeFilter) {
+                this.packagesTablePanel.setEnabledTypeFilter(false);
+            }
+        }
+    }
+
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/model/PackagesTableModel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/model/PackagesTableModel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/model/PackagesTableModel.java	(revision 43126)
@@ -49,7 +49,7 @@
 import org.gvsig.installer.lib.api.execution.InstallPackageService;
 import org.gvsig.installer.swing.api.SwingInstallerManager;
 import org.gvsig.installer.swing.impl.execution.panel.filters.NameDescriptionOrCodeFilter;
-import org.gvsig.installer.swing.impl.execution.panel.filters.PackageFilter;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.tools.packageutils.PackageManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagesTablePanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagesTablePanel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagesTablePanel.java	(revision 43126)
@@ -34,13 +34,10 @@
 import java.awt.Insets;
 import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
-import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.List;
 import java.util.Locale;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import javax.swing.JEditorPane;
 import javax.swing.JPanel;
@@ -49,15 +46,15 @@
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
 import javax.swing.table.TableColumnModel;
-import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang3.StringUtils;
 
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
 import org.gvsig.installer.swing.api.SwingInstallerManager;
+import org.gvsig.installer.swing.impl.execution.panel.filters.AndFilter;
 import org.gvsig.installer.swing.impl.execution.panel.filters.NameDescriptionOrCodeFilter;
-import org.gvsig.installer.swing.impl.execution.panel.filters.PackageFilter;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel;
 import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel.PackageOfficialRecommended;
 import org.gvsig.installer.swing.impl.execution.panel.model.PackagesTableModel.PackageOsAndArchitecture;
@@ -85,6 +82,8 @@
 	private PackagePropertiesFilterPanel filterPanel;
 	private FastFilterButtonsPanel fastFilterPanel;
 	private SelectPackagesPanel selectPackagesPanel;
+        
+        private PackageFilter baseFilter = null;
 
 	public PackagesTablePanel(SelectPackagesPanel selectPackagesPanel) {
 		super();
@@ -338,19 +337,24 @@
         }
 
 	public void setFilter(PackageFilter filter) {
-		PackagesTableModel pluginsTableModel = (PackagesTableModel) pluginsTable
-				.getModel();
-		pluginsTableModel.setFilter(filter);
-		selectPackagesPanel.updatePanel();
+            PackagesTableModel pluginsTableModel = (PackagesTableModel) pluginsTable.getModel();
+            if( baseFilter == null ) {
+                pluginsTableModel.setFilter(filter);
+            } else {
+                pluginsTableModel.setFilter(new AndFilter().add(this.baseFilter).add(filter));
+            }
+            selectPackagesPanel.updatePanel();
 	}
 
-	public void setFilter(NameDescriptionOrCodeFilter filter) {
-		PackagesTableModel pluginsTableModel = (PackagesTableModel) pluginsTable
-				.getModel();
-		pluginsTableModel.setFilter(filter);
-		selectPackagesPanel.updatePanel();
-	}
+        public void setBaseFilter(PackageFilter filter) {
+            this.baseFilter = filter;
+            this.setFilter(null);
+        }
 
+        public void setEnabledTypeFilter(boolean enabled) {
+            this.filterPanel.setEnabledTypeFilter(enabled);            
+        }
+        
 	private class MyMouseListener implements MouseListener {
 
 		public void mouseClicked(MouseEvent e) {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/PackageFilter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/PackageFilter.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/PackageFilter.java	(revision 43126)
@@ -1,36 +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.installer.swing.impl.execution.panel.filters;
-
-import org.gvsig.installer.lib.api.PackageInfo;
-
-/**
- * @author gvSIG Team
- * @version $Id$
- * 
- */
-public interface PackageFilter {
-
-	public boolean match(PackageInfo pkg);
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/TypeFilter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/TypeFilter.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/TypeFilter.java	(revision 43126)
@@ -23,6 +23,7 @@
  */
 package org.gvsig.installer.swing.impl.execution.panel.filters;
 
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.lib.api.PackageInfo;
 
 /**
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/AllFilter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/AllFilter.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/AllFilter.java	(revision 43126)
@@ -23,6 +23,7 @@
  */
 package org.gvsig.installer.swing.impl.execution.panel.filters;
 
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
 import org.gvsig.installer.swing.api.SwingInstallerManager;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/CategoryFilter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/CategoryFilter.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/CategoryFilter.java	(revision 43126)
@@ -23,6 +23,7 @@
  */
 package org.gvsig.installer.swing.impl.execution.panel.filters;
 
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import java.util.List;
 
 import org.gvsig.installer.lib.api.PackageInfo;
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/NameDescriptionOrCodeFilter.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/NameDescriptionOrCodeFilter.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/filters/NameDescriptionOrCodeFilter.java	(revision 43126)
@@ -23,6 +23,7 @@
  */
 package org.gvsig.installer.swing.impl.execution.panel.filters;
 
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.lib.api.PackageInfo;
 
 /**
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizard.java	(revision 43126)
@@ -1,349 +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.installer.swing.impl.execution.wizard;
-
-import java.util.Iterator;
-import java.util.List;
-
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-
-import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
-import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
-import org.gvsig.gui.beans.wizard.panel.OptionPanel;
-import org.gvsig.installer.lib.api.Dependencies;
-import org.gvsig.installer.lib.api.DependenciesCalculator;
-import org.gvsig.installer.lib.api.PackageInfo;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel;
-import org.gvsig.installer.swing.api.execution.JShowPackagesAndAskContinuePanel;
-import org.gvsig.installer.swing.api.execution.JShowRequiredPackagesAndAskContinuePanel;
-import org.gvsig.installer.swing.api.execution.JShowUnresolvedDependenciesAndAskContinuePanel;
-import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
-import org.gvsig.installer.swing.impl.execution.panel.SelectPackagesPanel;
-import org.gvsig.tools.swing.api.ToolsSwingLocator;
-import org.gvsig.tools.swing.api.windowmanager.WindowManager;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class SelectPackagesWizard implements OptionPanel {
-
-	private static final long serialVersionUID = -4678172923039393643L;
-
-	private static Logger LOG = LoggerFactory
-			.getLogger(SelectPackagesWizard.class);
-
-	protected DefaultInstallPackageWizard installerExecutionWizard;
-
-	private SelectPackagesPanel selectPackagesPanel = null;
-	private DefaultSwingInstallerManager swingInstallerManager = null;
-
-	private int direccion = WizardPanelWithLogo.ACTION_NEXT;
-
-	public SelectPackagesWizard(
-			DefaultInstallPackageWizard installerExecutionWizard) {
-		super();
-		this.installerExecutionWizard = installerExecutionWizard;
-		selectPackagesPanel = new SelectPackagesPanel(this);
-
-		swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
-				.getSwingInstallerManager();
-	}
-
-	public JPanel getJPanel() {
-		return selectPackagesPanel;
-	}
-
-	public String getPanelTitle() {
-		return swingInstallerManager.getText("_select_plugins");
-	}
-
-	public void lastPanel() {
-		direccion = WizardPanelWithLogo.ACTION_NEXT;
-		selectPackagesPanel.clearPanel();
-	}
-
-	public void nextPanel() throws NotContinueWizardException {
-	    /*
-	     * First warn about packages in development or unofficial
-	     */
-        checkDevelAndUnoficialPackages();
-        /*
-         * Then check dependencies
-         */
-		checkDependencies();
-		direccion = WizardPanelWithLogo.ACTION_PREVIOUS;
-		installerExecutionWizard.setNextButtonEnabled(false);
-	}
-
-	private void checkDependencies() throws NotContinueWizardException {
-		List<PackageInfo> requiredPackages = null;
-		List<PackageInfo> troubledPackages = null;
-		Dependencies unresolvedDependencies = null;
-		try {
-			// Creamos el calculador de dependencias
-			DependenciesCalculator calculator = this.swingInstallerManager
-					.getInstallerManager().createDependenciesCalculator(
-							installerExecutionWizard
-									.getInstallerExecutionService());
-
-			// Le indicamos los paquetes que queremos instalar
-			calculator.addPackageToInstall(this.installerExecutionWizard
-					.getInstallersToInstall());
-
-			// Le añadimos los paquetes que ya hay instalados.
-
-			PackageInfo[] pkgs = swingInstallerManager.getInstallerManager()
-					.getInstalledPackages();
-			calculator.addInstalledPackage(pkgs);
-
-			// Calculamos las dependencias
-			calculator.calculate();
-
-			requiredPackages = calculator.getRequiredPackages();
-			unresolvedDependencies = calculator.getUnresolvedDependencies();
-			troubledPackages = calculator.getConflictPackages();
-		} catch (Throwable e) {
-			LOG
-					.error(
-							swingInstallerManager
-									.getText("_an_error_has_occurred_when_calculating_the_dependecies_of_the_packages_to_install"),
-							e);
-			int resp = JOptionPane
-					.showConfirmDialog(
-							null,
-							swingInstallerManager
-									.getText("_an_error_has_occurred_when_calculating_the_dependecies_of_the_selected_packages")
-									+ "\n"
-									+ swingInstallerManager
-											.getText("_it_is_not_possible_to_verify_if_any_additional_package_is_needed_to_install_the_selected_packages")
-									+ "\n"
-									+ swingInstallerManager
-											.getText("_if_you_want_you_can_select_again_manually_the_packets_that_might_be_necessary")
-									+ swingInstallerManager
-											.getText("_do_you_want_to_continue_and_install_the_packages_you_already_have_selected"),
-							swingInstallerManager
-									.getText("_a_problem_has_occurred_when_calculating_the_dependencies"),
-							JOptionPane.YES_NO_OPTION,
-							JOptionPane.WARNING_MESSAGE);
-			if (resp == JOptionPane.NO_OPTION) {
-				throw new NotContinueWizardException("", null, false);
-			}
-		}
-
-		if (troubledPackages != null && troubledPackages.size() > 0) {
-			JShowPackagesAndAskContinuePanel dlg = this.swingInstallerManager
-					.createJShowTroubledPackagesAndAskContinuePanel(
-							troubledPackages,
-							swingInstallerManager
-									.getText("_Some_of_the_selected_addons_should_not_be_installed_simultaneously")
-									+ ". "
-		                            + swingInstallerManager.getText("_Installing_these_addons_may_cause_errors")
-									+ ".\n"
-									+ swingInstallerManager.getText("_do_you_want_to_continue")
-					);
-			if (dlg.needShow()) {
-				WindowManager wm = ToolsSwingLocator.getWindowManager();
-				wm.showWindow(dlg, swingInstallerManager
-						.getText("_do_you_want_to_continue"),
-						WindowManager.MODE.DIALOG);
-				if (dlg.cancelled()) {
-					throw new NotContinueWizardException("", null, false);
-				}
-			}
-		}
-
-		if (requiredPackages != null && requiredPackages.size() > 0) {
-			JShowRequiredPackagesAndAskContinuePanel dlg = this.swingInstallerManager
-					.createJShowRequiredPackagesAndAskContinuePanel(
-							requiredPackages,
-							swingInstallerManager
-									.getText("_the_selected_packages_require_to_install_or_update_the_following_packages")
-									+ ":\n"
-									+ swingInstallerManager
-											.getText("_do_you_want_to_continue"));
-			if (dlg.needShow()) {
-				WindowManager wm = ToolsSwingLocator.getWindowManager();
-				wm.showWindow(dlg, swingInstallerManager
-						.getText("_do_you_want_to_continue"),
-						WindowManager.MODE.DIALOG);
-				if (dlg.cancelled()) {
-					throw new NotContinueWizardException("", null, false);
-				}
-			}
-		}
-
-		if (unresolvedDependencies != null && unresolvedDependencies.size() > 0) {
-			JShowUnresolvedDependenciesAndAskContinuePanel dlg = this.swingInstallerManager
-					.createJShowUnresolvedDependenciesAndAskContinuePanel(
-							unresolvedDependencies,
-							swingInstallerManager
-									.getText("_the_following_dependencies_have_not_been_possible_to_resolve")
-                                    + ". " +
-                                    swingInstallerManager.getText("_This_may_cause_issues_in_gvSIG")
-									+ "\n" +
-									swingInstallerManager.getText("_do_you_want_to_continue_anyway")
-									);
-			if (dlg.needShow()) {
-				WindowManager wm = ToolsSwingLocator.getWindowManager();
-				wm.showWindow(dlg, swingInstallerManager
-						.getText("_do_you_want_to_continue"),
-						WindowManager.MODE.DIALOG);
-				if (dlg.cancelled()) {
-					throw new NotContinueWizardException("", null, false);
-				}
-			}
-		}
-
-		Iterator<PackageInfo> it = requiredPackages.iterator();
-		while (it.hasNext()) {
-			PackageInfo pkg = it.next();
-			selectPackagesPanel.getModel().selectPackage(pkg);
-			LOG.info("Automatic selection of required package "+pkg.getCode());
-		}
-	}
-
-	private void checkDevelAndUnoficialPackages()
-			throws NotContinueWizardException {
-		List<PackageInfo> packagesToInstall = this.installerExecutionWizard
-				.getInstallersToInstall();
-
-		JShowPackageStatusAndAskContinuePanel dlg = this.swingInstallerManager
-				.createJShowPackageStatusAndAskContinuePanel(
-						packagesToInstall,
-						swingInstallerManager.getText(
-						    "_you_have_selected_in_development_or_not_official_versions")
-                            + ". "
-                            + swingInstallerManager.getText(
-                                "_Installing_devel_addons_may_cause_errors")
-						    + "\n"
-						    + swingInstallerManager.getText(
-						        "_do_you_want_to_continue_anyway"));
-		if (dlg.needShow()) {
-			WindowManager wm = ToolsSwingLocator.getWindowManager();
-			wm.showWindow(dlg, swingInstallerManager
-					.getText("_do_you_want_to_continue"),
-					WindowManager.MODE.DIALOG);
-			if (dlg.cancelled()) {
-				throw new NotContinueWizardException("", null, false);
-			}
-		}
-	}
-
-	public void updatePanel() {
-                if(installerExecutionWizard.getSkipBundleSelection() ) {
-			installerExecutionWizard.setBackButtonEnabled(false);
-		}
-            
-		InstallPackageService installerExecutionService = installerExecutionWizard
-				.getInstallerExecutionService();
-
-		selectPackagesPanel.updatePanel();
-		selectPackagesPanel.setInitialFilter();
-
-		// if default packages must be selected or not
-		if (installerExecutionWizard.getSelectDefaultPackages()) {
-			selectPackagesPanel.selectPackages();
-		}
-
-		// if this panel has not to be shown
-		if (!installerExecutionWizard.showSelectPackagesPanel()) {
-			saltaOno(installerExecutionService);
-		}
-
-		checkIfPluginSelected();
-	}
-
-	public void checkIfPluginSelected() {
-		if (installerExecutionWizard.showSelectPackagesPanel()) {
-			installerExecutionWizard.setNextButtonEnabled(selectPackagesPanel
-					.isPackageSelected());
-		}
-	}
-
-	public void saltaOno(InstallPackageService installerExecutionService) {
-
-		List<String> defaultPackageIDs = installerExecutionService
-				.getDefaultSelectedPackagesIDs();
-
-		boolean defaultPacketsExist = false;
-
-		// check if there is any default package
-		if (defaultPackageIDs != null) {
-			for (int i = 0; i < installerExecutionService.getPackageCount(); i++) {
-				for (int j = 0; j < defaultPackageIDs.size(); j++) {
-					// if the package is in the default packages list
-					if (installerExecutionService.getPackageInfo(i).matchID(
-							defaultPackageIDs.get(j))) {
-						// if package is for all operating systems or the system
-						// operating system equals the project's one
-						if (installerExecutionService.getPackageInfo(i)
-								.getOperatingSystem().equals("all")
-								|| installerExecutionService.getPackageInfo(i)
-										.getOperatingSystem().equals(
-												this.swingInstallerManager
-														.getInstallerManager()
-														.getOperatingSystem())) {
-							defaultPacketsExist = true;
-							break;
-						}
-					}
-				}
-			}
-		}
-
-		if (defaultPacketsExist) {
-			(installerExecutionWizard).doAction(direccion);
-			// if there is not any package, show error and jump back.
-		} else {
-			(installerExecutionWizard)
-					.doAction(WizardPanelWithLogo.ACTION_PREVIOUS);
-			try {
-				throw new Exception(
-						swingInstallerManager
-								.getText("_There_are_no_packages_in_typical_installation_to_select"));
-			} catch (Exception e) {
-				// TODO Auto-generated catch block
-				e.printStackTrace();
-			}
-
-		}
-
-	}
-
-	public List<PackageInfo> getPackagesToInstall() {
-		return selectPackagesPanel.getPackagesToInstall();
-	}
-
-	public DefaultInstallPackageWizard getDefaultInstallPackageWizard() {
-		return this.installerExecutionWizard;
-	}
-
-	public Boolean isDefaultPackagesSelectionSet() {
-		return installerExecutionWizard.getSelectDefaultPackages();
-	}
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizard.java	(revision 43126)
@@ -1,175 +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.
- */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-package org.gvsig.installer.swing.impl.execution.wizard;
-
-import java.lang.reflect.InvocationTargetException;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import javax.swing.JOptionPane;
-
-import javax.swing.JPanel;
-import javax.swing.SwingUtilities;
-
-import org.gvsig.gui.beans.wizard.panel.OptionPanel;
-import org.gvsig.installer.lib.api.PackageInfo;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
-import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
-import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
-import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
-import org.gvsig.tools.task.AbstractMonitorableTask;
-import org.gvsig.tools.task.SimpleTaskStatus;
-
-/**
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public class ProgressWizard extends DefaultProgressPanel implements OptionPanel {
-
-    private static final long serialVersionUID = 8531884535246881448L;
-    private AbstractInstallPackageWizard installerExecutionWizard;
-    private DefaultSwingInstallerManager swingInstallerManager;
-
-    public ProgressWizard(DefaultInstallPackageWizard installerExecutionWizard) {
-        super();
-        this.installerExecutionWizard = installerExecutionWizard;
-        swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
-                .getSwingInstallerManager();
-    }
-
-    public JPanel getJPanel() {
-        return this;
-    }
-
-    public String getPanelTitle() {
-        return swingInstallerManager.getText("_progress");
-    }
-
-    public void lastPanel() {
-        installerExecutionWizard.setFinishButtonVisible(false);
-        installerExecutionWizard.setCancelButtonEnabled(true);
-    }
-
-    public void nextPanel() {
-        // Nothing to do, no next panel
-    }
-
-    public void updatePanel() {
-        installerExecutionWizard.setFinishButtonVisible(false);
-        installerExecutionWizard.setCancelButtonEnabled(false);
-
-        final ProgressWizard wizard = this;
-
-        UpdatePanel task = new UpdatePanel(wizard);
-        wizard.installerExecutionWizard.addCancellableTask(task);
-        bind(task.getTaskStatus());
-        task.setDaemon(true);
-        task.start();
-    }
-
-    private static class UpdatePanel extends AbstractMonitorableTask {
-
-        private final ProgressWizard panel;
-
-        public UpdatePanel(ProgressWizard panel) {
-            super(panel.swingInstallerManager
-                    .getText("_Install_package"));
-            this.panel = panel;
-        }
-
-        private void showWarning(final String msg) {
-            if( !SwingUtilities.isEventDispatchThread() )  {
-                try {
-                    SwingUtilities.invokeAndWait(new Runnable() {
-                        public void run() {
-                        }
-                    });
-                } catch (Exception ex) {
-                    logger.warn("Cant show message to the user. "+msg);
-                }
-                return;
-            }
-            JOptionPane.showMessageDialog(panel, msg, "Warning", JOptionPane.WARNING_MESSAGE);
-        }
-        
-        @Override
-        public synchronized void run() {
-
-            int errcount = 0;
-            try {
-                logger.info("Package installation iniitiated");
-                SimpleTaskStatus taskStatus = (SimpleTaskStatus) this
-                        .getTaskStatus();
-                // bundle of packages
-                InstallPackageService installerExecutionService = this.panel.installerExecutionWizard
-                        .getInstallerExecutionService();
-                // packages to install
-                List<PackageInfo> installersToInstall = this.panel.installerExecutionWizard
-                        .getInstallersToInstall();
-                Collections.sort(installersToInstall, new Comparator<PackageInfo>() {
-                    public int compare(PackageInfo o1, PackageInfo o2) {
-                        return o1.getCode().compareTo(o2.getCode());
-                    }
-                });
-                taskStatus.setRangeOfValues(0, installersToInstall.size());
-                for ( int i = 0; i < installersToInstall.size(); i++ ) {
-                    PackageInfo installerInfo = installersToInstall.get(i);
-                    taskStatus.message(installerInfo.getName());
-                    try {
-                        installerExecutionService.installPackage(
-                                panel.installerExecutionWizard.getApplicationFolder(),
-                                installerInfo
-                        );
-                    } catch (Throwable th) {
-                        logger.warn("Can't install package '" + installerInfo.getCode() + "'.", th);
-                        errcount++;
-                    }
-                    taskStatus.setCurValue(i + 1);
-                }
-                this.panel.installerExecutionWizard.setFinishButtonVisible(true);
-                if( errcount>0 ) {
-                    showWarning("Failed to install "+errcount+" packages.");
-                }
-                taskStatus.message(panel.swingInstallerManager.getText("_Finished"));
-
-                taskStatus.terminate();
-                taskStatus.remove();
-                logger.info("Package installation finished");
-            } catch (Throwable th) {
-                logger.warn("Problems install packages.",th);
-                showWarning(panel.swingInstallerManager.getText("_Cant_install_packege"));
-            }
-
-        }
-
-    }
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizard.java	(revision 43126)
@@ -1,312 +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.installer.swing.impl.execution.wizard;
-
-import java.awt.Component;
-import java.awt.GridBagConstraints;
-import java.awt.Insets;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.swing.JButton;
-import javax.swing.JOptionPane;
-import javax.swing.JPanel;
-import javax.swing.SwingUtilities;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
-import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
-import org.gvsig.gui.beans.wizard.panel.OptionPanel;
-import org.gvsig.i18n.Messages;
-import org.gvsig.installer.lib.api.PackageInfo;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
-import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
-import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
-import org.gvsig.tools.task.AbstractMonitorableTask;
-import org.gvsig.tools.task.SimpleTaskStatus;
-
-/**
- * @author gvSIG Team
- * @version $Id$
- * 
- */
-
-public class DownloadProgressWizard extends DefaultProgressPanel implements
-		OptionPanel {
-
-	private static final long serialVersionUID = -7064334977678611609L;
-	private static Logger logger = LoggerFactory
-			.getLogger(DownloadProgressWizard.class);
-	private AbstractInstallPackageWizard abstractInstallPackageWizard;
-	// private abstractInstallPackageWizard abstractInstallPackageWizard;
-	public JButton startDownload;
-	private int direccion = WizardPanelWithLogo.ACTION_NEXT;
-	private DefaultSwingInstallerManager swingInstallerManager;
-
-	public DownloadProgressWizard(
-			AbstractInstallPackageWizard abstractInstallPackageWizard) {
-		super();
-		this.abstractInstallPackageWizard = abstractInstallPackageWizard;
-	}
-
-	@Override
-	protected void initComponents() {
-		super.initComponents();
-
-		final DownloadProgressWizard wizard = this;
-
-		swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
-				.getSwingInstallerManager();
-
-		startDownload = new JButton(swingInstallerManager
-				.getText("_start_download"));
-
-		java.awt.GridBagConstraints gridBagConstraints;
-		gridBagConstraints = new GridBagConstraints();
-		gridBagConstraints.gridx = 0;
-		gridBagConstraints.gridy = 3;
-		gridBagConstraints.anchor = GridBagConstraints.EAST;
-		gridBagConstraints.insets = new Insets(5, 2, 2, 2);
-		add(startDownload, gridBagConstraints);
-
-		startDownload.addActionListener(new ActionListener() {
-
-			public void actionPerformed(ActionEvent e) {
-				UpdatePanel task = new UpdatePanel(wizard);
-				wizard.abstractInstallPackageWizard.addCancellableTask(task);
-				bind(task.getTaskStatus());
-				task.start();
-			}
-		});
-	}
-
-	public JPanel getJPanel() {
-		return this;
-	}
-
-	public String getPanelTitle() {
-		return swingInstallerManager.getText("_download_progress");
-	}
-
-	public void lastPanel() {
-		abstractInstallPackageWizard.setFinishButtonVisible(false);
-		abstractInstallPackageWizard.setCancelButtonEnabled(true);
-		direccion = WizardPanelWithLogo.ACTION_NEXT;
-	}
-
-	public void nextPanel() throws NotContinueWizardException {
-		direccion = WizardPanelWithLogo.ACTION_PREVIOUS;
-	}
-
-	public void updatePanel() {
-		boolean thereIsDownloablePackage = false;
-
-		InstallPackageService service = abstractInstallPackageWizard
-				.getInstallerExecutionService();
-		service.getPackageCount();
-
-		for (int i = 0; i < abstractInstallPackageWizard
-				.getInstallersToInstall().size(); i++) {
-
-			if (abstractInstallPackageWizard.getInstallersToInstall().get(i)
-					.getDownloadURL() != null) {
-				thereIsDownloablePackage = true;
-				break;
-			}
-		}
-
-		if (thereIsDownloablePackage) {
-			this.abstractInstallPackageWizard.setNextButtonEnabled(false);
-			this.startDownload.setEnabled(true);
-		} else {
-			((DefaultInstallPackageWizard) abstractInstallPackageWizard)
-					.doAction(direccion);
-		}
-	}
-
-	private String getText(String key) {
-		return this.swingInstallerManager.getText(key);
-	}
-
-	private static class UpdatePanel extends AbstractMonitorableTask {
-
-		private final DownloadProgressWizard panel;
-
-		public UpdatePanel(DownloadProgressWizard panel) {
-            super(panel.getText("_downloading_files"));
-			// super(panel.getText("_downloading"));
-			this.panel = panel;
-		}
-
-		@Override
-        public synchronized void run() {
-            SimpleTaskStatus taskStatus =
-                (SimpleTaskStatus) this.getTaskStatus();
-
-            List<String> not_downloaded = new ArrayList<String>();
-            
-            try {
-
-                List<PackageInfo> installersToInstall =
-                    this.panel.abstractInstallPackageWizard
-                        .getInstallersToInstall();
-                this.panel.startDownload.setEnabled(false);
-                this.panel.abstractInstallPackageWizard
-                    .setBackButtonEnabled(false);
-                InstallPackageService installerService =
-                    this.panel.abstractInstallPackageWizard
-                        .getInstallerExecutionService();
-
-                
-
-                for (int i = 0; i < installersToInstall.size(); i++) {
-                    taskStatus.setCurValue(0);
-                    PackageInfo installerInfo = installersToInstall.get(i);
-                    taskStatus.message(installerInfo.getName() + " " + (i + 1)
-                        + " / " + installersToInstall.size());
-                    if (installerInfo.getDownloadURL() != null) {
-                        try {
-                            installerService.downloadPackage(installerInfo,
-                                taskStatus);
-                        } catch (Exception e) {
-
-                            not_downloaded.add(installerInfo.getName());
-                            String msg =
-                                panel.swingInstallerManager
-                                    .getText("_Cant_download_package_files")
-                                    + " " + installerInfo.getName();
-                            logger.info(msg, e);
-                        }
-                    }
-
-                    if (not_downloaded.size() > 0) {
-                        break;
-                    }
-                }
-
-                this.panel.abstractInstallPackageWizard
-                    .setBackButtonEnabled(true);
-
-            } finally {
-                if (not_downloaded.size() == 0) {
-                    // Set the finished text
-                    taskStatus.message(panel.getText("_finished"));
-                    taskStatus.terminate();
-                    taskStatus.remove();
-                    this.panel.abstractInstallPackageWizard
-                        .setNextButtonEnabled(true);
-                } else {
-                    taskStatus.message(panel.getText("_finished_Some_files_not_downloaded"));
-                    taskStatus.terminate();
-                    taskStatus.remove();
-                    this.panel.abstractInstallPackageWizard
-                        .setNextButtonEnabled(false);
-                    showNotDownloaded(this.panel, not_downloaded);
-                }            
-                
-            }
-        }
-
-	}
-	
-	
-	   private static synchronized void showNotDownloaded(
-	       final Component parentPanel, final List<String> names) {
-	       
-	       int sz = names.size();
-           String list_str = ""; 
-	       for (int i=0; i<sz; i++) {
-	           list_str = list_str + "\n - " + names.get(i);
-	       }
-	       
-	       list_str = Messages.getText("_These_packages_not_downloaded")
-	           + ":\n" + list_str + "\n";
-	       final String list_str_copy = list_str; 
-	       if (!SwingUtilities.isEventDispatchThread()) {
-	            try {
-	                SwingUtilities.invokeLater(new Runnable() {
-	                    public void run() {
-	                        
-	                        JOptionPane.showMessageDialog(
-	                            parentPanel, list_str_copy,
-	                            Messages.getText("_Download_error"),
-	                            JOptionPane.ERROR_MESSAGE);
-	                        
-	                    }
-	                });
-	            } catch (Throwable e) {
-	                logger.info("Error while showing message dialog. ", e);
-	            }
-	            
-	        } else {
-	            JOptionPane.showMessageDialog(
-	                parentPanel, list_str, Messages.getText("_Download_error"),
-	                JOptionPane.ERROR_MESSAGE);
-	        }
-	        
-	    }
-	   
-	   
-	
-	private static synchronized int showOptionDialog(
-	    final Component parentComponent,
-	    final String message,
-	    final String title,
-	    final int optionType,
-	    final int messageType) {
-
-        if (!SwingUtilities.isEventDispatchThread()) {
-            try {
-                final int[] resp = new int[1];
-                SwingUtilities.invokeAndWait(new Runnable() {
-
-                    public void run() {
-                        resp[0] = showOptionDialog(
-                            parentComponent, message, title, optionType, messageType);
-                        
-                    }
-                });
-                
-                return resp[0];
-            } catch (Throwable e) {
-                logger.info("Error while showing message dialog. ", e);
-            }
-        }
-        
-	    return JOptionPane.showOptionDialog(
-	        parentComponent, message, title,
-	        optionType, messageType, null, null, null);
-	    
-	}
-	
-	
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizard.java	(revision 43126)
@@ -1,129 +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.
- */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-
-package org.gvsig.installer.swing.impl.execution.wizard;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.List;
-
-import javax.swing.JPanel;
-import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
-
-import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
-import org.gvsig.gui.beans.wizard.panel.OptionPanel;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
-import org.gvsig.installer.swing.api.SwingInstallerManager.UrlAndLabel;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
-import org.gvsig.installer.swing.impl.execution.panel.SelectBundlesPanel;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public class SelectBundlesWizard extends SelectBundlesPanel implements
-		OptionPanel {
-
-	private static final long serialVersionUID = -3694039665800882085L;
-	private DefaultInstallPackageWizard installerExecutionWizard;
-	private static final Logger LOG = LoggerFactory
-			.getLogger(SelectBundlesWizard.class);
-
-	public SelectBundlesWizard(
-			DefaultInstallPackageWizard installerExecutionWizard,
-			List<UrlAndLabel> defaultDownloadURL) {
-		super(defaultDownloadURL, installerExecutionWizard.getInstallFolder());
-		this.installerExecutionWizard = installerExecutionWizard;
-		updatePanel();
-	}
-
-	public JPanel getJPanel() {
-		return this;
-	}
-
-	public String getPanelTitle() {
-		return swingInstallerManager.getText("_select_installation_source");
-	}
-
-	public void lastPanel() {
-	}
-
-	public void nextPanel() throws NotContinueWizardException {
-		InstallPackageService installerExecutionService = installerExecutionWizard
-				.getInstallerExecutionService();
-		installerExecutionService.reset();
-
-		try {
-			if (isStandardSelected()) {
-				installerExecutionService
-						.addBundlesFromDirectory(installerExecutionWizard
-								.getInstallFolder());
-			} else {
-				if (isURLSelected()) {
-					installerExecutionService.addBundle(getSelectedURL());
-				} else {
-					File file = getSelectedFile();
-					if ((file != null) && (file.exists())) {
-						installerExecutionService.addBundle(file);
-					} else {
-						LOG.error(swingInstallerManager.getText(""
-								+ "_the_selected_file_does_not_exist"));
-					}
-				}
-			}
-		} catch (InstallPackageServiceException e) {
-			throw new NotContinueWizardException(swingInstallerManager
-					.getText("_execute_adding_error"), e, this);
-		} catch (MalformedURLException e) {
-			throw new NotContinueWizardException(swingInstallerManager
-					.getText("_execute_adding_error"), e, this);
-		}
-
-	}
-
-	public void updatePanel() {
-                if(installerExecutionWizard.getSkipBundleSelection() ) {
-                    installerExecutionWizard.doAction(WizardPanelWithLogo.ACTION_NEXT);
-                }
-		if (installerExecutionWizard != null) {
-			installerExecutionWizard.setBackButtonEnabled(false);
-		}
-	}
-
-	@Override
-	protected void checkNextButtonEnabled() {
-		if (installerExecutionWizard != null) {
-			installerExecutionWizard
-					.setNextButtonEnabled(isNextButtonEnabled());
-		}
-	}
-
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizard.java	(revision 43126)
@@ -1,99 +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.installer.swing.impl.execution.wizard;
-
-import java.util.List;
-
-import javax.swing.JPanel;
-
-import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
-import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
-import org.gvsig.gui.beans.wizard.panel.OptionPanel;
-import org.gvsig.installer.lib.api.execution.InstallPackageService;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
-import org.gvsig.installer.swing.impl.execution.panel.TypicalOrAdvancedPanel;
-
-/**
- * @author gvSIG Team
- * @version $Id$
- * 
- */
-public class TypicalOrAdvancedWizard extends TypicalOrAdvancedPanel implements
-		OptionPanel {
-
-	private DefaultInstallPackageWizard installerExecutionWizard;
-
-	private int direccion = WizardPanelWithLogo.ACTION_NEXT;
-
-	public TypicalOrAdvancedWizard(
-			DefaultInstallPackageWizard installerExecutionWizard) {
-		super();
-		this.installerExecutionWizard = installerExecutionWizard;
-	}
-
-	private static final long serialVersionUID = -7151675399781722322L;
-
-	public JPanel getJPanel() {
-		return this;
-	}
-
-	public String getPanelTitle() {
-		return swingInstallerManager.getText("_select_installation_mode");
-	}
-
-	public void lastPanel() {
-		direccion = WizardPanelWithLogo.ACTION_NEXT;
-
-	}
-
-	public void nextPanel() throws NotContinueWizardException {
-		if (installerExecutionWizard.getAskTypicalOrCustom()) {
-			installerExecutionWizard
-					.setShowSelectPackagesPanel(isAdvancedModeSelected());
-		}
-		direccion = WizardPanelWithLogo.ACTION_PREVIOUS;
-	}
-
-	public void updatePanel() {
-		InstallPackageService service = installerExecutionWizard
-				.getInstallerExecutionService();
-
-		if (!installerExecutionWizard.getAskTypicalOrCustom()) {
-			(installerExecutionWizard).doAction(direccion);
-		}
-
-		// if no packages will be selected on typical mode
-		List<String> defaultdPackagesIDs = service
-				.getDefaultSelectedPackagesIDs();
-
-		// disable or enable the typical mode
-		if ((defaultdPackagesIDs == null) || (defaultdPackagesIDs.size() < 1)) {
-			setEnableTypicalMode(false);
-		} else {
-			// typical mode is enabled
-			setEnableTypicalMode(true);
-		}
-
-	}
-}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizardPage.java	(revision 43126)
@@ -0,0 +1,220 @@
+/**
+ * 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.installer.swing.impl.execution.wizard;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.i18n.Messages;
+import org.gvsig.installer.lib.api.PackageInfo;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.SwingInstallerManager;
+import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
+import org.gvsig.installer.swing.impl.execution.DefaultInstallWizardPanel;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.task.AbstractMonitorableTask;
+import org.gvsig.tools.task.SimpleTaskStatus;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class DownloadProgressWizardPage extends DefaultProgressPanel implements
+        OptionPanel {
+
+    private static final long serialVersionUID = -7064334977678611609L;
+    private static final Logger logger = LoggerFactory.getLogger(DownloadProgressWizardPage.class);
+
+    private final InstallWizardPanel_ext wizardPanel;
+
+    public DownloadProgressWizardPage(InstallWizardPanel_ext wizardPanel) {
+        super();
+        this.wizardPanel = wizardPanel;
+    }
+
+    @Override
+    public JPanel getJPanel() {
+        return this;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_download_progress");
+    }
+
+    @Override
+    public void lastPanel() {
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+    }
+
+    @Override
+    public void nextPanel() throws NotContinueWizardException {
+    }
+
+    @Override
+    public void updatePanel() {
+        if( wizardPanel.getDirection() == WizardPanelWithLogo.ACTION_PREVIOUS ) {
+            wizardPanel.skip();
+            return;
+        }
+        boolean AreTherePackagesToDownload = false;
+
+        this.wizardPanel.setNextButtonEnabled(false);
+        this.wizardPanel.setBackButtonEnabled(false);
+        this.wizardPanel.setFinishButtonEnabled(false);
+
+        InstallPackageService service = wizardPanel.getInstallerExecutionService();
+        service.getPackageCount();
+
+        List<PackageInfo> packagesToInstall = wizardPanel.getPackagesToInstall();
+        for (PackageInfo packageToInstall : packagesToInstall) {
+            if( packageToInstall.getDownloadURL() != null ) {
+                AreTherePackagesToDownload = true;
+                break;
+            }
+        }
+
+        if (!AreTherePackagesToDownload) {
+            wizardPanel.skip();
+        }
+        
+        UpdatePanel task = new UpdatePanel(this);
+        wizardPanel.addCancellableTask(task);
+        bind(task.getTaskStatus());
+        task.setDaemon(true);
+        task.start();
+        
+    }
+
+    private String getText(String key) {
+        return this.wizardPanel.getTranslation(key);
+    }
+
+    private static class UpdatePanel extends AbstractMonitorableTask {
+
+        private final DownloadProgressWizardPage panel;
+
+        public UpdatePanel(DownloadProgressWizardPage panel) {
+            super(panel.getText("_downloading_files"));
+            this.panel = panel;
+        }
+
+        @Override
+        public synchronized void run() {
+            SimpleTaskStatus taskStatus = (SimpleTaskStatus) this.getTaskStatus();
+            final List<String> not_downloaded = new ArrayList<>();
+            try {
+
+                List<PackageInfo> packagesToInstall = this.panel.wizardPanel.getPackagesToInstall();
+                InstallPackageService installerService = this.panel.wizardPanel.getInstallerExecutionService();
+
+                taskStatus.setRangeOfValues(0, packagesToInstall.size());
+                for (int i = 0; i < packagesToInstall.size(); i++) {
+                    taskStatus.setCurValue(i);
+                    PackageInfo packageInfo = packagesToInstall.get(i);
+                    taskStatus.message(packageInfo.getName());
+                    if (packageInfo.getDownloadURL() != null) {
+                        try {
+                            installerService.downloadPackage(
+                                    packageInfo,
+                                    taskStatus
+                            );
+                        } catch (Exception e) {
+                            not_downloaded.add(packageInfo.getName());
+                            logger.info("Can't download package '"+packageInfo.getName()+"'.", e);
+                        }
+                    }
+
+                    if (not_downloaded.size() > 0) {
+                        break;
+                    }
+                }
+                SwingUtilities.invokeAndWait(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        if (not_downloaded.isEmpty()) {
+                            panel.wizardPanel.setNextButtonEnabled(true);
+                            panel.wizardPanel.doAction(WizardPanelWithLogo.ACTION_NEXT);
+                        } else {
+                            panel.wizardPanel.setNextButtonEnabled(false);
+                        }
+                        panel.wizardPanel.setBackButtonEnabled(true);
+                    }
+                });                
+
+            } catch(Exception ex) {
+                logger.warn("Problems downloading packages.", ex);
+                ToolsSwingLocator.getThreadSafeDialogsManager().messageDialog(
+                        panel.getText("_Cant_download_packages"), 
+                        panel.getText("_Warning"), 
+                        JOptionPane.WARNING_MESSAGE
+                );
+            } finally {
+                if (not_downloaded.isEmpty()) {
+                    taskStatus.message(panel.getText("_finished"));
+                } else {
+                    taskStatus.message(panel.getText("_finished_Some_files_not_downloaded"));
+                    showNotDownloaded(not_downloaded);
+                }
+                taskStatus.terminate();
+                taskStatus.remove();
+            }
+        }
+
+    }
+
+    private static synchronized void showNotDownloaded(final List<String> names) {
+
+        int sz = names.size();
+        String list_str = "";
+        for (int i = 0; i < sz; i++) {
+            list_str = list_str + "\n - " + names.get(i);
+        }
+
+        list_str = Messages.getText("_These_packages_not_downloaded")
+                + ":\n" + list_str + "\n";
+        ToolsSwingLocator.getThreadSafeDialogsManager().messageDialog(
+                list_str, 
+                Messages.getText("_Warning"), 
+                JOptionPane.WARNING_MESSAGE
+        );
+    }
+
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/DownloadProgressWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizardPage.java	(revision 43126)
@@ -0,0 +1,87 @@
+/**
+ * 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.
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Prodevelop}   {Task}
+ */
+package org.gvsig.installer.swing.impl.execution.wizard;
+
+import java.util.List;
+
+import javax.swing.JPanel;
+
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.swing.api.SwingInstallerManager.UrlAndLabel;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.execution.panel.SelectBundlesPanel;
+
+public class SelectBundlesWizardPage extends SelectBundlesPanel implements
+        OptionPanel {
+
+    private static final long serialVersionUID = -3694039665800882085L;
+    private final InstallWizardPanel_ext wizardPanel;
+
+    public SelectBundlesWizardPage(
+            InstallWizardPanel_ext wizardPanel,
+            List<UrlAndLabel> defaultDownloadURL) {
+        super(defaultDownloadURL, wizardPanel.getInstallFolder());
+        this.wizardPanel = wizardPanel;
+    }
+
+    @Override
+    public JPanel getJPanel() {
+        return this;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_select_installation_source");
+    }
+
+    @Override
+    public void lastPanel() {
+    }
+
+    @Override
+    public void nextPanel() throws NotContinueWizardException {
+    }
+
+    @Override
+    public void updatePanel() {
+        if (wizardPanel.getSkipSelectBundleWizardPage() && this.isNextButtonEnabled()) {
+            wizardPanel.skip();
+            return;
+        }
+        wizardPanel.setBackButtonEnabled(false);
+        wizardPanel.setNextButtonEnabled(isNextButtonEnabled());
+    }
+
+    @Override
+    protected void checkNextButtonEnabled() {
+        if( wizardPanel!=null ) {
+            wizardPanel.setNextButtonEnabled(isNextButtonEnabled());
+        }
+    }
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectBundlesWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizardPage.java	(revision 43126)
@@ -0,0 +1,87 @@
+/**
+ * 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.installer.swing.impl.execution.wizard;
+
+import java.util.List;
+
+import javax.swing.JPanel;
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.execution.panel.TypicalOrAdvancedPanel;
+
+/**
+ * @author gvSIG Team
+ * @version $Id$
+ *
+ */
+public class TypicalOrAdvancedWizardPage extends TypicalOrAdvancedPanel implements
+        OptionPanel {
+
+    private static final long serialVersionUID = -7151675399781722322L;
+
+    private final InstallWizardPanel_ext wizardPanel;
+
+    public TypicalOrAdvancedWizardPage(
+            InstallWizardPanel_ext wizardPanel) {
+        super();
+        this.wizardPanel = wizardPanel;
+    }
+
+    @Override
+    public JPanel getJPanel() {
+        return this;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_select_installation_mode");
+    }
+
+    @Override
+    public void lastPanel() {
+    }
+
+    @Override
+    public void nextPanel() throws NotContinueWizardException {
+        wizardPanel.setSkipSelectPackagesWizardPage(isAdvancedModeSelected());
+    }
+
+    @Override
+    public void updatePanel() {
+        InstallPackageService service = wizardPanel.getInstallerExecutionService();
+
+        List<String> defaultdPackagesIDs = service.getDefaultSelectedPackagesIDs();
+        if ( defaultdPackagesIDs == null || defaultdPackagesIDs.isEmpty() ) {
+            setEnableTypicalMode(false);
+        } else {
+            setEnableTypicalMode(true);
+        }
+
+        if (!wizardPanel.getSkipTypicalOrAdvancedWizardPage()) {
+            wizardPanel.skip();
+        }
+
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/TypicalOrAdvancedWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizardPage.java	(revision 43126)
@@ -0,0 +1,285 @@
+/**
+ * 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.installer.swing.impl.execution.wizard;
+
+import java.util.Iterator;
+import java.util.List;
+
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.lib.api.Dependencies;
+import org.gvsig.installer.lib.api.DependenciesCalculator;
+import org.gvsig.installer.lib.api.InstallerLocator;
+import org.gvsig.installer.lib.api.InstallerManager;
+import org.gvsig.installer.lib.api.PackageInfo;
+import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.SwingInstallerManager;
+import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.JShowPackagesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.JShowRequiredPackagesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.JShowUnresolvedDependenciesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.execution.panel.SelectPackagesPanel;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.swing.api.windowmanager.WindowManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SelectPackagesWizardPage implements OptionPanel {
+
+    private static final long serialVersionUID = -4678172923039393643L;
+
+    private static final Logger LOG = LoggerFactory.getLogger(SelectPackagesWizardPage.class);
+
+    private final InstallWizardPanel_ext wizardPanel;
+
+    private SelectPackagesPanel selectPackagesPanel = null;
+
+    public SelectPackagesWizardPage(
+            InstallWizardPanel_ext wizardPanel) {
+        super();
+        this.wizardPanel = wizardPanel;
+        this.selectPackagesPanel = new SelectPackagesPanel(this);
+    }
+    
+    @Override
+    public JPanel getJPanel() {
+        return selectPackagesPanel;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_select_plugins");
+    }
+
+    @Override
+    public void lastPanel() {
+        selectPackagesPanel.clearPanel();
+    }
+
+    @Override
+    public void nextPanel() throws NotContinueWizardException {
+        SwingInstallerManager swingManager = SwingInstallerLocator.getSwingInstallerManager();
+        /*
+         * First warn about packages in development or unofficial
+         */
+        checkDevelAndUnoficialPackages(swingManager);
+        /*
+         * Then check dependencies
+         */
+        checkDependencies(swingManager);
+        wizardPanel.setNextButtonEnabled(false);
+    }
+
+    private void checkDependencies(SwingInstallerManager swingManager) throws NotContinueWizardException {
+        List<PackageInfo> requiredPackages = null;
+        List<PackageInfo> troubledPackages = null;
+        Dependencies unresolvedDependencies = null;
+        try {
+            InstallerManager manager = InstallerLocator.getInstallerManager();
+            // Creamos el calculador de dependencias
+            DependenciesCalculator calculator = manager.createDependenciesCalculator(
+                wizardPanel.getInstallerExecutionService()
+            );
+
+            // Le indicamos los paquetes que queremos instalar
+            calculator.addPackageToInstall(
+                    this.wizardPanel.getPackagesToInstall()
+            );
+
+            // Le añadimos los paquetes que ya hay instalados.
+            PackageInfo[] pkgs = manager.getInstalledPackages();
+            calculator.addInstalledPackage(pkgs);
+
+            // Calculamos las dependencias
+            calculator.calculate();
+
+            requiredPackages = calculator.getRequiredPackages();
+            unresolvedDependencies = calculator.getUnresolvedDependencies();
+            troubledPackages = calculator.getConflictPackages();
+        } catch (Throwable e) {
+            LOG.warn(
+                    wizardPanel.getTranslation("_an_error_has_occurred_when_calculating_the_dependecies_of_the_packages_to_install"),
+                    e
+            );
+            int resp = JOptionPane.showConfirmDialog(
+                null,
+                wizardPanel.getTranslation("_an_error_has_occurred_when_calculating_the_dependecies_of_the_selected_packages") +
+                "\n" +
+                wizardPanel.getTranslation("_it_is_not_possible_to_verify_if_any_additional_package_is_needed_to_install_the_selected_packages") +
+                "\n" +
+                wizardPanel.getTranslation("_if_you_want_you_can_select_again_manually_the_packets_that_might_be_necessary") +
+                wizardPanel.getTranslation("_do_you_want_to_continue_and_install_the_packages_you_already_have_selected"), 
+                wizardPanel.getTranslation("_a_problem_has_occurred_when_calculating_the_dependencies"),
+                JOptionPane.YES_NO_OPTION,
+                JOptionPane.WARNING_MESSAGE
+            );
+            if (resp == JOptionPane.NO_OPTION) {
+                throw new NotContinueWizardException("", null, false);
+            }
+        }
+
+        if (troubledPackages != null && troubledPackages.size() > 0) {
+            JShowPackagesAndAskContinuePanel dlg = swingManager
+                    .createJShowTroubledPackagesAndAskContinuePanel(
+                            troubledPackages,
+                            wizardPanel.getTranslation("_Some_of_the_selected_addons_should_not_be_installed_simultaneously")
+                            + ". "
+                            + wizardPanel.getTranslation("_Installing_these_addons_may_cause_errors")
+                            + "\n"
+                            + wizardPanel.getTranslation("_do_you_want_to_continue")
+                    );
+            if (dlg.needShow()) {
+                WindowManager wm = ToolsSwingLocator.getWindowManager();
+                wm.showWindow(
+                    dlg, 
+                    wizardPanel.getTranslation("_do_you_want_to_continue"),
+                    WindowManager.MODE.DIALOG
+                );
+                if (dlg.cancelled()) {
+                    throw new NotContinueWizardException("", null, false);
+                }
+            }
+        }
+
+        if (requiredPackages != null && requiredPackages.size() > 0) {
+            JShowRequiredPackagesAndAskContinuePanel dlg = swingManager
+                    .createJShowRequiredPackagesAndAskContinuePanel(
+                            requiredPackages,
+                            wizardPanel.getTranslation("_the_selected_packages_require_to_install_or_update_the_following_packages")
+                            + ":\n"
+                            + wizardPanel.getTranslation("_do_you_want_to_continue"));
+            if (dlg.needShow()) {
+                WindowManager wm = ToolsSwingLocator.getWindowManager();
+                wm.showWindow(
+                    dlg, 
+                    wizardPanel.getTranslation("_do_you_want_to_continue"),
+                    WindowManager.MODE.DIALOG
+                );
+                if (dlg.cancelled()) {
+                    throw new NotContinueWizardException("", null, false);
+                }
+            }
+        }
+
+        if (unresolvedDependencies != null && unresolvedDependencies.size() > 0) {
+            JShowUnresolvedDependenciesAndAskContinuePanel dlg = swingManager
+                .createJShowUnresolvedDependenciesAndAskContinuePanel(
+                    unresolvedDependencies,
+                    wizardPanel.getTranslation("_the_following_dependencies_have_not_been_possible_to_resolve")
+                    + ". "
+                    + wizardPanel.getTranslation("_This_may_cause_issues_in_gvSIG")
+                    + "\n"
+                    + wizardPanel.getTranslation("_do_you_want_to_continue_anyway")
+                );
+            if (dlg.needShow()) {
+                WindowManager wm = ToolsSwingLocator.getWindowManager();
+                wm.showWindow(
+                    dlg, 
+                    wizardPanel.getTranslation("_do_you_want_to_continue"),
+                    WindowManager.MODE.DIALOG
+                );
+                if (dlg.cancelled()) {
+                    throw new NotContinueWizardException("", null, false);
+                }
+            }
+        }
+
+        Iterator<PackageInfo> it = requiredPackages.iterator();
+        while (it.hasNext()) {
+            PackageInfo pkg = it.next();
+            selectPackagesPanel.getModel().selectPackage(pkg);
+            LOG.info("Automatic selection of required package " + pkg.getCode());
+        }
+    }
+
+    private void checkDevelAndUnoficialPackages(SwingInstallerManager swingManager)
+            throws NotContinueWizardException {
+        List<PackageInfo> packagesToInstall = this.wizardPanel.getPackagesToInstall();
+
+        JShowPackageStatusAndAskContinuePanel dlg = swingManager
+                .createJShowPackageStatusAndAskContinuePanel(
+                        packagesToInstall,
+                        wizardPanel.getTranslation("_you_have_selected_in_development_or_not_official_versions")
+                        + ". "
+                        + wizardPanel.getTranslation("_Installing_devel_addons_may_cause_errors")
+                        + "\n"
+                        + wizardPanel.getTranslation("_do_you_want_to_continue_anyway"));
+        if (dlg.needShow()) {
+            WindowManager wm = ToolsSwingLocator.getWindowManager();
+            wm.showWindow(
+                    dlg, 
+                    wizardPanel.getTranslation("_do_you_want_to_continue"),
+                    WindowManager.MODE.DIALOG
+            );
+            if (dlg.cancelled()) {
+                throw new NotContinueWizardException("", null, false);
+            }
+        }
+    }
+
+    @Override
+    public void updatePanel() {
+        selectPackagesPanel.updatePanel();
+        selectPackagesPanel.setInitialFilter();
+
+        // if default packages must be selected or not
+        if (wizardPanel.getSelectDefaultPackages()) {
+            selectPackagesPanel.selectPackages();
+        }
+        wizardPanel.setFinishButtonEnabled(true);
+        wizardPanel.setBackButtonEnabled(true);
+        wizardPanel.setNextButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+
+        this.selectPackagesPanel.setBaseFilter(this.wizardPanel.getPackageFilter());
+
+        if (wizardPanel.getSkipSelectPackagesWizardPage() && !this.getPackagesToInstall().isEmpty()) {
+            wizardPanel.skip();
+            return;
+        }
+
+        checkIfPluginSelected();
+    }
+
+    public void checkIfPluginSelected() {
+        wizardPanel.setNextButtonEnabled(selectPackagesPanel.isPackageSelected());
+    }
+
+    public List<PackageInfo> getPackagesToInstall() {
+        return selectPackagesPanel.getPackagesToInstall();
+    }
+
+    public Boolean isDefaultPackagesSelectionSet() {
+        return wizardPanel.getSelectDefaultPackages();
+    }
+
+    public InstallWizardPanel_ext getWizardPanel() {
+        return this.wizardPanel;
+    }
+
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/SelectPackagesWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/InstallersWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/InstallersWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/InstallersWizardPage.java	(revision 43126)
@@ -0,0 +1,159 @@
+/**
+ * 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.
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Prodevelop}   {Task}
+ */
+package org.gvsig.installer.swing.impl.execution.wizard;
+
+import javax.swing.JOptionPane;
+
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
+
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.SwingInstallerManager;
+import org.gvsig.installer.swing.impl.DefaultSwingInstallerManager;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
+import org.gvsig.tools.task.AbstractMonitorableTask;
+import org.gvsig.tools.task.SimpleTaskStatus;
+
+public class InstallersWizardPage extends DefaultProgressPanel implements OptionPanel {
+
+    private static final long serialVersionUID = 8531884535246881448L;
+    private final InstallWizardPanel_ext wizardPanel;
+
+    public InstallersWizardPage(InstallWizardPanel_ext installerExecutionWizard) {
+        super();
+        this.wizardPanel = installerExecutionWizard;
+    }
+
+    @Override
+    public JPanel getJPanel() {
+        return this;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_Install_required_addons");
+    }
+
+    @Override
+    public void lastPanel() {
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+    }
+
+    @Override
+    public void nextPanel() {
+    }
+
+    @Override
+    public void updatePanel() {
+        if( wizardPanel.getDirection() == WizardPanelWithLogo.ACTION_PREVIOUS ) {
+            wizardPanel.skip();
+            return;
+        }
+        InstallPackageService bundle = wizardPanel.getInstallerExecutionService();
+        if (! bundle.needInstallPackageProviders()) {
+            wizardPanel.skip();
+            return;
+        }
+
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setBackButtonEnabled(false);
+        wizardPanel.setNextButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+
+        UpdatePanel task = new UpdatePanel(this);
+        this.wizardPanel.addCancellableTask(task);
+        bind(task.getTaskStatus());
+        task.setDaemon(true);
+        task.start();
+    }
+
+    private class UpdatePanel extends AbstractMonitorableTask {
+
+        private final InstallersWizardPage panel;
+
+        public UpdatePanel(InstallersWizardPage panel) {
+            super(panel.wizardPanel.getTranslation("_Installing prerequisites..."));
+            this.panel = panel;
+        }
+
+        private void showWarning(final String msg) {
+            if (!SwingUtilities.isEventDispatchThread()) {
+                try {
+                    SwingUtilities.invokeAndWait(new Runnable() {
+                        @Override
+                        public void run() {
+                        }
+                    });
+                } catch (Exception ex) {
+                    logger.warn("Cant show message to the user. " + msg);
+                }
+                return;
+            }
+            JOptionPane.showMessageDialog(panel, msg, "Warning", JOptionPane.WARNING_MESSAGE);
+        }
+
+        @Override
+        public synchronized void run() {
+
+            try {
+
+                logger.info("Package installation initiated");
+                SimpleTaskStatus taskStatus = (SimpleTaskStatus) this.getTaskStatus();
+
+                InstallPackageService bundle = wizardPanel.getInstallerExecutionService();
+                if (bundle.needInstallPackageProviders()) {
+                    bundle.installPackageProviders(taskStatus);
+                }
+
+                taskStatus.message(panel.wizardPanel.getTranslation("_Finished"));
+
+                taskStatus.terminate();
+                SwingUtilities.invokeAndWait(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        wizardPanel.setFinishButtonEnabled(false);
+                        wizardPanel.setBackButtonEnabled(true);
+                        wizardPanel.setNextButtonEnabled(true);
+                        wizardPanel.setCancelButtonEnabled(true);
+                        wizardPanel.doAction(WizardPanelWithLogo.ACTION_NEXT);
+                    }
+                });
+                logger.info("Package installation finished");
+            } catch (Throwable th) {
+                logger.warn("Problems install packages.", th);
+                showWarning(panel.wizardPanel.getTranslation("_Cant_install_package"));
+            }
+        }
+
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/InstallersWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizardPage.java	(revision 43126)
@@ -0,0 +1,166 @@
+/**
+ * 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.
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Prodevelop}   {Task}
+ */
+package org.gvsig.installer.swing.impl.execution.wizard;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import javax.swing.JOptionPane;
+
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.lib.api.PackageInfo;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
+import org.gvsig.tools.task.AbstractMonitorableTask;
+import org.gvsig.tools.task.SimpleTaskStatus;
+
+
+public class ProgressWizardPage extends DefaultProgressPanel implements OptionPanel {
+
+    private static final long serialVersionUID = 8531884535246881448L;
+    private final InstallWizardPanel_ext wizardPanel;
+
+    public ProgressWizardPage(InstallWizardPanel_ext wizardPanel) {
+        super();
+        this.wizardPanel = wizardPanel;
+    }
+
+    @Override
+    public JPanel getJPanel() {
+        return this;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_progress");
+    }
+
+    @Override
+    public void lastPanel() {
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+    }
+
+    @Override
+    public void nextPanel() {
+        // Nothing to do, no next panel
+    }
+
+    @Override
+    public void updatePanel() {
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(false);
+
+        final ProgressWizardPage wizard = this;
+
+        UpdatePanel task = new UpdatePanel(wizard);
+        wizard.wizardPanel.addCancellableTask(task);
+        bind(task.getTaskStatus());
+        task.setDaemon(true);
+        task.start();
+    }
+
+    private static class UpdatePanel extends AbstractMonitorableTask {
+
+        private final ProgressWizardPage panel;
+
+        public UpdatePanel(ProgressWizardPage panel) {
+            super(panel.wizardPanel.getTranslation("_Install_package"));
+            this.panel = panel;
+        }
+
+        private void showWarning(final String msg) {
+            if( !SwingUtilities.isEventDispatchThread() )  {
+                try {
+                    SwingUtilities.invokeAndWait(new Runnable() {
+                        public void run() {
+                        }
+                    });
+                } catch (Exception ex) {
+                    logger.warn("Cant show message to the user. "+msg);
+                }
+                return;
+            }
+            JOptionPane.showMessageDialog(panel, msg, "Warning", JOptionPane.WARNING_MESSAGE);
+        }
+        
+        @Override
+        public synchronized void run() {
+
+            int errcount = 0;
+            try {
+                logger.info("Package installation iniitiated");
+                SimpleTaskStatus taskStatus = (SimpleTaskStatus) this.getTaskStatus();
+                // bundle of packages
+                InstallPackageService installerExecutionService = this.panel.wizardPanel
+                        .getInstallerExecutionService();
+                // packages to install
+                List<PackageInfo> installersToInstall = this.panel.wizardPanel
+                        .getPackagesToInstall();
+                Collections.sort(installersToInstall, new Comparator<PackageInfo>() {
+                    public int compare(PackageInfo o1, PackageInfo o2) {
+                        return o1.getCode().compareTo(o2.getCode());
+                    }
+                });
+                taskStatus.setRangeOfValues(0, installersToInstall.size());
+                for ( int i = 0; i < installersToInstall.size(); i++ ) {
+                    PackageInfo installerInfo = installersToInstall.get(i);
+                    taskStatus.message(installerInfo.getName());
+                    try {
+                        installerExecutionService.installPackage(
+                                panel.wizardPanel.getApplicationFolder(),
+                                installerInfo
+                        );
+                    } catch (Throwable th) {
+                        logger.warn("Can't install package '" + installerInfo.getCode() + "'.", th);
+                        errcount++;
+                    }
+                    taskStatus.setCurValue(i + 1);
+                }
+                this.panel.wizardPanel.setFinishButtonEnabled(true);
+                if( errcount>0 ) {
+                    showWarning("Failed to install "+errcount+" packages.");
+                }
+                taskStatus.message(panel.wizardPanel.getTranslation("_Finished"));
+
+                taskStatus.terminate();
+                taskStatus.remove();
+                logger.info("Package installation finished");
+            } catch (Throwable th) {
+                logger.warn("Problems install packages.",th);
+                showWarning(panel.wizardPanel.getTranslation("_Cant_install_packege"));
+            }
+
+        }
+
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/ProgressWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/AddBundlesWizardPage.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/AddBundlesWizardPage.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/AddBundlesWizardPage.java	(revision 43126)
@@ -0,0 +1,156 @@
+/**
+ * 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.
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Prodevelop}   {Task}
+ */
+package org.gvsig.installer.swing.impl.execution.wizard;
+
+import javax.swing.JOptionPane;
+
+import javax.swing.JPanel;
+import javax.swing.SwingUtilities;
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
+
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.lib.api.execution.InstallPackageService;
+import org.gvsig.installer.swing.api.SwingInstallerLocator;
+import org.gvsig.installer.swing.api.SwingInstallerManager;
+import org.gvsig.installer.swing.impl.execution.InstallWizardPanel_ext;
+import org.gvsig.installer.swing.impl.execution.panel.SelectBundlesPanel;
+import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
+import org.gvsig.tools.swing.api.ToolsSwingLocator;
+import org.gvsig.tools.task.AbstractMonitorableTask;
+import org.gvsig.tools.task.SimpleTaskStatus;
+
+public class AddBundlesWizardPage extends DefaultProgressPanel implements OptionPanel {
+
+    private static final long serialVersionUID = 8531884535246881448L;
+    private final InstallWizardPanel_ext wizardPanel;
+
+    public AddBundlesWizardPage(InstallWizardPanel_ext installerExecutionWizard) {
+        super();
+        this.wizardPanel = installerExecutionWizard;
+    }
+
+    @Override
+    public JPanel getJPanel() {
+        return this;
+    }
+
+    @Override
+    public String getPanelTitle() {
+        return wizardPanel.getTranslation("_Loading_packages");
+    }
+
+    @Override
+    public void lastPanel() {
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+    }
+
+    @Override
+    public void nextPanel() {
+    }
+
+    @Override
+    public void updatePanel() {
+        if( wizardPanel.getDirection() == WizardPanelWithLogo.ACTION_PREVIOUS ) {
+            wizardPanel.skip();
+            return;
+        }
+        wizardPanel.setFinishButtonEnabled(false);
+        wizardPanel.setBackButtonEnabled(false);
+        wizardPanel.setNextButtonEnabled(false);
+        wizardPanel.setCancelButtonEnabled(true);
+
+        UpdatePanel task = new UpdatePanel(this);
+        this.wizardPanel.addCancellableTask(task);
+        bind(task.getTaskStatus());
+        task.setDaemon(true);
+        task.start();
+    }
+
+    private class UpdatePanel extends AbstractMonitorableTask {
+
+        private final AddBundlesWizardPage panel;
+
+        public UpdatePanel(AddBundlesWizardPage panel) {
+            super(panel.wizardPanel.getTranslation("_Loading_packages"));
+            this.panel = panel;
+        }
+
+        @Override
+        public synchronized void run() {
+
+            try {
+
+                logger.info("loading packages");
+                SimpleTaskStatus taskStatus = (SimpleTaskStatus) this.getTaskStatus();
+                taskStatus.setIndeterminate();
+
+                InstallPackageService installerExecutionService = wizardPanel.getInstallerExecutionService();
+                SelectBundlesPanel bundlesPanel = wizardPanel.getBundlesPanel();
+
+                if (bundlesPanel.isStandardSelected()) {
+                    installerExecutionService.addBundlesFromDirectory(
+                            wizardPanel.getInstallFolder(), taskStatus
+                    );
+
+                } else if (bundlesPanel.isURLSelected() && bundlesPanel.getSelectedURL() != null) {
+                    installerExecutionService.addBundle(bundlesPanel.getSelectedURL(), taskStatus);
+
+                } else if (bundlesPanel.isFileSelected() && bundlesPanel.getSelectedFile() != null && bundlesPanel.getSelectedFile().exists()) {
+                    installerExecutionService.addBundle(bundlesPanel.getSelectedFile(), taskStatus);
+
+                }
+
+                taskStatus.message(panel.wizardPanel.getTranslation("_Finished"));
+
+                taskStatus.terminate();
+                SwingUtilities.invokeAndWait(new Runnable() {
+
+                    @Override
+                    public void run() {
+                        wizardPanel.setFinishButtonEnabled(false);
+                        wizardPanel.setBackButtonEnabled(true);
+                        wizardPanel.setNextButtonEnabled(true);
+                        wizardPanel.setCancelButtonEnabled(true);
+                        wizardPanel.doAction(WizardPanelWithLogo.ACTION_NEXT);
+                    }
+                });
+                logger.info("Loading packages finished");
+
+            } catch (Throwable th) {
+                logger.warn("Problems loading packages.", th);
+                ToolsSwingLocator.getThreadSafeDialogsManager().messageDialog(
+                        panel.wizardPanel.getTranslation("_Cant_load_packages"), 
+                        panel.wizardPanel.getTranslation("_Warning"), 
+                        JOptionPane.WARNING_MESSAGE
+                );
+
+            }
+        }
+
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/wizard/AddBundlesWizardPage.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/creation/DefaultMakePluginPackageWizard.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/creation/DefaultMakePluginPackageWizard.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/creation/DefaultMakePluginPackageWizard.java	(revision 43126)
@@ -3,29 +3,23 @@
  *
  * 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 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.
+ * 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.
+ * 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.
+ * For any additional information, do not hesitate to contact us at info AT
+ * gvsig.com, or visit our website www.gvsig.com.
  */
-/*
- * AUTHORS (In addition to CIT):
- * 2010 {Prodevelop}   {Task}
- */
-
 package org.gvsig.installer.swing.impl.creation;
 
 import java.awt.BorderLayout;
@@ -34,12 +28,10 @@
 import java.net.URL;
 
 import javax.swing.ImageIcon;
+import javax.swing.JComponent;
 
-import jwizardcomponent.DefaultJWizardComponents;
 
 import org.gvsig.gui.beans.wizard.WizardPanel;
-import org.gvsig.gui.beans.wizard.WizardPanelActionListener;
-import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
 import org.gvsig.installer.lib.api.InstallerLocator;
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.creation.MakePluginPackageService;
@@ -52,185 +44,149 @@
 import org.gvsig.installer.swing.impl.creation.wizard.SelectFilesWizard;
 import org.gvsig.installer.swing.impl.creation.wizard.SelectOutputFileWizard;
 import org.gvsig.installer.swing.impl.creation.wizard.SelectPlugintoInstallWizard;
-import org.gvsig.installer.swing.impl.wizard.WizardListenerAdapter;
+import org.gvsig.installer.swing.impl.wizard.AbstractInstallerWizardPanel;
 import org.gvsig.tools.locator.LocatorException;
 
-/**
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
-public class DefaultMakePluginPackageWizard extends MakePluginPackageWizard
-		implements WizardPanel {
+public class DefaultMakePluginPackageWizard
+        extends
+        AbstractInstallerWizardPanel
+        implements
+        MakePluginPackageWizard, WizardPanel {
 
-	private static final long serialVersionUID = 9205891710214122265L;
-	private WizardPanelWithLogo wizardPanelWithLogo = null;
-	private MakePluginPackageService makePluginPackageService = null;
-	private OutputStream outputStream = null;
-	private OutputStream indexOutputStream;
-	private PackageInfo selectedPackageInfo = null;
-	private File originalPluginFolder = null;
+    private static final long serialVersionUID = 9205891710214122265L;
 
-	// Wizards
-	private AdvancedModeSelectionWizard advancedModeSelectionWizard = null;
-	private AntScriptWizard antScriptWizard = null;
-	private PackageInfoWizard pluginDescriptionWizard = null;
-	private ProgressWizard progressWizard = null;
-	private SelectFilesWizard selectFilesWizard = null;
-	private SelectOutputFileWizard selectOutputFileWizard = null;
-	private SelectPlugintoInstallWizard selectPlugintoInstallWizard = null;
+    private MakePluginPackageService makePluginPackageService = null;
+    private OutputStream outputStream = null;
+    private OutputStream indexOutputStream;
+    private PackageInfo selectedPackageInfo = null;
+    private File originalPluginFolder = null;
 
-	private WizardListenerAdapter wizardListenerAdapter = null;
-	private URL downloadURL;
+    // Wizard pages
+    private AdvancedModeSelectionWizard advancedModeSelectionWizard = null;
+    private AntScriptWizard antScriptWizard = null;
+    private PackageInfoWizard pluginDescriptionWizard = null;
+    private ProgressWizard progressWizard = null;
+    private SelectFilesWizard selectFilesWizard = null;
+    private SelectOutputFileWizard selectOutputFileWizard = null;
+    private SelectPlugintoInstallWizard selectPlugintoInstallWizard = null;
 
-	public DefaultMakePluginPackageWizard(File applicationFolder,
-			File installFolder) throws LocatorException,
-			MakePluginPackageServiceException {
-		super(applicationFolder, installFolder);
-		URL iconURL = getClass().getClassLoader().getResource(
-				"images/makepluginpackageicon.png");
-		ImageIcon icon = new ImageIcon(iconURL);
-		wizardPanelWithLogo = new WizardPanelWithLogo();
+    private URL downloadURL;
 
-		advancedModeSelectionWizard = new AdvancedModeSelectionWizard(this);
-		antScriptWizard = new AntScriptWizard(this);
-		pluginDescriptionWizard = new PackageInfoWizard(this);
-		progressWizard = new ProgressWizard(this);
-		selectFilesWizard = new SelectFilesWizard(this);
-		selectOutputFileWizard = new SelectOutputFileWizard(this);
-		selectPlugintoInstallWizard = new SelectPlugintoInstallWizard(this);
+    public DefaultMakePluginPackageWizard(File applicationFolder,
+            File installFolder) throws LocatorException,
+            MakePluginPackageServiceException {
+        super(applicationFolder, installFolder);
+        URL iconURL = getClass().getClassLoader().getResource(
+                "images/makepluginpackageicon.png");
+        ImageIcon icon = new ImageIcon(iconURL);
 
-		addWizards();
+        advancedModeSelectionWizard = new AdvancedModeSelectionWizard(this);
+        antScriptWizard = new AntScriptWizard(this);
+        pluginDescriptionWizard = new PackageInfoWizard(this);
+        progressWizard = new ProgressWizard(this);
+        selectFilesWizard = new SelectFilesWizard(this);
+        selectOutputFileWizard = new SelectOutputFileWizard(this);
+        selectPlugintoInstallWizard = new SelectPlugintoInstallWizard(this);
 
-		// Adding the listeners
-		wizardPanelWithLogo.setWizardListener(this);
+        addWizards();
 
-		setFinishButtonEnabled(false);
+        setFinishButtonEnabled(false);
 
-		this.setLayout(new BorderLayout());
-		this.add(wizardPanelWithLogo, BorderLayout.CENTER);
+        this.setLayout(new BorderLayout());
+        super.initComponents();
 
-		makePluginPackageService = InstallerLocator.getInstallerManager()
-				.getMakePluginPackageService();
-		selectPlugintoInstallWizard
-				.setPluginsDirectory(makePluginPackageService);
-		selectFilesWizard.setApplicationDirectory(applicationFolder);
-	}
+        makePluginPackageService = InstallerLocator.getInstallerManager().getMakePluginPackageService();
+        selectPlugintoInstallWizard.setPluginsDirectory(makePluginPackageService);
+        selectFilesWizard.setApplicationDirectory(applicationFolder);
+    }
 
-	public MakePluginPackageService getMakePluginPackageService() {
-		return makePluginPackageService;
-	}
+    public MakePluginPackageService getMakePluginPackageService() {
+        return makePluginPackageService;
+    }
 
-	private void addWizards() {
-		wizardPanelWithLogo.addOptionPanel(selectPlugintoInstallWizard);
-		wizardPanelWithLogo.addOptionPanel(pluginDescriptionWizard);
-		wizardPanelWithLogo.addOptionPanel(advancedModeSelectionWizard);
-		addLastWizards();
-	}
+    private void addWizards() {
+        addOptionPanel(selectPlugintoInstallWizard);
+        addOptionPanel(pluginDescriptionWizard);
+        addOptionPanel(advancedModeSelectionWizard);
+        addLastWizards();
+    }
 
-	private void addLastWizards() {
-		wizardPanelWithLogo.addOptionPanel(selectOutputFileWizard);
-		wizardPanelWithLogo.addOptionPanel(progressWizard);
-	}
+    private void addLastWizards() {
+        addOptionPanel(selectOutputFileWizard);
+        addOptionPanel(progressWizard);
+    }
 
-	private void addAdvancedWizards() {
-		wizardPanelWithLogo.addOptionPanel(selectFilesWizard);
-		wizardPanelWithLogo.addOptionPanel(antScriptWizard);
-	}
+    private void addAdvancedWizards() {
+        addOptionPanel(selectFilesWizard);
+        addOptionPanel(antScriptWizard);
+    }
 
-	private DefaultJWizardComponents getWizardComponents() {
-		return wizardPanelWithLogo.getWizardComponents();
-	}
+    public void setAdvancedModeSelected(boolean advancedModeSelected) {
+        for (int i = getWizardComponents().getWizardPanelList().size() - 1; i >= 3; i--) {
+            getWizardComponents().removeWizardPanel(i);
+        }
+        if (advancedModeSelected) {
+            addAdvancedWizards();
+        }
+        addLastWizards();
+    }
 
-	public void setNextButtonEnabled(boolean isEnabled) {
-		wizardPanelWithLogo.setNextButtonEnabled(isEnabled);
-	}
+    /**
+     * @return the installercreationService
+     */
+    public MakePluginPackageService getInstallerCreationService() {
+        return makePluginPackageService;
+    }
 
-	public void setCancelButtonEnabled(boolean isEnabled) {
-		wizardPanelWithLogo.setCancelButtonEnabled(isEnabled);
-	}
+    /**
+     * @return the outputStream
+     */
+    public OutputStream getOutputStream() {
+        return outputStream;
+    }
 
-	public void setFinishButtonEnabled(boolean isEnabled) {
-		wizardPanelWithLogo.setFinishButtonEnabled(isEnabled);
-	}
+    /**
+     * @param outputStream the outputStream to set
+     */
+    public void setOutputStream(OutputStream outputStream) {
+        this.outputStream = outputStream;
+    }
 
-	public void setBackButtonEnabled(boolean isEnabled) {
-		wizardPanelWithLogo.setBackButtonEnabled(isEnabled);
-	}
+    public OutputStream getIndexOutputStream() {
+        return indexOutputStream;
+    }
 
-	public void setAdvancedModeSelected(boolean advancedModeSelected) {
-		for (int i = getWizardComponents().getWizardPanelList().size() - 1; i >= 3; i--) {
-			getWizardComponents().removeWizardPanel(i);
-		}
-		if (advancedModeSelected) {
-			addAdvancedWizards();
-		}
-		addLastWizards();
-	}
+    public void setIndexOutputStream(OutputStream outputStream) {
+        this.indexOutputStream = outputStream;
+    }
 
-	/**
-	 * @return the installercreationService
-	 */
-	public MakePluginPackageService getInstallerCreationService() {
-		return makePluginPackageService;
-	}
+    public PackageInfo getSelectedPackageInfo() {
+        return selectedPackageInfo;
+    }
 
-	/**
-	 * @return the outputStream
-	 */
-	public OutputStream getOutputStream() {
-		return outputStream;
-	}
+    public void setSelectedPackageInfo(PackageInfo selectedPackageInfo) {
+        this.selectedPackageInfo = selectedPackageInfo;
+    }
 
-	/**
-	 * @param outputStream
-	 *            the outputStream to set
-	 */
-	public void setOutputStream(OutputStream outputStream) {
-		this.outputStream = outputStream;
-	}
+    public void setOriginalPluginFolder(File originalPluginFolder) {
+        this.originalPluginFolder = originalPluginFolder;
+    }
 
-	public OutputStream getIndexOutputStream() {
-		return indexOutputStream;
-	}
+    public File getOriginalPluginFolder() {
+        return this.originalPluginFolder;
+    }
 
-	public void setIndexOutputStream(OutputStream outputStream) {
-		this.indexOutputStream = outputStream;
-	}
+    public void setDownloadURL(URL downloadURL) {
+        this.downloadURL = downloadURL;
+    }
 
-	public PackageInfo getSelectedPackageInfo() {
-		return selectedPackageInfo;
-	}
+    public URL getDownloadURL() {
+        return downloadURL;
+    }
 
-	public void setSelectedPackageInfo(PackageInfo selectedPackageInfo) {
-		this.selectedPackageInfo = selectedPackageInfo;
-	}
+    @Override
+    public JComponent asJComponent() {
+        return this;
+    }
 
-	public void setOriginalPluginFolder(File originalPluginFolder) {
-		this.originalPluginFolder = originalPluginFolder;
-	}
-
-	public File getOriginalPluginFolder() {
-		return this.originalPluginFolder;
-	}
-
-	public WizardPanelActionListener getWizardPanelActionListener() {
-		if (((wizardListenerAdapter == null) && (getWizardActionListener() != null))) {
-			return new WizardListenerAdapter(this);
-		}
-		return wizardListenerAdapter;
-	}
-
-	public void setWizardPanelActionListener(
-			WizardPanelActionListener wizardActionListener) {
-		// TODO Auto-generated method stub
-
-	}
-
-	public void setDownloadURL(URL downloadURL) {
-		this.downloadURL = downloadURL;
-	}
-
-	public URL getDownloadURL() {
-		return downloadURL;
-	}
-
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerManager.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerManager.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerManager.java	(revision 43126)
@@ -55,15 +55,18 @@
 import org.gvsig.installer.swing.api.creation.JPackageInfoPanel;
 import org.gvsig.installer.swing.api.creation.MakePluginPackageWizard;
 import org.gvsig.installer.swing.api.creation.MakePluginPackageWizardException;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
 import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
+import org.gvsig.installer.swing.api.execution.InstallWizardPanel;
 import org.gvsig.installer.swing.api.execution.JShowPackageStatusAndAskContinuePanel;
 import org.gvsig.installer.swing.api.execution.JShowPackagesAndAskContinuePanel;
 import org.gvsig.installer.swing.api.execution.JShowRequiredPackagesAndAskContinuePanel;
 import org.gvsig.installer.swing.api.execution.JShowUnresolvedDependenciesAndAskContinuePanel;
+import org.gvsig.installer.swing.api.execution.PackageFilter;
 import org.gvsig.installer.swing.api.packagebuilder.PackageBuildder;
+import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
 import org.gvsig.installer.swing.impl.creation.panel.DefaultOutputPanel;
 import org.gvsig.installer.swing.impl.creation.panel.DefaultPackageInfoPanel;
+import org.gvsig.installer.swing.impl.execution.panel.filters.TypeFilter;
 import org.gvsig.installer.swing.impl.packagebuilder.BasePackageWizard;
 import org.gvsig.installer.swing.impl.panel.DefaultProgressPanel;
 import org.gvsig.tools.ToolsLocator;
@@ -324,7 +327,7 @@
 	}
 
 	public void registerInstallPackageWizard(
-			Class<? extends AbstractInstallPackageWizard> clazz) {
+			Class<? extends InstallerWizardPanel> clazz) {
 		ExtensionPoint extensionPoint = extensionPoints.add(
 				SWING_INSTALLER_MANAGER_EXTENSION_POINT, "");
 		extensionPoint.append(EXECUTE_INSTALLER_WIZARD_NAME, "", clazz);
@@ -483,7 +486,7 @@
 		return new DefaultProgressPanel();
 	}
 
-	public AbstractInstallPackageWizard createInstallPackageWizard(
+	public InstallWizardPanel createInstallPackageWizard(
 			File applicationDirectory, File installFolder)
 			throws InstallPackageWizardException {
 		ExtensionPoint ep = extensionPoints
@@ -492,7 +495,7 @@
 			Object[] args = new Object[2];
 			args[0] = applicationDirectory;
 			args[1] = installFolder;
-			return (AbstractInstallPackageWizard) ep.create(
+			return (InstallWizardPanel) ep.create(
 					EXECUTE_INSTALLER_WIZARD_NAME, args);
 
 		} catch (Exception e) {
@@ -501,6 +504,7 @@
 		}
 	}
 
+        @Override
 	public MakePluginPackageWizard createMakePluginPackageWizard(
 			File applicationDirectory, File installFolder)
 			throws MakePluginPackageWizardException {
@@ -523,4 +527,8 @@
             PackageBuildder packager = new BasePackageWizard(packageType, selectionFolder, outputFolder);
             return packager;
         }
+        
+        public PackageFilter createPackageTypeFilter(String type) {
+            return new TypeFilter(type);
+        }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerLibrary.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/DefaultSwingInstallerLibrary.java	(revision 43126)
@@ -36,7 +36,7 @@
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
 import org.gvsig.installer.swing.api.SwingInstallerManager;
 import org.gvsig.installer.swing.impl.creation.DefaultMakePluginPackageWizard;
-import org.gvsig.installer.swing.impl.execution.DefaultInstallPackageWizard;
+import org.gvsig.installer.swing.impl.execution.DefaultInstallWizardPanel;
 import org.gvsig.tools.library.AbstractLibrary;
 import org.gvsig.tools.library.LibraryException;
 
@@ -71,6 +71,6 @@
 		swingInstallerManager
 				.registerMakePluginPackageWizardInstallerCreationWizard(DefaultMakePluginPackageWizard.class);
 		swingInstallerManager
-				.registerInstallPackageWizard(DefaultInstallPackageWizard.class);
+				.registerInstallPackageWizard(DefaultInstallWizardPanel.class);
 	}
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/panel/DefaultProgressPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/panel/DefaultProgressPanel.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/panel/DefaultProgressPanel.java	(revision 43126)
@@ -54,11 +54,10 @@
 	final private JTaskStatus progressBar;
 
 	public DefaultProgressPanel() {
-		super();
-		progressBar = ToolsSwingLocator.getTaskStatusSwingManager()
-				.createJTaskStatus();
+            super();
+            progressBar = ToolsSwingLocator.getTaskStatusSwingManager().createJTaskStatus();
 
-		initComponents();
+            initComponents();
 	}
 
 	@Override
@@ -80,6 +79,7 @@
 
 	}
 
+        @Override
 	public void showErrorMessage(String msg, Throwable ex) {
 		logger.error(msg, ex);
                 
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/wizard/AbstractInstallerWizardPanel.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/wizard/AbstractInstallerWizardPanel.java	(revision 0)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/wizard/AbstractInstallerWizardPanel.java	(revision 43126)
@@ -0,0 +1,174 @@
+/**
+ * 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.
+ */
+/*
+ * AUTHORS (In addition to CIT):
+ * 2010 {Prodevelop}   {Task}
+ */
+package org.gvsig.installer.swing.impl.wizard;
+
+import java.awt.BorderLayout;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import javax.swing.JButton;
+
+import javax.swing.JPanel;
+import jwizardcomponent.DefaultJWizardComponents;
+import org.gvsig.gui.beans.wizard.WizardPanel;
+import org.gvsig.gui.beans.wizard.WizardPanelActionListener;
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
+import org.gvsig.gui.beans.wizard.panel.OptionPanel;
+import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
+import org.gvsig.installer.swing.api.wizard.InstallerWizardActionListener;
+
+import org.gvsig.tools.task.CancellableTask;
+
+public abstract class AbstractInstallerWizardPanel extends JPanel implements
+        InstallerWizardPanel, WizardPanel {
+
+    private static final long serialVersionUID = 5609799260650093733L;
+    private InstallerWizardActionListener wizardActionListener = null;
+    private final File applicationFolder;
+    private final File installFolder;
+    private final List<CancellableTask> cancelableTasks;
+    private WizardPanelWithLogo wizardPanelWithLogo = null;
+    private WizardListenerAdapter wizardListenerAdapter = null;
+
+    public AbstractInstallerWizardPanel(File applicationFolder, File installFolder) {
+        super();
+        this.wizardPanelWithLogo = new WizardPanelWithLogo();
+        this.applicationFolder = applicationFolder;
+        this.installFolder = installFolder;
+        this.cancelableTasks = new ArrayList<>();
+        this.wizardPanelWithLogo.setWizardListener(this);
+
+    }
+
+    protected void initComponents() {
+        this.add(this.wizardPanelWithLogo, BorderLayout.CENTER);
+        this.wizardPanelWithLogo.updatePanel();
+    }
+
+    public void addOptionPanel(OptionPanel wizardPage) {
+        this.wizardPanelWithLogo.addOptionPanel(wizardPage);
+    }
+
+    public DefaultJWizardComponents getWizardComponents() {
+        return wizardPanelWithLogo.getWizardComponents();
+    }
+
+    @Override
+    public void addCancellableTask(CancellableTask task) {
+        this.cancelableTasks.add(task);
+    }
+
+    @Override
+    public List<CancellableTask> getCancellableTasks() {
+        return this.cancelableTasks;
+    }
+
+    @Override
+    public void setWizardActionListener(
+            InstallerWizardActionListener wizardActionListener) {
+        this.wizardActionListener = wizardActionListener;
+    }
+
+    @Override
+    public InstallerWizardActionListener getWizardActionListener() {
+        return wizardActionListener;
+    }
+
+    @Override
+    public File getApplicationFolder() {
+        return applicationFolder;
+    }
+
+    @Override
+    public File getInstallFolder() {
+        return installFolder;
+    }
+
+    @Override
+    public boolean needsToRestartApplicationAfterFinish() {
+        // false by default
+        // to be overriden by subclasses
+        return false;
+    }
+
+    @Override
+    public void setNextButtonEnabled(boolean isEnabled) {
+        JButton button = getWizardComponents().getNextButton();
+        button.setEnabled(isEnabled);
+        button.repaint();
+    }
+
+    @Override
+    public void setFinishButtonEnabled(boolean isEnabled) {
+        JButton button = getWizardComponents().getFinishButton();
+        button.setEnabled(isEnabled);
+        button.repaint();
+    }
+
+    @Override
+    public void setCancelButtonEnabled(boolean isEnabled) {
+        JButton button = getWizardComponents().getCancelButton();
+        button.setEnabled(isEnabled);
+        button.repaint();
+    }
+
+    @Override
+    public void setBackButtonEnabled(boolean isEnabled) {
+        JButton button = getWizardComponents().getBackButton();
+        button.setEnabled(isEnabled);
+        button.repaint();
+    }
+
+    @Override
+    public void doAction(int action) {
+        this.wizardPanelWithLogo.doAction(action);
+    }
+
+    @Override
+    public void skip() {
+        this.wizardPanelWithLogo.skip();
+    }
+
+    @Override
+    public int getDirection() {
+        return this.wizardPanelWithLogo.getDirection();
+    }
+
+    @Override
+    public WizardPanelActionListener getWizardPanelActionListener() {
+        if (((wizardListenerAdapter == null) && (getWizardActionListener() != null))) {
+            wizardListenerAdapter = new WizardListenerAdapter(this);
+        }
+        return wizardListenerAdapter;
+    }
+
+    @Override
+    public void setWizardPanelActionListener(
+            WizardPanelActionListener wizardActionListener) {
+        // TODO Auto-generated method stub
+    }
+}

Property changes on: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/wizard/AbstractInstallerWizardPanel.java
___________________________________________________________________
Added: svn:mime-type
   + text/plain

Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/gui/beans/wizard/WizardPanelWithLogo.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/gui/beans/wizard/WizardPanelWithLogo.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/gui/beans/wizard/WizardPanelWithLogo.java	(revision 43126)
@@ -38,9 +38,13 @@
 
 import org.gvsig.gui.beans.wizard.panel.OptionPanel;
 import org.gvsig.gui.beans.wizard.panel.OptionPanelContainer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class WizardPanelWithLogo extends JPanel {
 
+    private static final Logger LOG = LoggerFactory.getLogger(WizardPanelWithLogo.class);
+            
     private static final long serialVersionUID = 7506729926181935234L;
     public final static int ACTION_PREVIOUS = 0;
     public final static int ACTION_NEXT = 1;
@@ -53,6 +57,7 @@
     JLabel statusLabel = new JLabel();
 
     ImageIcon logo;
+    private int direction = WizardPanelWithLogo.ACTION_NEXT;
 
     public WizardPanelWithLogo(ImageIcon logo) {
         this.logo = logo;
@@ -88,12 +93,14 @@
 
         wizardComponents.setFinishAction(new FinishAction(wizardComponents) {
 
+            @Override
             public void performAction() {
                 // dispose();
             }
         });
         wizardComponents.setCancelAction(new CancelAction(wizardComponents) {
 
+            @Override
             public void performAction() {
                 // dispose();
             }
@@ -126,10 +133,20 @@
         wizardComponents.updateComponents();
         super.setVisible(true);
     }
+    
+    public void updatePanel() {
+        try {
+            OptionPanelContainer page = (OptionPanelContainer) getWizardComponents().getCurrentPanel();
+            page.update();
+        } catch (Exception ex) {
 
+        }
+    }
+
     public void addOptionPanel(OptionPanel optionPanel) {
         getWizardComponents().addWizardPanel(
-            new OptionPanelContainer(getWizardComponents(), optionPanel));
+            new OptionPanelContainer(this, optionPanel)
+        );
     }
 
     public void setNextButtonEnabled(boolean isEnabled) {
@@ -162,4 +179,21 @@
     public void setBackButtonEnabled(boolean isEnabled) {
         getWizardComponents().getBackButton().setEnabled(isEnabled);
     }
+    
+    public int getDirection() {
+        return this.direction;
+    }
+    
+    public void setDirection(int direction) {
+        this.direction = direction;
+    }
+    
+    public void skip() {
+        int index = -1;
+        try {
+            this.doAction(this.getDirection());
+        } catch (Exception ex) {
+            LOG.warn("Can't skip current panel ("+index+").",ex);
+        }
+    }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/gui/beans/wizard/panel/OptionPanelContainer.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/gui/beans/wizard/panel/OptionPanelContainer.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.ui/src/main/java/org/gvsig/gui/beans/wizard/panel/OptionPanelContainer.java	(revision 43126)
@@ -32,8 +32,8 @@
 
 import javax.swing.JOptionPane;
 
-import jwizardcomponent.JWizardComponents;
 import jwizardcomponent.JWizardPanel;
+import org.gvsig.gui.beans.wizard.WizardPanelWithLogo;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,14 +50,16 @@
 public class OptionPanelContainer extends JWizardPanel {
 
     private static final long serialVersionUID = 3947658150325230122L;
+    private static final Logger LOG = LoggerFactory.getLogger(OptionPanelContainer.class);
+
     private OptionPanel optionPanel = null;
-    private static final Logger log =
-        LoggerFactory.getLogger(OptionPanelContainer.class);
-
-    public OptionPanelContainer(JWizardComponents wizardComponents,
+    private WizardPanelWithLogo wizardPanel;
+    
+    public OptionPanelContainer(WizardPanelWithLogo wizardPanel,
         OptionPanel optionPanel) {
-        super(wizardComponents);
+        super(wizardPanel.getWizardComponents());
         this.optionPanel = optionPanel;
+        this.wizardPanel = wizardPanel;
         setLayout(new BorderLayout());
         setBorder(javax.swing.BorderFactory.createCompoundBorder(
             javax.swing.BorderFactory.createTitledBorder(optionPanel
@@ -73,6 +75,8 @@
      */
     @Override
     public void back() {
+        this.wizardPanel.setDirection(WizardPanelWithLogo.ACTION_PREVIOUS);
+        LOG.debug("WizarPanel '"+this.optionPanel.getPanelTitle()+"' back.");
         optionPanel.lastPanel();
         super.back();
     }
@@ -85,12 +89,14 @@
     @Override
     public void next() {
         try {
+            this.wizardPanel.setDirection(WizardPanelWithLogo.ACTION_NEXT);
+            LOG.debug("WizarPanel '"+this.optionPanel.getPanelTitle()+"' next.");
             optionPanel.nextPanel();
             super.next();
         } catch (NotContinueWizardException e) {
             // this is not an error and not need to raise a error or
             // warning in the log.
-            log.info("It is not possible to continue with the wizard. "+e.displayMessage());
+            LOG.info("It is not possible to continue with the wizard. "+e.displayMessage());
             if (e.displayMessage()) {
                 JOptionPane.showMessageDialog(e.getComponent(), e
                     .getLocalizedMessageStack());
@@ -105,6 +111,7 @@
      */
     @Override
     public void update() {
+        LOG.debug("WizarPanel '"+this.optionPanel.getPanelTitle()+"' update, direction "+this.wizardPanel.getDirection()+".");
         optionPanel.updatePanel();
         super.update();
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/Launcher.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/Launcher.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/Launcher.java	(revision 43126)
@@ -32,8 +32,8 @@
 import java.awt.Toolkit;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
-import java.awt.event.WindowListener;
 import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
 import java.io.File;
@@ -75,7 +75,6 @@
 import java.util.Properties;
 import java.util.Set;
 import java.util.TreeSet;
-import java.util.logging.Level;
 import java.util.prefs.Preferences;
 
 import javax.swing.ImageIcon;
@@ -97,7 +96,6 @@
 import org.apache.commons.cli.PosixParser;
 import org.apache.commons.configuration.PropertiesConfiguration;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.input.ClassLoaderObjectInputStream;
 import org.apache.commons.lang3.JavaVersion;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.SystemUtils;
@@ -162,7 +160,7 @@
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.creation.MakePluginPackageServiceException;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
+import org.gvsig.installer.swing.api.execution.InstallWizardPanel;
 import org.gvsig.installer.swing.api.wizard.InstallerWizardActionListener;
 import org.gvsig.installer.swing.api.wizard.InstallerWizardPanel;
 import org.gvsig.tools.ToolsLocator;
@@ -3734,20 +3732,20 @@
 
         InstallerManager installerManager = InstallerLocator.getInstallerManager();
         
-//        try {
-//            logger.info("Loading plugins configurations");
-//            this.loadPluginConfigs();
-//        } catch (Throwable ex) {
-//            logger.warn("Can't load plugins configurations", ex);
-//        }
-//
-//        try {
-//            logger.info("Loading plugins");
-//            this.loadPluginServices();
-//        } catch (Throwable ex) {
-//            logger.warn("Can't load plugins", ex);
-//        }
+        try {
+            logger.info("Loading plugins configurations");
+            this.loadPluginConfigs();
+        } catch (Throwable ex) {
+            logger.warn("Can't load plugins configurations", ex);
+        }
 
+        try {
+            logger.info("Loading plugins");
+            this.loadPluginServices();
+        } catch (Throwable ex) {
+            logger.warn("Can't load plugins", ex);
+        }
+
         AndamiConfig config = getAndamiConfig();
 
         initializeIdentityManagement(new File(config.getPluginsDirectory()).getAbsoluteFile());
@@ -3779,16 +3777,18 @@
         // Launch installer
         PluginsManager manager = PluginsLocator.getManager();
 
-        AbstractInstallPackageWizard installPackageWizard = SwingInstallerLocator
+        InstallWizardPanel installPackageWizard = SwingInstallerLocator
                 .getSwingInstallerManager().createInstallPackageWizard(
                         manager.getApplicationFolder(),
                         manager.getInstallFolder());
         installPackageWizard.setWizardActionListener(new InstallerWizardActionListener() {
+            @Override
             public void finish(InstallerWizardPanel installerWizard) {
                 logger.info("Finish installation.");
                 System.exit(0);
             }
 
+            @Override
             public void cancel(InstallerWizardPanel installerWizard) {
                 logger.info("Cancel installation.");
                 System.exit(0);
@@ -3796,45 +3796,25 @@
         });
 
         // the wizard will show the Typical or Advanced mode option.
-        installPackageWizard.setAskTypicalOrCustom(true);
+        installPackageWizard.setSkipTypicalOrAdvancedWizardPage(false);
         // default packages will be selected.
         installPackageWizard.setSelectDefaultPackages(true);
 
         JFrame frame = new JFrame(Messages.get("gvsig_package_installer"));
-
-        frame.addWindowListener(new WindowListener() {
-            public void windowOpened(WindowEvent we) {
-                logger.info("Open window installation.");
-            }
-
+        frame.addWindowListener(new WindowAdapter() {
+            @Override
             public void windowClosing(WindowEvent we) {
                 logger.info("Closing installation.");
                 System.exit(0);
             }
 
+            @Override
             public void windowClosed(WindowEvent we) {
                 logger.info("Close installation.");
                 System.exit(0);
             }
-
-            public void windowIconified(WindowEvent we) {
-            }
-
-            public void windowDeiconified(WindowEvent we) {
-            }
-
-            public void windowActivated(WindowEvent we) {
-                logger.info("Activate window installation.");
-            }
-
-            public void windowDeactivated(WindowEvent we) {
-                logger.info("Deactivate window installation.");
-            }
         });
-        //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-
-        frame.getContentPane().add(installPackageWizard, BorderLayout.CENTER);
-
+        frame.getContentPane().add(installPackageWizard.asJComponent(), BorderLayout.CENTER);
         URL iconURL = getClass().getResource("/images/main/install-icon.png");
         if( iconURL!=null ) {
             ImageIcon icon = new ImageIcon(iconURL);
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageWindow.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageWindow.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageWindow.java	(revision 43126)
@@ -31,8 +31,6 @@
 import java.awt.BorderLayout;
 import java.awt.Dimension;
 import java.io.File;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 import javax.swing.JPanel;
 
@@ -40,10 +38,10 @@
 import org.gvsig.andami.ui.mdiManager.WindowInfo;
 import org.gvsig.i18n.Messages;
 import org.gvsig.installer.app.extension.utils.WindowInstallerListener;
-import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
 import org.gvsig.installer.swing.api.SwingInstallerLocator;
-import org.gvsig.installer.swing.api.execution.AbstractInstallPackageWizard;
+import org.gvsig.installer.swing.api.SwingInstallerManager;
 import org.gvsig.installer.swing.api.execution.InstallPackageWizardException;
+import org.gvsig.installer.swing.api.execution.InstallWizardPanel;
 import org.gvsig.tools.locator.LocatorException;
 
 /**
@@ -58,15 +56,19 @@
                 boolean skipBundleSelection)
 			throws LocatorException, InstallPackageWizardException {
 		super();
-		AbstractInstallPackageWizard installPackageWizard = SwingInstallerLocator
-				.getSwingInstallerManager().createInstallPackageWizard(
-						applicationFolder, installFolder);
+                SwingInstallerManager manager = SwingInstallerLocator.getSwingInstallerManager();
+		InstallWizardPanel installPackageWizard = manager.createInstallPackageWizard(
+                        applicationFolder, installFolder
+                );
 		installPackageWizard.setWizardActionListener(new WindowInstallerListener(this));
 		this.setLayout(new BorderLayout());
-                installPackageWizard.setSkipBundleSelection(skipBundleSelection);
-		add(installPackageWizard, BorderLayout.CENTER);
+                installPackageWizard.setSkipSelectBundleWizardPage(skipBundleSelection);
+                installPackageWizard.setSkipTypicalOrAdvancedWizardPage(true);
+                        
+		add(installPackageWizard.asJComponent(), BorderLayout.CENTER);
 	}
 
+        @Override
 	public WindowInfo getWindowInfo() {
 		if (windowInfo == null) {
 			windowInfo = new WindowInfo(WindowInfo.MAXIMIZABLE
@@ -79,6 +81,7 @@
 		return windowInfo;
 	}
 
+        @Override
 	public Object getWindowProfile() {
 		return WindowInfo.DIALOG_PROFILE;
 	}
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageExtension.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/execution/InstallPackageExtension.java	(revision 43126)
@@ -47,18 +47,17 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-/**
- * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodr&aacute;</a>
- */
 public class InstallPackageExtension extends Extension {
 
     private static final Logger logger = LoggerFactory
             .getLogger(InstallPackageExtension.class);
 
+    @Override
     public void execute(String actionCommand) {
         this.execute(actionCommand, null);
     }
 
+    @Override
     public void execute(String actionCommand, Object[] args) {
 
         if ("tools-addonsmanager".equalsIgnoreCase(actionCommand)) {
@@ -76,7 +75,7 @@
 
         PluginsManager pluginManager = PluginsLocator.getManager();
         
-        String cmd = null;
+        String cmd;
         boolean useInternalAddonsManager = false;
 
         if( InstallerManager.OS.WINDOWS.equalsIgnoreCase(installManager.getOperatingSystem()) ) {
@@ -127,13 +126,14 @@
                     )
             );
         } catch (Error e) {
-            logger.error("Error creating the wizard to install a package ", e);
-        } catch (Exception e) {
-            logger.error("Error creating the wizard to install a package ", e);
+            logger.warn("Error creating the wizard to install a package ", e);
+        } catch (Throwable e) {
+            logger.warn("Error creating the wizard to install a package ", e);
         }
 
     }
 
+    @Override
     public void initialize() {
         PluginsManager pm = PluginsLocator.getManager();
         PackageInfo packageInfo = pm.getPackageInfo();
@@ -153,10 +153,10 @@
                 manager.setDefaultDownloadURL(
                         new File( pm.getPlugin(this).getPluginDirectory(),"defaultDownloadsURLs")
                 );
-                if (packageInfo != null && (packageInfo.getState().startsWith(InstallerManager.STATE.BETA)
-                        || packageInfo.getState().startsWith(InstallerManager.STATE.RC)
-                        || packageInfo.getState().equalsIgnoreCase(InstallerManager.STATE.FINAL))) {
-
+                if( packageInfo.getState().startsWith(InstallerManager.STATE.BETA) ||
+                    packageInfo.getState().startsWith(InstallerManager.STATE.RC) ||
+                    packageInfo.getState().equalsIgnoreCase(InstallerManager.STATE.FINAL) 
+                    ) {
                     String installURL = manager.getInstallerManager().getDownloadBaseURL().toString()
                             + "dists/<%Version%>/builds/<%Build%>/packages.gvspki ## Official gvSIG repository (frozen in this version)";
                     manager.addDefaultDownloadURL(installURL);
@@ -165,30 +165,33 @@
                 logger.info("Error. Can't select default gvspki", th);
             }
 
-            InputStream is = this.getClass().getResourceAsStream(
-                    "/defaultDownloadsURLs");
+            InputStream is = this.getClass().getResourceAsStream("/defaultDownloadsURLs");
             BufferedReader in = new BufferedReader(new InputStreamReader(is));
-            String line = null;
-            for (line = in.readLine(); line != null; line = in.readLine()) {
+            for (String line = in.readLine(); line != null; line = in.readLine()) {
                 try {
                     manager.addDefaultDownloadURL(line);
                 } catch (MalformedURLException e) {
-                    logger.error(
-                            "Error creating the default packages download URL pointing to "
-                            + line, e);
+                    logger.warn(
+                        "Error creating the default packages download URL pointing to " + line,
+                        e
+                    );
                 }
             }
             manager.getInstallerManager().setVersion(version);
         } catch (Throwable e) {
-            logger.error("Error reading the default packages download URL file "
-                    + "/defaultDownloadsURLs", e);
+            logger.warn(
+                "Error reading the default packages download URL file /defaultDownloadsURLs",
+                e
+            );
         }
     }
 
+    @Override
     public boolean isEnabled() {
         return true;
     }
 
+    @Override
     public boolean isVisible() {
         return true;
     }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageWindow.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageWindow.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.installer.app/org.gvsig.installer.app.mainplugin/src/main/java/org/gvsig/installer/app/extension/creation/MakePluginPackageWindow.java	(revision 43126)
@@ -60,7 +60,7 @@
 		makePluginPackageWizard
 				.setWizardActionListener(new WindowInstallerListener(this));
 		this.setLayout(new BorderLayout());
-		add(makePluginPackageWizard, BorderLayout.CENTER);
+		add(makePluginPackageWizard.asJComponent(), BorderLayout.CENTER);
 	}
 
 	public WindowInfo getWindowInfo() {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/SymbolInstallerProviderLibrary.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/SymbolInstallerProviderLibrary.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/SymbolInstallerProviderLibrary.java	(revision 43126)
@@ -43,10 +43,6 @@
 
     @Override
     protected void doPostInitialize() throws LibraryException {
-        ProviderManager providerManager =
-            InstallerProviderLocator.getProviderManager();
 
-        providerManager
-            .addProviderFactory(new SymbolInstallerExecutionProviderFactory());
     }
 }
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExecutionProviderFactory.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExecutionProviderFactory.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExecutionProviderFactory.java	(revision 43126)
@@ -23,6 +23,7 @@
  */
 package org.gvsig.symbology.app.symbolinstaller.execution;
 
+import java.io.File;
 import org.gvsig.tools.ToolsLocator;
 import org.gvsig.tools.dynobject.DynClass;
 import org.gvsig.tools.dynobject.DynObject;
@@ -38,7 +39,12 @@
     public static final String PROVIDER_DESCRIPTION = "";
 
     private DynClass dynclass;
+    private final File symbolsFolder;
 
+    public SymbolInstallerExecutionProviderFactory(File symbolsFolder) {
+        this.symbolsFolder = symbolsFolder;
+    }
+    
     @Override
     protected DynClass createParametersDynClass() {
         if (dynclass == null) {
@@ -49,7 +55,7 @@
 
     @Override
     protected Provider doCreate(DynObject parameters, ProviderServices services) {
-        return new SymbolInstallerExecutionProvider(services);
+        return new SymbolInstallerExecutionProvider(services,symbolsFolder);
     }
 
     public void initialize() {
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExtension.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExtension.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExtension.java	(revision 43126)
@@ -23,22 +23,22 @@
  */
 package org.gvsig.symbology.app.symbolinstaller.execution;
 
+
 import java.io.File;
-import java.util.Locale;
-
 import org.gvsig.andami.IconThemeHelper;
+import org.gvsig.andami.PluginsLocator;
+import org.gvsig.andami.PluginsManager;
 import org.gvsig.andami.plugins.Extension;
 import org.gvsig.andami.ui.ToolsWindowManager;
 import org.gvsig.fmap.mapcontext.MapContextLocator;
 import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager;
 import org.gvsig.i18n.Messages;
-import org.gvsig.installer.lib.api.InstallerLocator;
-import org.gvsig.installer.lib.api.InstallerManager;
 import org.gvsig.symbology.app.symbolinstaller.creation.DefaultMakeSymbolPackageWizard;
 import org.gvsig.tools.swing.api.windowmanager.WindowManager;
 
 public class SymbolInstallerExtension extends Extension {
 
+    @Override
     public void initialize() {
 
         IconThemeHelper.registerIcon("symbol-installer", "wizard-make-symbol-package", this);
@@ -46,23 +46,26 @@
 
     @Override
     public void postInitialize() {
-        InstallerManager im = InstallerLocator.getInstallerManager();
+        PluginsManager pluginsManager = PluginsLocator.getManager();
         
-        SymbolManager sym_man = MapContextLocator.getSymbolManager();
-        File symbolsDirectory =
-            new File(sym_man.getSymbolPreferences().getSymbolLibraryPath());
+        SymbolManager symbolManager = MapContextLocator.getSymbolManager();
+        File symbolsFolder = new File(symbolManager.getSymbolPreferences().getSymbolLibraryPath());
 
-        im.setDefaultLocalAddonRepository(symbolsDirectory,SymbolInstallerExecutionProviderFactory.PROVIDER_NAME);
+        SymbolsInstallerInitializer initializer = new SymbolsInstallerInitializer();
+        initializer.perform(pluginsManager.getPlugin(this).getPluginName(), symbolsFolder);
     }
 
+    @Override
     public boolean isEnabled() {
         return true;
     }
 
+    @Override
     public boolean isVisible() {
         return true;
     }
 
+    @Override
     public void execute(String actionCommand) {
         if (actionCommand.equals("Create_Package")) {
             DefaultMakeSymbolPackageWizard wizard =
Index: trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExecutionProvider.java
===================================================================
--- trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExecutionProvider.java	(revision 43125)
+++ trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.symbology.app/org.gvsig.symbology.app.symbolinstaller/src/main/java/org/gvsig/symbology/app/symbolinstaller/execution/SymbolInstallerExecutionProvider.java	(revision 43126)
@@ -27,8 +27,6 @@
 import java.io.IOException;
 import java.io.InputStream;
 
-import org.gvsig.fmap.mapcontext.MapContextLocator;
-import org.gvsig.fmap.mapcontext.rendering.symbols.SymbolManager;
 import org.gvsig.installer.lib.api.PackageInfo;
 import org.gvsig.installer.lib.api.execution.InstallPackageServiceException;
 import org.gvsig.installer.lib.spi.InstallPackageProviderServices;
@@ -40,9 +38,11 @@
 
 public class SymbolInstallerExecutionProvider extends AbstractProvider
     implements InstallPackageProvider {
+    private final File symbolsFolder;
 
-    public SymbolInstallerExecutionProvider(ProviderServices providerServices) {
+    public SymbolInstallerExecutionProvider(ProviderServices providerServices, File symbolsFolder) {
         super(providerServices);
+        this.symbolsFolder = symbolsFolder;
     }
 
     public class InstallerSymbolsDirectoryNotFoundException extends
@@ -57,16 +57,12 @@
         }
     }
 
+    @Override
     public void install(File applicationDirectory, InputStream inputStream,
         PackageInfo packageInfo) throws InstallPackageServiceException {
-
         
-        SymbolManager sym_man = MapContextLocator.getSymbolManager();
-        File symbolsDirectory =
-            new File(sym_man.getSymbolPreferences().getSymbolLibraryPath());
-
         try {
-            if (!symbolsDirectory.exists()) {
+            if (!symbolsFolder.exists()) {
                 throw new InstallerSymbolsDirectoryNotFoundException();
             }
             InstallerProviderManager installerProviderManager =
@@ -74,13 +70,14 @@
             InstallPackageProviderServices installerProviderServices =
                 installerProviderManager.createInstallerProviderServices();
 
-            installerProviderServices.decompress(inputStream, symbolsDirectory);
+            installerProviderServices.decompress(inputStream, symbolsFolder);
 
         } catch (Exception e) {
             throw new InstallPackageServiceException(e);
         }
     }
 
+    @Override
     public void installLater(File applicationDirectory,
         InputStream inputStream, PackageInfo packageInfo)
         throws InstallPackageServiceException, IOException {
Index: trunk/org.gvsig.desktop/pom.xml
===================================================================
--- trunk/org.gvsig.desktop/pom.xml	(revision 43125)
+++ trunk/org.gvsig.desktop/pom.xml	(revision 43126)
@@ -2599,7 +2599,7 @@
 
         <jython.artifactId>jython-standalone</jython.artifactId>
         <!-- External project versions -->
-        <gvsig.tools.version>3.0.100</gvsig.tools.version>
+        <gvsig.tools.version>3.0.101</gvsig.tools.version>
         <gvsig.proj.version>1.0.4</gvsig.proj.version>
         <gvsig.projection.api.version>2.0.22</gvsig.projection.api.version>
 
