Author Topic: ToolTip for code...  (Read 3052 times)

Offline Crepuscule

  • Multiple posting newcomer
  • *
  • Posts: 22
ToolTip for code...
« on: January 13, 2012, 04:04:21 pm »
Hello everybody,

I had an idea that could be very very very very essential for source code development. It is about the possibility to add tooltip in the code.

For example, if I have the following code:

Code: [Select]
if (age >= 18)
{
    printf("You can drink alcool");
}
else
{
    printf("You're too younf to dring alcool");
}

That could be great to have more information about the source code, just placing the mouse on the line we want. For example, If I place the mouse on the line "if (age >= 18)" a tooltip could appears with a message like "If you are of age to drink...".
That could replace comment between // and /* ... */ and we can imagine later we can generate a documentation from these tooltip.

I think it is a very good idea. But I can't develop this plugin myself, I don't have enough time to know the source code of code::blocks. So, I give the idea if someone able to do that wants to start coding this new plugin. It is as you want.

But, If this plugin already exists... thanks to tell me where I can find it.

Regards

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12081
    • Travis build status
Re: ToolTip for code...
« Reply #1 on: January 13, 2012, 04:28:05 pm »
And where would you store the tooltip strings?
Or you propose to parse the code?
(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!]

Offline Crepuscule

  • Multiple posting newcomer
  • *
  • Posts: 22
Re: ToolTip for code...
« Reply #2 on: January 13, 2012, 04:44:24 pm »
It is just an idea, not a whole project.

I think it could be better to store the strings in an external file to keep the possibility to generate documentation.

When I read a source code that was not written by me, the most of the time there is almost any comment... so it is hard to understand easily the code. Sometime, the opposite problem appears... there is too much comments... and it is also hard to read the code...
The idea is to hide comments in tooltip (with the possibility to have pictures, hyperlinks...).
So when I read a code, If I don't understand, I can place the mouse on the understandable code and watch a real documentation about this code and not just simple comments. If the documentation is too big, we should be able to give a hyperlink in the tooltip to open a documentation (.doc, .pdf... etc).

Next, If someone try to understand a source code from the beginning, if we are able to generate documentation from the tooltips, he could understand easily the architecture of the software... that could be a very great beginning to develop the code. That could very good for code::blocks development (I tryed to do that few weeks ago but I don't have enough time to understand the whole code and architecture of Code::Blocks).

That could be also interesting for companies that wants to use code::blocks to develop their code and to have immediatly documentation about their work with this tool.

But for me, the main use of this tool is to read easily a source code...

Regards,


Crepuscule