Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netbeans autocomplete doesn't work on joomla 3.8 #18014

Closed
trananhmanh89 opened this issue Sep 20, 2017 · 9 comments
Closed

Netbeans autocomplete doesn't work on joomla 3.8 #18014

trananhmanh89 opened this issue Sep 20, 2017 · 9 comments

Comments

@trananhmanh89
Copy link
Contributor

trananhmanh89 commented Sep 20, 2017

Netbeans 8.2 autocomplete doesn't work on joomla 3.8.

With joomla 3.7 or lower, it's works fine.

Any one got the same issue 😭 ?

@mbabker
Copy link
Contributor

mbabker commented Sep 20, 2017

There are two options to help with IDE resolution. As previously announced, the core libraries were namespaced and the old class names do not exist as real classes anymore, but are still accessible through aliasing. The below scripts can be used to generate files to help your IDE correctly resolve the old class names.

@mbabker mbabker closed this as completed Sep 20, 2017
@joomdonation
Copy link
Contributor

@mbabker The subGenerator comes with Joomla core is not working. I made a PR #17925 to fix it but the class name is still wrong (all class name are in lower case) as explained in the PR

I had to modify some code to get correct result. So if someone needs this option, get this zip file, unzip it and save it to the root folder of your Joomla installation and it will be OK
stubs.zip

@trananhmanh89
Copy link
Contributor Author

Awesome 👍

@PhocaCz
Copy link
Contributor

PhocaCz commented Oct 3, 2017

@joomdonation

Hi Tuan,

works great with Eclipse.

Thank you, Jan

@joomdonation
Copy link
Contributor

I'm glad it helps :)

@rbuelund
Copy link

rbuelund commented Oct 5, 2017

The zip file also worked in PHPStorm - BUT - getParams is still not getting recognized ??

            $app = JFactory::getApplication();
	// Load the parameters.
	$params = $app->getParams();

@mbabker
Copy link
Contributor

mbabker commented Oct 5, 2017

The getParams method only exists on the site application class. Since JFactory::getApplication() has a docblock that returns the base CMS application class, it won't exist in the autocomplete stuff unless you put an inline docblock in your code to force it to resolve.

/** @var JApplicationSite|\Joomla\CMS\Application\SiteApplication $app */
$app = JFactory::getApplication();
$params = $app->getParams();

@rbuelund
Copy link

rbuelund commented Oct 5, 2017

Ok - thank you !

@ghost
Copy link

ghost commented Oct 28, 2017

@fishtime please open a new Issue as Comments on closed Threads didn't get much Notice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants