Changeset 34552 in osm for applications/editors
- Timestamp:
- 2018-08-18T20:08:51+02:00 (6 years ago)
- Location:
- applications/editors/josm/plugins/reverter
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reverter/build.xml
r34270 r34552 4 4 <property name="commit.message" value="Reverter: Update MultiOsmReader to support null data after redaction"/> 5 5 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 6 <property name="plugin.main.version" value="1 3914"/>6 <property name="plugin.main.version" value="14153"/> 7 7 8 8 <!-- Configure these properties (replace "..." accordingly). -
applications/editors/josm/plugins/reverter/src/reverter/ChangesetIdQuery.java
r33865 r34552 25 25 import javax.swing.plaf.basic.BasicComboBoxEditor; 26 26 27 import org.openstreetmap.josm.Main;28 27 import org.openstreetmap.josm.data.osm.DataSet; 29 28 import org.openstreetmap.josm.gui.ExtendedDialog; 30 29 import org.openstreetmap.josm.gui.MainApplication; 31 30 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 31 import org.openstreetmap.josm.spi.preferences.Config; 32 32 import org.openstreetmap.josm.tools.GBC; 33 33 … … 66 66 67 67 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); 69 69 contentInsets = new Insets(10, 10, 10, 5); 70 70 … … 142 142 }); 143 143 144 if ( Main.pref.getBoolean("downloadchangeset.autopaste", true)) {144 if (Config.getPref().getBoolean("downloadchangeset.autopaste", true)) { 145 145 tcid.tryToPasteFromClipboard(); 146 146 } … … 157 157 protected void restoreChangesetsHistory(HistoryComboBox cbHistory) { 158 158 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>())); 160 160 // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement() 161 161 Collections.reverse(cmtHistory); … … 169 169 protected void remindChangesetsHistory(HistoryComboBox cbHistory) { 170 170 cbHistory.addCurrentItemToHistory(); 171 Main.pref.putList(getClass().getName() + ".changesetsHistory", cbHistory.getHistory());171 Config.getPref().putList(getClass().getName() + ".changesetsHistory", cbHistory.getHistory()); 172 172 } 173 173 -
applications/editors/josm/plugins/reverter/src/reverter/ObjectsHistoryDialog.java
r32905 r34552 9 9 import javax.swing.JPanel; 10 10 11 import org.openstreetmap.josm.Main;12 11 import org.openstreetmap.josm.gui.ExtendedDialog; 12 import org.openstreetmap.josm.gui.MainApplication; 13 13 14 14 @SuppressWarnings("serial") 15 15 public class ObjectsHistoryDialog extends ExtendedDialog { 16 16 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); 18 18 contentInsets = new Insets(10, 10, 10, 5); 19 19 setButtonIcons(new String[] {"ok.png", "cancel.png" }); -
applications/editors/josm/plugins/reverter/src/reverter/RevertChangesetTask.java
r34036 r34552 14 14 import javax.swing.JOptionPane; 15 15 16 import org.openstreetmap.josm.Main;17 16 import org.openstreetmap.josm.command.Command; 18 17 import org.openstreetmap.josm.command.SequenceCommand; 19 18 import org.openstreetmap.josm.command.conflict.ConflictAddCommand; 19 import org.openstreetmap.josm.data.UndoRedoHandler; 20 20 import org.openstreetmap.josm.gui.MainApplication; 21 21 import org.openstreetmap.josm.gui.Notification; … … 65 65 @Override 66 66 public Integer call() throws Exception { 67 return JOptionPane.showConfirmDialog(Main .parent,67 return JOptionPane.showConfirmDialog(MainApplication.getMainFrame(), 68 68 tr("This changeset has objects that are not present in current dataset.\n" + 69 69 "It is needed to download them before reverting. Do you want to continue?"), … … 111 111 Command cmd = allcmds.size() == 1 ? allcmds.get(0) : new SequenceCommand(tr("Revert changeset"), allcmds); 112 112 GuiHelper.runInEDT(() -> { 113 MainApplication.undoRedo.add(cmd);113 UndoRedoHandler.getInstance().add(cmd); 114 114 if (numberOfConflicts > 0) { 115 115 MainApplication.getMap().conflictDialog.warnNumNewConflicts(numberOfConflicts); -
applications/editors/josm/plugins/reverter/src/reverter/ReverterUploadHook.java
r33572 r34552 5 5 import org.openstreetmap.josm.command.Command; 6 6 import org.openstreetmap.josm.data.APIDataSet; 7 import org.openstreetmap.josm.data.UndoRedoHandler; 7 8 import org.openstreetmap.josm.gui.MainApplication; 8 9 … … 17 18 if (!ReverterPlugin.reverterUsed) return true; 18 19 boolean hasRevertions = false; 19 for (Command cmd : MainApplication.undoRedo.commands) {20 for (Command cmd : UndoRedoHandler.getInstance().commands) { 20 21 if (cmd instanceof RevertChangesetCommand) { 21 22 hasRevertions = true;
Note:
See TracChangeset
for help on using the changeset viewer.