Telerik® JustCode™ by Progress

Within Code Style General view you can adjust different settings regarding the Code cleaner, autoformatting and generation of code.

Code Style General


General section contains a few useful check box settings and two combo boxes:

  • Add documentation for generated members - Generates documentation for generated types.
    1. Put the cursor over the name of the class and select Create Constructor from the Visual aid.
      Before Doc Generation
    2. A documentation will be generated above the newly generated constructor.
      After Doc Generation
    3. Adjust lines on autoformat - Adjust whether to modify lines on autoformat.
    4. Adjust spaces on autoformat - Adjust whether to modify spaces on autoformat.
    5. Use 'this' qualifier for field or member accesses - Sets whether to put or remove 'this' qualifier when Code Cleaning is executed.
      • Always
        this qualifier
      • Only if necessary
        this qualifier If Needed
    6. Use implicitly typed variable declaration - Sets whether the implicitly typed variable is declared when introduced from JustCode.
      Introduce Variable
      • Always
        Introduce Variable Always
      • Only if type is obvious - A type is defined as obvious when constructor or explicit typecast expression is used to initialize the variable.
        Introduce Variable If
      • Only if necessary
        Introduce Variable If

    Block Usage

    Block Usage section contains settings for the "Arrange code block usage" step of Code Cleaning

    Let's show for example what Use blocks in if-else statements setting is doing.In order to test it we have to run the Code Cleaner (Ctrl + Shift + Alt + C) with the following cleaning step turned on:

    Code Cleaner Block Usage

    Let's imagine that we have the following code snippet and we want to execute the Code Cleaner step over it.

    Begin State

    It has three different states:

    • Always - It will add block always.
      Block Usage Always
    • Always except for single line statements - It will add / remove block always except for single line statement. If we execute it over the previous result we will receive:
      Block Usage Always Except
    • Only if necessary It will add / remove block if necessary. If we execute it over the previous result we will receive:
      Block Usage Only If

    The settings are separated and applied per language - C#, VisualBasic.NET, JavaScript, CSS, LESS.

    See Also