Thanks for your great product. All our developers use Compare It!
We have been using it (among other things) for C++ code reviews. It does a great job of taking us right to the change. But then the question always follows: "Wait, what function are we in?" We page up and locate the function and then go back to the change. It would be really slick if Compare It!, when in a function block (i.e., between curly braces for C++: return_value functionname(parms){ }), could have an option to show "return_value functionname(parms)" on some toolbar.
Thanks for your consideration.
For source code, display function declaration
Thank you!
Thank you! And thanks again for a very useful product.
Thinking about this more
It seems like one trickiest part here is, given a line of code, identifying the preceding function. And it's language dependent. For C++, I think you want to look for a pattern like this:
ReturnValue FunctionName(*)*{
... where * are wildcards. FunctionName might be ClassName::FunctionName, but it should be one term without spaces either way. ReturnValue and FunctionName cannot contain a semicolon or parentheses or brackets. I think that is good enough to distinguish between statements like this:
if(*)*{
... as well as class or namespace designations:
class ClassName*{
namespace NameSpaceName*{
Maybe CompareIt! could simply locate this pattern appearing on or before the highlighted line of code and display it on a status bar or something. To make it language-specific and associated with the appropriate file extensions, the pattern could be entered in Options / Options / File Filters. If you wanted to make the setting broader than "function name" you could call it "context identifier" or something. You could even make it the user's responsibility to construct a regular expression to identify the pattern if you wanted.
ReturnValue FunctionName(*)*{
... where * are wildcards. FunctionName might be ClassName::FunctionName, but it should be one term without spaces either way. ReturnValue and FunctionName cannot contain a semicolon or parentheses or brackets. I think that is good enough to distinguish between statements like this:
if(*)*{
... as well as class or namespace designations:
class ClassName*{
namespace NameSpaceName*{
Maybe CompareIt! could simply locate this pattern appearing on or before the highlighted line of code and display it on a status bar or something. To make it language-specific and associated with the appropriate file extensions, the pattern could be entered in Options / Options / File Filters. If you wanted to make the setting broader than "function name" you could call it "context identifier" or something. You could even make it the user's responsibility to construct a regular expression to identify the pattern if you wanted.