-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically generate Java classes from XSD #1637
Conversation
…date version numbers to 1.0.1
…vour of distributionManagement and fixed some checkstyle, findbugs and pmd violations
… to empty catch statement
…and elements out to abstract Layer complexType and update test map files to 1.0.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What an amazing piece of work!
As far as I understand, much of the code is actually no longer there, because it will get automatically generated as part of the build?
I just noticed one problem with the layers. I hope it is still possible to have all layers in a single array, since the order is important.
renderer.paintTileLayer(g2d, layer); | ||
} | ||
// Draw each object group | ||
for (ObjectGroup group : map.getObjectGroups()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, this is not how layers work, since layers of different types are supposed to get interleaved. Would it still be possible to set it up that way?
Ah, maybe we should not commit |
Yes that is correct, I have updated the appveyor build script to build the java projects using maven so that the code can be generated as the qbs task cannot do this, however the build is still failing even though the maven task is saying it is successful... not sure why at the moment
This makes perfect sense now you mention it, I have now fixed it so that TileLayer, ObjectGroup and ImageLayer all live in the same list as requested
I have now removed the generated documentation, im not quite sure where you would want it put to be part of the documentation website though... let me know if you need anything more |
…s using maven instead of qbs on appveyor
Well, that fixes the AppVeyor build. The fact that now the Travis CI build is broken is not relevant to this PR. Do you think this change should be ready for merging now, @mikepthomas? |
I believe so, If you are happy with the content it can be merged. Once merged, I can start the process to deploy to maven central. Let me know if you need anything more :) |
Alright, I've just tried to get this to work locally. While compiling When I tried to get
But I did do the |
This is expected because these values have been marked as deprecated in the tmx map format docs: The warnings are being displayed as the showDeprecation flag is set in the maven compiller plugin, this can be turned off if you want to surpress the warnings during compile time.
The command "mvn clean install" should be done in the util/java directory so that it builds both projects at the same time. The error you are receiving is due to the parent pom not being in your local maven repository and I have yet to deploy a 1.0-SNAPSHOT build to the oss snapshots repository. When a snapshot build has been deployed, then building from each project directory should work fine. |
Hmm, well technically I wrote "deprecated or unsupported", and for these attributes it actually means more like "unsupported". Tiled can read and write maps using those attributes and will generally work fine, but it can't move or resize tile layers individually. I realized now that
Ok, that makes sense. The |
Even though they are deprecated in libtiled-java they should be able to be read and written to without issues too, and the warnings are just being generated due to the property being marked with the @deprecated annotation, I can either remove the annotation or ignore the warning, whichever you feel best.
I can add this to the documentation, however it will only be required when the pom does not exist in the snapshots repository. I will need to add it as part to the deployment to maven central and once it is there, building each project individually should work just fine. So I am not sure the documentation will be relevant after deployment. I can add a snapshot build to oss tonight from my forked repository if you like however the last one was created with a clean checkout from your master branch. |
Sorry for the delay. It looks like a great improvement and I've just given it another test run and it was working fine, so it's merged now! |
Created XML Schema file using the tiled map format documentation to automatically generate Java classes and javadoc documentation and bring in attributes that have been introduced into newer versions of Tiled