The navigator tag called Functions use to show just functions in the active file. Now, in addition to functions, it also shows all the fields in structures declared at the file scope. Same problem with the FunctionFindAll macro
For example, if the file looks like this:
typedef struct struct_name
{
int var;
int var2;
} STRUCT_NAME_T
void func1( void)
{
}
void func2( void)
{
}
The functions tab looks like this
func1
func2
var1
var2
Functions display shows structures also
Re: Functions display shows structures also
To understand what is going on, first understand Zeus has two methods of generating this function information and I will describe these below.
1. Workspace Functions Panel
As the name suggests, this mode requires an open workspace. When a workspace is open Zeus automatically creates tag information for all files contained in that workspace.
For any file defined in the workspace, Zeus will use the Function tag information to populate the Functions panel.
For a workspace containing your file this result is produced: 2. Default Functions Panel
For the case where no workspace is open or the active file is not defined in that workspace, there is no tag information and for this scenario Zeus falls back to using the Function regexp define in the General section of the document type to populate this panel.
For your file used in this scenario the following results are produced: NOTE: For most document types this regexp is not defined and in these cases Zeus reverts to a default function regex.
Resolving the Issue
With this information in mind, it's clear you are seeing the result of the Workspace Functions Panel scenario.
To make those results display as required you need to turn on the tag long name option which can be done by editing the general section of the editor options panel as shown below: With that option enabled, the following results are produced for the Workspace Functions Panel mode: Cheers Jussi
1. Workspace Functions Panel
As the name suggests, this mode requires an open workspace. When a workspace is open Zeus automatically creates tag information for all files contained in that workspace.
For any file defined in the workspace, Zeus will use the Function tag information to populate the Functions panel.
For a workspace containing your file this result is produced: 2. Default Functions Panel
For the case where no workspace is open or the active file is not defined in that workspace, there is no tag information and for this scenario Zeus falls back to using the Function regexp define in the General section of the document type to populate this panel.
For your file used in this scenario the following results are produced: NOTE: For most document types this regexp is not defined and in these cases Zeus reverts to a default function regex.
Resolving the Issue
With this information in mind, it's clear you are seeing the result of the Workspace Functions Panel scenario.
To make those results display as required you need to turn on the tag long name option which can be done by editing the general section of the editor options panel as shown below: With that option enabled, the following results are produced for the Workspace Functions Panel mode: Cheers Jussi
Re: Functions display shows structures also
Turning on the long class names changes the format of the function display to also show function class name and structure variable's data type. It still displays the structure variables as if they are functions
While viewing this file that is in my workspace
// ***************************************************************************
typedef struct struct_tag
{
int var1;
int var2;
} TEST;
void func1( void)
{
}
void func2( void)
{
}
//***********************************************************************
I execute the FunctionFindAll macro and get this
---------------------------------------------------------------------------
Zeus IDE - Version 3.99a - Beta5
Copyright (c) Xidicone P/L 2023 All rights reserved.
---------------------------------------------------------------------------
func1
func2
var1
var2
However, if I execute the same macro on an identical file that is not in my workspace, I get the correct result
---------------------------------------------------------------------------
Zeus IDE - Version 3.99a - Beta5
Copyright (c) Xidicone P/L 2023 All rights reserved.
---------------------------------------------------------------------------
void func1( void)
void func2( void)
While viewing this file that is in my workspace
// ***************************************************************************
typedef struct struct_tag
{
int var1;
int var2;
} TEST;
void func1( void)
{
}
void func2( void)
{
}
//***********************************************************************
I execute the FunctionFindAll macro and get this
---------------------------------------------------------------------------
Zeus IDE - Version 3.99a - Beta5
Copyright (c) Xidicone P/L 2023 All rights reserved.
---------------------------------------------------------------------------
func1
func2
var1
var2
However, if I execute the same macro on an identical file that is not in my workspace, I get the correct result
---------------------------------------------------------------------------
Zeus IDE - Version 3.99a - Beta5
Copyright (c) Xidicone P/L 2023 All rights reserved.
---------------------------------------------------------------------------
void func1( void)
void func2( void)
Re: Functions display shows structures also
For me, running the FunctionFindAll function displays the correct results (i.e. file open and workspace open):
But I can replicate your issue by turning off the option shown below, doing a Tags Rebuild and then re-running the FunctionFindAll function:
That suggests to you me you have that option turned off, which means you are running the ctags program (i.e. xtags.exe) as the source of tag information.
If that is the case, this is an issue will be with the ctags program and one possible fix would be copying the xtags.exe from your old install and replacing the current xtags.exe file.
But a better option would be turning on the TSP tags options as the ctags option for tag information is a legacy feature.
Cheers Jussi
PS: For the second case of a file not in the workspace, there is no tag information available, so that FunctionFindAll function reverts to using the Function regular expression to generate the results.
Code: Select all
func1
func2
If that is the case, this is an issue will be with the ctags program and one possible fix would be copying the xtags.exe from your old install and replacing the current xtags.exe file.
But a better option would be turning on the TSP tags options as the ctags option for tag information is a legacy feature.
Cheers Jussi
PS: For the second case of a file not in the workspace, there is no tag information available, so that FunctionFindAll function reverts to using the Function regular expression to generate the results.
Re: Functions display shows structures also
Hi Jussi,
When I 1st looked at my C++ keywords tab, both TSP boxes were unchecked and I have an entry for numbers. I made my dialog matched yours and rebuilt tags, but the problem persisted. Then I checked Enable TSP for tags generation and rebuilt tags. With it checked, both function displays are now correct. I know that is the opposite of what you said, but that is how it is working for me. Thanks for the help. I would have never thought to looks at these option, not knowing what TSP is.
When I 1st looked at my C++ keywords tab, both TSP boxes were unchecked and I have an entry for numbers. I made my dialog matched yours and rebuilt tags, but the problem persisted. Then I checked Enable TSP for tags generation and rebuilt tags. With it checked, both function displays are now correct. I know that is the opposite of what you said, but that is how it is working for me. Thanks for the help. I would have never thought to looks at these option, not knowing what TSP is.
Re: Functions display shows structures also
That was my mistake as my post was not clear. I was showing that with this off, the problem is created.I made my dialog matched yours and rebuilt tags, but the problem persisted.
The TSP is the Tree Sitter Parser. It is used for syntax highlighting and a replacement tag generator.I would have never thought to looks at these option, not knowing what TSP is.
With this option off, Zeus uses the xtags.exe for tag information and hance the cause of the problem you reported is found in that xtags.exe component.
Cheers Jussi