I setted up Data Source (MySQL, local server, root username/password). I have autocomplete for tables names in database console tab. How I can get autocomplete at least for tables names in .sql files?
Both Ctrl+Space and Shift+Ctrl+Space deosn't help. See image below.
OS: Win 7 x32;
WebIDE(PhpStorm): from 94.583 down to 94.5 or even to more old versions.
Please check my answer in this post. I use DB navigator for mysql databases and autocomplete works ok.
Yes, I know about Database Navigator plugin. But WebIDE developers says in the blog there should be autocomplete with bundled plugin Database Support. Therefore my question is, how to invoke autocompletion without Database Navigator.
Currently I don't wish to use Dabase Navigator because it is too slow for me. WebIDE works much faster without it (I tried it on EAP 94.5, maybe now it works faster). And I don't need most of their features. Features of Database Support are enough for me. Currently I can invoke autocomplete for tables and fields names in db console tool window and in sql-injected strings in .php files. All what I need is autocomplete in .sql files too.
All the tables are in "reduinda_work" database (schema/catalog) which is not imported by default.
So you have to do any of the following:
The third variant is the best for MySQL.
BTW it seems that SQL Resolve inspection is turned off because all the tables in the file should be yellow.
My db source has exactly the same settings. See image below. But there is no autocomplete in .sql files.
No, I didn't turn off inspections. See image below.
Please ensure that MySQL dialect is configured in Settings/SQL Dialects.
The Generic dialect provides only keyword highlighing and completion so this setting may be the cause of the problem.
If this is not the case then I have to ask some more questions:
Does "Go to declaration" (Ctrl+B) works on `se_languagevars` for example?
Do you have completion in the following sample queries:
"select * from reduinda_<caret-here>"
"select * from reduinda_work.<caret-here>
As far as inspections are concerned the "highlighting level" popup is not enough. You should check whether the SQL inspections are turned on in the inspection profile settings. To check the profile just click on the "Configure Inspections" link that is located under the "Highlighting Level" slider.
Thank you, Gregory! I didn't selected SQL dialect for my files. There was a problem. But after selecting MySQL dialect the WebIDE started throwing a lot of errors like this:
Element: class com.intellij.psi.impl.source.tree.PsiCommentImpl: Element: class com.intellij.psi.impl.source.tree.PsiCommentImpl
com.intellij.psi.PsiInvalidElementAccessException: Element: class com.intellij.psi.impl.source.tree.PsiCommentImpl
This problem is unrelated to SQL or Database functionality.
Please use built in error reporting tool or post this trace in tracker.
Make sure you have the latest EAP installed and/or wait for the next one.
I reported it via built in error reporting tool. But sometimes this tool doesn't send report. And I should press send button second time, sometimes third and so on. Is it because your server is overloaded with error reports?
There may be various reasons. Anyway we do our best to make it available.