Re: [josm-dev] Disabling parts of internal style

2012-11-18 Thread Jiri Klement
; On Sat, 17 Nov 2012, Jiri Klement wrote: > > is there a way to do small custom modifications to internal element style? >> I know I can copy elemstyles.xml and do my modifications but I would >> prefer >> to have my own little style file that contains only changes I do

[josm-dev] Disabling parts of internal style

2012-11-17 Thread Jiri Klement
Hi, is there a way to do small custom modifications to internal element style? I know I can copy elemstyles.xml and do my modifications but I would prefer to have my own little style file that contains only changes I don't like in elemstyles.xml. To be specific, I don't like piste:difficulty rend

Re: [josm-dev] first impressions

2012-01-10 Thread Jiri Klement
Hi, I have hudson running at my laptop that builds josm and plugins and also checks for changes in josm that breaks backward compatibility with plugins. Problem is that it's broken all the time (either compilation error in plugins or some change in josm that breaks some plugins) so I basically gav

Re: [josm-dev] How to report EDT violations

2012-01-03 Thread Jiri Klement
Hi, Problem in history dialog should be fixed now. As for reporting, you can make tickets but it's really minor issue, in 99.9% of cases this won't break anything. Or you can disable the check by setting debug.edt-checker.enable to false (default is true only for local builds, users of josm-latest

Re: [josm-dev] MapCSS selector to match way in multiple relations

2011-11-03 Thread Jiri Klement
Hi, I don't know about MapCSS but routes plugin can render hiking trails. It was made especially for Czech hiking trails which AFAIK use the same system as in Slovakia. -- Jiri On Thu, Nov 3, 2011 at 8:44 AM, Martin Ždila wrote: > Hello > > I'd like to create a MapCSS for hiking trails. In our

Re: [josm-dev] composing display name for relations from operator ref name from via to

2011-10-20 Thread Jiri Klement
Hi, Extending name template to work with parent relations or members or any other related primitives shouldn't be too difficult, general idea is to add new construct that will have search expression to select from which primitive should be tags taken and inner name template. Query that gets name

Re: [josm-dev] Autogenerated JAXB files in JOSM SVN

2011-08-15 Thread Jiri Klement
Hi, The files were generated using xjc tool from wms-cache.xsd file. JAXB is used to simplify reading of xml files - xml is automatically transformed into java objects that are easier to process than for example SAX events. The files doesn't need to be checked in svn, it would be quite easy to ge

[josm-dev] Customizable name formatter

2011-07-19 Thread Jiri Klement
eparated files, then searching for appropriate template for primitive would be best done by search/filter expression. Or this is not suitable for core at all and it should be rather provided via plugin. It might useful to make it possible to define custom icon for primitive as well. So what do you

Re: [josm-dev] few questions about plugin development

2010-05-06 Thread Jiri Klement
Hi, > How can I debug my plugin? I tried to append to a JOSM process but this > doesn't seem to work :( If you're using Eclipse then you can debug your plugin project as usuall, only use JOSM.java as a main class. JOSM will try to load your plugin from jar file, but all plugin classes will be alr

Re: [josm-dev] Painting

2010-03-10 Thread Jiri Klement
> This is exactly what RepaintManager in Java does for you. > User events (mouse gestures, ...) and posted tasks are processed > and the repaint requests they caused are buffered and a repaint request > is posted at the end of the event queue. Once the queue drains, the repaint > happens, only once

Re: [josm-dev] Wireframe saves the day for a complex multipolygon

2010-02-07 Thread Jiri Klement
Multipolygon painting speed was improved in 2793, but Lake Inari was very slow anyway, because it contains multiple outer polygons. I've added optimalization for this case today (r2948). Btw. outer polygons are not used correctly in the lake, when there is small lake inside of island on the big la

Re: [josm-dev] Can I style by user in mappaint?

2010-01-16 Thread Jiri Klement
>The JOSM search box help lists 21 conditions, offers case >(in)sensitiveness and optional regular expressions, still misses a >simple logical AND and offers a myriad of possible combinations. What do you mean by missing AND? Logical AND is imlicit so "highway=tertiary oneway=yes" will search for

Re: [josm-dev] Can I style by user in mappaint?

2010-01-15 Thread Jiri Klement
I think it would be nice to use search patterns in mappaint. The style information is cached in OsmPrimitive so it shouldn't have impact on overall performance. And there are probably other usecases when key=value matching is not sufficient. Actually I was planning to do some prototype to see if

Re: [josm-dev] Switch to Java 6?

2009-11-29 Thread Jiri Klement
>> Simple use normal if/then. Java VM will recompile it at runtime. This >> probably >> wont work in java5 if compiled for java6 :-( >> http://www.devx.com/tips/Tip/13342 > > Runtime handling is no usuable solution. When you have conditionals you > don't want specific code in a version (e.g. commer

Re: [josm-dev] Preparing data set?

2009-11-20 Thread Jiri Klement
Hi, I guess it's because RelationListDialog is updated after almost any change in dataset. I will add possibility to disable events on Dataset for batch operations, then Preparing dataset should be about as fast as before. On Fri, Nov 20, 2009 at 2:30 PM, Nakor wrote: >  Hello, > > Lately when I

Re: [josm-dev] Changeset 2427

2009-11-10 Thread Jiri Klement
It's not possible to get it easily back as it was, but Way.getBBox() should do the caching now. When I get time I'll add events to Dataset so that Way will know when it's nodes were changed and update it's bbox. On Tue, Nov 10, 2009 at 6:33 PM, Dave Hansen wrote: > This changeset: > >        http

Re: [josm-dev] Changes in JOSM core (referrers)

2009-11-08 Thread Jiri Klement
On Sun, Nov 8, 2009 at 4:42 PM, Frederik Ramm wrote: > Jiri Klement wrote: >> >> wtemp is temporary way, existingWay is some way in the dataset. wtemp >> will be added as referrer to existingWay nodes and never released by >> GC. I'm not sure yet if it's co

[josm-dev] Changes in JOSM core (referrers)

2009-11-08 Thread Jiri Klement
Hi, I did some changes in JOSM core, that might bring some tickets in following days. First of all, Dataset now have map of primitives, that makes searching for primitive by id much faster. It's used by addPrimitive method to throw an exception if somebody is trying to add the same primitive twic

Re: [josm-dev] QuadBuckets in Dataset

2009-10-31 Thread Jiri Klement
> One suggestion was to use the UndoRedoHandler code to catch > modifications and reindex the primitives.  How about something like > this? I'm not sure if the code will work for one moved node. You first call reIndexPrimitives(modified) that might move node to different bucket and then try to

Re: [josm-dev] QuadBuckets in Dataset

2009-10-31 Thread Jiri Klement
> I'd just like to note that as a JOSM user I appreciated QuadBuckets > since I could run the Validator on large datasets for the first time > without JOSM taking forever (& having to be killed). I've noticed that validator plugin is using QuadBuckets, but in my opinion UnconnectedWays test will m

[josm-dev] QuadBuckets in Dataset

2009-10-31 Thread Jiri Klement
Hi, QuadBuckets is used for some time as storage for nodes and ways in Dataset but I think it doesn't bring any benefit for JOSM in current state. Ability to do fast search for bounding box will be usefull in future, but right now it can't be used because it's not sure that QuadBuckets will be rei

Re: [josm-dev] Loading JOSM+plugins into Eclipse for the first time.

2009-10-07 Thread Jiri Klement
> OK, I admit, I cannot locate the changed "livegps". Can somebody point > me to where it is please. It's fixed in JOSM (revision 2247), not livegps plugin. >Finally, >If all the developers are happy with the current state, then I will >certainly not interfere and code anything which will upset y

Re: [josm-dev] Problem with referrers

2009-10-07 Thread Jiri Klement
> Karl wrote: > Exactly, and just for the sake of naming suggestions: in this context they > could be called NodeMemento, WayMemento, etc. > (really just for the sake of examples, I'm not in favor of these names, they > would be used in the context of undo/redo, but not in the general context of >

Re: [josm-dev] Loading JOSM+plugins into Eclipse for the first time.

2009-10-04 Thread Jiri Klement
I've fixed #2480 by replacing LinkedList with ConcurrentLinkedQueue (or at least I hope so, I don't have gps device with me to test it). Just a few thoughs about threading issues... Making data structures thread safe does not necessary mean big synchronization overhead. For example ConcurrentLink

[josm-dev] Problem with referrers

2009-10-03 Thread Jiri Klement
Hi, I'm working on support for referrers and I run into a problem which I'm not sure how to fix. Currently JOSM quite often makes copies of primitive (using for example cloneFrom or special constructors). It's not obvious whether the copy is added to the dataset or is kept in case we need to get

Re: [josm-dev] JOSM Tested

2009-10-03 Thread Jiri Klement
I would preffer to have new tested released asap, the best would be releasing #2221 right now :-). I was hoping to be developing over the weekend. I'm going to add referrers (so you can eg get list of ways that reference some node). That should make some parts of josm much faster when working with

Re: [josm-dev] Loading JOSM+plugins into Eclipse for the first time.

2009-10-02 Thread Jiri Klement
Hi, JOSM and most plug-ins already have prepared Eclipse projects. It should be enough to import JOSM project and plug-ins you want to debug. (File - Import - Project, disable copy to workspace) If you want to be able to debug plug-in you must run plug-in project but use JOSM main class as a star

Re: [josm-dev] jttt and private class members

2009-07-28 Thread Jiri Klement
Another area is possibility to build spatial index - it should make map paint and functions like getNearestNode much faster. Spatial index and painting only primitives that are not too small is imho the main reason why is josmng so much faster than josm. Btw. Currently I'm not continuing on the re

Re: [josm-dev] JOSM without Main.ds

2009-07-19 Thread Jiri Klement
Hi, I have another patch that will break plugins and possibly other things. It replaces direct access to PleaseWaitDialog with ProgressMonitor interface. It should fix exceptions caused by modifications of PleaseWaitDialog by multiple threads and also allows grouping of tasks - useful especially f

Re: [josm-dev] R: FW: [OSM-newbies] JOSM problems - is it just me?

2009-04-06 Thread Jiri Klement
Can you please make a bug report and include one of the hs_err files? It's quite possible it's a Java bug. In that case upgrading Java to newest version should help. On Mon, Apr 6, 2009 at 9:02 PM, Fabrizio Carrai wrote: > It happened to me as well, but since some earlier version. Approximately

[josm-dev] [PATCH] Lower memory consumption using string interning in OsmReader

2009-03-14 Thread Jiri Klement
185MB, 38MB saved Especially the timestamp patch saves much more memory than I have expected. The tests were made using 80MB osm file. I've used jconsole to perform GC and measure heap size. -- Jiri Klement string_intern.patch Description: Binary data __

Re: [josm-dev] [PATCH] timestamp & parsedTimestamp in OsmPrimitive

2009-03-10 Thread Jiri Klement
OK, here is another patch, this time using DateUtils from josm-ng. On Tue, Mar 10, 2009 at 9:08 AM, Dirk Stöcker wrote: > On Tue, 10 Mar 2009, Jiri Klement wrote: > >> I did some benchmarks and here are the results: >> no date handling at all - 17 seconds >> josm-n

Re: [josm-dev] [PATCH] timestamp & parsedTimestamp in OsmPrimitive

2009-03-09 Thread Jiri Klement
memory efficient storage of timestamp. I personally would get rid of lazy parsing parsing and use Petr's version. What do you think? On Mon, Mar 9, 2009 at 6:03 PM, Petr Nejedlý wrote: > Jiri Klement napsal(a): >> >> Hi, >> >> Attached patch replaces timestamp and

Re: [josm-dev] [PATCH] timestamp & parsedTimestamp in OsmPrimitive

2009-03-09 Thread Jiri Klement
On Sun, Mar 8, 2009 at 11:17 PM, Dirk Stöcker wrote: > Generally ok, but some points you should fix: > > a) I hate constructs like this: >   if (n.getTimestamp().getAsString() != null) >   { >     wpt.attr.put("time", n.getTimestamp().getAsString()); > > Calling functions twice is always bad desig

Re: [josm-dev] Java 1.5 compile error

2009-01-25 Thread Jiri Klement
Setting up compiler compliance is not enough. You have to use JDK 1.5 compiler to make sure you don't use any Java 1.6 api. Anyway is Java 5 support still necessary? Java 6 seems to be available on most computers now. On Sun, Jan 25, 2009 at 8:55 PM, Igor Shubovych wrote: > Andre, > > Which JDK

[josm-dev] [PATCH] Hide splashscreen when other windows is shown

2008-11-26 Thread Jiri Klement
Hi, attached patch automatically hides splashscreen when some window is shown (ie missing plugin, broken config, ..). Without the patch splash screen blocks the other window making josm unable to start. -- Jiri splash.patch Description: Binary data __

[josm-dev] Resource bundle not found exception

2008-10-29 Thread Jiri Klement
Hi, Josm compiled from svn fails with following exception: java.util.MissingResourceException: Resource bundle not found at org.xnap.commons.i18n.I18nFactory.getI18n(I18nFactory.java:257) at org.xnap.commons.i18n.I18nFactory.getI18n(I18nFactory.java:180) at org.xnap.commons.i