Hi,
I'm doing a lot of development in wxWidgets (C++). To fix warnings to unused variables for different compilers, wxWidgets use the WXUNUSED macro. This is usually used in event handlers (and since it's GUI programming, there are a lot of them). Functions look like this:
void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnSqlEditCharAdded(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnMenuOpen(wxCommandEvent& WXUNUSED(event))
This confuses the Symbol browser (to the left), which shows:
ExecuteSqlFrame::WXUNUSED
for all such functions. Is this a bug in Geany and could you recommend some workaround until it's fixed?
BTW, I tested with 0.12 and 0.13 and the problem is visible in both versions.
Thanks,
On Sun, 17 Feb 2008 00:49:38 +0100, "Milan Babuskov" milan.babuskov@gmail.com wrote:
Hi.
I'm doing a lot of development in wxWidgets (C++). To fix warnings to unused variables for different compilers, wxWidgets use the WXUNUSED macro. This is usually used in event handlers (and since it's GUI programming, there are a lot of them). Functions look like this:
void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnSqlEditCharAdded(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnMenuOpen(wxCommandEvent& WXUNUSED(event))
This confuses the Symbol browser (to the left), which shows:
ExecuteSqlFrame::WXUNUSED
for all such functions. Is this a bug in Geany and could you recommend some workaround until it's fixed?
Yes, it is a bug. It's not really a Geany bug, more a bug in the CTags C parser. Well, there are two possibilities: - someone fixes the bug in Geany and we'll send the fix to the CTags project - you file a bugreport at the CTags bug tracker (http://ctags.sourceforge.net) and when it is fixed, we use the fix also for Geany. If you do so, please post a link to the bugreport, Thanks.
I won't work on this. So maybe Nick want to fix it, or anyone else likes to write a patch. The file to look into is tagmanager/c.c in the Geany source directory. But it's probably better to report this at the CTags project and hope someone will fix it.
Regards, Enrico
On Feb 17, 2008 6:55 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
- you file a bugreport at the CTags bug tracker
(http://ctags.sourceforge.net) and when it is fixed, we use the fix also for Geany. If you do so, please post a link to the bugreport,
Done:
https://sourceforge.net/tracker/index.php?func=detail&aid=1895518&gr...
But it's probably better to report this at the CTags project and hope someone will fix it.
I agree. Although, seeing some entries from 2004. doesn't give me too much hope.
Thanks,
On Sun, 17 Feb 2008 19:23:58 +0100, "Milan Babuskov" milan.babuskov@gmail.com wrote:
On Feb 17, 2008 6:55 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
- you file a bugreport at the CTags bug tracker
(http://ctags.sourceforge.net) and when it is fixed, we use the fix also for Geany. If you do so, please post a link to the bugreport,
Done:
https://sourceforge.net/tracker/index.php?func=detail&aid=1895518&gr...
Thanks.
Regards, Enrico
On Feb 17, 2008 6:55 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
I'm doing a lot of development in wxWidgets (C++). To fix warnings to unused variables for different compilers, wxWidgets use the WXUNUSED macro. This is usually used in event handlers (and since it's GUI programming, there are a lot of them). Functions look like this:
void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnSqlEditCharAdded(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnMenuOpen(wxCommandEvent& WXUNUSED(event))
ctags developers closed the bug report (as invalid) as there is a workaround to use -I switch. So, in this case, ctags should be invoked with:
ctags -IWXUNUSED
I'm not sure it's a smart idea to put that directly in the code, so maybe it would be good to add something like 'Additional ctags options' setting in Preferences -> Tools. It would be a simple text field where Geany users could put -IWXUNUSED or whatever other switch they need.
What do you think?
Thanks,
On Mon, 18 Feb 2008 09:23:45 +0100, "Milan Babuskov" milan.babuskov@gmail.com wrote:
On Feb 17, 2008 6:55 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
I'm doing a lot of development in wxWidgets (C++). To fix warnings to unused variables for different compilers, wxWidgets use the WXUNUSED macro. This is usually used in event handlers (and since it's GUI programming, there are a lot of them). Functions look like this:
void ExecuteSqlFrame::OnSqlEditUpdateUI(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnSqlEditCharAdded(wxStyledTextEvent& WXUNUSED(event)) void ExecuteSqlFrame::OnMenuOpen(wxCommandEvent& WXUNUSED(event))
ctags developers closed the bug report (as invalid) as there is a workaround to use -I switch. So, in this case, ctags should be invoked with:
ctags -IWXUNUSED
I'm not sure it's a smart idea to put that directly in the code, so maybe it would be good to add something like 'Additional ctags options' setting in Preferences -> Tools. It would be a simple text
I added something similar to the current SVN version(quoting the docs :D):
You can also ignore certain tags if they would lead to wrong parsing of the code. Simply create a file called "ignore.tags" in your Geany configuration directory (usually ``~/.geany/``). Then list all tags you want to ignore in this file, separated by spaces and/or newlines.
For more details, please read the ctags manual at http://ctags.sourceforge.net/ctags.html for the -I option.
Regards, Enrico