One Star

[resolved] Added code is not visible in expression builder

Hi: gurus I just added a test Java class and a simple function under the code folder. When I added the new class Talend already created a skeleton code with one method called helloExample. My problem is that I can see the helloExample method in the expression builder but when I add my new custom methods, these methods are not visible in expression builder. Am I missing some thing? Do I have to go through some manual compilation process before I see my custom methods? I don't find any Java perspective either from where I can compile the code, and I guess Talend uses Eclipse incremental compilation feature any way to compile the code in my workspace.
I would also appreciate if some one point me to some tutorial where I can see how to add our own custom code.
Thanks
RJ.
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] Added code is not visible in expression builder

Thanks Shawn for the tip. My methods were always static, but now I found the reason why they were not visible in the expression builder and correct me if I am wrong. What I have noticed that I didn't have the method comments at the top of my new methods, and once I have put methods comments they were visible at the expression builder. I am not sure, how internally Talend introspects the new methods, my first guess would be the Java introspection and comments or no comments should not be an issue, but that is what my experience is with Talend version 3.1 for windows.
Regards,
RJ.
2 REPLIES
Community Manager

Re: [resolved] Added code is not visible in expression builder

Hello
The custom methods must be 'static'. So, don't forget to add 'static' keyword.
Best regards

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

Re: [resolved] Added code is not visible in expression builder

Thanks Shawn for the tip. My methods were always static, but now I found the reason why they were not visible in the expression builder and correct me if I am wrong. What I have noticed that I didn't have the method comments at the top of my new methods, and once I have put methods comments they were visible at the expression builder. I am not sure, how internally Talend introspects the new methods, my first guess would be the Java introspection and comments or no comments should not be an issue, but that is what my experience is with Talend version 3.1 for windows.
Regards,
RJ.