Author |
Topic |
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 12 2006 : 2:28:29 PM
|
Active hyper-links in comments - this is the feature I always dream about. Maybe 'http://...' links would be not so useful, but links to functions/classes (intelligent enough to track changes in the code) would be GREAT feature for me. What do you think? It is possible at all with VAX? |
|
feline
Whole Tomato Software
United Kingdom
18994 Posts |
Posted - Jun 12 2006 : 4:48:33 PM
|
in VS2003 and VS2005 there is the option:
IDE tools menu -> Options -> Text Editor -> All Languages -> Enable single-click URL navigation
that sounds like it should provide working links. as for "tracking changes" in the code, it sounds like you are after either alt-g or FSIW, both of which are existing features of VA. |
zen is the art of being at one with the two'ness |
|
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 12 2006 : 6:18:15 PM
|
Hm, 'Enable single-click URL navigation' seems to work only for URLs, which is not exactly my point, as I stated above. Alt+G and FSIW are great tools, but what I want is an another toy :) Imagine this:
// this function changes the way Foo() and Bar() saves their properties
void Blah();
Now, the magic thing: VAX recognizes, that Foo() and Bar() are the function names (it should be hard to do - if the existence of braces is not enough, it always can be some kind of enclosong pair, like {Foo()} for example), and paints underlined. When I double-click on Foo(), VAX moves the caret to Foo()'s definition. It's only a silly example, I would imagine dozens of applications for this feature, really :) If you want the real-life example of such feature, take a look on the way in which Doxygen (and simiral tools) cross-links the documentation. With this feature implemented in VAX and little amount of work involved into the code documentation, we may resing Doxygen-like tools, at least for an internal usage.
|
|
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 12 2006 : 6:25:00 PM
|
quote: Originally posted by beef
it should be hard to do
I mean, it shoulN'T be hard to do, of course :) |
|
|
support
Whole Tomato Software
5566 Posts |
Posted - Jun 12 2006 : 7:53:53 PM
|
We often type Foo() in our code, Alt+G to do our work, return and Undo the typing of Foo(). |
|
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 13 2006 : 03:10:16 AM
|
quote: Originally posted by support
We often type Foo() in our code, Alt+G to do our work, return and Undo the typing of Foo().
Yes, but NOT in comments! I don't want just one more way to replace FSIW and Alt+G. What I want is the cross-linked in-code documentation. Just like the way Doxygen do, but directly in the code, without all this java-doc clutter. |
|
|
feline
Whole Tomato Software
United Kingdom
18994 Posts |
Posted - Jun 13 2006 : 4:40:03 PM
|
assuming for the moment we are talking about C++ then you need:
myDataClass::foo()
to be placed into the comment, since foo() on its own is not going to get you anywhere. the same logic applies to C#. non class member functions in C++ are a separate problem.
from one point of view, at this point, all you are doing is specifying the text to copy and paste into FSIW. so instead of this two step process you are after a single key press to do this.
personally i see the appeal of this idea. my concern is over opening a can of worms / feature requests. sometimes it is hard to know where to draw the line
i can see reasons why alt-g is not a brilliant idea, since the there is no constraint on the text in the comment, and no context. there is nothing to stop me, as a user going:
// sdkfhsdkfhksjfh()
and then wanting to know why alt-g does not do something sensible from this point of view being able to drop the text info FSIW makes sense to me, since it allows you more flexibility in what you put in the comment.
do you follow my logic here? personally i find the idea is quite appealing, i am just wondering how best to approach it, and if it really fits into VA. |
zen is the art of being at one with the two'ness |
|
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 14 2006 : 2:02:17 PM
|
quote: Originally posted by feline
assuming for the moment we are talking about C++ then you need:
myDataClass::foo()
to be placed into the comment, since foo() on its own is not going to get you anywhere. the same logic applies to C#. non class member functions in C++ are a separate problem.
Doxygen seems to have some intelligence here, and determines the context by the comment position. But I agree, if it is possible in the documentation tool (which have, on the other hand, its own comment-syntax overhead), doesnt mean that it is simple and even possible in a tool like VAX.
quote:
from one point of view, at this point, all you are doing is specifying the text to copy and paste into FSIW. so instead of this two step process you are after a single key press to do this.
I'm not sure if I fully understand, but if you are proposing additional shortcut to open FSIW with symbol 'under the caret', then we are meeting half way. In other words, this is the solution :) What about this: - I double click at the symbol in a comment (the entire word becomes selected), or I select it manually, or maybe just place the caret on the symbol.. - Shift+Alt+S - FSIW dialog appears with the selected word already written in.
quote:
personally i see the appeal of this idea. my concern is over opening a can of worms / feature requests. sometimes it is hard to know where to draw the line
Ok, I understand :) |
|
|
feline
Whole Tomato Software
United Kingdom
18994 Posts |
Posted - Jun 14 2006 : 5:01:49 PM
|
the only problem with FSIW picking up the selected text in the IDE is that currently FSIW remembers your last search when you re-open it. so some of the time the last search will be replaced by the selected text, which will be unhelpful if this happens by accident.
in support of this idea, the find dialog will pick up the selected text when you launch it.
overall this seems sensible, and personally i can definitely see how it would help, so i have put in a feature request
case=1316
on a related front, since i keep meaning to look into doxygen how does its context work? does it simply assume that if i reference "length()" then it must be a member of the current class? what if this is from my base class? i am curious as to how it tries to solve this problem. |
zen is the art of being at one with the two'ness |
|
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 14 2006 : 7:17:26 PM
|
Hm, I am not a Doxygen Expert, but I think it works more or less like this: 1. The comment is binded to the item it refers to. There are strict rules for such binding, in general the item described is the one directly following the comment. 2. For each string in the comment, that is classified as the reference (braces at the end, dot inside, etc), the referenced item is searched 'bottom up' from the context of our commented item.
For example:
...some code... //* This is a comment, Foo()! C::Bar() ..some code..
The item commented is C::Bar(). Foo() is searched starting from class C, then through all base classes, then in the namespace in which the C is defined, and so on. I think it is similar to the way the C++ compiler (hence - VAX :) looks up for the symbol. Just start from the context of the commented item and go up, that's it.
As I sad, I am not a Doxygen expert, so I am not sure if it is done this way, at least, this is the way it CAN be done. |
|
|
beef
Senior Member
Poland
42 Posts |
Posted - Jun 14 2006 : 7:19:55 PM
|
To be strict, doxygen comments starts with /** or ///, not //* :) |
|
|
feline
Whole Tomato Software
United Kingdom
18994 Posts |
Posted - Jun 15 2006 : 4:46:03 PM
|
interesting. one of these days i really should look into doxygen |
zen is the art of being at one with the two'ness |
|
|
jpizzi
Tomato Guru
USA
642 Posts |
Posted - Jun 16 2006 : 12:08:53 AM
|
The advantage that Doxygen has is the luxury to parse the entire build tree (assuming that you have set it up to do that) "off-line." By this I mean that Doxygen does not have to parse the code you are developing while you are developing it. It also can be setup (and, indeed, works better if you do) to have complete knowledge of the preprocessing options you desire, etc. You start up a Doxygen session and it runs. Then you go back to editing. (Well, you could run it simultaneously with editing code, but I wouldn't be too trustful of the results in the modules you are editing.).
Feline: yes, Doxygen is _really_ nice. |
Joe Pizzi |
|
|
feline
Whole Tomato Software
United Kingdom
18994 Posts |
Posted - Jun 17 2006 : 12:24:11 PM
|
i tried doxygen a few times before, but never spent enough time with it to overcome the "i cannot find anything" problem. i would open up some massive great index page of all of our classes in IE, and then i was faced with the problem that a list of 4,000 classes was rather hard to use *sigh*
Firefox and its incremental find feature will be a bonus there.
what is really required is spending enough time with it to find out how to use it properly. |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|