Closed edeso closed 2 years ago
Hi Ede,Not very interesting, I give you that. I think it should be solved by an improvement of XML2java rather than just eliminating the warning though.There is a ticket for that :#518 Java2xml framework : no default default valueThere maybe another way. I think warnings are systematically emitted because there are some predefined symbology stored somewhere in the code and not using the new 'interior' tag. It should be possible to upgrade these predefined symbols so that they do not emit warnings anymore. Michaël
@mukoki can you be a bit more specific?
Ede, Currently, the XML2Java framework does not accept "optional" attributes. If an attribute is defined in the java2xml config file, it must be there or it throws an exception. To avoid the exception in the case of "interior" attribute (and some others), there are hacks in the code which hide exceptions for these specific attributes. It works and it makes these attributes optional, but the solution is not clean (not extendable) and my idea was to introduce the capability of having optional attributes (or elements ?) in the config files (java2xml). Anyway, we can keep or remove the message. I don't pretend it is interesting for the user. It is just a reminder that there is something to improve in the java2xml framework to fully accept this kind of attribute and maintain backward compatibility.
Michaël
Mike,
quickly debugged into it and the Warning seems to come from reading AbstractPalettePanel.xml
creating a BasicStyleList, but can't figure out how the values are mapped to java members, as the names seem not to be reflected in BasicStyle. can you give me a lil more background?
..ede
Hi Ede,AbstractPalettePanel.xml defines a list of BasicStyle.The mapping of this list to a java object is defined in AbstractPalettePanel$BasicStyleList.java2xmlThe corresponding java object is an internal class of AbstractPalettePanel.The value of each BasicStyle attribute is converted to a java member by BasicStyle.java2xmlNot sure I answer your question though. Let me know.I realize that there are many other attributes missing from BasicStyle definitions in AbstractPalettePanel.xml not only interior. I don't remember why I added a special escape for interior and why it does not make problem for other attributes like width, enabled or pattern.
@mukoki needs to be thoroughly debugged it seems. i'm pretty sure we can decorate members or add some other way to a class to mark voluntary attributes.
hey Mike,
are these warning really necessary?