Changeset 33641 in osm for applications/editors


Ignore:
Timestamp:
2017-09-20T21:35:05+02:00 (7 years ago)
Author:
simon04
Message:

JOSM/wikipedia: reuse UserQueryList (drops massive code duplication) - see #josm15264

Location:
applications/editors/josm/plugins/wikipedia
Files:
1 deleted
2 edited

Legend:

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

    r33635 r33641  
    55    <property name="commit.message" value="Commit message"/>
    66    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    7     <property name="plugin.main.version" value="12878"/>
     7    <property name="plugin.main.version" value="12880"/>
    88    <property name="plugin.canloadatruntime" value="true"/>
    99
  • applications/editors/josm/plugins/wikipedia/src/org/wikipedia/gui/WikosmDownloadSource.java

    r33628 r33641  
    3030import org.openstreetmap.josm.gui.download.DownloadSourceSizingPolicy;
    3131import org.openstreetmap.josm.gui.download.DownloadSourceSizingPolicy.AdjustableDownloadSizePolicy;
     32import org.openstreetmap.josm.gui.download.UserQueryList;
    3233import org.openstreetmap.josm.gui.util.GuiHelper;
    3334import org.openstreetmap.josm.gui.widgets.JosmTextArea;
     
    8485
    8586        private final JosmTextArea wikosmQuery;
    86         private final WikosmQueryList wikosmQueryList;
     87        private final UserQueryList wikosmQueryList;
    8788        private final JCheckBox referrers;
    8889        private final JCheckBox fullRel;
    8990
    9091        /**
    91          * Create a new {@link WikosmDownloadSourcePanel}
     92         * Create a new {@code WikosmDownloadSourcePanel}
    9293         * @param ds The download source to create the panel for
    9394         */
     
    123124
    124125
    125             this.wikosmQueryList = new WikosmQueryList(this, this.wikosmQuery);
     126            this.wikosmQueryList = new UserQueryList(this, this.wikosmQuery, "download.wikosm.query");
    126127            this.wikosmQueryList.setPreferredSize(new Dimension(350, 300));
    127128
     
    269270
    270271        /**
    271          * Action that delegates snippet creation to {@link WikosmQueryList#createNewItem()}.
     272         * Action that delegates snippet creation to {@link UserQueryList#createNewItem()}.
    272273         */
    273274        private class AddSnippetAction extends AbstractAction {
     
    289290
    290291        /**
    291          * Action that delegates snippet removal to {@link WikosmQueryList#removeSelectedItem()}.
     292         * Action that delegates snippet removal to {@link UserQueryList#removeSelectedItem()}.
    292293         */
    293294        private class RemoveSnippetAction extends AbstractAction implements ListSelectionListener {
     
    322323
    323324        /**
    324          * Action that delegates snippet edit to {@link WikosmQueryList#editSelectedItem()}.
     325         * Action that delegates snippet edit to {@link UserQueryList#editSelectedItem()}.
    325326         */
    326327        private class EditSnippetAction extends AbstractAction implements ListSelectionListener {
Note: See TracChangeset for help on using the changeset viewer.