KDE

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • reducing suck factor #2: properly doxygen closing

    6 answers - 819 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hello,
    The second strike fixes improper indentation when closing doxygen comments.
    Consider this situation (| - caret, . - space):
    /**
    * bla
    */|
    Now (using the cstyle-indenter) hit enter.
    Without the patch, we receive:
    /**
    * bla
    */
    |
    whereas the patch leads to the expected result:
    /**
    * bla
    */
    |
    I. e. the caret is aligned with the indentation of the doxygen comment
    *beginning*, not the *end* as it is currently handled by kate.
    Please review. I'd like to commit the fix as soon as I've got green light.
    mfg
    Leo
    KWrite-Devel mailing list
    KWrite-Devel (AT) kde (DOT) org
    PGP SIGNATURE
    Version: GnuPG v1.2.5 (GNU/Linux)
    CD+1YrrRHlMtgy7DITRyPA==
    =0NWP
    PGP SIGNATURE
  • No.1 | | 1005 bytes | |

    Leo Savernik wrote:
    Hello,

    The second strike fixes improper indentation when closing doxygen comments.

    Consider this situation (| - caret, . - space):
    /**
    * bla
    */|

    Now (using the cstyle-indenter) hit enter.

    Without the patch, we receive:
    /**
    * bla
    */
    |

    whereas the patch leads to the expected result:

    /**
    * bla
    */
    |

    Does this also fix regular comments? Maybe this is fixed already (I'm
    not on latest KATE), but right now I get:

    /*
    *
    *|

    (add closing '/')
    /*
    *
    */|

    (fix indentation)
    /*
    *
    */
    ^ cursor is before this '*'

    (<end>)
    /*
    *
    */|

    (<enter>)
    /*
    *
    */
    |

    IIRC the indentation problem was already fixed in a recent commit (don't
    indent on '/'), but I saw 'doxygen' in that sentence too, so can someone
    make sure that these also work on non-Doxygen block comments?
  • No.2 | | 1674 bytes | |

    Tuesday 22 August 2006 21:44, Leo Savernik wrote:
    Hello,

    The second strike fixes improper indentation when closing doxygen
    comments.

    Consider this situation (| - caret, . - space):
    /**
    * bla
    */|

    Now (using the cstyle-indenter) hit enter.

    Without the patch, we receive:
    /**
    * bla
    */
    |

    whereas the patch leads to the expected result:

    /**
    * bla
    */
    |

    I. e. the caret is aligned with the indentation of the doxygen comment
    *beginning*, not the *end* as it is currently handled by kate.

    Please review. I'd like to commit the fix as soon as I've got green
    light.

    mfg
    Leo

    The bug does not exist (at least here) if you have C++ highlighting. For
    C-highlighting it exists, indeed (didn't look why (*) ).

    The proposed patch increases Kate's suck factor in the following example,
    let's take some C-code:

    void foo(); /** comment */
    | <- this is where the cursor is then.

    Fix would be to simply take the first char of Cursor returned by
    Comment.

    (*) More thoughts on that: The indenter sometimes uses highlighting
    information to check for comments or other attributes. The CStyle indenter
    reads the attributes only once in ::updateConfig(). If we change from C++
    to C (or any other highlighting) the attributes change; a '{' can have
    another 'int' then (cullmann: is that true?). If so, we need to call
    m_indenter->updateConfig() in KateDocument::setHlMode(int mode);

    Dominik

    KWrite-Devel mailing list
    KWrite-Devel (AT) kde (DOT) org
  • No.3 | | 502 bytes | |

    Am Mittwoch, 23. August 2006 18:56 schrieb Dominik Haumann:
    The proposed patch increases Kate's suck factor in the following example,
    let's take some C-code:

    void foo(); /** comment */
    * * * * * * | <- this is where the cursor is then.

    Ups, updated patch:

    mfg
    Leo

    KWrite-Devel mailing list
    KWrite-Devel (AT) kde (DOT) org

    PGP SIGNATURE
    Version: GnuPG v1.2.5 (GNU/Linux)

    v/NljyhvEATMBehTj5Q=
    =A+w4
    PGP SIGNATURE
  • No.4 | | 394 bytes | |

    Am Mittwoch, 23. August 2006 18:56 schrieb Dominik Haumann:
    The bug does not exist (at least here) if you have C++ highlighting. For
    C-highlighting it exists, indeed (didn't look why (*) ).

    Erm, this is strange because I *use* C++ highlighting and I can reproduce the
    bug.

    mfg
    Leo

    KWrite-Devel mailing list
    KWrite-Devel (AT) kde (DOT) org
  • No.5 | | 362 bytes | |

    Am Dienstag, 22. August 2006 21:59 schrieb mwoehlke:
    (<end>)
    /*
    *
    */|

    (<enter>)
    /*
    *
    */
    |

    Though my patch doesn't regard plain comments at all, your case works as
    expected. Maybe it was fixed en passant.

    mfg
    Leo

    KWrite-Devel mailing list
    KWrite-Devel (AT) kde (DOT) org
  • No.6 | | 411 bytes | |

    Leo Savernik wrote:
    Am Dienstag, 22. August 2006 21:59 schrieb mwoehlke:
    >(<end>)
    >/*
    >*
    >*/|
    >>

    >(<enter>)
    >/*
    >*
    >*/
    >|


    Though my patch doesn't regard plain comments at all, your case works as
    expected. Maybe it was fixed en passant.

    , thanks for the info.

Re: reducing suck factor #2: properly doxygen closing


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 1 =
QUESTION ON "KDE"

EMSDN.COM