Skip to content

Commit

Permalink
Use JOSM @main instead of a copy of it
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@meta.com>
  • Loading branch information
tsmock committed Nov 1, 2023
1 parent 4cc3ed8 commit f4f4426
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public class IgnoreAction extends JosmAction {
*/
public IgnoreAction(IgnoreType type) {
super(tr(type.getButtonText()), "dialogs/fix", tr(type.getButtonText()),
Shortcut.registerShortcut(/* NO-SHORTCUT */ "maproulette:ignore." + type.name().toLowerCase(Locale.ROOT),
Shortcut.registerShortcut(
/* NO-SHORTCUT */ "maproulette:ignore." + type.name().toLowerCase(Locale.ROOT),
tr("MapRoulette: {0}", tr(type.getButtonText())), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false);
this.type = type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ static <T extends Record> boolean equals(@Nonnull T first, @Nonnull T second) {
final var type = component.getType();
final var firstObj = getField(first, component);
final var secondObj = getField(second, component);
if ((type.isArray() && !arrayEquals(type, firstObj, secondObj)) ||
(!type.isArray() && !Objects.equals(firstObj, secondObj))) {
if ((type.isArray() && !arrayEquals(type, firstObj, secondObj))
|| (!type.isArray() && !Objects.equals(firstObj, secondObj))) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
* A parser for user objects
*/
final class UserParser {
private UserParser() { /* Hide constructor */ }
private UserParser() {
/* Hide constructor */ }

/**
* Parse a {@link PointReview} object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
import javax.swing.JMenuItem;
import javax.swing.JTable;

import mockit.Mock;
import mockit.MockUp;
import org.junit.jupiter.api.Test;
import org.openstreetmap.josm.data.Bounds;
import org.openstreetmap.josm.data.osm.DataSet;
Expand All @@ -22,10 +20,13 @@
import org.openstreetmap.josm.plugins.maproulette.actions.IgnoreAction;
import org.openstreetmap.josm.plugins.maproulette.gui.task.list.TaskListPanel;
import org.openstreetmap.josm.plugins.maproulette.util.LoggingHandler;
import org.openstreetmap.josm.plugins.maproulette.util.Main;
import org.openstreetmap.josm.plugins.maproulette.util.MapRouletteConfig;
import org.openstreetmap.josm.testutils.annotations.Main;
import org.openstreetmap.josm.testutils.annotations.Projection;

import mockit.Mock;
import mockit.MockUp;

/**
* Test class for {@link TaskListPanel}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

import mockit.Mock;
import mockit.MockUp;
import org.junit.jupiter.api.Test;
import org.openstreetmap.josm.data.Bounds;
import org.openstreetmap.josm.data.coor.LatLon;
Expand All @@ -20,13 +18,16 @@
import org.openstreetmap.josm.gui.layer.OsmDataLayer;
import org.openstreetmap.josm.plugins.maproulette.actions.IgnoreAction;
import org.openstreetmap.josm.plugins.maproulette.api.model.Identifier;
import org.openstreetmap.josm.plugins.maproulette.gui.task.list.TaskListPanel;
import org.openstreetmap.josm.plugins.maproulette.gui.TaskListPanelTest;
import org.openstreetmap.josm.plugins.maproulette.util.Main;
import org.openstreetmap.josm.plugins.maproulette.gui.task.list.TaskListPanel;
import org.openstreetmap.josm.plugins.maproulette.util.MapRouletteConfig;
import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
import org.openstreetmap.josm.testutils.annotations.Main;
import org.openstreetmap.josm.testutils.annotations.Projection;

import mockit.Mock;
import mockit.MockUp;

/**
* Test class for {@link MapRouletteClusteredPointLayer}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
import org.openstreetmap.josm.plugins.maproulette.gui.ModifiedObjects;
import org.openstreetmap.josm.plugins.maproulette.gui.ModifiedTask;
import org.openstreetmap.josm.plugins.maproulette.gui.layer.MapRouletteClusteredPointLayer;
import org.openstreetmap.josm.plugins.maproulette.util.Main;
import org.openstreetmap.josm.plugins.maproulette.util.MapRouletteConfig;
import org.openstreetmap.josm.spi.preferences.Config;
import org.openstreetmap.josm.testutils.annotations.BasicPreferences;
import org.openstreetmap.josm.testutils.annotations.Main;
import org.openstreetmap.josm.testutils.annotations.Projection;

/**
Expand Down

This file was deleted.

0 comments on commit f4f4426

Please sign in to comment.