Ignore:
Timestamp:
2011-10-30T23:41:51+01:00 (13 years ago)
Author:
stoecker
Message:

fix build

Location:
applications/editors/josm/plugins/surveyor
Files:
2 edited

Legend:

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

    r26605 r26991  
    3232    <property name="commit.message" value="Changed the constructor signature of the plugin main class"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4394"/>
     34    <property name="plugin.main.version" value="4549"/>
    3535    <property name="josm" location="../../core/dist/josm-custom.jar"/>
    3636    <property name="plugin.dist.dir" value="../../dist"/>
  • applications/editors/josm/plugins/surveyor/src/at/dallermassl/josm/plugin/surveyor/SurveyorComponent.java

    r26345 r26991  
    129129
    130130        SurveyorComponent surveyorComponent = null;
    131         try {
    132             parser.start(in);
    133             List<SurveyorActionDescription> actions = new ArrayList<SurveyorActionDescription>();
    134             while(parser.hasNext()) {
    135                 Object object = parser.next();
    136                 if (object instanceof SurveyorComponent) {
    137                     System.out.println("SurveyorComponent " + object);
    138                     surveyorComponent = (SurveyorComponent) object;
    139                 } else if (object instanceof ButtonDescription) {
    140                     System.out.println("ButtonDescription " + object);
    141                     ((ButtonDescription)object).setActions(actions);
    142                     surveyorComponent.addButton(((ButtonDescription)object));
    143                     actions.clear();
    144                 } else if (object instanceof SurveyorActionDescription) {
    145                     System.out.println("SurveyorActionDescription " + object);
    146                     actions.add((SurveyorActionDescription)object);
    147                 } else {
    148                     System.err.println("unknown " + object);
    149                 }
     131        parser.start(in);
     132        List<SurveyorActionDescription> actions = new ArrayList<SurveyorActionDescription>();
     133        while(parser.hasNext()) {
     134            Object object = parser.next();
     135            if (object instanceof SurveyorComponent) {
     136                System.out.println("SurveyorComponent " + object);
     137                surveyorComponent = (SurveyorComponent) object;
     138            } else if (object instanceof ButtonDescription) {
     139                System.out.println("ButtonDescription " + object);
     140                ((ButtonDescription)object).setActions(actions);
     141                surveyorComponent.addButton(((ButtonDescription)object));
     142                actions.clear();
     143            } else if (object instanceof SurveyorActionDescription) {
     144                System.out.println("SurveyorActionDescription " + object);
     145                actions.add((SurveyorActionDescription)object);
     146            } else {
     147                System.err.println("unknown " + object);
    150148            }
    151         } catch (SAXException e) {
    152             e.printStackTrace();
    153149        }
    154 
    155 //        SurveyorComponent surveyorComponent = new SurveyorComponent();
    156 //        surveyorComponent.setGridSize(3,3);
    157 //        surveyorComponent.addButton(new ButtonDescription("Tunnel", "T", "images/symbols/tunnel.png", "ConsolePrinterAction", ButtonType.SINGLE));
    158 //        surveyorComponent.addButton(new ButtonDescription("Bridge", "B", null, "ConsolePrinterAction", ButtonType.TOGGLE));
    159 //        surveyorComponent.addButton(new ButtonDescription("Motorway", "M", null, "ConsolePrinterAction", null));
    160 //        surveyorComponent.addButton(new ButtonDescription("Primary", "P", null, "ConsolePrinterAction", null));
    161 //        surveyorComponent.addButton(new ButtonDescription("Secondary", "S", null, "ConsolePrinterAction", null));
    162 //        surveyorComponent.addButton(new ButtonDescription("Unclassified", "U", null, "ConsolePrinterAction", null));
    163 //        surveyorComponent.addButton(new ButtonDescription("Residential", "R", null, "ConsolePrinterAction", null));
    164 //        surveyorComponent.addButton(new ButtonDescription("Parking", "P", "images/symbols/parking.png", "ConsolePrinterAction", null));
    165150
    166151        JFrame frame = new JFrame();
Note: See TracChangeset for help on using the changeset viewer.