Revision 47

View differences:

trunk/org.gvsig.customize.app/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/CustomizeTask.java
388 388
        if (!getPropertyBoolean("configureOGCServers_" + protocol)) {
389 389
            return;
390 390
        }
391
        if( servers==null ) {
392
            logger.info("No servers specifieds for protocol "+protocol+".");
393
            return;
394
        }
391 395
        if (pluginName == null) {
392 396
            logger.info("Skip '" + pluginName + "' servers configurations..");
393 397
            return;
......
403 407
            plugin.getPluginProperties().setDynValue("Servers", serversDataPersistence);
404 408
        }
405 409
        MyServerData serversData = new MyServerData(serversDataPersistence);
406

  
410
        
407 411
        for (int i = 0; i < servers.size(); i++) {
408 412
            String server = (String) servers.get(i).getDynValue("url");
409 413
            boolean remove = BooleanUtils.isTrue((Boolean) servers.get(i).getDynValue("remove"));
trunk/org.gvsig.customize.app/org.gvsig.customize.app.mainplugin/src/main/java/org/gvsig/customize/Configuration.java
4 4
import java.io.File;
5 5
import java.io.FileInputStream;
6 6
import java.io.FileOutputStream;
7
import java.io.FileWriter;
8 7
import java.io.IOException;
9 8
import java.io.InputStream;
10 9
import java.util.Map;
11
import java.util.logging.Level;
12 10
import javax.swing.JOptionPane;
13 11
import org.apache.commons.io.FileUtils;
14 12
import org.apache.commons.io.IOUtils;
......
81 79
            DynObject config = null;
82 80
            PluginsManager pluginManager = PluginsLocator.getManager();
83 81
            PluginServices plugin = pluginManager.getPlugin(CustomizeExtension.class);
84
            File configFile = new File(plugin.getPluginDirectory(), "configure.dat");
82
            File configFile = new File(plugin.getPluginHomeFolder(), "configure.dat");
85 83
            if (configFile.exists()) {
86 84
                is = new FileInputStream(configFile);
87
                PersistenceManager pman = new XMLPersistenceManager();
85
                PersistenceManager pman = ToolsLocator.getPersistenceManager();//new XMLPersistenceManager();
88 86
                config = (DynObject) pman.getObject(is);
89 87
            } else {
90 88
                config = this.create();
......
159 157
        try {
160 158
            PluginsManager pluginManager = PluginsLocator.getManager();
161 159
            PluginServices plugin = pluginManager.getPlugin(CustomizeExtension.class);
162
            os = new FileOutputStream(new File(plugin.getPluginDirectory(), "configure.dat"));
163
            PersistenceManager pman = new XMLPersistenceManager();
160
            os = new FileOutputStream(new File(plugin.getPluginHomeFolder(), "configure.dat"));
161
            PersistenceManager pman = ToolsLocator.getPersistenceManager();//new XMLPersistenceManager();
164 162
            PersistentState state = pman.getState(config);
165 163
            pman.saveState(state, os);
166 164
            updateAndamiTheme((DynObject) config.getDynValue("theme"));
trunk/org.gvsig.customize.app/org.gvsig.customize.app.mainplugin/src/main/resources-plugin/configure.form
129 129
        <field name="default_projection" label="Default projection" type="CRS" defaultValue="EPSG:4326" mandatory="false">
130 130
          <description>Default projection to use in gvSIG</description>
131 131
        </field>
132
        <field name="recent11" label="Recent projection 1" type="CRS" defaultValue="" mandatory="false">
132
        <field name="recent11" label="Recent projection 1" type="Object" classOfValue="org.cresques.cts.IProjection" type="CRS" defaultValue="" mandatory="false">
133 133
          <description>Projection to add to recent used projections</description>
134 134
        </field>
135 135
        <field name="recent2" label="Recent projection 2" type="CRS" defaultValue="" mandatory="false">

Also available in: Unified diff