Revision 265 org.gvsig.toolbox/trunk/org.gvsig.toolbox/org.gvsig.toolbox.gui/src/main/java/es/unex/sextante/gui/cmd/EditScriptAction.java
EditScriptAction.java | ||
---|---|---|
3 | 3 |
import es.unex.sextante.core.GeoAlgorithm; |
4 | 4 |
import es.unex.sextante.core.Sextante; |
5 | 5 |
import es.unex.sextante.gui.core.IToolboxRightButtonAction; |
6 |
import es.unex.sextante.gui.core.SextanteGUI; |
|
7 |
import es.unex.sextante.gui.settings.SextanteScriptsSettings; |
|
8 |
import java.io.File; |
|
6 | 9 |
|
7 | 10 |
public class EditScriptAction |
8 |
implements
|
|
9 |
IToolboxRightButtonAction {
|
|
11 |
implements |
|
12 |
IToolboxRightButtonAction { |
|
10 | 13 |
|
11 |
public void execute(final GeoAlgorithm alg) { |
|
12 |
// TODO Auto-generated method stub |
|
14 |
@Override |
|
15 |
public void execute(final GeoAlgorithm alg) { |
|
16 |
ScriptEditingPanel panel = new ScriptEditingPanel(SextanteGUI.getSettingParameterValue( |
|
17 |
SextanteScriptsSettings.SCRIPTS_FOLDER) + File.separator + alg.getName() + ".bsh" |
|
18 |
); |
|
19 |
SextanteGUI.getGUIFactory().showGenericDialog("Script", panel); |
|
20 |
} |
|
13 | 21 |
|
14 |
} |
|
22 |
@Override |
|
23 |
public String getDescription() { |
|
15 | 24 |
|
25 |
return Sextante.getText("Edit"); |
|
16 | 26 |
|
17 |
public String getDescription() {
|
|
27 |
}
|
|
18 | 28 |
|
19 |
return Sextante.getText("Edit"); |
|
29 |
@Override |
|
30 |
public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) { |
|
20 | 31 |
|
21 |
}
|
|
32 |
return alg instanceof ScriptAlgorithm;
|
|
22 | 33 |
|
34 |
} |
|
23 | 35 |
|
24 |
public boolean canBeExecutedOnAlgorithm(final GeoAlgorithm alg) { |
|
25 |
|
|
26 |
return alg instanceof ScriptAlgorithm; |
|
27 |
|
|
28 |
} |
|
29 |
|
|
30 | 36 |
} |
Also available in: Unified diff