New Organized & Documented Coding Conventions & Practices?

overdhose

Active Member
Contributor
Design
World
GUI
I discussed this with Cervator before, he suggested I raise the issue here.
I had done some modifications to classes while R41D3NN was reviewing some of our code. One of those was PlayerFactory. Playerfactory had an import of Terasology.Components.* which was changed by the individual components like terasology.components.CharacterMovementComponent; in the update. I didn't have problems merging, but I did have a new component I had to throw in the mix, so having Idea automatically adding the import for the new component, it changed the imports back to Terasology.Components.*, effectively undoing some of the work put in.

This made me think that, given enough IDE interference (I have no idea what the most used one is) a lot of code might be reverted back that way, and if I should tell my IDE not to make this kind of decisions anymore. The funny thing is, being pretty noobish to the whole java setting, I actually kind of rely on the ide making some "best decisions for me", and I bet many noobish contributors would do so to.

Anyway, I am to unexperienced to tell you which approach is the best in this case to start with, so I ain't questioning which approach is best here, I'm just wondering if there are some ide guidelines we need to set up, as far as I am concerned, I was actually used to Eclipse doing some minecraft modding before, I installed Idea following the Terasology wiki dev setup, so I expect some will follow those exact steps and end up in the same situation. I don't even know if doing the same thing in Eclipse would change the result. But it might be food for thought.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
By default Eclipse will expand out the imports unless you have 99 imports from the same package (basically, never) - this can be configured in the preferences. IntelliJ's default setting is 5 (and 3 for static imports). I would suggest that since IntelliJ is the preferred development platform for Terasology we go with its defaults, but I'm not too concerned either way. We do need to be consistent so that we don't have a lot of churn as people with different IDEs organize imports.
 
Top