Improvements to java entity model export

Post ideas to make Cubik Studio even better.
Post Reply

Improvements to java entity model export

Post by MennoMax » 28 Feb 2018, 15:23

Hello, with a current issue for the java export around, I believe this is a great opportunity for further improvements. I have just bought this tool recently, but can't use it properly because of the linked issue. However, there were a few other things I'd like to see changed in the java exports;

- Remove the e#_ prefix of parts when exporting a entity model.
- Make element names case sensitive when exporting a minecraft entity (because "partZero" is currently exported to "Partzero")
- Make the class name of the export file case sensitive, currently "ModelXYZ" is exported to type "Modelxyz".

Thats all I noticed, thank you very much.
x
User avatar
MennoMax
Supporter
Posts: 4
Joined: 28 Feb 2018, 12:27

Re: Improvements to java entity model export

Post by Sphax » 01 Mar 2018, 14:06

1) I can't remove the "e#_" prefix because that is making unique names. 2 elements can have same name but not same ID.

2) I can keep cases in names but first letter will be capitalized

3) Same as 2
x
User avatar
Sphax
Admin
Posts: 1314
Joined: 10 Nov 2011, 10:44

Re: Improvements to java entity model export

Post by MennoMax » 01 Mar 2018, 15:53

1) Not even in the exported file? I always have to remove the e#_ prefix, and the Java IDE would throw an error anyways if two elements have the same name. But this is a personal preference anyway, unlike 2) and 3), so I will just write a small script that removes the e#_ prefixes for me.

2) and 3) would make the export file follow the Java conventions (or at least not unfollow them if the user follows them), so 3) isn't too bad as the type name should always be capitalized.

I wonder how the the file is being exported if the first letter will always be capitalized. Aren't just the element strings (which can be lowercase in the editor) put into the export file during the export?

Edit: But I fully understand if the editor is in a state that would be too hard to adjust just for the java export files.
x
User avatar
MennoMax
Supporter
Posts: 4
Joined: 28 Feb 2018, 12:27

Re: Improvements to java entity model export

Post by JTK222 » 01 Mar 2018, 21:02

2) is kind of wrong, java convention is camelCase
And SnakeCase for Class names (alias the java file name)
x
User avatar
JTK222
Supporter
Posts: 51
Joined: 02 Nov 2016, 08:35

Re: Improvements to java entity model export

Post by MennoMax » 02 Mar 2018, 11:08

Sorry if this was unclear, but that is exactly what I said. I was referring to 2) and 3) of my initial suggestion and said that his proposed fix for 3) would at least make 3) follow the java convention.

Edit: I read through your post again, it is UpperCamelCase for classes and lowerCamelCase for variables, snake_case is not used in java.
x
User avatar
MennoMax
Supporter
Posts: 4
Joined: 28 Feb 2018, 12:27

Re: Improvements to java entity model export

Post by Sphax » 03 Mar 2018, 18:53

camelCase for fields/properties
CamelCase for classes.
I'll see how to respect that for next update
x
User avatar
Sphax
Admin
Posts: 1314
Joined: 10 Nov 2011, 10:44

Re: Improvements to java entity model export

Post by MennoMax » 03 Mar 2018, 22:00

This one is snake case -> something_snake_case

This is upper camel case -> JavaClass
and this is lower camel case -> javaFieldOrProperty

And thanks for considering these improvements.
x
User avatar
MennoMax
Supporter
Posts: 4
Joined: 28 Feb 2018, 12:27

Re: Improvements to java entity model export

Post by JTK222 » 03 Mar 2018, 22:17

Meh I always mix up the names for the cases xD
Sorry for the mistake :3
x
User avatar
JTK222
Supporter
Posts: 51
Joined: 02 Nov 2016, 08:35

Post Reply

Return to “Suggestions”