Changeset 9949 in osm for applications


Ignore:
Timestamp:
2008-08-18T16:47:03+02:00 (16 years ago)
Author:
stoecker
Message:

fixed build of two more modules

Location:
applications/editors/josm/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/build.xml

    r9948 r9949  
    2626    <ant        dir="pluginmanager"     antfile="build.xml"     target="dist"/>
    2727    <ant        dir="slippymap"         antfile="build.xml"     target="dist"/>
     28    <ant        dir="surveyor"          antfile="build.xml"     target="dist"/>
    2829    <ant        dir="tagging-preset-tester"     antfile="build.xml"     target="dist"/>
    2930    <ant        dir="utilsplugin"       antfile="build.xml"     target="dist"/>
    3031    <ant        dir="validator"         antfile="build.xml"     target="dist"/>
     32    <ant        dir="waypoints"         antfile="build.xml"     target="dist"/>
    3133    <ant        dir="wmsplugin"         antfile="build.xml"     target="dist"/>
    3234    <ant        dir="ywms"              antfile="build.xml"     target="dist"/>
     
    3638    <ant        dir="grid"              antfile="build.xml"     target="dist"/>
    3739    <ant        dir="navigator"         antfile="build.xml"     target="dist"/>
    38     <ant        dir="surveyor"          antfile="build.xml"     target="dist"/>
    39     <ant        dir="waypoints"         antfile="build.xml"     target="dist"/>
    4040  </target>
    4141
  • applications/editors/josm/plugins/waypoints/src/WaypointOpenAction.java

    r1495 r9949  
    1414import javax.swing.JFileChooser;
    1515import javax.swing.JOptionPane;
     16
     17import javax.xml.parsers.ParserConfigurationException;
    1618
    1719import org.openstreetmap.josm.Main;
     
    3638
    3739        public void actionPerformed(ActionEvent e) {
    38                 JFileChooser fc = createAndOpenFileChooser(true, true);
     40                JFileChooser fc = createAndOpenFileChooser(true, true, null);
    3941                if (fc == null)
    4042                        return;
     
    5860                        JOptionPane.showMessageDialog(Main.parent,
    5961                                        tr("Error while parsing {0}",fn)+": "+x.getMessage());
     62                } catch (ParserConfigurationException x) {
     63                        x.printStackTrace(); // broken SAXException chaining
     64                        JOptionPane.showMessageDialog(Main.parent,
     65                                        tr("Error while parsing {0}",fn)+": "+x.getMessage());
    6066                } catch (IOException x) {
    6167                        x.printStackTrace();
  • applications/editors/josm/plugins/waypoints/src/WaypointReader.java

    r1495 r9949  
    77import java.io.InputStreamReader;
    88
     9import javax.xml.parsers.SAXParserFactory;
     10import javax.xml.parsers.ParserConfigurationException;
     11
    912import org.openstreetmap.josm.data.coor.LatLon;
    1013import org.openstreetmap.josm.data.osm.DataSet; // NW
     
    1215import org.xml.sax.Attributes;
    1316import org.xml.sax.SAXException;
    14 
    15 import uk.co.wilson.xml.MinML2;
    16 
     17import org.xml.sax.InputSource;
     18import org.xml.sax.helpers.DefaultHandler;
    1719
    1820/**
     
    2123public class WaypointReader {
    2224
    23         private static class Parser extends MinML2 {
     25        private static class Parser extends DefaultHandler {
    2426                /**
    2527                 * Current track to be read. The last entry is the current trkpt.
     
    99101         */
    100102        public static DataSet parse(InputStream source)
    101                         throws SAXException, IOException{
     103                        throws SAXException, IOException, ParserConfigurationException {
    102104                Parser parser = new Parser();
    103                 parser.parse(new InputStreamReader(source, "UTF-8"));
     105                SAXParserFactory.newInstance().newSAXParser().parse(new InputSource(new InputStreamReader(source, "UTF-8")), parser);
    104106                return parser.dataSet;
    105107        }
Note: See TracChangeset for help on using the changeset viewer.