cancel
Showing results for 
Search instead for 
Did you mean: 

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

matt-crc
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
matt-crc
Senior

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

 

View solution in original post

17 REPLIES 17
Pavel A.
Evangelist III

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.

 

 

Hi @Pavel A. 

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

Pavel A.
Evangelist III

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.

 

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.

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

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)

 

 


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

Hi @Andrew Neil 

1- Enclosing project -> Workspace  (same results)

    mattcrc_0-1744377196651.png

2- i tried different filename patterns: same results

    mattcrc_1-1744377403590.png

 

 

 

Hi @Andrew Neil 

Attached is the ST Example project

Let me know if you get different results.