Eclipse for Android, lost code completion feature - eclipse

I wanted to transfer my Syntax coloring settings from my Eclipse EE to my Eclipse for Android, so I did what is told in this question. The problem is that, even if my syntax coloring did apply correctly, I lost all my code completion and proposals (and, conveniently enough, I didn't make a backup)! If I press ctrl + space, I get a No default proposals message. Always.
I wouldn't like to have to install the whole IDE again, so if someone could provide a solution to this it would be much appreciated.

Preferences > Java > Editor > Content Assist > Advanced lists the default content assist proposals. Check that some proposals are actually enabled.

Related

Stop Eclipse from autocompleting variable names on declaration

Edit: I am a dumbass who repeatedly went into CA for JavaScript instead of Java. This is what happens when you blindly use the search box, folks.
I know this question has been asked and answered here before, but there's a problem. The solution just isn't there anymore.
I have the exact same problem as this good fella. I saw the answers, they say it's been patched in the 2018-12 release, which I assume is about 18 months old (I've only recently started using eclipse). I'm on the 2020-03 release and, as I said, the Disable insertion triggers except 'Enter' just isn't there anymore. See below:
Eclipse Preferences->Editor->Content Assist Window in 2020-03 release:
I tried looking for it elsewhere in Preferences but I can't find it. When I try to google it all that comes is this same solution, and nothing useful comes up if I filter the searches for time. Does someone know where this option went or if there is another way I can fix this? It's driving me nuts.
Your screenshot shows the JavaScript, not the Java content assist preference page where this setting has never existed:
Window (macOS: Eclipse) > Prefences: JavaScript > Editor > Content Assist
The Java content assist setting described in the mentioned answer can still be found at the same place:
Window (macOS: Eclipse) > Prefences: Java > Editor > Content Assist

Highlighting occurrences in Eclipse PDT

I'm working on a project that has now become complex enough to require navigational help from the IDE. In particular, I need highlighting of the occurrences of variables.
However, I can press the Toggle Mark Occurrences as many times as I want, PDT won't give me that useful functionality on anything, be it variables or functions. According to this (old) question, everything that is needed for that feature to work is correctly configured:
In the preferences (General > Appearance > Editors > Text Editors > Annotations), all annotations types related to "Occurrences" or "PHP" have Overview ruler checked and Text as also checked, with a color set.
In PHP > Editor > Mark Occurrences, every checkbox is checked.
This happens to me both in Neon.3 and in Mars.2: I'm not getting occurrences highlighted in PDT. JDT (Java) works as it should. CDT (tested on C++ code) works too.
Are there additional configuration options that evaded me?
Or is this a bug? I've searched the official Bugzilla and it seems that the highlighting of occurrences has been a recurring regression in Eclipse. It doesn't work either in JSDT (but that's a different issue because JSDT is undergoing an overhaul that caused a slew of regressions).
The same thing happened to me (sometimes still happens to me) but it improved significantly by adding more memory to my computer. It seems to be a functionality that due to the particularities of the php language requires many resources to be computed. I hope my experience will help you.

Eclipse autocomplete parentheses in control structures

I have a quick question that might save me a few seconds of annoyance every day. I know that eclipse can do a lot of autocomplete magic, so this might be possible:
As a programmer who learned with python, I constantly forget to surround contitions in control structures (like if or while) with parentheses. How do I make eclipse autocomplete opening and closing parentheses when I finish typing while or if?
I am aware that I can autocomplete whole structures with ctrl-space, but how can I configure eclipse to do this by itself?
Any help is appreciated.
So in stock Eclipse, the usual way to bring up assisted content is to type Ctrl+Space. The problem with this is that it brings up both Help Proposals and Template Proposals, with the Help Proposals displayed first. You end up wasting time scrolling down to find what you actually want from the Template Proposals. And there's just that much more clutter to choose from.
The solution is this:
Go Window->Preferences->General->Keys. In the type filter text search for "Template". This should bring up a "C++ Content Assist (Template Proposal)" line. Click on it. Now map this to whatever shortcut you'd like (I did Shift+Space because that's an easy one to do while typing). Make sure to click on the "Binding" option to do this. Click "Ok" and you're done!
If you ever want to add or change what is brought up by that shortcut, and for which specific strings it works, just go Window->Preferences->C/C++->Editor->Templates and you can edit those to do exactly what you'd like when using that newly assigned shortcut.
Hope this helps.
EDIT: I am unable verify if this works for PyDev, as I'm running Eclipse Oxygen, which doesn't currently offer PyDev or the Eclipse Marketplace Client plugin. However, my guess is this would still work in PyDev. Best of luck!
Sources:
Setting auto complete shortcuts in Eclipse
How to change the Control+Space autocomplete shortcut keys in Eclipse for Android
Thanks for any help, but the only thing that seems to work are workarounds. My prefered "solution" is to change the Auto activation triggers for Java in Preferences>Java>Editor>Content Assist from . to .iwfs, so that the autocomplete dialog automatically pops up when I start typing if, while, for or switch. Then hitting enter will do exactly what I needed.

Eclipse auto suggesting and filling in variable names

Okay, so my issue is when I am creating a variable, lets say for example "Object o" while I am typing "o" it'll suggest something like "object". Which is okay but when I press space it auto fills in the new name. Basically I don't want to turn off auto completion I just want to disable space auto filling the suggestion in. Even to disable variable naming suggestions would work.
I'm using Eclipse Juno Service Release 1.
I know it's an old question but since non of the answers here worked for me, and this problem was really annoying me too, I am adding solution that helped me.
In your Eclipse go to:
Window/Preferences/Java/Editor/Content Assist
and enable:
Disable insertion triggers except 'Enter'
screen/shotted
Hopefully that will work for everyone!)
As there isn't any definitive solution for this yet, what I find works best is to disable the alphabetic characters from triggers:
Windows > Prefereces > Java > Editor > Content Assist > Auto activation triggers for Java
This will mean no class name / type completion, but method name completion will still be suggested when you pressed dot, however at least Eclipse stop messing with my variable name
Go to Window/Preferences/Java/Editor/Content Assist and choose settings that works for you.
I realize this is a 3 year old post, but...
From what I can gather, there isn't an option to disable this, it was hard coded into the content assist feature. But there is a plugin that you can download from the answer to this stack overflow question that will disable this feature
Window -> Preferences -> Java -> Editor -> Content Assist -> Advanced
I turned off Java Type Proposals and made sure Java Proposals is turned on. By the way this is in Spring Tool Suite I haven't checked using eclipse.

eclipse java editor method proposal

I recently had to work on a visual basic project. For this task I used Visual Studio 2010 and noticed I slight difference how method are proposed for code completion. If you hit CRTL+Space and start typing, all methods are suggested that contain the text. Eclipse suggests all method that start with the text.
This behavior is especially helpful if you have to work with unknown code. Can I achieve the same behavior for Eclipse? Thank you!
You can download Eclipse Code Recommenders plugin - http://www.eclipse.org/recommenders/. It has a feature 'Subwords Completion' which does exactly what you are looking for.
The closest you have in Eclipse is support for camel-case... This allows you to type "new NPE" ctrl-space and Eclipse will propose NullPointerException and NoPermissionException (depending on your current target platform).
To see which preferences you have to change the behavior of the quick assist functionality, open the Preferences Dialog and type "assist" in the search field... There are plenty of ways to tweak the behavior :-)