Author Topic: Patch: function arguments added to autocomplete tooltip  (Read 125433 times)

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: Patch: function arguments added to autocomplete tooltip
« Reply #105 on: March 16, 2013, 02:57:16 am »
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 :)

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Patch: function arguments added to autocomplete tooltip
« Reply #106 on: March 17, 2013, 09:11:23 pm »
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().
Code
#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); }

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: Patch: function arguments added to autocomplete tooltip
« Reply #107 on: March 17, 2013, 09:41:43 pm »
Good catch Alpha.
Here's  next patch that fixes both issues.
« Last Edit: March 17, 2013, 10:37:34 pm by p2rkw »

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Patch: function arguments added to autocomplete tooltip
« Reply #108 on: March 29, 2013, 08:26:23 pm »
All seems in order; committed.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Patch: function arguments added to autocomplete tooltip
« Reply #109 on: April 05, 2013, 07:23:03 pm »
New problem code identified:
Code
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).

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: Patch: function arguments added to autocomplete tooltip
« Reply #110 on: April 05, 2013, 10:24:29 pm »
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

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Patch: function arguments added to autocomplete tooltip
« Reply #111 on: April 06, 2013, 03:13:47 am »
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...)

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Patch: function arguments added to autocomplete tooltip
« Reply #112 on: April 06, 2013, 09:02:46 am »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Patch: function arguments added to autocomplete tooltip
« Reply #113 on: April 06, 2013, 12:09:07 pm »
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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Patch: function arguments added to autocomplete tooltip
« Reply #114 on: April 06, 2013, 12:27:46 pm »
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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Patch: function arguments added to autocomplete tooltip
« Reply #115 on: April 06, 2013, 02:09:04 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: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Patch: function arguments added to autocomplete tooltip
« Reply #116 on: April 06, 2013, 03:48:03 pm »
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_

  • Guest
Re: Patch: function arguments added to autocomplete tooltip
« Reply #117 on: April 08, 2013, 10:43:32 am »
I hope I am in the right place to re-post this, but I have reported an issue with autocompletion tooltip here http://forums.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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Patch: function arguments added to autocomplete tooltip
« Reply #118 on: April 08, 2013, 12:45:36 pm »
Definitely not the right place.
(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_

  • Guest
Re: Patch: function arguments added to autocomplete tooltip
« Reply #119 on: April 08, 2013, 01:56:08 pm »
Still so much to learn...at least the issue I have reported, is it valid or not?