Changeset 34552 in osm for applications/editors


Ignore:
Timestamp:
2018-08-18T20:08:51+02:00 (6 years ago)
Author:
donvip
Message:

update to JOSM 14153

Location:
applications/editors/josm/plugins/reverter
Files:
5 edited

Legend:

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

    r34270 r34552  
    44    <property name="commit.message" value="Reverter: Update MultiOsmReader to support null data after redaction"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="13914"/>
     6    <property name="plugin.main.version" value="14153"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/reverter/src/reverter/ChangesetIdQuery.java

    r33865 r34552  
    2525import javax.swing.plaf.basic.BasicComboBoxEditor;
    2626
    27 import org.openstreetmap.josm.Main;
    2827import org.openstreetmap.josm.data.osm.DataSet;
    2928import org.openstreetmap.josm.gui.ExtendedDialog;
    3029import org.openstreetmap.josm.gui.MainApplication;
    3130import org.openstreetmap.josm.gui.widgets.HistoryComboBox;
     31import org.openstreetmap.josm.spi.preferences.Config;
    3232import org.openstreetmap.josm.tools.GBC;
    3333
     
    6666
    6767    public ChangesetIdQuery() {
    68         super(Main.parent, tr("Revert changeset"), new String[] {tr("Revert"), tr("Cancel")}, true);
     68        super(MainApplication.getMainFrame(), tr("Revert changeset"), new String[] {tr("Revert"), tr("Cancel")}, true);
    6969        contentInsets = new Insets(10, 10, 10, 5);
    7070
     
    142142        });
    143143
    144         if (Main.pref.getBoolean("downloadchangeset.autopaste", true)) {
     144        if (Config.getPref().getBoolean("downloadchangeset.autopaste", true)) {
    145145            tcid.tryToPasteFromClipboard();
    146146        }
     
    157157    protected void restoreChangesetsHistory(HistoryComboBox cbHistory) {
    158158        List<String> cmtHistory = new LinkedList<>(
    159                 Main.pref.getList(getClass().getName() + ".changesetsHistory", new LinkedList<String>()));
     159                Config.getPref().getList(getClass().getName() + ".changesetsHistory", new LinkedList<String>()));
    160160        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
    161161        Collections.reverse(cmtHistory);
     
    169169    protected void remindChangesetsHistory(HistoryComboBox cbHistory) {
    170170        cbHistory.addCurrentItemToHistory();
    171         Main.pref.putList(getClass().getName() + ".changesetsHistory", cbHistory.getHistory());
     171        Config.getPref().putList(getClass().getName() + ".changesetsHistory", cbHistory.getHistory());
    172172    }
    173173
  • applications/editors/josm/plugins/reverter/src/reverter/ObjectsHistoryDialog.java

    r32905 r34552  
    99import javax.swing.JPanel;
    1010
    11 import org.openstreetmap.josm.Main;
    1211import org.openstreetmap.josm.gui.ExtendedDialog;
     12import org.openstreetmap.josm.gui.MainApplication;
    1313
    1414@SuppressWarnings("serial")
    1515public class ObjectsHistoryDialog extends ExtendedDialog {
    1616    public ObjectsHistoryDialog() {
    17         super(Main.parent, tr("Objects history"), new String[] {"Revert", "Cancel"}, false);
     17        super(MainApplication.getMainFrame(), tr("Objects history"), new String[] {"Revert", "Cancel"}, false);
    1818        contentInsets = new Insets(10, 10, 10, 5);
    1919        setButtonIcons(new String[] {"ok.png", "cancel.png" });
  • applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetTask.java

    r34036 r34552  
    1414import javax.swing.JOptionPane;
    1515
    16 import org.openstreetmap.josm.Main;
    1716import org.openstreetmap.josm.command.Command;
    1817import org.openstreetmap.josm.command.SequenceCommand;
    1918import org.openstreetmap.josm.command.conflict.ConflictAddCommand;
     19import org.openstreetmap.josm.data.UndoRedoHandler;
    2020import org.openstreetmap.josm.gui.MainApplication;
    2121import org.openstreetmap.josm.gui.Notification;
     
    6565                @Override
    6666                public Integer call() throws Exception {
    67                     return JOptionPane.showConfirmDialog(Main.parent,
     67                    return JOptionPane.showConfirmDialog(MainApplication.getMainFrame(),
    6868                            tr("This changeset has objects that are not present in current dataset.\n" +
    6969                                    "It is needed to download them before reverting. Do you want to continue?"),
     
    111111            Command cmd = allcmds.size() == 1 ? allcmds.get(0) : new SequenceCommand(tr("Revert changeset"), allcmds);
    112112            GuiHelper.runInEDT(() -> {
    113                 MainApplication.undoRedo.add(cmd);
     113                UndoRedoHandler.getInstance().add(cmd);
    114114                if (numberOfConflicts > 0) {
    115115                    MainApplication.getMap().conflictDialog.warnNumNewConflicts(numberOfConflicts);
  • applications/editors/josm/plugins/reverter/src/reverter/ReverterUploadHook.java

    r33572 r34552  
    55import org.openstreetmap.josm.command.Command;
    66import org.openstreetmap.josm.data.APIDataSet;
     7import org.openstreetmap.josm.data.UndoRedoHandler;
    78import org.openstreetmap.josm.gui.MainApplication;
    89
     
    1718        if (!ReverterPlugin.reverterUsed) return true;
    1819        boolean hasRevertions = false;
    19         for (Command cmd : MainApplication.undoRedo.commands) {
     20        for (Command cmd : UndoRedoHandler.getInstance().commands) {
    2021            if (cmd instanceof RevertChangesetCommand) {
    2122                hasRevertions = true;
Note: See TracChangeset for help on using the changeset viewer.