How to rename a component

One Star

How to rename a component

Hi,
How do I rename a component in the designer. By default each component gets some ugly name like tSetGlobalVar_1, tSetGlobalVar_2, tSetGlobalVar_3. I would like to give a meaningful name to each one.
Thanks
Community Manager

Re: How to rename a component

Hello
Go to the view item on component setting viewer and edit the label format.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to rename a component

Thanks,, but that doesn't change the name of the component, it just shows it with a different name. In the generated code the component is still named with the old name. Is there a way to change that?
One Star

Re: How to rename a component

In the generated HTML documentation the components are still shown with their real name - tSetGlobalVar_1, tSetGlobalVar_2, tSetGlobalVar_3. Now it's even more confusing.
Community Manager

Re: How to rename a component

Hello
In the generated code the component is still named with the old name. Is there a way to change that?

1) Go to plugins\org.talend.designer.components.localprovider_3.2.3.r35442\components\tSetGlobalVar and change all the file name with new name, eg:
tSetGlobalVar_main.javajet change to tNewName_main.javajet
Open all the file and replace the old name with new name, eg:
tSetGlobalVar_messages.properties:
LONG_NAME=Sets a list of global variables
HELP=org.talend.help.tSetGlobalVar
VARIABLES.NAME=Variables
VARIABLES.ITEM.KEY=Key
VARIABLES.ITEM.VALUE=Value
change to:
LONG_NAME=Sets a list of global variables
HELP=org.talend.help.tNewName
VARIABLES.NAME=Variables
VARIABLES.ITEM.KEY=Key
VARIABLES.ITEM.VALUE=Value
2) Write a migration task if need, that means if there exists some jobs using the component with the old name, you need to write a migration task to make them Compatible with the new component. I think maybe it is diffcultly for you to write the migration task, I suggest you re-design the job with new component avoid writing the migration task.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business