Revision 244 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.app/org.gvsig.geoprocess.app.mainplugin/src/main/java/org/gvsig/geoprocess/extension/GeoprocessExtension.java
GeoprocessExtension.java | ||
---|---|---|
20 | 20 |
*/ |
21 | 21 |
package org.gvsig.geoprocess.extension; |
22 | 22 |
|
23 |
import java.awt.Frame; |
|
24 |
import java.io.File; |
|
25 |
import java.util.HashMap; |
|
26 |
|
|
23 | 27 |
import es.unex.sextante.gui.additionalResults.AdditionalResults; |
24 | 28 |
import es.unex.sextante.gui.core.IGUIFactory; |
25 | 29 |
import es.unex.sextante.gui.core.SextanteGUI; |
26 | 30 |
import es.unex.sextante.gui.history.History; |
27 | 31 |
|
32 |
import org.gvsig.andami.PluginServices; |
|
28 | 33 |
import org.gvsig.andami.plugins.Extension; |
34 |
import org.gvsig.geoprocess.lib.api.GeoProcessLocator; |
|
35 |
import org.gvsig.geoprocess.lib.sextante.SextanteGeoProcessManager; |
|
36 |
import org.gvsig.geoprocess.lib.sextante.core.DefaultInputFactory; |
|
37 |
import org.gvsig.geoprocess.lib.sextante.core.DefaultOutputFactory; |
|
38 |
import org.gvsig.geoprocess.lib.sextante.core.DefaultPostProcessTaskFactory; |
|
29 | 39 |
import org.gvsig.geoprocess.sextante.gui.core.GUIFactory; |
30 | 40 |
|
31 | 41 |
/** |
... | ... | |
53 | 63 |
private static final String GEOPROCESS_HELP = "GEOPROCESS_HELP"; |
54 | 64 |
|
55 | 65 |
public void initialize() { |
66 |
SextanteGUI.setSextantePath(System.getProperty("user.dir") |
|
67 |
+ File.separator + "gvSIG" + File.separator + "extensiones" |
|
68 |
+ File.separator + "org.gvsig.geoprocess.app.mainplugin"); |
|
69 |
SextanteGUI |
|
70 |
.addAlgorithmProvider((SextanteGeoProcessManager) GeoProcessLocator |
|
71 |
.getGeoProcessManager()); |
|
72 |
SextanteGUI.initialize(); |
|
73 |
|
|
74 |
// Sextante API uses collection implementations :( |
|
75 |
HashMap<String, String> map = new HashMap<String, String>(); |
|
76 |
map.put("isFirstTimeUsingSextante", Boolean.FALSE.toString()); |
|
77 |
|
|
78 |
SextanteGUI.setCustomDefaultSettings(map); |
|
79 |
SextanteGUI.setMainFrame(((Frame) PluginServices.getMainFrame())); |
|
80 |
SextanteGUI.setOutputFactory(new DefaultOutputFactory()); |
|
81 |
SextanteGUI.setInputFactory(new DefaultInputFactory()); |
|
82 |
SextanteGUI |
|
83 |
.setPostProcessTaskFactory(new DefaultPostProcessTaskFactory()); |
|
84 |
|
|
56 | 85 |
SextanteGUI.setGUIFactory(new GUIFactory()); |
57 | 86 |
History.startSession(); |
58 | 87 |
} |
Also available in: Unified diff