LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Wolfgang

Custom, error-specific menu items in build output window

Hello NI world,

 

when modifying functions I typically encounter errors such as:

 

30240, 1   Redeclaration of 'xyz' previously declared at ab.c:1621.

when I forgot to adjust a parameter etc.   It would be useful if I could use the right click popup menu of the build output window to jump to the first declaration in order to fix it. Right now, there is only the menu entry Goto Item

5 Comments
LuisG
NI Employee (retired)

Wolfgang,

 

When you right-click on the error line in the Build Output window, the only possible source-code connection is to the source code line that generated the error. It is not possible to parse the error line in order to extract the particular symbol name which you want to browse (there could be multiple, or even zero, symbol names in a given error line).

 

However, once you select "Goto Item", you should then be able to right-click on the function name and select "Go to Next Reference" (Ctrl+Shift+I) to take you to the declaration (and beyond, if you keep hitting Ctrl+Shift+I. Is that where you want to go? If so, you can still get there in two steps.

 

Luis

Wolfgang
Trusted Enthusiast

Luis,

 

1) if the function is used frequently you may have to keep hitting Ctrl+Shift+I tens of times to finally arrive at the function declaration...

 

2) You actually do have an extra information in this error message:


 30240, 1   Redeclaration of 'xyz' previously declared at ab.c:1621.


In this case I'd like to jump to the the line where the function was declared, this line (1621) is given in the error message, too; so I suggest that it should be possible to jump to this line number; right now, you can use Goto Item to jump to the line of the error (30240). Why not add the same functionality for the second line number?

 

Wolfgang

 

 

 

LuisG
NI Employee (retired)

Okay, I acknowledge that it's technically possible to parse out the declaration location and offer to jump to that location.

 

The only reservations I have is that this particular compiler error happens to reference another source location. Other compiler errors don't, or they might reference multiple other source locations, or they might even reference a single other source location but that location might represent something completely different. So, while the "goto item" menu item is generic and works for every compiler error, what you're really asking for is for custom menu items that apply to specific compiler errors.

 

This is a perfectly good suggestion, and we'll consider it as such: "custom, error-specific menu items in build output window".

LuisG
NI Employee (retired)
Status changed to: Under Consideration
 
Wolfgang
Trusted Enthusiast

Thanks, Luis!

 

Of course you are free to modify the title to your liking Smiley Happy

Let's hope that the modified title will attract kudos, too.

 

I also agree that your modified suggestion is more general and thus more useful - it's just that this specific error message is a good friend of mine, because somehow functions and their parameters tend to change during development...Smiley Wink

 


This is a perfectly good suggestion, and we'll consider it as such: "custom, error-specific menu items in build output window".