How to make Eclipse with PDT work with registered Joomla namespace aliases?

Viewed 1130

What I'm trying to do is to start working under a Joomla! project in the Eclipse PHP IDE with PHP Development Tools installed. I use Eclipse Oxygen for PHP Development and work with a Joomla 3.8.2 project.

After creating project and importing the code, I get validation errors about not being able to resolve some class to a type. For example:

$par = JComponentHelper::getParams('com_somecomponent');

This gives me a validation error:

JComponentHelper cannot be resolved to a type.

I assume this is due to the fact that JComponentHelper is a registered Joomla! alias and the real name is \Joomla\CMS\Component\ComponentHelper. How can I provide Eclipse with this information to be able to correctly resolve the namespace?

1 Answers
Related