2025-04-10 6:53 PM - edited 2025-04-11 9:03 AM
Hello,
I downloaded an example "Nx_SNTP_Client", and all the include files are hidden in the file tree (left pane)
1- Where is the setting to show these files? (Why is this even an option)?
2- Why does the Search/Find not work with these hidden files?
I looked at: https://community.st.com/t5/stm32cubeide-mcus/cubeide-imported-example-file-structure-does-not-show-header/m-p/75355#M1515 with a similar question, and i see the "outline" tab, but how does that fix the search problem? What am I missing?
thanks
Matthew
Solved! Go to Solution.
2025-04-11 9:11 AM - edited 2025-04-11 9:28 AM
This is Search Bug.... If you try to search for something in the project, it will fail unless the correct tab in the search window is selected....
So if you search for "DNS_SERVER_ADDRESS" and the search windows displays "File Search" tab... Then the search FAILS.... it will not display the results properly.
However, if you do the same search again, and before pressing the "Search" button, just select the C/C++ tab, then the Search sort of works.... (no options were changed)
Why changing the displayed tab before pressing the "search" button makes it work is beyond me.... sigh!!!
2025-04-10 7:49 PM
This is how Eclipse CDT works. Another way to see includes is right click in the editor (in a c or h file) and select Show in-> Include browser.
2025-04-10 7:52 PM
Hi @Pavel A.
but how come I see all the include files in other projects?
2025-04-11 1:28 AM
Eclipse projects can have "virtual folders" that do not directly correspond to real filesystem folder structure. A folder with .h files can be added as a Source location (in Paths and Symbols). It takes time to get used to it.
2025-04-11 1:34 AM
As @Pavel A. said, this is Eclipse behaviour - not specific to CubeIDE.
You should get a "folder" in the Project Explorer called 'Includes' - which shows all the includes used by the build:
(might have to do a build first to see it)
@matt-crc wrote:2- Why does the Search/Find not work with these hidden files?
If they are used in the project, then search should include them.
2025-04-11 1:59 AM - edited 2025-04-11 2:00 AM
@matt-crc wrote:"Nx_SNTP_Client"
You mean this ?
Screenshots earlier in that page do show .h files - do they match what you see?
2025-04-11 5:12 AM
Thanks for your response... I'm not familiar with the eclipse IDE, so please bear with my dumb questions...
1- this is what I see in the example project:
2- Is there a way to switch from "virtual" directory structure to real directory structure?
3- But the biggest problem is that the search doesn't work in this project. For example, in file app_netduo.c, i have this code:
UINT dns_create(NX_DNS *dns_ptr) {
UINT ret = NX_SUCCESS;
/* Create a DNS instance for the Client */
ret = nx_dns_create(dns_ptr, &IpInstance, (UCHAR*) "DNS Client");
if (ret) {
Error_Handler();
}
/* Initialize DNS instance with the DNS server Address */
ret = nx_dns_server_add(dns_ptr, DNS_SERVER_ADDRESS);
if (ret) {
Error_Handler();
}
return ret;
}
I highlight "DNS_SERVER_ADDRESS" and try to search for it in the project:
The search results return this:
So, where is this define declared???? why isn't the search working?
if I manually search for it, I find it in app_netxduo.h (same directory as app_netxduo.c)
#define DEFAULT_MAIN_PRIORITY 10
#define DEFAULT_PRIORITY 5
#define LINK_PRIORITY 11
#define NULL_ADDRESS 0
#define DNS_SERVER_ADDRESS IP_ADDRESS(1, 1, 1, 1)
2025-04-11 6:08 AM
@matt-crc wrote:2- Is there a way to switch from "virtual" directory structure to real directory structure?
No.
Does your search find stuff if you choose 'Workspace' ?
What if you specify a different filename pattern; eg,
With your search, if you right-click on "DNS_SERVER_ADDRESS" and choose 'Search Text' - what does that do?
2025-04-11 6:18 AM
Hi @Andrew Neil
1- Enclosing project -> Workspace (same results)
2- i tried different filename patterns: same results
2025-04-11 6:34 AM