[josm-dev] Resource Handling in josm-ng
Petr.Nejedly at Sun.COM
Wed Jun 4 14:57:09 BST 2008
Raphael Studer napsal(a):
> I tried to use the josm-ng and get a null pointer at
> org.openstreetmap.josmng.view.osm.Style.parseRules (Line 69) while
> opening the /styles/standard/elemstyles.xml file.
> To fix this, I had to add the styles folder somewhere in the eclipse
> project preferences.
There are two "source roots" defined for the project - /src and /styles.
Both are configured properly in the NetBeans project definiton and I haven't
tried opening the project under eclipse.
Styles are under separate source root to allow simple redirect to other
styles source - the bundled style is in fact empty and so rendering falls
back to wireframe rendering.
I'm mostly using the mappaint styleset by putting:
And if you just invoke ant inside the root folder of the project
it should build everything the same way as in NetBeans IDE, including
such a private style redirect.
(hmm, it seems that you may need to have NetBeans installed anyway
to build it this way, it uses some NB-specific ant extensions...)
> Is there a possibility to add the resource without changing project
> settings for an IDE?
Well, you can still create the style file "styles/standard/elemstyles.xml"
directly under src folder, classpath is classpath.
I will need to implement richer style semantics for the HiFi rendering anyway,
then I'll bundle my own style file (with different syntax).
But I'll have to copy the icons then. This setup allowed me to avoid
Petr "Nenik" Nejedly, NetBeans/Sun Microsystems, http://www.netbeans.org
355/113 -- Not the famous irrational number PI, but an incredible simulation!
More information about the josm-dev