Javadoc Tooltip with Content Assist in Eclipse - eclipse

When i started to use Eclipse's Content Assist, Eclipse used to give me Javadoc help of item i focus in a tooltip box next to content assist. However, after a while Javadoc tooltip stopped working. I tried resetting preferences to default but no luck. What should i do?
p.s: Javadoc works when i highlight an element (i.e. a method).

I mingled with various options for 4 hours...even created a new workspace. Finally what worked for me was some preference changes.
Goto Preferences > Java > Editor > Content Assist, click on Restore Defaults.
Restart Eclipse and you are good to go.

You could try checking you have the latest version (and possibly reinstalling) xulrunner. That's Mozilla's platform independent GUI library, and as far as I'm aware it's used to display the javadoc, both content assist popups and in the javadoc tab. The likely cause of your problem is bugs/communication difficulties between eclipse and xulrunner.

I was facing the same problem here, and then, armed with Gaurav Kumar tip, I managed to solve it.
The problem here was that I had put a lower auto activation delay value. When I put it back to 200 and restarted Eclipse, the javadocs came back.

I solved the problem by changing Preferences > Java > Editor > Content Assist -> Auto Activation -> Auto activation triggers for Javadoc from "##" to "#".

Related

How to increase duration of content-assist popup in eclipse kepler?

For some unknown reason, the duration of the popup window for the control assist proposals has been shortened. If my proposals contain a list long enough to scroll the suggestions, the popup auto-hides in the midst of scrolling.
I tried deleting the .metadata folder of my workspace and restarted but it didn't work.
Could someone please help regarding the same?
I am using Eclipse Kepler.
You can adjest the content assist delay in eclipse preference.
Refer this blog.

How can I keep Eclipse from filling in auto-completions when I type an opening parenthesis ('(')?

