#15057 closed enhancement (fixed)
[Patch] Overpass dialog: UI cleanup for history and wizard
Reported by: | bafonins | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 17.08 |
Component: | Core | Version: | |
Keywords: | mirrored_download, overpass, download | Cc: | michael2402, Stereo |
Description
Would like to share some of my work related to the Overpass download dialog. See this ticket.
The main dialog looks exactly the same as it used to look previously.
The Overpass Query Wizard tool is now represented in a separate dialog where some examples are provided, as well as a link to the wiki.
I tried to make the view similar to the one at overpass-turbo.
After pressing the arrow button from the main dialog the users history is shown. In this window the user can :
see all queries that the user successfully executed (considering only valid queries) that are saved named: 'history {date}'
save any other query with unique name
edit any existing item from the list
remove any existing item from the list
search for specific item by its name
inspect queries behind every item
Feel free to give remarks, any feedback is appreciated.
Attachments (17)
Change History (67)
by , 7 years ago
Attachment: | functionality.png added |
---|
by , 7 years ago
Attachment: | history-list-search.png added |
---|
by , 7 years ago
Attachment: | history-list-tooltip.png added |
---|
by , 7 years ago
Attachment: | history-list-view.png added |
---|
by , 7 years ago
Attachment: | main-view.png added |
---|
by , 7 years ago
Attachment: | query-edit-view.png added |
---|
by , 7 years ago
Attachment: | query-wizard-view.png added |
---|
comment:1 by , 7 years ago
Milestone: | → 17.07 |
---|---|
Summary: | History of Overpass queries → [Patch] History of Overpass queries |
comment:2 by , 7 years ago
Summary: | [Patch] History of Overpass queries → [Patch] Overpass dialog: UI cleanup for history and wizard |
---|
follow-ups: 6 10 comment:3 by , 7 years ago
FYI: Overpass turbo now has an option to save a query directly in the OSM account data. We could fetch that data (and in principle add new entries as well): https://www.openstreetmap.org/user/tyr_asd/diary/41793
by , 7 years ago
Attachment: | overpass-turbo-lzw.js added |
---|
comment:5 by , 7 years ago
This code allows to fetch overpass turbo queries (with r12502 + overpass-turbo-lzw.js
):
try { Map<String, String> map = new OsmServerUserPreferencesReader().fetchUserPreferences(NullProgressMonitor.INSTANCE); String scount = map.get("overpass-ide_query-count"); if (scount != null) { try { ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript"); try (CachedFile cf = new CachedFile("resource://data/overpass-turbo-lzw.js"); Reader reader = cf.getContentReader()) { engine.eval(reader); } Object base64 = engine.get("Base64"); for (int i = 0 ; i < Integer.parseInt(scount); i++) { String v = map.get("overpass-ide_query_" + i + "_0"); int idx = v.indexOf("p=") + 2; int p = Integer.parseInt(v.substring(idx, v.indexOf('&', idx))); idx = v.indexOf("n=") + 2; String name = v.substring(idx, v.indexOf('&', idx)); StringBuffer sb = new StringBuffer(v.substring(v.indexOf("q=") + 2)); for (int j = 1; j < p ; j++) { sb.append(map.get("overpass-ide_query_" + i + "_" + j)); } String query = (String) ((Invocable) engine).invokeFunction("lzw_decode", ((Invocable) engine).invokeMethod(base64, "decode", sb.toString())); } } catch (NumberFormatException ex) { Main.trace(ex); } } } catch (OsmTransferException | ScriptException | NoSuchMethodException | IOException ex) { Main.error(ex); }
comment:6 by , 7 years ago
Replying to bastiK:
FYI: Overpass turbo now has an option to save a query directly in the OSM account data. We could fetch that data (and in principle add new entries as well): https://www.openstreetmap.org/user/tyr_asd/diary/41793
Although this is a nice feature, I don't think we should use it. We can add an extra button to fetch/sync them, but this would be a separate feature. The problem I see is that we should be consistent on where we store preferences: We currently only store all preferences locally. Best would be to allow the user to store all JOSM preferences to the server and be consistent there.
PS: Wouldn't this be much cleaner using Regexp (p=(\\d+)
, untested)?
follow-up: 8 comment:7 by , 7 years ago
I'd remove the arrow button and make the history list persistent. Because to me it seems like the main mode of operation: I have a couple often-used queries in the history and always search for them there.
follow-up: 9 comment:8 by , 7 years ago
Replying to Zverikk:
I'd remove the arrow button and make the history list persistent. Because to me it seems like the main mode of operation: I have a couple often-used queries in the history and always search for them there.
The arrow button is just a way to hide the list. All possible preferences are saved, so opening the list once implies opening in the future.
What do you mean by 'making the list persistent' ? Currently, when the query is used, and no errors appeared during execution - it is automatically saved. So, any time the user can reuse it.
comment:9 by , 7 years ago
Replying to anonymous:
Replying to Zverikk:
I'd remove the arrow button and make the history list persistent. Because to me it seems like the main mode of operation: I have a couple often-used queries in the history and always search for them there.
The arrow button is just a way to hide the list. All possible preferences are saved, so opening the list once implies opening in the future.
What do you mean by 'making the list persistent' ? Currently, when the query is used, and no errors appeared during execution - it is automatically saved. So, any time the user can reuse it.
Sorry, forgot to login
follow-up: 12 comment:10 by , 7 years ago
Replying to bastiK:
FYI: Overpass turbo now has an option to save a query directly in the OSM account data. We could fetch that data (and in principle add new entries as well): https://www.openstreetmap.org/user/tyr_asd/diary/41793
I think it falls out of the scope of this patch. But indeed, seems like a good feature.
comment:12 by , 7 years ago
follow-up: 19 comment:17 by , 7 years ago
After executing a few queries my list on the right is still empty. It seems it is not working for me.
comment:18 by , 7 years ago
I only tested it with one entry - it seemed to work. But I just saw that the translation is still missing there.
Adding / removing items manually works.
comment:19 by , 7 years ago
Thats weird. Despite that some code was refactored having the latest version seems to work properly for me. Could you give more information?
Did your queries succeed?
Did at least one of them appeared in the list?
Replying to Klumbumbus:
After executing a few queries my list on the right is still empty. It seems it is not working for me.
follow-ups: 25 28 comment:20 by , 7 years ago
Ah Ok, now I understand. The automatic entry is only created if the query actually downloads something.
Well there are alot of blank text boxes now and no hint which box does what and what you need to type in where. The boxes need some headings.
Using the right click menu in the bookmarks box is also not really intuitive. I think it would be better to use buttons in a line below (additional, the right click menu can stay, but should get the add/edit(delete icons), similar to the tags/membership panel. (Help/Dialog/TagsMembership) That would create a consistent gui.
comment:21 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
follow-up: 23 comment:22 by , 7 years ago
One more thing: trying to build and execute an invalid wizard query results in the following error in the console. I'm not sure if it should be this way.
2017-08-09 21:01:55.564 WARNUNG: couldn't parse wizard input 2017-08-09 21:01:55.567 SCHWERWIEGEND: org.openstreetmap.josm.tools.UncheckedParseException org.openstreetmap.josm.tools.UncheckedParseException at org.openstreetmap.josm.tools.OverpassTurboQueryWizard.constructQuery(OverpassTurboQueryWizard.java:70) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.tryParseSearchTerm(OverpassQueryWizardDialog.java:136) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.buildQueryAction(OverpassQueryWizardDialog.java:162) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.buttonAction(OverpassQueryWizardDialog.java:105) at org.openstreetmap.josm.gui.ExtendedDialog$1.actionPerformed(ExtendedDialog.java:376) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:456) at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:253) at org.openstreetmap.josm.actions.OverpassDownloadAction$OverpassDownloadDialog$1.actionPerformed(OverpassDownloadAction.java:189) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.download.DownloadDialog.setVisible(DownloadDialog.java:482) at org.openstreetmap.josm.actions.OverpassDownloadAction.actionPerformed(OverpassDownloadAction.java:66) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
follow-up: 24 comment:23 by , 7 years ago
Thats seems like an issue. Thanks. Will check it.
Replying to Klumbumbus:
One more thing: trying to build and execute an invalid wizard query results in the following error in the console. I'm not sure if it should be this way.
2017-08-09 21:01:55.564 WARNUNG: couldn't parse wizard input 2017-08-09 21:01:55.567 SCHWERWIEGEND: org.openstreetmap.josm.tools.UncheckedParseException org.openstreetmap.josm.tools.UncheckedParseException at org.openstreetmap.josm.tools.OverpassTurboQueryWizard.constructQuery(OverpassTurboQueryWizard.java:70) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.tryParseSearchTerm(OverpassQueryWizardDialog.java:136) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.buildQueryAction(OverpassQueryWizardDialog.java:162) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.buttonAction(OverpassQueryWizardDialog.java:105) at org.openstreetmap.josm.gui.ExtendedDialog$1.actionPerformed(ExtendedDialog.java:376) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:456) at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:253) at org.openstreetmap.josm.actions.OverpassDownloadAction$OverpassDownloadDialog$1.actionPerformed(OverpassDownloadAction.java:189) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.download.DownloadDialog.setVisible(DownloadDialog.java:482) at org.openstreetmap.josm.actions.OverpassDownloadAction.actionPerformed(OverpassDownloadAction.java:66) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
comment:24 by , 7 years ago
Actually, I checked it and this kind of behaviour is acceptable. JOSM does not crash, the UncheckedParseException is handled and the appropriate dialog is shown to the user, reporting that the query is invalid. This exception is just report using the build-in tools of JOSM. In my opinion it is fine. Would be nice to hear someone else about this. Some parts of JOSM behave the same.
Replying to bafonins:
Thats seems like an issue. Thanks. Will check it.
Replying to Klumbumbus:
One more thing: trying to build and execute an invalid wizard query results in the following error in the console. I'm not sure if it should be this way.
2017-08-09 21:01:55.564 WARNUNG: couldn't parse wizard input 2017-08-09 21:01:55.567 SCHWERWIEGEND: org.openstreetmap.josm.tools.UncheckedParseException org.openstreetmap.josm.tools.UncheckedParseException at org.openstreetmap.josm.tools.OverpassTurboQueryWizard.constructQuery(OverpassTurboQueryWizard.java:70) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.tryParseSearchTerm(OverpassQueryWizardDialog.java:136) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.buildQueryAction(OverpassQueryWizardDialog.java:162) at org.openstreetmap.josm.gui.download.OverpassQueryWizardDialog.buttonAction(OverpassQueryWizardDialog.java:105) at org.openstreetmap.josm.gui.ExtendedDialog$1.actionPerformed(ExtendedDialog.java:376) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.ExtendedDialog.setVisible(ExtendedDialog.java:456) at org.openstreetmap.josm.gui.ExtendedDialog.showDialog(ExtendedDialog.java:253) at org.openstreetmap.josm.actions.OverpassDownloadAction$OverpassDownloadDialog$1.actionPerformed(OverpassDownloadAction.java:189) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.WaitDispatchSupport$2.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.awt.WaitDispatchSupport$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(Unknown Source) at java.awt.Dialog.show(Unknown Source) at java.awt.Component.show(Unknown Source) at java.awt.Component.setVisible(Unknown Source) at java.awt.Window.setVisible(Unknown Source) at java.awt.Dialog.setVisible(Unknown Source) at org.openstreetmap.josm.gui.download.DownloadDialog.setVisible(DownloadDialog.java:482) at org.openstreetmap.josm.actions.OverpassDownloadAction.actionPerformed(OverpassDownloadAction.java:66) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.awt.EventQueue$4.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
comment:25 by , 7 years ago
A lot of blank boxes? A screenshot would be very helpful, as well as sequence of actions to reproduce that. In my case, only valid that are correctly parsed are saved.
Also, managing the list via right-clicking on items/empty list seems to be convenient. It might be not be obvious in the beginning, but there is the Help button for that, right? I expect to be updated once this feature is added to the stable version of JOSM.
Replying to Klumbumbus:
Ah Ok, now I understand. The automatic entry is only created if the query actually downloads something.
Well there are alot of blank text boxes now and no hint which box does what and what you need to type in where. The boxes need some headings.
Using the right click menu in the bookmarks box is also not really intuitive. I think it would be better to use buttons in a line below (additional, the right click menu can stay, but should get the add/edit(delete icons), similar to the tags/membership panel. (Help/Dialog/TagsMembership) That would create a consistent gui.
by , 7 years ago
Attachment: | overpassqueryboxes.png added |
---|
by , 7 years ago
Attachment: | overpassqueryboxes2.png added |
---|
follow-ups: 29 40 comment:27 by , 7 years ago
Indeed, buttons can be added and some placeholders as well for the snippet list. But for the leftmost text field, where the query is supposed to be placed, the commented text must be present to the user when the dialog is opened.
Replying to Klumbumbus:
follow-up: 30 comment:28 by , 7 years ago
Also, it is worth noting, that a query is added not when 'something is downloaded', it is added when it is reported to be valid and no errors appeared during fetching the data. So, even if there is nothing to download in the selected area, the query is still added.
Replying to Klumbumbus:
Ah Ok, now I understand. The automatic entry is only created if the query actually downloads something.
Well there are alot of blank text boxes now and no hint which box does what and what you need to type in where. The boxes need some headings.
Using the right click menu in the bookmarks box is also not really intuitive. I think it would be better to use buttons in a line below (additional, the right click menu can stay, but should get the add/edit(delete icons), similar to the tags/membership panel. (Help/Dialog/TagsMembership) That would create a consistent gui.
comment:29 by , 7 years ago
Replying to bafonins:
for the leftmost text field, where the query is supposed to placed, the commented text must be present to the user when dialog is opened.
Right, it was at the first opening. However once you delete this the box is ithout label. Why not write Overpass query:
below Datenquellen und -typen:
(in my german screenshot)?
follow-up: 31 comment:30 by , 7 years ago
Replying to bafonins:
a query is added not when 'something is downloaded', it is added when it is reported to be valid and no errors appeared during fetching the data. So, even if there is nothing to download in the selected area, the query is still added.
That doesn't work for me. For me the query is added as bookmark in the right list only if the query downloaded something.
follow-up: 32 comment:31 by , 7 years ago
Is the 'No data found in this area' popup shown after executing the query?
Replying to Klumbumbus:
Replying to bafonins:
a query is added not when 'something is downloaded', it is added when it is reported to be valid and no errors appeared during fetching the data. So, even if there is nothing to download in the selected area, the query is still added.
That doesn't work for me. For me the query is added as bookmark in the right list only if the query downloaded something.
follow-up: 33 comment:32 by , 7 years ago
Replying to bafonins:
Is the 'No data found in this area' popup shown after executing the query?
Yes. (In the bottom left corner of the mapview.)
comment:33 by , 7 years ago
Can I have the query?
Replying to Klumbumbus:
Replying to bafonins:
Is the 'No data found in this area' popup shown after executing the query?
Yes. (In the bottom left corner of the mapview.)
comment:34 by , 7 years ago
[out:xml][timeout:25][bbox:{{bbox}}]; ( node["shop"]; way["shop"]; relation["shop"]; ); (._;>;); out meta;
comment:36 by , 7 years ago
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2017-08-08 23:40:10 +0200 (Tue, 08 Aug 2017) Build-Date:2017-08-09 01:31:34 Revision:12583 Relative:URL: ^/trunk Identification: JOSM/1.5 (12583 de) Windows 10 64-Bit OS Build number: Windows 10 Pro 1703 (15063) Memory Usage: 1797 MB / 3641 MB (1456 MB allocated, but free) Java version: 1.8.0_144-b01, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1680x1050 Maximum Screen Size: 1680x1050 VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest-mehr-RAM.jnlp, -Djnlpx.remove=false, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=1024m,4096m, -Djnlpx.splashport=53406, -Djnlpx.jvm=<java.home>\bin\javaw.exe] Dataset consistency test: No problems found Plugins: + AddrInterpolation (33160) + DirectDownload (33160) + DirectUpload (33182) + FastDraw (33182) + HouseNumberTaggingTool (33160) + Mapillary (v1.5.5) + OpeningHoursEditor (33185) + ShapeTools (1220) + Tracer2 (33004) + alignways (33182) + apache-commons (32994) + apache-http (32699) + buildings_tools (33004) + contourmerge (1030) + editgpx (33004) + imagery-xml-bounds (33276) + imagery_offset_db (33316) + jogl (1.1.0) + log4j (32699) + measurement (33088) + osm-obj-info (1484152384) + photo_geotagging (33088) + photoadjust (33303) + reltoolbox (33311) + reverter (33088) + tag2link (33382) + tageditor (33021) + tagging-preset-tester (33004) + terracer (33088) + turnlanes-tagging (254) + turnrestrictions (33088) + undelete (33480) + utilsplugin2 (33328) + wikipedia (33288)
comment:37 by , 7 years ago
It might be the case tha this particular query already exist. It was decided to check for duplicates, in order to avoid creating many equal historical queries. Could you clear the list of saved queries and try executing it again with the same bounding box being selected? Because this works fine for me.
Replying to Klumbumbus:
(created by
shop=*
in the wizard)
follow-up: 39 comment:38 by , 7 years ago
The list is currently empty.
(I can confirm that the same query is not added again, if (in my case) the query downloaded something.)
comment:39 by , 7 years ago
Should not be like this. Will test it tomorrow and check it on windows.
Replying to Klumbumbus:
The list is currently empty.
(I can confirm that the same query is not added again, if (in my case) the query downloaded something.)
by , 7 years ago
Attachment: | GUI-refactored.png added |
---|
Added buttons and several labels to explain certain parts of the dialog
by , 7 years ago
Attachment: | gui-update.patch added |
---|
Updated GUI, fixed several sonar warnings, added missing translation markers, fixed preference loading
by , 7 years ago
Attachment: | GUI-refactored-michael.png added |
---|
follow-up: 41 comment:40 by , 7 years ago
comment:41 by , 7 years ago
- The arrow button was present in this dialog before this patch, so I assume that anyone who used the dialog knows what is it for. The only thing the users will find different is only the way history is saved. I think the arrow button fits well here.
- Cant find any existing dialogs with this feature.
- The current layout makes it not so easy. I think it can be changed later.
Replying to michael2402:
Looks better. Some notes from me:
- Our users know the look of JSplitPane separators.
- You can add a search icon before the search field. Have a look at the preset search dialog ;-)
- I liked the old position of the wizard button more ;-). It shows that the wizard is related to the query field.
by , 7 years ago
Attachment: | gui-update-v2.patch added |
---|
Same as previous patch, but set up button indices properly in the snippet edit dialog. Now 'Save button' is always active and the dialog can be saved by simply pressing enter.
by , 7 years ago
Attachment: | dialog-update-v3.patch added |
---|
Added translations, refactored the code a bit, added sorting for the items by their creation/update date.
comment:42 by , 7 years ago
Can you please check #15152? It seems to be a major regression introduced with this patch.
comment:44 by , 7 years ago
I applied your patch.
When changing preference items, make sure that you stay compatible to old preferences. I got (and fixed) the following NPE:
[java] 2017-08-16 21:59:47.573 SCHWERWIEGEND: Handled by bug report queue: java.lang.NullPointerException: text [java] java.lang.NullPointerException: text [java] at java.util.Objects.requireNonNull(Objects.java:228) [java] at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1848) [java] at java.time.LocalDateTime.parse(LocalDateTime.java:492) [java] at org.openstreetmap.josm.gui.download.OverpassQueryList.restorePreferences(OverpassQueryList.java:271)
by , 7 years ago
Attachment: | up_and_down.png added |
---|
comment:45 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
follow-up: 47 comment:46 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
OK, seems legit. It probably fails at the upload of the query. The message looks strange on first view though.
comment:47 by , 7 years ago
Replying to Klumbumbus:
OK, seems legit. It probably fails at the upload of the query. The message looks strange on first view though.
But the message is not correct then. It should state "Sending query..." or "Requesting data..." or something similar.
comment:48 by , 7 years ago
Hm. I think the real problem with my query (wizard: place=plot in Germany
) was that the query timed out at the overpass server. So the "upload" of the query should not be the problem as it works fine with a smaller geocodeArea
comment:50 by , 5 years ago
Cc: | added |
---|
This looks great! :)