Skip to main content
matt-crc
Senior III
April 11, 2025
Solved

How to show all files in CubeIDE project? - Search does not work in CubeIDE - BUG

  • April 11, 2025
  • 6 replies
  • 2376 views

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

Best answer by matt-crc

@Andrew Neil 

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.

mattcrc_0-1744387600819.png

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)

mattcrc_1-1744387720073.png

Why changing the displayed tab before pressing the "search" button makes it work is beyond me....  sigh!!!

 

6 replies

Pavel A.
Super User
April 11, 2025

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.

 

 

matt-crc
matt-crcAuthor
Senior III
April 11, 2025

Hi @Pavel A. 

but how come I see all the include files in other projects?

Pavel A.
Super User
April 11, 2025

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.

 

Andrew Neil
Super User
April 11, 2025

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:

AndrewNeil_0-1744360434757.png

(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.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
April 11, 2025

@matt-crc wrote:

"Nx_SNTP_Client"


You mean this ?

Screenshots earlier in that page do show .h files - do they match what you see?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
matt-crc
matt-crcAuthor
Senior III
April 11, 2025

Hi @Andrew Neil @Pavel A. 

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:

    mattcrc_0-1744372827770.png

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:

mattcrc_1-1744373196306.png

The search results return this:

mattcrc_2-1744373273894.png

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)

 

 

Andrew Neil
Super User
April 11, 2025

@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,

AndrewNeil_0-1744376880404.png

 

With your search, if you right-click on  "DNS_SERVER_ADDRESS" and choose 'Search Text' - what does that do?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
matt-crc
matt-crcAuthorBest answer
Senior III
April 11, 2025

@Andrew Neil 

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.

mattcrc_0-1744387600819.png

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)

mattcrc_1-1744387720073.png

Why changing the displayed tab before pressing the "search" button makes it work is beyond me....  sigh!!!

 

Andrew Neil
Super User
April 11, 2025

Strange!

I always use the 'File Search' tab, and it seems to work for me!

(I do it via the Search > File... menu)

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
matt-crc
matt-crcAuthor
Senior III
April 11, 2025

Hi @Andrew Neil 

Result with "file search" tab selected:

mattcrc_1-1744389668843.png

 

Result with "C/C++" tab selected:

mattcrc_2-1744389707463.png

 

This code is very unstable... even the "scope" changes depending on which tab is selected... sigh

 

matt-crc
matt-crcAuthor
Senior III
April 11, 2025

mattcrc_0-1744392662701.png

Both searches failed.... Why can't we get a single search with all hits?