Inheriting Processor Expert components with CDE and the Component Wizard is easy. But sometimes it is tricky and requires some tweaking. Components should be easily accessible (see CDE: Show Inherited Methods), and names should make sense. And here is a challenge: changing the name for inherited components:
Processor Expert uses Inhr plus a number for the name. Things get a bit complicated if you have many inherited components in your project: they are named Inhr1, Inhr2, Inhr3, and so on. Such a name does not make much sense, and from the name you cannot tell what is behind it.
It would be better if there would be a more meaningful name. E.g. ‘CS1‘ for a Chip Select, or ‘Arbitr1‘ for an arbitration signal? I can change the name of a root component, but not the name of an inherited one :-(.
Good news: with some tweaking you can change the base name.
Note: I only can change the base name for components I have write access. I cannot change it for the ones which are delivered with CodeWarrior, they are read-only. But I can change it for my own components or the ones I install e.g. from here.
The trick is to make a change in the component .bean file. In that file you will find for every inherited component a default entry:
I change it to some useful and short (say 3-5 characters) base name:
If I already have an inherited component in my project: it won’t change the name. The new base name is used if I add the inherited component again. But once I add the component with the modified base name, it looks now like this:
Happy Base Naming 🙂