Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Alpha on April 25, 2015, 10:52:38 pm

Title: Multi line comment editing
Post by: Alpha on April 25, 2015, 10:52:38 pm
Attached patch modifies the action on press enter while editing a multi line comment.  If anyone has time to test, I would be interested if this behaviour feels useful, or just annoying.
Title: Re: Multi line comment editing
Post by: oBFusCATed on April 26, 2015, 02:44:06 am
Can you explain what it is supposed to change?
Post an example code?
I see no difference in behaviour.
Title: Re: Multi line comment editing
Post by: Alpha on April 26, 2015, 04:26:54 am
Code: cpp
    /**
     * This is a comment.
     * Press enter here to see change:
Code: cpp
    // This is a comment.
    // Press enter here to see change:
Without this patch, the next line will copy the indentation only from the previous line.  With this patch, the leading * or // should also be copied.

Also:
Code: cpp
    /**
     * I am doxygen.
     *
     * @param foo
     * @param pressEnterHere
The pattern will copy "     * @param ".
Title: Re: Multi line comment editing
Post by: oBFusCATed on April 26, 2015, 01:07:37 pm
Are you sure you've tested it a lot and thoroughly? For me it works at random.
It is totally broken for non-doxygen comments (it copies random string either '/' or some random text).

Also I'd consider this feature annoying, because it forces me to format comments in certain way that might not be compliant with the style guide I'm using at the moment.
Title: Re: Multi line comment editing
Post by: Alpha on April 28, 2015, 07:11:21 am
Are you sure you've tested it a lot and thoroughly? For me it works at random.
Had it applied locally for a while, though it is my own code, so of course I am biased.

Also I'd consider this feature annoying, because it forces me to format comments in certain way that might not be compliant with the style guide I'm using at the moment.
Okay, thanks.  I was more looking for opinions on how it worked.  I will put this down on my checklist of things to improve planning of functionality for the future...
Title: Re: Multi line comment editing
Post by: oBFusCATed on April 28, 2015, 08:34:20 am
Had it applied locally for a while, though it is my own code, so of course I am biased.
What do you mean by biased?
The single line comments are totally broken.
I had it append just one '/' or even something like '// asdf' when I press enter.
I'm not sure I've seen it work correctly in the little testing I've done.