So, on Eclipse Luna, I often encounter the situation where I'm typing a method name, but the first autocomplete suggestion is not the method I am looking for but something that is prefix-equivalent but longer, as in this example:
In the example, I just wanted the element(String name) method, so instead of hitting Return, I type ( instead. The result, quite annoyingly, is this:
This is clearly not what I was looking for. Is there a way to prevent Eclipse from performing auto-complete when I hit open-parenthesis (()?
These are my content assist settings (aparrently, I don't have code recommenders installed at all in this eclipse installation):
In Eclipse 4.11 (2019-03), and possibly earlier, the answer to this is under Preferences → Java → Editor → Content Assist → Disable insertion triggers except 'Enter'. After I checked that box, editing became a lot less annoying.
I have no idea why Eclipse doesn't do it by default. Who types map.put( and wants that to autocomplete to map.compute()?
A hack for this is to change the way Eclipse sorts the proposals.
You can go to Preferences menu and then go to the section for which you want to edit sorting. Then to de Editor section and Content Assist.
For example, for Java editor, it will be Preferences > Java > Editor > Content Assist.
There you will see, more or less in the middle of the window, a section called Sorting and filtering. Inside there is an option called Sort proposalswhich you can change from by relevance to alphabetically. Save an close.
With this you will get the proposals list order alphabetically and element() will be before other methods starting by element.
EDIT:
Tested in Eclipse Luna running in Ubuntu 14.04 and it works. You'll still get your code completed when writing ( but it will be completed with the shorter option available in the proposals list. If you want to use another method, you can continue writing some letters and the shortest option will disapear of proposals as it doesn't match what you are writing.
I guess your problem is the substring matches.
Go Window->Preferences->Java->Editor>Content Assist.
In Sort proposals section uncheck Show substring matches.
I found By relevance more useful then Alphabetically.
I have usually checked hidden Hide proposals not visible in the invocation target, and Hide deprecated references, too.
I hope it help.
The feature you're fighting with is the new "Intelligent code completion" which orders methods based on average usage count. Don't ask me where they get the data. See also here:
http://www.eclipse.org/recommenders/manual/#intelligent-code-completion
To disable the feature go to the preferences page Code Recommenders|Completions and uncheck "Enable intelligent code completion".
Another issue which might negatively affect code completions appears to be 'Java Proposals (Task-Focused)'. For example, it causes map.put() to be replaced with map.compute().
You can disable these from Preferences | Java | Editor | Content Assist | Advanced.
See also: http://literatejava.com/eclipse/bad-auto-completions-in-eclipse/

Sysout shortcut key not working even after setting the template

I added the sysout in the Eclipse template, context as Java statements and Pattern as System.out.println(${word_selection}${});${cursor} but still when I try typing "sysout" and press Ctrl + Space, it says "No default proposal".
Please help me how to figure this out, I am using MyEclipse version -8.6
I had the same problem, but it turned out I was typing a code snippet outside of a method, so Eclipse correctly decided not to propose this template. How silly!
Eclipse > Preferences > Java > Editor > Content Assistant > Advanced
Make sure Template Proposals is checked in one of the shown lists.
You shouldn't need to add the template as it should already be there under Java->Editor->Templates. Ensure that you have ticked the checkbox at the beginning of the template definition. Also make sure that you're pressing Ctrl+Space with the text cursor positioned immediately after the "t" in "sysout". This works for me.
In my case, I had the Apache POI library referenced in my project which added the SystemOutLogger to the list of things to insert.
'sysout' will only be auto inserted if it is the only thing in the
list.

Turning on Word Wrap for the Eclipse XQuery Plugin

How Can I Turn on Word Wrap for the Eclipse XQuery Plugin?
It does not seem to be in the window preferences section.
We Are currently working also on the code formatter. Therefore wrapping is not currently supported in the XQDT editor. I also don't see a workaround for it either. But I took a note about this. Follow us on twitter #XQDT too see when we come up with something new. The formatter will also com but not in the very near future.
It is in the Window Preferences section even without the plugin. Try going to
Window > Preferences > Java > Code Style > Formatter
create a new eclipse profile then set the maximum line width to whatever you want under the 'line wrapping' tab. apply the feature and click 'Ok'.

disable eclipse auto completion

I love Eclipse but I HATE auto-completion with a vengeance! I swear though, no matter how hard I look in prefs or Google I can't find where I turn this off!
I'm having the problem with both CFEclipse and the PHP editor.
How do I completely disable all "smart" quotes/tags/braces auto-inserting. Not some of it.. ALL of it. No matter how many options I untick both editors keep trying to finish my code for me.. usually with irritating results. Like this one (PHP editor):
<img alt="banner" src="/images/banner.jpg"></img>
This is HTML, not XHTML - I don't want, or need, my img tags closed.
Anyway this is still happening after I've gone to Preferences | PHP | Editor | Typing and Preferences | PHP | Editor | Code Assist and unchecked every option.
I can't be the only one having this issue but I can't find any howtos or help on this.
Well I found how to stop the tags auto-closing. For some reason it's under the Web | HTML Files preferences (even for a PHP file). I realise PHP is embedded in HTML but it seems odd the way the Editor options cross over like this. You need to restart Eclipse for this change to work.
I don't know how to find the Web | HTML Files Preferences section of cfeclipse configuration. The best I could find for this utterly infuriating so-called feature is this:
Go to Window -> Preferences -> CFEclipse -> Editor Then set Insight Delay to 9999. This won't turn it off but as good as. (Thank you House of Fusion for confirming my action).
You can find the HTML content assist in:
Window > Preferences > Web > HTML Files > Editor > Content Assist
and uncheck the "Automatically Make Suggestions" checkbox in the "Auto Activation" Panel
(used Linux Version of Eclipse Juno)
Found it (it IS hard to find, I know). It's:
Window > Preferences > Web > HTML Files > Editor > Typing (a LOT of steps, I know), then you can uncheck the boxes :).
Same issue, a slightly different location : looks like this is to be unplugged for each different programming language we use.
For Java, I had to look in :
(window / preferences) Java > Editor > Content Assist, frame "Auto Activation", uncheck "Enable auto activation"
For Linux version of Eclipse Juno, find it in:
Window > Preferences > Java > Editor > Content Assist. then uncheck "Enable auto activation" from the "Auto Activation" Panel
Then Eclipse and I can work together...
Yes, code completion and it's family are VERY irritating and it's hard to find the right checkbox.
Windows->Preferences. And then look at all the choices for editors. You will find the place.
I'm using Flash Builder and encounter the same annoyance with the Actionscript editor.
I was trying to disable this for Javascript, and my environment was not set up the way the other answers were describing. I had to go to:
Window > Preferences > Aptana Studio > Editors > JavaScript > Content Assist
There I had to empty the textboxes for:
display proposals
display contextual info
insert proposal
Now it shows me suggestions, which is great, but no longer forces its favorite suggestion on me when it thinks it's appropriate. It was turning:
this.
...into:
thistory.
THISTORY? What on earth is THISTORY? I'm glad that annoyance is over.
To disable autoclosing for brackets and HTML tags you shall go:
Preferences -> PHP / Web -> Editor -> Typing
then unchek all you need :)
I tried unchecking AutoActivation in ContentAssist for the Java Editor in hopes of disabling SmartInsert. But that failed. Best I could do was to go to Windows>Preferences>Java>Editor>Typing. Then uncheck both the Indentation boxes and Adjust Indentation in When pasting. That disabled the parts of SmartInsert that annoyed me the most. Should work the same for other editors. It is a shame there seems to be no way to disable it altogether.