Improve code quality


    Posts : 19
    Join date : 2013-04-26

    Improve code quality

    Post  Pandragon on 24th January 2014, 20:01

    HOWTO: Indent code style and Code clean up.

    Delete javaTest.
    I believe that it is useless :/

    Gameserver (Java):
    Use the build-in code formater (Select GameServer Project -> Eclipse menu -> Source -> Clean up...).

    It will "prettify" the whole project code and make it more easy to read Smile
    Also it will drop about 2500 code warnings in Eclipse Wink

    Datapack (Python):
    If you don't have Python installed you will probably need to download it from
    I use version 3.3.3 x64.
    You will also need to have the PyDev Eclipse Plugin.
    Eclipse menu -> Help -> Install New Software... -> Add... ->

    Setup Pydev Code Formatter:
    Eclipse menu -> Window -> Preferences -> Pydev -> Editor -> Code Style -> Code Formatter -> Enable all tick boxes
    except the one that says "Use space before and after parenthesis?".

    Now you will be able to indent style any *.py file (unfortunately you will have to do it manually one file at the time).
    Open *.py file -> Eclipse menu -> Source -> Format Code

    *You may like to import the gameserver project to the Project References to avoid viewing Eclipse error warnings.

    Search for ways to improve code:
    You can install Eclipse plugins such as "CodePro AnalytiX" to analyse and improve the projects code.
    CodePro AnalytiX can be found at

    Hope that this post will be helpful for at least a few people.


    Posts : 985
    Join date : 2012-12-03

    Re: Improve code quality

    Post  DnR on 25th January 2014, 15:58

    That's a nice and useful guide.
    Thanks a lot. Smile

      Current date/time is 24th July 2017, 09:34