### Eclipse Workspace Patch 1.0 #P org.gvsig.toolbox.algorithm Index: src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java =================================================================== --- src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java (revision 190) +++ src/main/java/es/unex/sextante/topology/checkLineDirectionCoherence/CheckLineDirectionCoherenceAlgorithm.java (working copy) @@ -8,6 +8,9 @@ import java.util.Iterator; import java.util.Set; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.geom.GeometryFactory; @@ -21,13 +24,18 @@ import es.unex.sextante.dataObjects.IVectorLayer; import es.unex.sextante.dataObjects.vectorFilters.BoundingBoxFilter; import es.unex.sextante.exceptions.GeoAlgorithmExecutionException; +import es.unex.sextante.exceptions.OptionalParentParameterException; import es.unex.sextante.exceptions.RepeatedParameterNameException; +import es.unex.sextante.exceptions.UndefinedParentParameterNameException; import es.unex.sextante.outputs.OutputVectorLayer; public class CheckLineDirectionCoherenceAlgorithm extends GeoAlgorithm { + + private static final Logger LOG = + LoggerFactory.getLogger(CheckLineDirectionCoherenceAlgorithm.class); public static final String RESULT = "RESULT"; public static final String LINES = "LINES"; @@ -49,14 +57,20 @@ try { m_Parameters.addInputVectorLayer(LINES, Sextante.getText("Lines_layer"), AdditionalInfoVectorLayer.SHAPE_TYPE_LINE, true); + m_Parameters.addTableField(FIELD, Sextante.getText("Field"), LINES); m_Parameters.addNumericalValue(TOLERANCE, Sextante.getText("Tolerance"), AdditionalInfoNumericalValue.NUMERICAL_VALUE_DOUBLE, 1, 0, Double.MAX_VALUE); addOutputVectorLayer(RESULT, Sextante.getText("Result"), OutputVectorLayer.SHAPE_TYPE_LINE); - } - catch (final RepeatedParameterNameException e) { - + } catch (final RepeatedParameterNameException e) { + LOG.error("Repeated parameter name", e); + return; + } catch (UndefinedParentParameterNameException e) { + LOG.error("Undefined parameter name", e); + return; + } catch (OptionalParentParameterException e) { + LOG.error("Optional parent parameter", e); + return; } - }