News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Patch: function arguments added to autocomplete tooltip

Started by p2rkw, November 26, 2012, 02:03:14 AM

Previous topic - Next topic

p2rkw

If I am author of those functions then they should be removed.

In CompareBaseArguments I tried to ignore arguments names and compare it only by its types, but this function is not finished. I don't know how it gets into trunk :)

Alpha

Quote from: Alpha on March 16, 2013, 01:22:54 AM
This patch works.
Never mind.
When I do not enable new features of the C++ language, the parser correctly skips items such as cbegin(), however, the doxygen parser does not skip them.  All of the following documentation is appended to size().

#ifdef __GXX_EXPERIMENTAL_CXX0X__
     /**
      *  Returns a read-only (constant) iterator that points to the
      *  first element in the %vector.  Iteration is done in ordinary
      *  element order.
      */
     const_iterator
     cbegin() const
     { return const_iterator(this->_M_impl._M_start); }

     /**
      *  Returns a read-only (constant) iterator that points one past
      *  the last element in the %vector.  Iteration is done in
      *  ordinary element order.
      */
     const_iterator
     cend() const
     { return const_iterator(this->_M_impl._M_finish); }

     /**
      *  Returns a read-only (constant) reverse iterator that points
      *  to the last element in the %vector.  Iteration is done in
      *  reverse element order.
      */
     const_reverse_iterator
     crbegin() const
     { return const_reverse_iterator(end()); }

     /**
      *  Returns a read-only (constant) reverse iterator that points
      *  to one before the first element in the %vector.  Iteration
      *  is done in reverse element order.
      */
     const_reverse_iterator
     crend() const
     { return const_reverse_iterator(begin()); }
#endif

     // [23.2.4.2] capacity
     /**  Returns the number of elements in the %vector.  */
     size_type
     size() const
     { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }

p2rkw

Good catch Alpha.
Here's  next patch that fixes both issues.

Alpha


Alpha

New problem code identified:

enum TokenizerState
{
    tsSkipEqual         = 0x0001,         /// Skip the assignment statement
    tsSkipQuestion      = 0x0002,         /// Skip the conditional evaluation statement
    tsSkipSubScrip      = 0x0004,         /// Skip the array-subscript notation statement

    tsSingleAngleBrace  = 0x0008,         /// Reserve angle braces
    tsReadRawExpression = 0x0010,         /// Reserve every chars

    tsSkipNone          = 0x1000,         /// Skip None
    // convenient masks
    tsSkipUnWanted      = tsSkipEqual    | tsSkipQuestion | tsSkipSubScrip,
    tsTemplateArgument  = tsSkipUnWanted | tsSingleAngleBrace
};

All of the line comments are attached to the token after them.  So, for example, tsSkipUnWanted says "Skip None" (I am not sure if this issue existed previously though).

p2rkw

I was looking for bug for an hour, when I found out that's not a bug. Read manual to see how those comments should be formatted: http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html#memberdoc

Alpha

Quote from: p2rkw on April 05, 2013, 10:24:29 PM
Read manual [...]
Ah ha!  It is a feature, not a bug ;) .  Thanks for pointing that out.  (I guess I need to do some more manual reading...)

Jenna

Quote from: Alpha on April 06, 2013, 03:13:47 AM
Quote from: p2rkw on April 05, 2013, 10:24:29 PM
Read manual [...]
Ah ha!  It is a feature, not a bug ;) .  Thanks for pointing that out.  (I guess I need to do some more manual reading...)
Almost no users do this.
I also have to write documentation for the stuff I do at work (  :( ) and less than 10% ofthe users read it.

MortenMacFly

Quote from: jens on April 06, 2013, 09:02:46 AM
Almost no users do this.
Erm... I do it all the time to doc member vars or enum/struct memebers in my S/W projects. ;-)
Its quite convenient for that purpose. My usual style is //!< (fwiw).

In the example here the arrows seems missing...?!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Jenna

Quote from: MortenMacFly on April 06, 2013, 12:09:07 PM
Quote from: jens on April 06, 2013, 09:02:46 AM
Almost no users do this.
Erm... I do it all the time to doc member vars or enum/struct memebers in my S/W projects. ;-)

I mean almost no users do read manuals, they all try to do stuff by trial and error and hope someone comes to clean up the mess afterwards.

MortenMacFly

Quote from: jens on April 06, 2013, 12:27:46 PM
I mean almost no users do read manuals, they all try to do stuff by trial and error and hope someone comes to clean up the mess afterwards.
Ah - that thing... a manual... a prof. at the university where I studied used to say: "Products that require a manual to be used are a design failure." :-) I kind of like that way of thinking... but well... for s/w it maybe different...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ollydbg

Something off-topic, I think that when something(like new feature is added to C::B), the developer should also add some text entry on the C::B manual currently in Latex format. (If you look at the GDB development, they have a very nice rule, that the docs and the code base are all synchronized)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

stefanos_

I hope I am in the right place to re-post this, but I have reported an issue with autocompletion tooltip here http://forums.next.codeblocks.org/index.php/topic,17647.msg121548.html#msg121548.

Also, another issue I just noticed is that when I type for example a header file and press Return key (on Windows), it does not autocomplete header's name with a >, but it works like this on Debian wheezy.

If I press Tab key on Windows, it autocompletes the name with >, but not working on Debian wheezy.

Is this the right behavior for this mechanism? Please advice, cheers.

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

stefanos_

Still so much to learn...at least the issue I have reported, is it valid or not?