-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
430 | 430 | * Create image file from StyleElement. |
431 | 431 | * @param element style element |
432 | 432 | * @param type object type |
433 | | * @param nc navigatable component |
| 433 | * @param nc navigable component |
434 | 434 | * |
435 | 435 | * @return the URL |
436 | 436 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * This is a little used SVG function, as most editors will save curves as |
45 | | * Beziers. To reduce the need to rely on the Batik library, this functionallity |
| 45 | * Beziers. To reduce the need to rely on the Batik library, this functionality |
46 | 46 | * is being bypassed for the time being. In the future, it would be nice to |
47 | 47 | * extend the GeneralPath command to include the arcTo ability provided by Batik. |
48 | 48 | * |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
54 | 54 | |
55 | 55 | static final Pattern patternUrl = Pattern.compile("\\s*url\\((.*)\\)\\s*"); |
56 | 56 | static final Matcher matchFpNumUnits = Pattern.compile("\\s*([-+]?((\\d*\\.\\d+)|(\\d+))([-+]?[eE]\\d+)?)\\s*(px|cm|mm|in|pc|pt|em|ex)\\s*").matcher(""); |
57 | | |
| 57 | |
58 | 58 | String name; |
59 | 59 | String stringValue; |
60 | 60 | |
61 | | boolean colorCompatable = false; |
62 | | boolean urlCompatable = false; |
| 61 | boolean colorCompatible = false; |
| 62 | boolean urlCompatible = false; |
63 | 63 | |
64 | 64 | /** Creates a new instance of StyleAttribute */ |
65 | 65 | public StyleAttribute() |
66 | 66 | { |
67 | 67 | this(null, null); |
68 | 68 | } |
69 | | |
70 | | public StyleAttribute(String name) |
| 69 | |
| 70 | public StyleAttribute(String name) |
71 | 71 | { |
72 | 72 | this(name, null); |
73 | 73 | } |
… |
… |
|
238 | 238 | { |
239 | 239 | return getURIValue(null); |
240 | 240 | } |
241 | | |
| 241 | |
242 | 242 | /** |
243 | | * Parse this sytle attribute as a URL and return it in URI form resolved |
| 243 | * Parse this style attribute as a URL and return it in URI form resolved |
244 | 244 | * against the passed base. |
245 | 245 | * |
246 | 246 | * @param base - URI to resolve against. If null, will return value without |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
167 | 167 | /** |
168 | 168 | * Scans an input string for double values. For each value found, places |
169 | 169 | * in a list. This method regards any characters not part of a floating |
170 | | * point value to be seperators. Thus this will parse whitespace seperated, |
171 | | * comma seperated, and many other separation schemes correctly. |
| 170 | * point value to be separators. Thus this will parse whitespace separated, |
| 171 | * comma separated, and many other separation schemes correctly. |
172 | 172 | */ |
173 | 173 | public synchronized static double[] parseDoubleList(String list) |
174 | 174 | { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
37 | 37 | package com.kitfox.svg; |
38 | 38 | |
39 | 39 | /** |
40 | | * A convienience singleton for allowing all classes to access a common SVG universe. |
| 40 | * A convenient singleton for allowing all classes to access a common SVG universe. |
41 | 41 | * |
42 | 42 | * @author kitfox |
43 | 43 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
87 | 87 | */ |
88 | 88 | protected String cssClass = null; |
89 | 89 | /** |
90 | | * Styles defined for this elemnt via the <b>style</b> attribute. |
| 90 | * Styles defined for this element via the <b>style</b> attribute. |
91 | 91 | */ |
92 | 92 | private Map<String, String> inlineStyles = Collections.emptyMap(); |
93 | 93 | /** |
… |
… |
|
114 | 114 | /** |
115 | 115 | * This element may override the URI we resolve against with an xml:base |
116 | 116 | * attribute. If so, a copy is placed here. Otherwise, we defer to our |
117 | | * parent for the reolution base |
| 117 | * parent for the resolution base |
118 | 118 | */ |
119 | 119 | protected URI xmlBase = null; |
120 | 120 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
118 | 118 | /** |
119 | 119 | * Determines if the given URL is accepted by {@link #getPatterns}. |
120 | 120 | * Can be overridden for more complex checking logic. |
121 | | * @param url URL to donwload |
| 121 | * @param url URL to download |
122 | 122 | * @return {@code true} if this URL is accepted |
123 | 123 | */ |
124 | 124 | public boolean acceptsUrl(String url) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
20 | 20 | import org.xml.sax.SAXException; |
21 | 21 | |
22 | 22 | /** |
23 | | * This is an asynchronous task for downloading a collection of changests from the OSM server. |
| 23 | * This is an asynchronous task for downloading a collection of changesets from the OSM server. |
24 | 24 | * |
25 | 25 | * The task only downloads the changeset properties without the changeset content. It |
26 | 26 | * updates the global {@link ChangesetCache}. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
123 | 123 | */ |
124 | 124 | private int initialMoveDelay = 200; |
125 | 125 | /** |
126 | | * The minimal shift of mouse (in pixels) befire something counts as move |
| 126 | * The minimal shift of mouse (in pixels) before something counts as move |
127 | 127 | */ |
128 | 128 | private int initialMoveThreshold = 1; |
129 | 129 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
72 | 72 | // default to paste in center of map (pasted via menu or cursor not in MapView) |
73 | 73 | MapView mapView = MainApplication.getMap().mapView; |
74 | 74 | EastNorth mPosition = mapView.getCenter(); |
75 | | // We previously checked for modifier to know if the action has been trigerred via shortcut or via menu |
| 75 | // We previously checked for modifier to know if the action has been triggered via shortcut or via menu |
76 | 76 | // But this does not work if the shortcut is changed to a single key (see #9055) |
77 | 77 | // Observed behaviour: getActionCommand() returns Action.NAME when triggered via menu, but shortcut text when triggered with it |
78 | 78 | if (e != null && !getValue(NAME).equals(e.getActionCommand())) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
55 | | * Register a expert mode change listener, and optionnally fires it. |
| 55 | * Register a expert mode change listener, and optionally fires it. |
56 | 56 | * @param listener the listener. Ignored if null. |
57 | 57 | * @param fireWhenAdding if true, the listener will be fired immediately after added |
58 | 58 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Gets the commands that will be required to do a full way reversal including changing the tags |
69 | | * @return The comamnds |
| 69 | * @return The commands |
70 | 70 | */ |
71 | 71 | public Collection<Command> getCommands() { |
72 | 72 | List<Command> c = new ArrayList<>(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
17 | 17 | import org.openstreetmap.josm.tools.Shortcut; |
18 | 18 | |
19 | 19 | /** |
20 | | * Abtract class for Toggle Actions. |
| 20 | * Abstract class for Toggle Actions. |
21 | 21 | * @since 6220 |
22 | 22 | */ |
23 | 23 | public abstract class ToggleAction extends JosmAction { |
… |
… |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
118 | | * Toggles the selcted action state, if needed according to the ActionEvent that trigerred the action. |
119 | | * This method will do nothing if the action event comes from a Swing component supporting the SELECTED_KEY property because |
120 | | * the component already set the selected state. |
121 | | * This method needs to be called especially if the action is associated with a keyboard shortcut to ensure correct selected state. |
122 | | * @param e ActionEvent that trigerred the action |
| 118 | * Toggles the selected action state, if needed according to the ActionEvent that triggered the action. |
| 119 | * This method will do nothing if the action event comes from a Swing component |
| 120 | * supporting the SELECTED_KEY property because the component already set the selected state. |
| 121 | * This method needs to be called especially if the action is associated with a keyboard |
| 122 | * shortcut to ensure correct selected state. |
| 123 | * @param e ActionEvent that triggered the action |
123 | 124 | * @see <a href="https://docs.oracle.com/javase/8/docs/api/javax/swing/Action.html">Interface Action</a> |
124 | 125 | */ |
125 | 126 | protected final void toggleSelectedState(ActionEvent e) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
59 | 59 | conflict.getMy().getId(), |
60 | 60 | (int) Math.max(myVersion, theirVersion) |
61 | 61 | ); |
62 | | // update visiblity state |
| 62 | // update visibility state |
63 | 63 | if (theirVersion >= myVersion) { |
64 | 64 | conflict.getMy().setVisible(conflict.getTheir().isVisible()); |
65 | 65 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
239 | 239 | /** |
240 | 240 | * Ensures that all primitives that are participating in this command belong to the affected data set. |
241 | 241 | * |
242 | | * Commands may use this in their update methods to check the consitency of the primitives they operate on. |
| 242 | * Commands may use this in their update methods to check the consistency of the primitives they operate on. |
243 | 243 | * @throws AssertionError if no {@link DataSet} is set or if any primitive does not belong to that dataset. |
244 | 244 | */ |
245 | 245 | protected void ensurePrimitivesAreInDataset() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
36 | 36 | * Creates a RotateCommand. |
37 | 37 | * Assign the initial object set, compute pivot point and initial rotation angle. |
38 | 38 | * @param objects objects to fetch nodes from |
39 | | * @param currentEN cuurent eats/north |
| 39 | * @param currentEN current east/north |
40 | 40 | */ |
41 | 41 | public RotateCommand(Collection<? extends OsmPrimitive> objects, EastNorth currentEN) { |
42 | 42 | super(objects); |
… |
… |
|
50 | 50 | |
51 | 51 | /** |
52 | 52 | * Get angle between the horizontal axis and the line formed by the pivot and given point. |
53 | | * @param currentEN cuurent eats/north |
| 53 | * @param currentEN current east/north |
54 | 54 | * @return angle between the horizontal axis and the line formed by the pivot and given point |
55 | 55 | **/ |
56 | 56 | protected final double getAngle(EastNorth currentEN) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
36 | 36 | * Computation of pivot point is done by the same rules that are used in |
37 | 37 | * the "align nodes in circle" action. |
38 | 38 | * @param objects objects to fetch nodes from |
39 | | * @param currentEN cuurent eats/north |
| 39 | * @param currentEN current east/north |
40 | 40 | */ |
41 | 41 | public ScaleCommand(Collection<? extends OsmPrimitive> objects, EastNorth currentEN) { |
42 | 42 | super(objects); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
70 | 70 | /** |
71 | 71 | * The number format used for high precision coordinates |
72 | 72 | */ |
73 | | public static final DecimalFormat cDdHighPecisionFormatter; |
| 73 | public static final DecimalFormat cDdHighPrecisionFormatter; |
74 | 74 | static { |
75 | 75 | // Don't use the localized decimal separator. This way we can present |
76 | 76 | // a comma separated list of coordinates. |
77 | 77 | cDdFormatter = (DecimalFormat) NumberFormat.getInstance(Locale.UK); |
78 | 78 | cDdFormatter.applyPattern("###0.0######"); |
79 | | cDdHighPecisionFormatter = (DecimalFormat) NumberFormat.getInstance(Locale.UK); |
80 | | cDdHighPecisionFormatter.applyPattern("###0.0##########"); |
| 79 | cDdHighPrecisionFormatter = (DecimalFormat) NumberFormat.getInstance(Locale.UK); |
| 80 | cDdHighPrecisionFormatter.applyPattern("###0.0##########"); |
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
135 | 135 | String PT_ELE = "ele"; |
136 | 136 | |
137 | 137 | /** Creation/modification timestamp for the point. |
138 | | * Date and time in are in Univeral Coordinated Time (UTC), not local time! |
| 138 | * Date and time in are in Coordinated Universal Time (UTC), not local time! |
139 | 139 | * Conforms to ISO 8601 specification for date/time representation. |
140 | 140 | * Fractional seconds are allowed for millisecond timing in tracklogs. */ |
141 | 141 | String PT_TIME = "time"; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
37 | 37 | */ |
38 | 38 | RELATION_MEMBERS_CHANGED, |
39 | 39 | /** |
40 | | * The tags of a primitve have changed |
| 40 | * The tags of a primitive have changed |
41 | 41 | */ |
42 | 42 | TAGS_CHANGED, |
43 | 43 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
21 | 21 | /** |
22 | 22 | * This class allows to add DatasetListener to currently active dataset. If active |
23 | 23 | * layer is changed, listeners are automatically registered at new active dataset |
24 | | * (it's no longer necessary to register for layer events and reregister every time |
| 24 | * (it's no longer necessary to register for layer events and re-register every time |
25 | 25 | * new layer is selected) |
26 | 26 | * |
27 | 27 | * Events in EDT are supported, see {@link #addDatasetListener(DataSetListener, FireMode)} |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
127 | 127 | } |
128 | 128 | |
129 | 129 | /** |
130 | | * Returns a new partial copy of this history, betwwen the given version numbers |
| 130 | * Returns a new partial copy of this history, between the given version numbers |
131 | 131 | * @param fromVersion the starting version number |
132 | 132 | * @param untilVersion the ending version number |
133 | 133 | * @return a new partial copy of this history, between the given version numbers |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
52 | 52 | /** Color Preference for nodes */ |
53 | 53 | protected Color nodeColor; |
54 | 54 | |
55 | | /** Color Preference for hightlighted objects */ |
| 55 | /** Color Preference for highlighted objects */ |
56 | 56 | protected Color highlightColor; |
57 | | /** Preference: size of virtual nodes (0 displayes display) */ |
| 57 | /** Preference: size of virtual nodes (0 displays display) */ |
58 | 58 | protected int virtualNodeSize; |
59 | 59 | /** Preference: minimum space (displayed way length) to display virtual nodes */ |
60 | 60 | protected int virtualNodeSpace; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
50 | 50 | /** |
51 | 51 | * Constructs a new {@code ComputeStyleListWorker}. |
52 | 52 | * @param circum distance on the map in meters that 100 screen pixels represent |
53 | | * @param nc navigatable component |
| 53 | * @param nc navigable component |
54 | 54 | * @param input the primitives to process |
55 | 55 | * @param output the list of styles to which styles will be added |
56 | 56 | * @param directExecutionTaskSize the threshold deciding whether to subdivide the tasks |
… |
… |
|
64 | 64 | /** |
65 | 65 | * Constructs a new {@code ComputeStyleListWorker}. |
66 | 66 | * @param circum distance on the map in meters that 100 screen pixels represent |
67 | | * @param nc navigatable component |
| 67 | * @param nc navigable component |
68 | 68 | * @param input the primitives to process |
69 | 69 | * @param output the list of styles to which styles will be added |
70 | 70 | * @param directExecutionTaskSize the threshold deciding whether to subdivide the tasks |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
282 | 282 | /** |
283 | 283 | * <p>Creates an instance of the currently active renderer.</p> |
284 | 284 | * @param g Graphics |
285 | | * @param viewport Navigatable component |
| 285 | * @param viewport Navigable component |
286 | 286 | * @param isInactiveMode {@code true} if the paint visitor shall render OSM objects such that they look inactive |
287 | 287 | * @return an instance of the currently active renderer |
288 | 288 | * |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | | * Remebers a node in the "hull" |
| 62 | * Remembers a node in the "hull" |
63 | 63 | * |
64 | 64 | * @param n the node |
65 | 65 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
887 | 887 | * Can be called before bigger changes on dataset. Events are disabled until {@link #endUpdate()}. |
888 | 888 | * {@link DataSetListener#dataChanged(DataChangedEvent event)} event is triggered after end of changes |
889 | 889 | * <br> |
890 | | * Typical usecase should look like this: |
| 890 | * Typical use case should look like this: |
891 | 891 | * <pre> |
892 | 892 | * ds.beginUpdate(); |
893 | 893 | * try { |
… |
… |
|
906 | 906 | /** |
907 | 907 | * Must be called after a previous call to {@link #beginUpdate()} to fire change events. |
908 | 908 | * <br> |
909 | | * Typical usecase should look like this: |
| 909 | * Typical use case should look like this: |
910 | 910 | * <pre> |
911 | 911 | * ds.beginUpdate(); |
912 | 912 | * try { |
… |
… |
|
1149 | 1149 | DataSourceRemovedEvent clearEvent = new DataSourceRemovedEvent( |
1150 | 1150 | this, new LinkedHashSet<>(from.dataSources), from.dataSources.stream()); |
1151 | 1151 | if (from.dataSources.stream().filter(dataSource -> !dataSources.contains(dataSource)) |
1152 | | .map(dataSources::add).filter(Boolean.TRUE::equals).count() > 0) { |
| 1152 | .anyMatch(dataSources::add)) { |
1153 | 1153 | cachedDataSourceArea = null; |
1154 | 1154 | cachedDataSourceBounds = null; |
1155 | 1155 | } |
… |
… |
|
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | /* --------------------------------------------------------------------------------- */ |
1187 | | /* interface ProjectionChangeListner */ |
| 1187 | /* interface ProjectionChangeListener */ |
1188 | 1188 | /* --------------------------------------------------------------------------------- */ |
1189 | 1189 | @Override |
1190 | 1190 | public void projectionChanged(Projection oldValue, Projection newValue) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | | * Checks for womplete ways with incomplete nodes. |
| 71 | * Checks for complete ways with incomplete nodes. |
72 | 72 | */ |
73 | 73 | public void checkCompleteWaysWithIncompleteNodes() { |
74 | 74 | final Stopwatch stopwatch = Stopwatch.createStarted(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
200 | 200 | /** |
201 | 201 | * Replies the OSM id of this primitive. |
202 | 202 | * By default, returns the same value as {@link #getId}. |
203 | | * Can be overidden by primitive implementations handling an internal id different from the OSM one. |
| 203 | * Can be overridden by primitive implementations handling an internal id different from the OSM one. |
204 | 204 | * |
205 | 205 | * @return the OSM id of this primitive. |
206 | 206 | * @since 13924 |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
37 | 37 | * It can be created, deleted and uploaded to the OSM-Server. |
38 | 38 | * |
39 | 39 | * Although OsmPrimitive is designed as a base class, it is not to be meant to subclass |
40 | | * it by any other than from the package {@link org.openstreetmap.josm.data.osm}. The available primitives are a fixed set that are given |
41 | | * by the server environment and not an extendible data stuff. |
| 40 | * it by any other than from the package {@link org.openstreetmap.josm.data.osm}. The available primitives are a fixed |
| 41 | * set that are given by the server environment and not an extendable data stuff. |
42 | 42 | * |
43 | 43 | * @author imi |
44 | 44 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
24 | 24 | /** |
25 | 25 | * Clears the cached style. |
26 | 26 | * This should not be called from outside. Fixing the UI to add relevant |
27 | | * get/set functions calling this implicitely is preferred, so we can have |
| 27 | * get/set functions calling this implicitly is preferred, so we can have |
28 | 28 | * transparent cache handling in the future. |
29 | 29 | */ |
30 | 30 | default void clearCachedStyle() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | | * Creates a clone of the tag collection <code>other</code>. Creats an empty |
| 164 | * Creates a clone of the tag collection <code>other</code>. Creates an empty |
165 | 165 | * tag collection if <code>other</code> is null. |
166 | 166 | * |
167 | 167 | * @param other the other collection |
… |
… |
|
735 | 735 | } |
736 | 736 | |
737 | 737 | /** |
738 | | * Get a stram for the given key. |
| 738 | * Get a stream for the given key. |
739 | 739 | * @param key The key |
740 | 740 | * @return The stream. An empty stream if key is <code>null</code> |
741 | 741 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
47 | 47 | * (accuracy data is optional) into heap based Java arrays. This is the |
48 | 48 | * highest performance option, and is useful for large volume transformations. |
49 | 49 | * Non-file data sources (eg using an SQL Blob) are also supported through |
50 | | * InputStream. The RandonAccessFile option has a much smaller memory |
| 50 | * InputStream. The RandomAccessFile option has a much smaller memory |
51 | 51 | * footprint as only the Sub Grid headers are stored in memory, but |
52 | 52 | * transformation is slower because the file must be read a number of |
53 | 53 | * times for each transformation. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
1 | 1 | // License: GPL. For details, see LICENSE file. |
2 | 2 | |
3 | 3 | /** |
4 | | * Provides the classes for datums used in map projections. |
| 4 | * Provides the classes for datum used in map projections. |
5 | 5 | */ |
6 | 6 | package org.openstreetmap.josm.data.projection.datum; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
16 | 16 | * <em>loxodrome</em> lines, i.e. a ship following this line would keep a constant azimuth on its |
17 | 17 | * compass. |
18 | 18 | * <p> |
19 | | * This implementation handles both the 1 and 2 stardard parallel cases. |
| 19 | * This implementation handles both the 1 and 2 standard parallel cases. |
20 | 20 | * For 1 SP (EPSG code 9804), the line of contact is the equator. |
21 | 21 | * For 2 SP (EPSG code 9805) lines of contact are symmetrical |
22 | 22 | * about the equator. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
79 | 79 | * has {@code "rectified_grid_angle"} parameter.</li> |
80 | 80 | * |
81 | 81 | * <li>{@code Hotine_Oblique_Mercator} (EPSG code 9812)<br> |
82 | | * grid coordinates begin at the interseciton of the central line and aposphere equator, |
| 82 | * grid coordinates begin at the intersection of the central line and aposphere equator, |
83 | 83 | * has {@code "rectified_grid_angle"} parameter.</li> |
84 | 84 | * <li>{@code Hotine_Oblique_Mercator_Azimuth_Natural_Origin} (ESRI)<br> |
85 | 85 | * grid coordinates begin at the interseciton of the central line and aposphere equator.</li> |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
145 | 145 | /** |
146 | 146 | * Returns the set of tagchecks on which this check depends on. |
147 | 147 | * @param check the tagcheck |
148 | | * @param schecks the collection of tagcheks to search in |
| 148 | * @param schecks the collection of tagchecks to search in |
149 | 149 | * @return the set of tagchecks on which this check depends on |
150 | 150 | * @since 7881 |
151 | 151 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
142 | 142 | |
143 | 143 | MainApplication.getLayerManager().addActiveLayerChangeListener(this); |
144 | 144 | |
145 | | new SlippyMapControler(this, this); |
| 145 | new SlippyMapController(this, this); |
146 | 146 | } |
147 | 147 | |
148 | 148 | private static LinkedHashMap<String, TileSource> getAllTileSources() { |
… |
… |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
249 | | * Handles a {@link SlippyMapControler#mouseMoved} event |
| 249 | * Handles a {@link SlippyMapController#mouseMoved} event |
250 | 250 | * @param point The point in the view |
251 | 251 | */ |
252 | 252 | public void handleMouseMoved(Point point) { |
-
old
|
new
|
|
27 | 27 | * |
28 | 28 | * @author Tim Haussmann |
29 | 29 | */ |
30 | | public class SlippyMapControler extends MouseAdapter { |
| 30 | public class SlippyMapController extends MouseAdapter { |
31 | 31 | |
32 | 32 | /** A Timer for smoothly moving the map area */ |
33 | 33 | private static final Timer TIMER = new Timer(true); |
… |
… |
|
60 | 60 | private boolean isSelecting; |
61 | 61 | |
62 | 62 | /** |
63 | | * Constructs a new {@code SlippyMapControler}. |
64 | | * @param navComp navigatable component |
| 63 | * Constructs a new {@code SlippyMapController}. |
| 64 | * @param navComp navigable component |
65 | 65 | * @param contentPane content pane |
66 | 66 | */ |
67 | | public SlippyMapControler(SlippyMapBBoxChooser navComp, JPanel contentPane) { |
| 67 | public SlippyMapController(SlippyMapBBoxChooser navComp, JPanel contentPane) { |
68 | 68 | iSlippyMapChooser = navComp; |
69 | 69 | iSlippyMapChooser.addMouseListener(this); |
70 | 70 | iSlippyMapChooser.addMouseMotionListener(this); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
18 | 18 | import org.openstreetmap.josm.gui.conflict.pair.ListRole; |
19 | 19 | |
20 | 20 | /** |
21 | | * The model for merging two lists of way nodess |
| 21 | * The model for merging two lists of way nodes |
22 | 22 | * @since 1622 |
23 | 23 | */ |
24 | 24 | public class NodeListMergeModel extends AbstractListMergeModel<Node, WayNodesConflictResolverCommand> { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
31 | 31 | model.getMyTableModel(), |
32 | 32 | model.getMySelectionModel() |
33 | 33 | ); |
34 | | return embeddInScrollPane(myEntriesTable); |
| 34 | return embedInScrollPane(myEntriesTable); |
35 | 35 | } |
36 | 36 | |
37 | 37 | @Override |
… |
… |
|
42 | 42 | model.getMergedTableModel(), |
43 | 43 | model.getMergedSelectionModel() |
44 | 44 | ); |
45 | | return embeddInScrollPane(mergedEntriesTable); |
| 45 | return embedInScrollPane(mergedEntriesTable); |
46 | 46 | } |
47 | 47 | |
48 | 48 | @Override |
… |
… |
|
53 | 53 | model.getTheirTableModel(), |
54 | 54 | model.getTheirSelectionModel() |
55 | 55 | ); |
56 | | return embeddInScrollPane(theirEntriesTable); |
| 56 | return embedInScrollPane(theirEntriesTable); |
57 | 57 | } |
58 | 58 | |
59 | 59 | @Override |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
31 | 31 | model.getMyTableModel(), |
32 | 32 | model.getMySelectionModel() |
33 | 33 | ); |
34 | | return embeddInScrollPane(myEntriesTable); |
| 34 | return embedInScrollPane(myEntriesTable); |
35 | 35 | } |
36 | 36 | |
37 | 37 | @Override |
… |
… |
|
43 | 43 | model.getMergedSelectionModel() |
44 | 44 | ); |
45 | 45 | mergedEntriesTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE); |
46 | | return embeddInScrollPane(mergedEntriesTable); |
| 46 | return embedInScrollPane(mergedEntriesTable); |
47 | 47 | } |
48 | 48 | |
49 | 49 | @Override |
… |
… |
|
54 | 54 | model.getTheirTableModel(), |
55 | 55 | model.getTheirSelectionModel() |
56 | 56 | ); |
57 | | return embeddInScrollPane(theirEntriesTable); |
| 57 | return embedInScrollPane(theirEntriesTable); |
58 | 58 | } |
59 | 59 | |
60 | 60 | @Override |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
88 | 88 | |
89 | 89 | protected abstract JScrollPane buildTheirElementsTable(); |
90 | 90 | |
91 | | protected JScrollPane embeddInScrollPane(JTable table) { |
| 91 | protected JScrollPane embedInScrollPane(JTable table) { |
92 | 92 | JScrollPane pane = new JScrollPane(table); |
93 | 93 | if (adjustmentSynchronizer == null) { |
94 | 94 | adjustmentSynchronizer = new AdjustmentSynchronizer(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
6 | 6 | import org.openstreetmap.josm.gui.dialogs.ConflictDialog; |
7 | 7 | |
8 | 8 | /** |
9 | | * The conflict resolver receives the result of a {@link ConflictDialog}. It should then apply the resulution the user selected. |
| 9 | * The conflict resolver receives the result of a {@link ConflictDialog}. |
| 10 | * It should then apply the resolution the user selected. |
10 | 11 | */ |
11 | 12 | public interface IConflictResolver { |
12 | 13 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
29 | 29 | * to remove the tag. |
30 | 30 | * |
31 | 31 | * The editor responds intercepts some keys and interprets them as navigation keys. It |
32 | | * forwards navigation events to {@link NavigationListener}s registred with this editor. |
| 32 | * forwards navigation events to {@link NavigationListener}s registered with this editor. |
33 | 33 | * You should register the parent table using this editor as {@link NavigationListener}. |
34 | 34 | * |
35 | 35 | * {@link KeyEvent#VK_ENTER} and {@link KeyEvent#VK_TAB} trigger a {@link NavigationListener#gotoNextDecision()}. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
120 | 120 | /** |
121 | 121 | * sets a new value for this |
122 | 122 | * |
123 | | * @param value the new vlaue |
| 123 | * @param value the new value |
124 | 124 | */ |
125 | 125 | public void setNew(String value) { |
126 | 126 | this.value = Optional.ofNullable(value).orElse(""); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
204 | | * Gets the number of reamining conflicts. |
| 204 | * Gets the number of remaining conflicts. |
205 | 205 | * @return The number |
206 | 206 | */ |
207 | 207 | public int getNumConflicts() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | | * Tests wheter this set contains any primitives that have invalid data. |
| 147 | * Tests whether this set contains any primitives that have invalid data. |
148 | 148 | * @return <code>true</code> if invalid data is contained in this set. |
149 | 149 | */ |
150 | 150 | public boolean hasIncompleteData() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
227 | 227 | * Builds the table with actions which can be applied to the currently visible changesets |
228 | 228 | * in the changeset table. |
229 | 229 | * |
230 | | * @return changset actions panel |
| 230 | * @return changeset actions panel |
231 | 231 | */ |
232 | 232 | protected JPanel buildChangesetTableActionPanel() { |
233 | 233 | JPanel pnl = new JPanel(new BorderLayout()); |
… |
… |
|
716 | 716 | } |
717 | 717 | |
718 | 718 | /** |
719 | | * Selects the changesets in <code>changests</code>, provided the |
| 719 | * Selects the changesets in <code>changesets</code>, provided the |
720 | 720 | * respective changesets are already present in the local changeset cache. |
721 | 721 | * |
722 | 722 | * @param changesets the collection of changesets. If {@code null}, the |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
11 | 11 | import org.openstreetmap.josm.gui.widgets.JosmTextArea; |
12 | 12 | |
13 | 13 | /** |
14 | | * The cell renderer for the changeset dicussion table |
| 14 | * The cell renderer for the changeset discussion table |
15 | 15 | * @since 7715 |
16 | 16 | */ |
17 | 17 | public class ChangesetDiscussionTableCellRenderer extends AbstractCellRenderer { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
34 | 34 | * Adds actions to the selection action toolbar |
35 | 35 | * @param group The group to add |
36 | 36 | */ |
37 | | public static void addActionsToSelectio(IRelationEditorActionGroup group) { |
| 37 | public static void addActionsToSelection(IRelationEditorActionGroup group) { |
38 | 38 | selectionActions.add(group); |
39 | 39 | } |
40 | 40 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
70 | 70 | * It either displays |
71 | 71 | * <ul> |
72 | 72 | * <li>the list of changesets the currently selected objects are assigned to</li> |
73 | | * <li>the list of changesets objects in the current data layer are assigend to</li> |
| 73 | * <li>the list of changesets objects in the current data layer are assigned to</li> |
74 | 74 | * </ul> |
75 | 75 | * |
76 | 76 | * The dialog offers actions to download and to close changesets. It can also launch an external |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | | * Constructs a new unamed {@code Bookmark} for the given area. |
| 90 | * Constructs a new unnamed {@code Bookmark} for the given area. |
91 | 91 | * @param area The bookmark area |
92 | 92 | */ |
93 | 93 | public Bookmark(Bounds area) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
62 | 62 | /** |
63 | 63 | * The height of this component is given by a preference entry. |
64 | 64 | * <p> |
65 | | * Mind that using a preferred component size is not possible in this case, since the preference entry needs to have a onstant default value. |
| 65 | * Mind that using a preferred component size is not possible in this case, |
| 66 | * since the preference entry needs to have a constant default value. |
66 | 67 | */ |
67 | 68 | class AdjustableDownloadSizePolicy implements DownloadSourceSizingPolicy { |
68 | 69 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
24 | 24 | */ |
25 | 25 | CIRCLE("circle", 1, 0), |
26 | 26 | /** |
27 | | * A triangle with sides of equal lengh |
| 27 | * A triangle with sides of equal length |
28 | 28 | */ |
29 | 29 | TRIANGLE("triangle", 3, Math.PI / 2), |
30 | 30 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
25 | 25 | import org.openstreetmap.josm.tools.OpenBrowser; |
26 | 26 | |
27 | 27 | /** |
28 | | * Handles cliks on hyperlinks inside {@link HelpBrowser}. |
| 28 | * Handles clicks on hyperlinks inside {@link HelpBrowser}. |
29 | 29 | * @since 14807 |
30 | 30 | */ |
31 | 31 | public class HyperlinkHandler implements HyperlinkListener { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
330 | 330 | |
331 | 331 | /** |
332 | 332 | * Constructs a new {@code AlignedRenderer}. |
333 | | * @param hAlignment Horizontal alignement. One of the following constants defined in SwingConstants: |
| 333 | * @param hAlignment Horizontal alignment. One of the following constants defined in SwingConstants: |
334 | 334 | * LEFT, CENTER (the default for image-only labels), RIGHT, LEADING (the default for text-only labels) or TRAILING |
335 | 335 | */ |
336 | 336 | public AlignedRenderer(int hAlignment) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
185 | 185 | * This function exports part of user preferences to specified file. |
186 | 186 | * Default values are not saved. |
187 | 187 | * @param filename - where to export |
188 | | * @param append - if true, resulting file cause appending to exuisting preferences |
| 188 | * @param append - if true, resulting file cause appending to existing preferences |
189 | 189 | * @param keys - which preferences keys you need to export ("imagery.entries", for example) |
190 | 190 | */ |
191 | 191 | public static void exportPreferencesKeysToFile(String filename, boolean append, String... keys) { |
… |
… |
|
199 | 199 | * Default values are not saved. |
200 | 200 | * Preference keys matching specified pattern are saved |
201 | 201 | * @param fileName - where to export |
202 | | * @param append - if true, resulting file cause appending to exuisting preferences |
203 | | * @param pattern - Regexp pattern forh preferences keys you need to export (".*imagery.*", for example) |
| 202 | * @param append - if true, resulting file cause appending to existing preferences |
| 203 | * @param pattern - Regexp pattern for preferences keys you need to export (".*imagery.*", for example) |
204 | 204 | */ |
205 | 205 | public static void exportPreferencesKeysByPatternToFile(String fileName, boolean append, String pattern) { |
206 | 206 | Map<String, Setting<?>> allSettings = Preferences.main().getAllSettings(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
25 | 25 | import org.openstreetmap.josm.tools.Utils; |
26 | 26 | |
27 | 27 | /** |
28 | | * An aciton that imports images along a GPX path |
| 28 | * An action that imports images along a GPX path |
29 | 29 | */ |
30 | 30 | public class ImportImagesAction extends AbstractAction { |
31 | 31 | private final transient GpxLayer layer; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
38 | 38 | |
39 | 39 | @Override |
40 | 40 | protected void finish() { |
41 | | // empty - flush is instaneus |
| 41 | // empty - flush is instantaneous |
42 | 42 | } |
43 | 43 | |
44 | 44 | @Override |
45 | 45 | protected void cancel() { |
46 | | // empty - flush is instaneus |
| 46 | // empty - flush is instantaneous |
47 | 47 | } |
48 | 48 | }.run(); |
49 | 49 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
192 | | * This is the list of layers we manage. The list is unmodifyable. That way, read access does not need to be synchronized. |
| 192 | * This is the list of layers we manage. The list is unmodifiable. That way, read access does |
| 193 | * not need to be synchronized. |
193 | 194 | * |
194 | 195 | * It is only changed in the EDT. |
195 | 196 | * @see LayerManager#updateLayers(Consumer) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
191 | 191 | /** |
192 | 192 | * Get new scale for zoom in/out with a ratio at a number of times. |
193 | 193 | * Used by mousewheel zoom where wheel can step more than one between events. |
194 | | * @param scale previois scale |
| 194 | * @param scale previous scale |
195 | 195 | * @param ratio user defined zoom ratio |
196 | 196 | * @param times number of times to zoom |
197 | 197 | * @return new {@link Scale} object from {@link ScaleList} or outside |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Constructs a new {@code MapCSSException} with an explicit error message. |
16 | | * @param specialmessage error message |
| 16 | * @param specialMessage error message |
17 | 17 | */ |
18 | | public MapCSSException(String specialmessage) { |
19 | | super(specialmessage); |
| 18 | public MapCSSException(String specialMessage) { |
| 19 | super(specialMessage); |
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
57 | 57 | */ |
58 | 58 | public float realWidth; |
59 | 59 | /** |
60 | | * A flag indicating if the direction arrwos should be painted. Should not be accessed directly |
| 60 | * A flag indicating if the direction arrows should be painted. Should not be accessed directly |
61 | 61 | */ |
62 | 62 | public boolean wayDirectionArrows; |
63 | 63 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
27 | 27 | */ |
28 | 28 | public final Color strokeColor; |
29 | 29 | /** |
30 | | * The color to fill the interiour of the shape. |
| 30 | * The color to fill the interior of the shape. |
31 | 31 | */ |
32 | 32 | public final Color fillColor; |
33 | 33 | |
… |
… |
|
37 | 37 | * @param size The overall size of the symbol, both width and height are the same |
38 | 38 | * @param stroke The stroke to use for the outline |
39 | 39 | * @param strokeColor The color to draw the stroke with |
40 | | * @param fillColor The color to fill the interiour of the shape. |
| 40 | * @param fillColor The color to fill the interior of the shape. |
41 | 41 | */ |
42 | 42 | public Symbol(SymbolShape symbol, int size, Stroke stroke, Color strokeColor, Color fillColor) { |
43 | 43 | if (stroke != null && strokeColor == null) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
146 | 146 | * Uses the cache, if possible, and saves the results to the cache. |
147 | 147 | * @param osm OSM primitive |
148 | 148 | * @param scale scale |
149 | | * @param nc navigatable component |
| 149 | * @param nc navigable component |
150 | 150 | * @return pair containing style list and range |
151 | 151 | * @since 13810 (signature) |
152 | 152 | */ |
… |
… |
|
238 | 238 | * |
239 | 239 | * @param osm OSM primitive |
240 | 240 | * @param scale scale |
241 | | * @param nc navigatable component |
| 241 | * @param nc navigable component |
242 | 242 | * @return pair containing style list and range |
243 | 243 | */ |
244 | 244 | private Pair<StyleElementList, Range> getImpl(IPrimitive osm, double scale, NavigatableComponent nc) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
83 | 83 | /** |
84 | 84 | * Builds the panel for entering the username and password |
85 | 85 | * |
86 | | * @return constructed panel for the creditentials |
| 86 | * @return constructed panel for the credentials |
87 | 87 | */ |
88 | 88 | protected VerticallyScrollablePanel buildUserNamePasswordPanel() { |
89 | 89 | VerticallyScrollablePanel pnl = new VerticallyScrollablePanel(new GridBagLayout()); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
31 | 31 | import org.openstreetmap.josm.tools.OpenBrowser; |
32 | 32 | |
33 | 33 | /** |
34 | | * This is the UI for running a semic-automic authorisation procedure. |
| 34 | * This is the UI for running a semi-automatic authorisation procedure. |
35 | 35 | * |
36 | 36 | * In contrast to the fully-automatic procedure the user is dispatched to an |
37 | 37 | * external browser for login and authorisation. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | | * Replies the list of plugin informations to display. |
| 165 | * Replies the list of plugin information to display. |
166 | 166 | * |
167 | | * @return the list of plugin informations to display |
| 167 | * @return the list of plugin information to display |
168 | 168 | */ |
169 | 169 | public List<PluginInformation> getDisplayedPlugins() { |
170 | 170 | return displayedPlugins; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
35 | 35 | /** indicates whether we use OAuth as authentication scheme */ |
36 | 36 | private final JRadioButton rbOAuth = new JRadioButton(); |
37 | 37 | /** the panel which contains the authentication parameters for the respective authentication scheme */ |
38 | | private final JPanel pnlAuthenticationParameteters = new JPanel(new BorderLayout()); |
| 38 | private final JPanel pnlAuthenticationParameters = new JPanel(new BorderLayout()); |
39 | 39 | /** the panel for the basic authentication parameters */ |
40 | 40 | private BasicAuthenticationPreferencesPanel pnlBasicAuthPreferences; |
41 | 41 | /** the panel for the OAuth authentication parameters */ |
… |
… |
|
90 | 90 | gc.fill = GridBagConstraints.BOTH; |
91 | 91 | gc.weightx = 1.0; |
92 | 92 | gc.weighty = 1.0; |
93 | | add(pnlAuthenticationParameteters, gc); |
| 93 | add(pnlAuthenticationParameters, gc); |
94 | 94 | |
95 | 95 | //-- the two panels for authentication parameters |
96 | 96 | pnlBasicAuthPreferences = new BasicAuthenticationPreferencesPanel(); |
97 | 97 | pnlOAuthPreferences = new OAuthAuthenticationPreferencesPanel(); |
98 | 98 | |
99 | 99 | rbBasicAuthentication.setSelected(true); |
100 | | pnlAuthenticationParameteters.add(pnlBasicAuthPreferences, BorderLayout.CENTER); |
| 100 | pnlAuthenticationParameters.add(pnlBasicAuthPreferences, BorderLayout.CENTER); |
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
… |
… |
|
150 | 150 | @Override |
151 | 151 | public void itemStateChanged(ItemEvent e) { |
152 | 152 | if (rbBasicAuthentication.isSelected()) { |
153 | | pnlAuthenticationParameteters.removeAll(); |
154 | | pnlAuthenticationParameteters.add(pnlBasicAuthPreferences, BorderLayout.CENTER); |
| 153 | pnlAuthenticationParameters.removeAll(); |
| 154 | pnlAuthenticationParameters.add(pnlBasicAuthPreferences, BorderLayout.CENTER); |
155 | 155 | pnlBasicAuthPreferences.revalidate(); |
156 | 156 | } else { |
157 | | pnlAuthenticationParameteters.removeAll(); |
158 | | pnlAuthenticationParameteters.add(pnlOAuthPreferences, BorderLayout.CENTER); |
| 157 | pnlAuthenticationParameters.removeAll(); |
| 158 | pnlAuthenticationParameters.add(pnlOAuthPreferences, BorderLayout.CENTER); |
159 | 159 | pnlOAuthPreferences.revalidate(); |
160 | 160 | } |
161 | 161 | repaint(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
73 | 73 | JPanel pnl = new JPanel(new GridBagLayout()); |
74 | 74 | |
75 | 75 | cbUseForAllRequests.setText(tr("Use OAuth for all requests to {0}", OsmApi.getOsmApi().getServerUrl())); |
76 | | cbUseForAllRequests.setToolTipText(tr("For user-based bandwith limit instead of IP-based one")); |
| 76 | cbUseForAllRequests.setToolTipText(tr("For user-based bandwidth limit instead of IP-based one")); |
77 | 77 | pnl.add(cbUseForAllRequests, GBC.eol().fill(GBC.HORIZONTAL)); |
78 | 78 | |
79 | 79 | pnl.add(cbShowAdvancedParameters, GBC.eol().fill(GBC.HORIZONTAL)); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
215 | 215 | }; |
216 | 216 | |
217 | 217 | /** |
218 | | * See if this task is canceleable |
| 218 | * See if this task is cancelable |
219 | 219 | * @return <code>true</code> if it can be canceled |
220 | 220 | */ |
221 | 221 | public final boolean isCancelable() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
107 | | * adds a colleciton of {@link AutoCompletionItem} to this list. An item is only |
| 107 | * adds a collection of {@link AutoCompletionItem} to this list. An item is only |
108 | 108 | * added it is not null and if it does not exist in the list yet. |
109 | 109 | * |
110 | 110 | * @param collection auto completion collection; must not be null |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | | * Sets wether this role is required at least once in the relation. |
| 71 | * Sets whether this role is required at least once in the relation. |
72 | 72 | * @param str "required" or "optional" |
73 | 73 | * @throws SAXException if str is neither "required" or "optional" |
74 | 74 | */ |
… |
… |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | | * Sets wether the role name is a regular expression. |
| 83 | * Sets whether the role name is a regular expression. |
84 | 84 | * @param str "true" or "false" |
85 | 85 | * @throws SAXException if str is neither "true" or "false" |
86 | 86 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
8 | 8 | import org.openstreetmap.josm.tools.Shortcut; |
9 | 9 | |
10 | 10 | /** |
11 | | * Action implementing a multikey shortcut - shorcuts like Ctrl+Alt+S,n will toggle n-th layer visibility. |
| 11 | * Action implementing a multikey shortcut - shortcuts like Ctrl+Alt+S,n will toggle n-th layer visibility. |
12 | 12 | * @since 4595 |
13 | 13 | */ |
14 | 14 | public interface MultikeyShortcutAction extends Action { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
330 | 330 | |
331 | 331 | /** |
332 | 332 | * Opens the {@code AbstractFileChooser} that has been created. |
333 | | * @return the {@code AbstractFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog. |
| 333 | * @return the {@code AbstractFileChooser} if the user effectively chooses a file or directory. |
| 334 | * {@code null} if the user cancelled the dialog. |
334 | 335 | */ |
335 | 336 | public final AbstractFileChooser openFileChooser() { |
336 | 337 | return openFileChooser(null); |
337 | 338 | } |
338 | 339 | |
339 | 340 | /** |
340 | | * Opens the {@code AbstractFileChooser} that has been created and waits for the user to choose a file/directory, or cancel the dialog.<br> |
341 | | * When the user choses a file or directory, the {@code lastDirProperty} is updated to the chosen directory path. |
| 341 | * Opens the {@code AbstractFileChooser} that has been created and waits for the user to choose a file/directory, |
| 342 | * or cancel the dialog.<br> |
| 343 | * When the user chooses a file or directory, the {@code lastDirProperty} is updated to the chosen directory path. |
342 | 344 | * |
343 | | * @param parent The Component used as the parent of the AbstractFileChooser. If null, uses {@code MainApplication.getMainFrame()}. |
344 | | * @return the {@code AbstractFileChooser} if the user effectively choses a file or directory. {@code null} if the user cancelled the dialog. |
| 345 | * @param parent The Component used as the parent of the AbstractFileChooser. If null, |
| 346 | * uses {@code MainApplication.getMainFrame()}. |
| 347 | * @return the {@code AbstractFileChooser} if the user effectively chooses |
| 348 | * a file or directory.{@code null} if the user cancelled the dialog. |
345 | 349 | */ |
346 | 350 | public AbstractFileChooser openFileChooser(Component parent) { |
347 | 351 | if (fc == null) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
181 | 181 | } |
182 | 182 | |
183 | 183 | /** |
184 | | * Sets a listener to be invoked on ssingle click |
| 184 | * Sets a listener to be invoked on single click |
185 | 185 | * @param clickListener The click listener |
186 | 186 | */ |
187 | 187 | public void setClickListener(ActionListener clickListener) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * This utility class provides static methods which explain various exceptions to the user. |
32 | | * |
33 | 32 | */ |
34 | 33 | public final class ExceptionDialogUtil { |
35 | 34 | |
… |
… |
|
368 | 367 | * |
369 | 368 | * @param e the exception |
370 | 369 | */ |
371 | | public static void explainNestedUnkonwnHostException(OsmTransferException e) { |
| 370 | public static void explainNestedUnknownHostException(OsmTransferException e) { |
372 | 371 | showErrorDialog( |
373 | 372 | ExceptionUtil.explainNestedUnknownHostException(e), |
374 | 373 | tr("Unknown host"), |
… |
… |
|
391 | 390 | return; |
392 | 391 | } |
393 | 392 | if (ExceptionUtil.getNestedException(e, UnknownHostException.class) != null) { |
394 | | explainNestedUnkonwnHostException(e); |
| 393 | explainNestedUnknownHostException(e); |
395 | 394 | return; |
396 | 395 | } |
397 | 396 | if (ExceptionUtil.getNestedException(e, IOException.class) != null) { |
… |
… |
|
423 | 422 | |
424 | 423 | if (e instanceof OsmApiException) { |
425 | 424 | OsmApiException oae = (OsmApiException) e; |
426 | | switch(oae.getResponseCode()) { |
427 | | case HttpURLConnection.HTTP_PRECON_FAILED: |
428 | | explainPreconditionFailed(oae); |
429 | | return; |
430 | | case HttpURLConnection.HTTP_GONE: |
431 | | explainGoneForUnknownPrimitive(oae); |
432 | | return; |
433 | | case HttpURLConnection.HTTP_INTERNAL_ERROR: |
434 | | explainInternalServerError(oae); |
435 | | return; |
436 | | case HttpURLConnection.HTTP_BAD_REQUEST: |
437 | | explainBadRequest(oae); |
438 | | return; |
439 | | case HttpURLConnection.HTTP_NOT_FOUND: |
440 | | explainNotFound(oae); |
441 | | return; |
442 | | case HttpURLConnection.HTTP_CONFLICT: |
443 | | explainConflict(oae); |
444 | | return; |
445 | | case HttpURLConnection.HTTP_UNAUTHORIZED: |
446 | | explainAuthenticationFailed(oae); |
447 | | return; |
448 | | case HttpURLConnection.HTTP_FORBIDDEN: |
449 | | explainAuthorizationFailed(oae); |
450 | | return; |
451 | | case HttpURLConnection.HTTP_CLIENT_TIMEOUT: |
452 | | explainClientTimeout(oae); |
453 | | return; |
454 | | case 509: case 429: |
455 | | explainBandwidthLimitExceeded(oae); |
456 | | return; |
457 | | default: |
458 | | explainGenericHttpException(oae); |
459 | | return; |
| 425 | switch (oae.getResponseCode()) { |
| 426 | case HttpURLConnection.HTTP_PRECON_FAILED: |
| 427 | explainPreconditionFailed(oae); |
| 428 | return; |
| 429 | case HttpURLConnection.HTTP_GONE: |
| 430 | explainGoneForUnknownPrimitive(oae); |
| 431 | return; |
| 432 | case HttpURLConnection.HTTP_INTERNAL_ERROR: |
| 433 | explainInternalServerError(oae); |
| 434 | return; |
| 435 | case HttpURLConnection.HTTP_BAD_REQUEST: |
| 436 | explainBadRequest(oae); |
| 437 | return; |
| 438 | case HttpURLConnection.HTTP_NOT_FOUND: |
| 439 | explainNotFound(oae); |
| 440 | return; |
| 441 | case HttpURLConnection.HTTP_CONFLICT: |
| 442 | explainConflict(oae); |
| 443 | return; |
| 444 | case HttpURLConnection.HTTP_UNAUTHORIZED: |
| 445 | explainAuthenticationFailed(oae); |
| 446 | return; |
| 447 | case HttpURLConnection.HTTP_FORBIDDEN: |
| 448 | explainAuthorizationFailed(oae); |
| 449 | return; |
| 450 | case HttpURLConnection.HTTP_CLIENT_TIMEOUT: |
| 451 | explainClientTimeout(oae); |
| 452 | return; |
| 453 | case 509: |
| 454 | case 429: |
| 455 | explainBandwidthLimitExceeded(oae); |
| 456 | return; |
| 457 | default: |
| 458 | explainGenericHttpException(oae); |
| 459 | return; |
460 | 460 | } |
461 | 461 | } |
462 | 462 | explainGeneric(e); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
10 | 10 | public interface MapFrameListener { |
11 | 11 | |
12 | 12 | /** |
13 | | * Called after Main.mapFrame is initalized. (After the first data is loaded). |
| 13 | * Called after Main.mapFrame is initialized. (After the first data is loaded). |
14 | 14 | * You can use this callback to tweak the newFrame to your needs, as example install |
15 | 15 | * an alternative Painter. |
16 | 16 | * @param oldFrame The old MapFrame |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
123 | 123 | |
124 | 124 | /** |
125 | 125 | * Constructs a new {@code MapMover}. |
126 | | * @param navComp the navigatable component |
| 126 | * @param navComp the navigable component |
127 | 127 | * @since 11713 |
128 | 128 | */ |
129 | 129 | public MapMover(NavigatableComponent navComp) { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
713 | 713 | |
714 | 714 | /** |
715 | 715 | * Gets the real bounds that enclose this rectangle. |
716 | | * This is computed respecting that the borders of this rectangle may not be a straignt line in latlon coordinates. |
| 716 | * This is computed respecting that the borders of this rectangle may not be a straight line in latlon coordinates. |
717 | 717 | * @return The bounds. |
718 | 718 | * @since 10458 |
719 | 719 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
170 | 170 | * Plays a WAV audio file from a specified position at variable speed. |
171 | 171 | * @param url The resource to play, which must be a WAV file or stream |
172 | 172 | * @param seconds The number of seconds into the audio to start playing |
173 | | * @param speed Rate at which audio playes (1.0 = real time, > 1 is faster) |
| 173 | * @param speed Rate at which audio plays (1.0 = real time, > 1 is faster) |
174 | 174 | * @throws InterruptedException thread interrupted |
175 | 175 | * @throws IOException audio fault exception, e.g. can't open stream, unhandleable audio format |
176 | 176 | */ |
… |
… |
|
183 | 183 | /** |
184 | 184 | * Pauses the currently playing audio stream. Does nothing if nothing playing. |
185 | 185 | * @throws InterruptedException thread interrupted |
186 | | * @throws IOException audio fault exception, e.g. can't open stream, unhandleable audio format |
| 186 | * @throws IOException audio fault exception, e.g. can't open stream, unhandleable audio format |
187 | 187 | */ |
188 | 188 | public static void pause() throws InterruptedException, IOException { |
189 | 189 | AudioPlayer instance = AudioPlayer.getInstance(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
88 | 88 | long skippedBytes = audioInputStream.skip(bytesToSkip); |
89 | 89 | bytesToSkip -= skippedBytes; |
90 | 90 | if (skippedBytes == 0) { |
91 | | // Avoid inifinite loop |
| 91 | // Avoid infinite loop |
92 | 92 | Logging.warn("Unable to skip bytes from audio input stream"); |
93 | 93 | bytesToSkip = 0; |
94 | 94 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | | * Sets the cancelation status (authentication request canceled by user) |
63 | | * @param canceled the cancelation status (authentication request canceled by user) |
| 62 | * Sets the cancellation status (authentication request canceled by user) |
| 63 | * @param canceled the cancellation status (authentication request canceled by user) |
64 | 64 | */ |
65 | 65 | public void setCanceled(boolean canceled) { |
66 | 66 | this.canceled = canceled; |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
235 | 235 | * Replies a query which is restricted to a bounding box. |
236 | 236 | * |
237 | 237 | * @param min the min lat/lon coordinates of the bounding box. Must not be null. |
238 | | * @param max the max lat/lon coordiantes of the bounding box. Must not be null. |
| 238 | * @param max the max lat/lon coordinates of the bounding box. Must not be null. |
239 | 239 | * |
240 | 240 | * @return the restricted changeset query |
241 | 241 | * @throws IllegalArgumentException if min is null |
… |
… |
|
277 | 277 | |
278 | 278 | /** |
279 | 279 | * Restricts the result to changesets which have been closed after <code>closedAfter</code> and which |
280 | | * habe been created before <code>createdBefore</code>. Both dates are expressed relative to the current |
| 280 | * have been created before <code>createdBefore</code>. Both dates are expressed relative to the current |
281 | 281 | * time zone. |
282 | 282 | * |
283 | 283 | * @param closedAfter only reply changesets closed after this date. Must not be null. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
2 | 2 | package org.openstreetmap.josm.io; |
3 | 3 | |
4 | 4 | /** |
5 | | * All exceptions resulting from a user cancelation during any import should implement this interface. |
| 5 | * All exceptions resulting from a user cancellation during any import should implement this interface. |
6 | 6 | * @since 6621 |
7 | 7 | */ |
8 | 8 | public interface ImportCancelException { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
89 | 89 | } |
90 | 90 | } |
91 | 91 | } catch (OsmApiException e) { |
92 | | // We want to explicitely display message to user in some cases like when he has been blocked (#17722) |
| 92 | // We want to explicitly display message to user in some cases like when he has been blocked (#17722) |
93 | 93 | ExceptionDialogUtil.explainOsmTransferException(e); |
94 | 94 | } catch (OsmTransferException e) { |
95 | 95 | // But not message for random network or API issues (like in #17929) |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
408 | 408 | } |
409 | 409 | |
410 | 410 | /** |
411 | | * Workaround for difference in Oerpass API. |
| 411 | * Workaround for difference in Overpass API. |
412 | 412 | * As of now (version 7.55) Overpass api doesn't return invisible objects. |
413 | 413 | * Check if we have objects which do not appear in the dataset and fetch them from OSM instead. |
414 | 414 | * @param ds the dataset |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
50 | 50 | LatLon ll = note.getLatLon(); |
51 | 51 | out.print(" <note "); |
52 | 52 | out.print("id=\"" + note.getId() + "\" "); |
53 | | out.print("lat=\"" + LatLon.cDdHighPecisionFormatter.format(ll.lat()) + "\" "); |
54 | | out.print("lon=\"" + LatLon.cDdHighPecisionFormatter.format(ll.lon()) + "\" "); |
| 53 | out.print("lat=\"" + LatLon.cDdHighPrecisionFormatter.format(ll.lat()) + "\" "); |
| 54 | out.print("lon=\"" + LatLon.cDdHighPrecisionFormatter.format(ll.lon()) + "\" "); |
55 | 55 | out.print("created_at=\"" + DateUtils.fromDate(note.getCreatedAt()) + "\" "); |
56 | 56 | if (note.getClosedAt() != null) { |
57 | 57 | out.print("closed_at=\"" + DateUtils.fromDate(note.getClosedAt()) + "\" "); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
71 | 71 | public static final int MAX_DOWNLOAD_THREADS = 2; |
72 | 72 | |
73 | 73 | /** |
74 | | * Defines whether all OSM API requests should be signed with an OAuth token (user-based bandwith limit instead of IP-based one) |
| 74 | * Defines whether all OSM API requests should be signed with an OAuth token (user-based bandwidth limit instead of IP-based one) |
75 | 75 | */ |
76 | 76 | public static final BooleanProperty USE_OAUTH_FOR_ALL_REQUESTS = new BooleanProperty("oauth.use-for-all-requests", true); |
77 | 77 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
238 | 238 | |
239 | 239 | void writeLatLon(LatLon ll) { |
240 | 240 | if (ll != null) { |
241 | | out.print(" lat='"+LatLon.cDdHighPecisionFormatter.format(ll.lat())+ |
242 | | "' lon='"+LatLon.cDdHighPecisionFormatter.format(ll.lon())+'\''); |
| 241 | out.print(" lat='"+LatLon.cDdHighPrecisionFormatter.format(ll.lat())+ |
| 242 | "' lon='"+LatLon.cDdHighPrecisionFormatter.format(ll.lon())+'\''); |
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
93 | 93 | * Possible Overpass API output format, with the {@code [out:<directive>]} statement. |
94 | 94 | * @since 11916 |
95 | 95 | */ |
96 | | public enum OverpassOutpoutFormat { |
| 96 | public enum OverpassOutputFormat { |
97 | 97 | /** Default output format: plain OSM XML */ |
98 | 98 | OSM_XML("xml"), |
99 | 99 | /** OSM JSON format (not GeoJson) */ |
… |
… |
|
109 | 109 | |
110 | 110 | private final String directive; |
111 | 111 | |
112 | | OverpassOutpoutFormat(String directive) { |
| 112 | OverpassOutputFormat(String directive) { |
113 | 113 | this.directive = directive; |
114 | 114 | } |
115 | 115 | |
… |
… |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
125 | | * Returns the {@code OverpassOutpoutFormat} matching the given directive. |
| 125 | * Returns the {@code OverpassOutputFormat} matching the given directive. |
126 | 126 | * @param directive directive used in {@code [out:<directive>]} statement |
127 | | * @return {@code OverpassOutpoutFormat} matching the given directive |
| 127 | * @return {@code OverpassOutputFormat} matching the given directive |
128 | 128 | * @throws IllegalArgumentException in case of invalid directive |
129 | 129 | */ |
130 | | static OverpassOutpoutFormat from(String directive) { |
131 | | for (OverpassOutpoutFormat oof : values()) { |
| 130 | static OverpassOutputFormat from(String directive) { |
| 131 | for (OverpassOutputFormat oof : values()) { |
132 | 132 | if (oof.directive.equals(directive)) { |
133 | 133 | return oof; |
134 | 134 | } |
… |
… |
|
139 | 139 | |
140 | 140 | static final Pattern OUTPUT_FORMAT_STATEMENT = Pattern.compile(".*\\[out:([a-z]{3,})\\].*", Pattern.DOTALL); |
141 | 141 | |
142 | | static final Map<OverpassOutpoutFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>(); |
| 142 | static final Map<OverpassOutputFormat, Class<? extends AbstractReader>> outputFormatReaders = new ConcurrentHashMap<>(); |
143 | 143 | |
144 | 144 | final String overpassServer; |
145 | 145 | final String overpassQuery; |
… |
… |
|
164 | 164 | * @param readerClass OSM reader class |
165 | 165 | * @return the previous value associated with {@code format}, or {@code null} if there was no mapping |
166 | 166 | */ |
167 | | public static final Class<? extends AbstractReader> registerOverpassOutpoutFormatReader( |
168 | | OverpassOutpoutFormat format, Class<? extends AbstractReader> readerClass) { |
| 167 | public static final Class<? extends AbstractReader> registerOverpassOutputFormatReader( |
| 168 | OverpassOutputFormat format, Class<? extends AbstractReader> readerClass) { |
169 | 169 | return outputFormatReaders.put(Objects.requireNonNull(format), Objects.requireNonNull(readerClass)); |
170 | 170 | } |
171 | 171 | |
172 | 172 | static { |
173 | | registerOverpassOutpoutFormatReader(OverpassOutpoutFormat.OSM_XML, OverpassOsmReader.class); |
174 | | registerOverpassOutpoutFormatReader(OverpassOutpoutFormat.OSM_JSON, OverpassOsmJsonReader.class); |
| 173 | registerOverpassOutputFormatReader(OverpassOutputFormat.OSM_XML, OverpassOsmReader.class); |
| 174 | registerOverpassOutputFormatReader(OverpassOutputFormat.OSM_JSON, OverpassOsmJsonReader.class); |
175 | 175 | } |
176 | 176 | |
177 | 177 | @Override |
… |
… |
|
368 | 368 | AbstractReader reader = null; |
369 | 369 | Matcher m = OUTPUT_FORMAT_STATEMENT.matcher(overpassQuery); |
370 | 370 | if (m.matches()) { |
371 | | Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutpoutFormat.from(m.group(1))); |
| 371 | Class<? extends AbstractReader> readerClass = outputFormatReaders.get(OverpassOutputFormat.from(m.group(1))); |
372 | 372 | if (readerClass != null) { |
373 | 373 | try { |
374 | 374 | reader = readerClass.getDeclaredConstructor().newInstance(); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
41 | 41 | private static final long serialVersionUID = 737333873766201033L; |
42 | 42 | |
43 | 43 | /** |
44 | | * We capture all stack traces on exception creation. This allows us to trace synchonization problems better. |
| 44 | * We capture all stack traces on exception creation. This allows us to trace synchronization problems better. |
45 | 45 | * We cannot be really sure what happened but we at least see which threads |
46 | 46 | */ |
47 | 47 | private final transient Map<Thread, StackTraceElement[]> allStackTraces = new HashMap<>(); |
… |
… |
|
61 | 61 | /** |
62 | 62 | * Constructs a new {@code ReportedException}. |
63 | 63 | * @param exception the cause (which is saved for later retrieval by the {@link #getCause()} method) |
64 | | * @param caughtOnThread thread where the exception was caugth |
| 64 | * @param caughtOnThread thread where the exception was caught |
65 | 65 | * @since 14380 |
66 | 66 | */ |
67 | 67 | public ReportedException(Throwable exception, Thread caughtOnThread) { |
… |
… |
|
276 | 276 | } |
277 | 277 | |
278 | 278 | /** |
279 | | * Check if this is caused by an out of memory situaition |
| 279 | * Check if this is caused by an out of memory situation |
280 | 280 | * @return <code>true</code> if it is. |
281 | 281 | * @since 10819 |
282 | 282 | */ |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
48 | 48 | |
49 | 49 | public enum TokenType { CONDITION_START, VARIABLE_START, CONTEXT_SWITCH_START, END, PIPE, APOSTROPHE, TEXT, EOF } |
50 | 50 | |
51 | | private final Set<Character> specialCharaters = new HashSet<>(Arrays.asList('$', '?', '{', '}', '|', '\'', '!')); |
| 51 | private final Set<Character> specialCharacters = new HashSet<>(Arrays.asList('$', '?', '{', '}', '|', '\'', '!')); |
52 | 52 | |
53 | 53 | private final String template; |
54 | 54 | |
… |
… |
|
113 | 113 | getChar(); |
114 | 114 | return new Token(TokenType.APOSTROPHE, position); |
115 | 115 | default: |
116 | | while (c != -1 && !specialCharaters.contains((char) c)) { |
| 116 | while (c != -1 && !specialCharacters.contains((char) c)) { |
117 | 117 | if (c == '\\') { |
118 | 118 | getChar(); |
119 | 119 | if (c == 'n') { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
213 | 213 | result.add(';'); |
214 | 214 | break; |
215 | 215 | case "hu": |
216 | | // Hungary, https://en.wikipedia.org/wiki/QWERTZ#Hungary |
| 216 | // Hungarian, https://en.wikipedia.org/wiki/QWERTZ#Hungary |
217 | 217 | result.add('0'); |
218 | 218 | break; |
219 | 219 | case "bs": // Bosnian |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
10 | 10 | public enum Platform { |
11 | 11 | |
12 | 12 | /** |
13 | | * Unik-like platform. This is the default when the platform cannot be identified. |
| 13 | * Unix-like platform. This is the default when the platform cannot be identified. |
14 | 14 | */ |
15 | 15 | UNIXOID { |
16 | 16 | @Override |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
137 | | * Converts an angle diven in cardinal directions to radians. |
| 137 | * Converts an angle given in cardinal directions to radians. |
138 | 138 | * The following values are supported: {@code n}, {@code north}, {@code ne}, {@code northeast}, |
139 | 139 | * {@code e}, {@code east}, {@code se}, {@code southeast}, {@code s}, {@code south}, |
140 | 140 | * {@code sw}, {@code southwest}, {@code w}, {@code west}, {@code nw}, {@code northwest}. |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | | * Creqates a stream iterating the list in reversed order |
| 38 | * Creates a stream iterating the list in reversed order |
39 | 39 | * @param list the list to iterate over |
40 | 40 | * @param <T> the type of elements in the list |
41 | 41 | * @return a stream iterating the list in reversed order |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
54 | 54 | dataSet.addPrimitive(n2); |
55 | 55 | dataSet.addPrimitive(n3); |
56 | 56 | |
57 | | Way w = new Way(); // Way is Clockwize |
| 57 | Way w = new Way(); // Way is clockwise |
58 | 58 | w.setNodes(Arrays.asList(new Node[] {n1, n2, n3})); |
59 | 59 | dataSet.addPrimitive(w); |
60 | 60 | |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
110 | 110 | PurgeCommand command = new PurgeCommand(testData.layer.getDataSet(), Arrays.<OsmPrimitive>asList(testData.existingNode), |
111 | 111 | Arrays.<OsmPrimitive>asList(testData.existingRelation)); |
112 | 112 | command.fillModifiedData(modified, deleted, added); |
113 | | // intentianally empty (?) |
| 113 | // intentionally empty (?) |
114 | 114 | assertArrayEquals(new Object[] {}, modified.toArray()); |
115 | 115 | assertArrayEquals(new Object[] {}, deleted.toArray()); |
116 | 116 | assertArrayEquals(new Object[] {}, added.toArray()); |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
143 | 143 | } |
144 | 144 | |
145 | 145 | @Test |
146 | | void testFireingEventsAddAChangeset() { |
| 146 | void testFiringEventsAddAChangeset() { |
147 | 147 | TestListener listener = new TestListener() { |
148 | 148 | @Override |
149 | 149 | void test() { |
… |
… |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | @Test |
165 | | void testFireingEventsUpdateChangeset() { |
| 165 | void testFiringEventsUpdateChangeset() { |
166 | 166 | // Waiter listener to ensure the second listener does not receive the first event |
167 | 167 | TestListener waiter = new TestListener() { |
168 | 168 | @Override |
… |
… |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | @Test |
197 | | void testFireingEventsRemoveChangeset() { |
| 197 | void testFiringEventsRemoveChangeset() { |
198 | 198 | // Waiter listener to ensure the second listener does not receive the first event |
199 | 199 | TestListener waiter = new TestListener() { |
200 | 200 | @Override |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
297 | 297 | InputStream stderr = process.getErrorStream(); |
298 | 298 | try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin, StandardCharsets.UTF_8))) { |
299 | 299 | String s = String.format("%s %s%n", |
300 | | LatLon.cDdHighPecisionFormatter.format(ll.lon()), |
301 | | LatLon.cDdHighPecisionFormatter.format(ll.lat())); |
| 300 | LatLon.cDdHighPrecisionFormatter.format(ll.lon()), |
| 301 | LatLon.cDdHighPrecisionFormatter.format(ll.lat())); |
302 | 302 | if (debug) { |
303 | 303 | System.out.println("\n" + String.join(" ", args) + "\n" + s); |
304 | 304 | } |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** |
70 | | * Test {@link Op#EQ} and interpetation as key |
| 70 | * Test {@link Op#EQ} and interpretation as key |
71 | 71 | */ |
72 | 72 | @Test |
73 | 73 | void testKeyValueEqAsKey() { |
-
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
19 | 19 | import org.junit.Test; |
20 | 20 | import org.openstreetmap.josm.TestUtils; |
21 | 21 | import org.openstreetmap.josm.data.Bounds; |
22 | | import org.openstreetmap.josm.io.OverpassDownloadReader.OverpassOutpoutFormat; |
| 22 | import org.openstreetmap.josm.io.OverpassDownloadReader.OverpassOutputFormat; |
23 | 23 | import org.openstreetmap.josm.testutils.JOSMTestRules; |
24 | 24 | import org.openstreetmap.josm.tools.SearchCompilerQueryWizard; |
25 | 25 | import org.openstreetmap.josm.tools.Utils; |
… |
… |
|
156 | 156 | */ |
157 | 157 | @Test |
158 | 158 | public void testOutputFormatStatement() { |
159 | | for (OverpassOutpoutFormat oof : OverpassOutpoutFormat.values()) { |
| 159 | for (OverpassOutputFormat oof : OverpassOutputFormat.values()) { |
160 | 160 | Matcher m = OverpassDownloadReader.OUTPUT_FORMAT_STATEMENT.matcher("[out:"+oof.getDirective()+"]"); |
161 | 161 | assertTrue(m.matches()); |
162 | 162 | assertEquals(oof.getDirective(), m.group(1)); |