Hiding a Component in CDE

This post is for the geeks of us: the ones writing Processor Expert components with CDE (Components Development Environment). The problem is the following: In the Components Library view I have all my components listed, such as the USB stack components:

USB Stack Components

USB Stack Components

But the USB class components (the device or host ones) only make sense as sub-component (inherited) inside the FSL_USB_Stack:

FSL_USB_CDC_Device as inherited sub-component of FSL_USB_Stack

FSL_USB_CDC_Device as inherited sub-component of FSL_USB_Stack

So it does not make sense to add one of the device or host components to a project as the ‘root’ component: It only makes sense to add the FSL_USB_Stack component and then select the needed device or host sub-(inherited)-component. So how to hide the components?

The answer is to check a box in the CDE:

Only for inheritance sharing

Only for inheritance sharing

This will add the following to the .bean file:

 <OnlyForInheritanceSharing>true

With this knowledge, I can simply add that line to the .bean files with a text editor:

OnlyForInheritanceSharing set to true in bean file

OnlyForInheritanceSharing set to true in bean file

With this, I can successfully filter the components which are used as sub-components only:

Subcomponents not visible any more

Subcomponents not visible any more

Summary

With adding an extra setting to the .bean file of a component, I can hide it. That way I avoid users of the components to add components which then will not work, as they are only designed to be as a sub-component. So in my next component release you will get a cleaned up list of components :-).

❗ Unfortunately, this setting gets lost if the component gets loaded with the classic BeanWizard 😦

Happy Hiding πŸ™‚

Advertisements

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.