Revision 218 org.gvsig.geoprocess/trunk/org.gvsig.geoprocess/org.gvsig.geoprocess.app/org.gvsig.geoprocess.app.sextante/src/main/java/org/gvsig/geoprocess/app/sextante/SextanteAlgorithmsExtension.java
SextanteAlgorithmsExtension.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import org.gvsig.andami.PluginsLocator; |
10 | 10 |
import org.gvsig.andami.plugins.Extension; |
11 |
import org.gvsig.geoprocess.extensions.ToolboxExtension; |
|
11 | 12 |
|
12 | 13 |
/** |
13 | 14 |
* Sextante algorithms extension. |
... | ... | |
27 | 28 |
// algorithms, so we must get them before and add again afterwards. |
28 | 29 |
Map<String, HashMap<String, GeoAlgorithm>> algorithms = |
29 | 30 |
Sextante.getAlgorithms(); |
31 |
|
|
32 |
// The sextante algorithms jar files are copied into the |
|
33 |
// org.gvsig.geoprocess.app.mainplugin plugin as sextante looks |
|
34 |
// for resource bundles using its own classloader |
|
30 | 35 |
Sextante.initialize((PluginsLocator.getManager() |
31 |
.getPlugin(SextanteAlgorithmsExtension.class).getPluginDirectory()
|
|
36 |
.getPlugin(ToolboxExtension.class).getPluginDirectory()
|
|
32 | 37 |
.getAbsolutePath()) + "/lib"); |
33 |
Sextante.getAlgorithms().putAll(algorithms); |
|
38 |
|
|
39 |
// Readd previous algorithms just in case |
|
40 |
if (algorithms != null) { |
|
41 |
Sextante.getAlgorithms().putAll(algorithms); |
|
42 |
} |
|
34 | 43 |
} |
35 | 44 |
|
36 | 45 |
public boolean isEnabled() { |
Also available in: Unified diff