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/waypoints/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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.