Changeset 10043 in josm
- Timestamp:
- 2016-03-26T14:45:25+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/CopyCoordinatesAction.java
r8390 r10043 47 47 } 48 48 49 private Collection<Node> getSelectedNodes() {49 private static Collection<Node> getSelectedNodes() { 50 50 if (getCurrentDataSet() == null || getCurrentDataSet().getSelected() == null) { 51 51 return Collections.emptyList(); -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r9968 r10043 69 69 * @return Array of number of nodes to put in each arc 70 70 */ 71 private int[] distributeNodes(PolarNode[] angles, int nodesCount) {71 private static int[] distributeNodes(PolarNode[] angles, int nodesCount) { 72 72 int[] count = new int[angles.length]; 73 73 double[] width = new double[angles.length]; -
trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java
r10001 r10043 777 777 * @throws IllegalArgumentException if parts is empty 778 778 */ 779 private List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) {779 private static List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) { 780 780 781 781 //prepare next map … … 1026 1026 * @return the outermost Way. 1027 1027 */ 1028 private List<PolygonLevel> findOuterWaysImpl(int level, Collection<AssembledPolygon> boundaryWays) {1028 private static List<PolygonLevel> findOuterWaysImpl(int level, Collection<AssembledPolygon> boundaryWays) { 1029 1029 1030 1030 //TODO: bad performance for deep nestings... … … 1293 1293 * @return list of polygons, or null if too complex relation encountered. 1294 1294 */ 1295 private List<Multipolygon> collectMultipolygons(Collection<Way> selectedWays) {1295 private static List<Multipolygon> collectMultipolygons(Collection<Way> selectedWays) { 1296 1296 1297 1297 List<Multipolygon> result = new ArrayList<>(); -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r10001 r10043 367 367 * @return List of ways to split 368 368 */ 369 private List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) {369 private static List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) { 370 370 if (selectedNodes.isEmpty()) 371 371 return null; -
trunk/src/org/openstreetmap/josm/actions/UnJoinNodeWayAction.java
r8510 r10043 149 149 * @return List of relevant ways 150 150 */ 151 private List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) {151 private static List<Way> getApplicableWays(List<Way> selectedWays, List<Node> selectedNodes) { 152 152 if (selectedNodes.isEmpty()) 153 153 return null; -
trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java
r9989 r10043 869 869 } 870 870 871 private boolean movesHiddenWay() {871 private static boolean movesHiddenWay() { 872 872 final Collection<OsmPrimitive> elementsToTest = new HashSet<>(getCurrentDataSet().getSelected()); 873 873 for (Way osm : Utils.filteredCollection(getCurrentDataSet().getSelected(), Way.class)) { -
trunk/src/org/openstreetmap/josm/data/AutosaveTask.java
r9586 r10043 324 324 } 325 325 326 private boolean jvmPerfDataFileExists(final String jvmId) {326 private static boolean jvmPerfDataFileExists(final String jvmId) { 327 327 File jvmDir = new File(System.getProperty("java.io.tmpdir") + File.separator + "hsperfdata_" + System.getProperty("user.name")); 328 328 if (jvmDir.exists() && jvmDir.canRead()) { -
trunk/src/org/openstreetmap/josm/data/imagery/WMTSTileSource.java
r10000 r10043 261 261 } 262 262 263 private Layer userSelectLayer(Collection<Layer> layers) {263 private static Layer userSelectLayer(Collection<Layer> layers) { 264 264 if (layers.size() == 1) 265 265 return layers.iterator().next(); -
trunk/src/org/openstreetmap/josm/data/osm/event/DatasetEventManager.java
r9371 r10043 184 184 } 185 185 186 private void fireEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) {186 private static void fireEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) { 187 187 for (ListenerInfo listener: listeners) { 188 188 if (!listener.consolidate) { … … 192 192 } 193 193 194 private void fireConsolidatedEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) {194 private static void fireConsolidatedEvents(List<ListenerInfo> listeners, AbstractDatasetChangedEvent event) { 195 195 for (ListenerInfo listener: listeners) { 196 196 if (listener.consolidate) { -
trunk/src/org/openstreetmap/josm/data/osm/event/SelectionEventManager.java
r9371 r10043 82 82 } 83 83 84 private void fireEvents(List<ListenerInfo> listeners, Collection<? extends OsmPrimitive> newSelection) {84 private static void fireEvents(List<ListenerInfo> listeners, Collection<? extends OsmPrimitive> newSelection) { 85 85 for (ListenerInfo listener: listeners) { 86 86 listener.listener.selectionChanged(newSelection); … … 96 96 } 97 97 }; 98 99 98 } -
trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
r9886 r10043 231 231 * @return translated/shortened error/warnign message 232 232 */ 233 private String getErrorMessage(String key, Object o) {233 private static String getErrorMessage(String key, Object o) { 234 234 String msg = o.toString().trim() 235 235 .replace("Unexpected token:", tr("Unexpected token:")) -
trunk/src/org/openstreetmap/josm/data/validation/tests/OverlappingWays.java
r9999 r10043 67 67 } 68 68 69 private boolean parentMultipolygonConcernsArea(OsmPrimitive p) {69 private static boolean parentMultipolygonConcernsArea(OsmPrimitive p) { 70 70 for (Relation r : OsmPrimitive.getFilteredList(p.getReferrers(), Relation.class)) { 71 71 if (r.concernsArea()) { -
trunk/src/org/openstreetmap/josm/data/validation/tests/RelationChecker.java
r9932 r10043 126 126 } 127 127 128 private Map<String, RoleInfo> buildRoleInfoMap(Relation n) {128 private static Map<String, RoleInfo> buildRoleInfoMap(Relation n) { 129 129 Map<String, RoleInfo> map = new HashMap<>(); 130 130 for (RelationMember m : n.getMembers()) { … … 141 141 142 142 // return Roles grouped by key 143 private Map<String, RolePreset> buildAllRoles(Relation n) {143 private static Map<String, RolePreset> buildAllRoles(Relation n) { 144 144 Map<String, RolePreset> allroles = new HashMap<>(); 145 145 -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r9995 r10043 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 import static org.openstreetmap.josm.tools.I18n.trn; 6 import gnu.getopt.Getopt;7 import gnu.getopt.LongOpt;8 6 9 7 import java.awt.Dimension; … … 75 73 import org.openstreetmap.josm.tools.PlatformHookWindows; 76 74 import org.openstreetmap.josm.tools.Utils; 75 76 import gnu.getopt.Getopt; 77 import gnu.getopt.LongOpt; 77 78 78 79 /** … … 651 652 } 652 653 653 private boolean handleNetworkOrProxyErrors(boolean hasErrors, String title, String message) {654 private static boolean handleNetworkOrProxyErrors(boolean hasErrors, String title, String message) { 654 655 if (hasErrors) { 655 656 ExtendedDialog ed = new ExtendedDialog( -
trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java
r10035 r10043 446 446 } 447 447 448 private void destroyComponents(Component component, boolean destroyItself) {448 private static void destroyComponents(Component component, boolean destroyItself) { 449 449 if (component instanceof Container) { 450 450 for (Component c: ((Container) component).getComponents()) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
r9149 r10043 31 31 private final Collection<TableCellRenderer> customRenderer = new CopyOnWriteArrayList<>(); 32 32 33 private void setColors(Component c, String key, boolean isSelected) {33 private static void setColors(Component c, String key, boolean isSelected) { 34 34 UIDefaults defaults = javax.swing.UIManager.getDefaults(); 35 35 if (OsmPrimitive.getDiscardableKeys().contains(key)) { -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
r9970 r10043 566 566 } 567 567 568 private int findViewRow(JTable table, TableModel model, Object value) {568 private static int findViewRow(JTable table, TableModel model, Object value) { 569 569 for (int i = 0; i < model.getRowCount(); i++) { 570 570 if (model.getValueAt(i, 0).equals(value)) -
trunk/src/org/openstreetmap/josm/gui/dialogs/relation/sort/RelationNodeMap.java
r9246 r10043 280 280 } 281 281 282 private Integer findAdjacentWay(NodesWays nw, Node n) {282 private static Integer findAdjacentWay(NodesWays nw, Node n) { 283 283 Set<Integer> adj = nw.nodes.get(n); 284 284 if (adj == null || adj.isEmpty()) return null; -
trunk/src/org/openstreetmap/josm/gui/preferences/display/GPXSettingsPanel.java
r9078 r10043 446 446 } 447 447 448 private void updateWaypointLabelCombobox(JosmComboBox<String> cb, JosmTextField tf, TemplateEntryProperty property) {448 private static void updateWaypointLabelCombobox(JosmComboBox<String> cb, JosmTextField tf, TemplateEntryProperty property) { 449 449 String labelPattern = property.getAsString(); 450 450 boolean found = false; … … 463 463 } 464 464 465 private void updateWaypointPattern(JosmComboBox<String> cb, JosmTextField tf) {465 private static void updateWaypointPattern(JosmComboBox<String> cb, JosmTextField tf) { 466 466 if (cb.getSelectedIndex() == WAYPOINT_LABEL_CUSTOM) { 467 467 tf.setEnabled(true); -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/CacheContentsPanel.java
r10021 r10043 228 228 } 229 229 230 private JTable getTableForCache(final CacheAccess<String, BufferedImageCacheEntry> cache, final TableModel tableModel) {230 private static JTable getTableForCache(final CacheAccess<String, BufferedImageCacheEntry> cache, final TableModel tableModel) { 231 231 final JTable ret = new JTable(tableModel); 232 232 -
trunk/src/org/openstreetmap/josm/gui/preferences/imagery/ImageryPreference.java
r10016 r10043 771 771 } 772 772 773 private boolean confirmEulaAcceptance(PreferenceTabbedPane gui, String eulaUrl) {773 private static boolean confirmEulaAcceptance(PreferenceTabbedPane gui, String eulaUrl) { 774 774 URL url = null; 775 775 try { -
trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
r10003 r10043 345 345 } 346 346 347 private void minimizeSplitBounds(Split split, Rectangle bounds) {347 private static void minimizeSplitBounds(Split split, Rectangle bounds) { 348 348 Rectangle splitBounds = new Rectangle(bounds.x, bounds.y, 0, 0); 349 349 List<Node> splitChildren = split.getChildren(); … … 710 710 } 711 711 712 private void throwInvalidLayout(String msg, Node node) {712 private static void throwInvalidLayout(String msg, Node node) { 713 713 throw new InvalidLayoutException(msg, node); 714 714 } … … 759 759 } 760 760 761 private Divider dividerAt(Node root, int x, int y) {761 private static Divider dividerAt(Node root, int x, int y) { 762 762 if (root instanceof Divider) { 763 763 Divider divider = (Divider) root; … … 785 785 } 786 786 787 private boolean nodeOverlapsRectangle(Node node, Rectangle r2) {787 private static boolean nodeOverlapsRectangle(Node node, Rectangle r2) { 788 788 Rectangle r1 = node.getBounds(); 789 789 return -
trunk/src/org/openstreetmap/josm/io/NMEAImporter.java
r8895 r10043 67 67 } 68 68 69 private void showNmeaInfobox(boolean success, NmeaReader r) {69 private static void showNmeaInfobox(boolean success, NmeaReader r) { 70 70 final StringBuilder msg = new StringBuilder(160).append("<html>"); 71 71 msg.append(tr("Coordinates imported: {0}", r.getNumberOfCoordinates())).append("<br>") -
trunk/src/org/openstreetmap/josm/plugins/ReadLocalPluginInformationTask.java
r9078 r10043 73 73 } 74 74 75 private File[] listFiles(File pluginsDirectory, final String regex) {75 private static File[] listFiles(File pluginsDirectory, final String regex) { 76 76 return pluginsDirectory.listFiles( 77 77 new FilenameFilter() { -
trunk/src/org/openstreetmap/josm/plugins/ReadRemotePluginInformationTask.java
r9634 r10043 196 196 } 197 197 198 private void displayErrorMessage(final ProgressMonitor monitor, final String msg, final String details, final String title,198 private static void displayErrorMessage(final ProgressMonitor monitor, final String msg, final String details, final String title, 199 199 final String firstMessage) { 200 200 GuiHelper.runInEDTAndWait(new Runnable() { -
trunk/src/org/openstreetmap/josm/tools/template_engine/ContextSwitchTemplate.java
r9992 r10043 185 185 private final TemplateEntry template; 186 186 187 private Match transform(Match m, int searchExpressionPosition) throws ParseError {187 private static Match transform(Match m, int searchExpressionPosition) throws ParseError { 188 188 if (m instanceof Parent) { 189 189 Match child = transform(((Parent) m).getOperand(), searchExpressionPosition);
Note:
See TracChangeset
for help on using the changeset viewer.