#12438 closed enhancement (fixed)
[patch] hide items from list of recently added tags
Reported by: | kolesar | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 16.02 |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
Added option to hide items from list of recently added tags that have key that already exists in selection. Also added option to keep these items enabled even they would replace existing tag. Popup menu on add tag dialog looks like this:
Recent tags with existing key ( ) Enable (o) Disable ( ) Hide
Hiding already applied items allows better usage of available space in dialog. When a tag is applied to the selection, item hides from list. If apply was called without closing the dialog then list is refreshed immediately.
For backwards compatibility immediate refresh can be disabled. Created another menu item for setting this behaviour:
Refresh recent tags list after applying tag ( ) Refresh tag status and list of recently added tags (o) Refresh tag status only ( ) No refresh
In the first case newly added tag shows first on top of recently used tags (if not hidden). Second case does not add/reorder list of recent tags immediately but refreshes status of tags (disabled or hidden) according to selection. In the third case nothing happens in the list (this was before this patch).
Default values of setting are shown above as (o)
. Previous behaviour was Disable
+ No refresh
. I think new default setting is better than before.
Requires #12421 that made changes at the same location of code.
Attachments (2)
Change History (17)
follow-up: 2 comment:1 by , 9 years ago
follow-up: 3 comment:2 by , 9 years ago
Replying to bastiK:
Do we really need this configuration option? You should simply make the default behavior good enough, so no one feels the need to change it.
Absolutely needed. User can choose value from three options and backwards compatibility option is only one of them. The other two are also important.
Hide
works best with the first option (full refresh), Disable
with the second (refresh tags status only). When hiding used keys immediate refresh is very cool because it refreshes list and thus reuses space with tags that did not fit into dialog. For convenience options can be mixed together. If someone does not like immediate reordering with hiding, can choose one of the lower options. Others may like reordering with Disable or even Enable
.
comment:3 by , 9 years ago
follow-up: 6 comment:4 by , 9 years ago
Refreshed patch. Added javadoc comments to all public methods in TagEditHelper.
(I have started using Eclipse, errors and warnings are helpful, but still can't start JOSM from Eclipse.)
by , 9 years ago
Attachment: | HideItemsFromRecentlyAddedTags.patch added |
---|
follow-up: 8 comment:6 by , 9 years ago
Milestone: | → 16.02 |
---|
Replying to kolesar:
Refreshed patch. Added javadoc comments to all public methods in TagEditHelper.
Thanks!
(I have started using Eclipse, errors and warnings are helpful, but still can't start JOSM from Eclipse.)
Any error messages? Running it from Eclipse will be useful, at least for interactive debugging and running the tests.
follow-up: 12 comment:7 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
There is a problem with translation. "Hide" is already in use for item "Facilities/Hunting Stand" check "Hide"
see https://translations.launchpad.net/josm/trunk/+pots/josm/de/5982/+translate
How to solve? Add translation context here or in defaultpresets.xml?
by , 9 years ago
Attachment: | Versteck.png added |
---|
follow-up: 9 comment:8 by , 9 years ago
Replying to bastiK:
(I have started using Eclipse, errors and warnings are helpful, but still can't start JOSM from Eclipse.)
Any error messages? Running it from Eclipse will be useful, at least for interactive debugging and running the tests.
Eclipse gives 9 errors about The method seconds(int) is undefined for the type Timeout
and 7681 warnings about different topics.
When finished build, a popup asks: Errors exists in required project(s): josm Proceed with launch?
If I click Proceed, the following error is printed to console:
ERROR: java.io.IOException: Failed to open input stream for resource 'resource://data/preferences.xsd' java.io.IOException: Failed to open input stream for resource 'resource://data/preferences.xsd' at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:205) at org.openstreetmap.josm.data.Preferences.validateXML(Preferences.java:1644) at org.openstreetmap.josm.data.Preferences.load(Preferences.java:900) at org.openstreetmap.josm.data.Preferences.init(Preferences.java:970) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:358)
At the same time a JOSM popup is displayed: Preferences file had errors. If I press OK, a new error is displayed:
ERROR: java.lang.RuntimeException: java.io.IOException: Failed to open input stream for resource 'resource://data/fonts/DroidSans.ttf'. Cause: java.io.IOException: Failed to open input stream for resource 'resource://data/fonts/DroidSans.ttf' java.lang.RuntimeException: java.io.IOException: Failed to open input stream for resource 'resource://data/fonts/DroidSans.ttf' at org.openstreetmap.josm.tools.FontsManager.initialize(FontsManager.java:43) at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:384) Caused by: java.io.IOException: Failed to open input stream for resource 'resource://data/fonts/DroidSans.ttf' at org.openstreetmap.josm.io.CachedFile.getInputStream(CachedFile.java:205) at org.openstreetmap.josm.tools.FontsManager.initialize(FontsManager.java:40) ... 1 more
JOSM stops here.
follow-ups: 10 11 comment:9 by , 9 years ago
Replying to kolesar:
Replying to bastiK:
(I have started using Eclipse, errors and warnings are helpful, but still can't start JOSM from Eclipse.)
Any error messages? Running it from Eclipse will be useful, at least for interactive debugging and running the tests.
Eclipse gives 9 errors about
The method seconds(int) is undefined for the type Timeout
and 7681 warnings about different topics.
Maybe using an old version of junit? Make sure you have up-to-date Eclipse (4.5.1).
ERROR: java.io.IOException: Failed to open input stream for resource 'resource://data/preferences.xsd'
The resources must be in classpath (i.e. copied to the .jar file). This should work automatically if you are using the preconfigured project in the repository. (File > Import... > General > Existing Project)
We use some kind of hack for this: Check project properties > Java Build Path. In the source tab, it should have entries JOSM/data, JOSM/styles with output folder set to JOSM/bin2/...
Then there should be two predefined run configurations (java 7 and 8). In the Classpath tab under user entries, there must be an entry "bin2".
comment:10 by , 9 years ago
Replying to bastiK:
The resources must be in classpath (i.e. copied to the .jar file). This should work automatically if you are using the preconfigured project in the repository. (File > Import... > General > Existing Project)
Thank you, importing was the key to the solution. I have followed DevelopersGuide/Compiling that told me: "Just add a new Java Project using the JOSM source folder as existing path." This way did not work, importing works. Updated wiki page.
comment:11 by , 9 years ago
Replying to bastiK:
Replying to kolesar:
Eclipse gives 9 errors about
The method seconds(int) is undefined for the type Timeout
and 7681 warnings about different topics.
Maybe using an old version of junit? Make sure you have up-to-date Eclipse (4.5.1).
This is new in JUnit 4.12. You must either use latest Eclipse (>= 4.5) or configure the classpath with older versions of Eclipse as Luna does only include JUnit 4.11.
comment:12 by , 9 years ago
Replying to Klumbumbus:
There is a problem with translation. "Hide" is already in use for
item "Facilities/Hunting Stand" check "Hide"
see https://translations.launchpad.net/josm/trunk/+pots/josm/de/5982/+translate
How to solve? Add translation context here or in defaultpresets.xml?
I would say in presets. We're more likely to use "Hide" without context to refer to an UI item rather than a hunting stand :)
comment:14 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Replying to kolesar:
Do we really need this configuration option? You should simply make the default behavior good enough, so no one feels the need to change it.