I've started up with developing Java.
However, These days I've started iPhone project and gave me lazy writing code;auto code generate functionality in xCode.
Are there any non-pay free edition add-on exist that does similar to xCode?
I mean, I do know Eclipse already has partial auto method look up when you put '.' (dot) token after class name which shows the list of methods.
thank you all.
The functionality is called content assist in Eclipse. It comes as default.
To trigger content assist, normally you have to click Ctrl+Space (Windows/Linux). But as you said, on Java it will be auto-activated when user press ..
You can however change this behavior. Go to Preferences -> Java -> Editor -> Content Assist and change the Auto activation triggers for Java.
For example to get the behavior of xCode, you could change it to ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
It comes by default with eclipse.
You need to press . then ctrl + spacebar
If ctrl + space doesn't work, you may try Alt + /
I used to think the autocompletion was slow, but it turns out you can make it instant. Go to Window / Preferences / Java / Editor / Content Assist / Auto-Activation and decrease Auto activation delay to zero.
I've been using Code Recommends. This is a very useful Eclipse plugin you must have.
One of my most favorite functionality is
Subwords Completion (you don't need to remember exactly the first letter of method's name, just type in other whatever letter you remember even they're inside).
It also offers many other functionality that may meet your need.
Related
Does IntelliJ have the ability to tab out of auto-completed brackets? As in, when you press "tab" key near a closing bracket, the cursor will jump over it instead of adding a new tab. This is a pretty standard feature in Eclipse. In IntelliJ IDEA you must use arrow keys to do so.
Similar question was asked 4 years ago here, but maybe 4 year isn't enough time to complete this complex feature, so I'm asking again.
UPDATE:
Initial implementation for this feature is available starting from IntelliJ IDEA 2018.2 version. It works more like in MS Visual Studio - without visual indication of tab 'exit' position. For now, it should work in Java, SQL, Python and some other files. It will take some time for other languages to catch up - some language-specific code changes are required. The feature is disabled by default, you can enable it in:
Settings (Preferences on Mac)| Editor | General | Smart Keys | Jump outside closing bracket/quote with Tab.
Original answer:
Nothing new since the original question was submitted, except a third-party plug-in that was started by one of the users.
For some reason the author didn't release a binary version of the plug-in yet.
I went ahead and built the plug-in, you can get the jar file here.
Copy it into the IDE plugins folder, restart IDEA and use Shift+Space.
Keyboard shortcut can be changed in the Keymap settings:
Feature requests and bug reports should go here.
Just type in the closing bracket again, it will get you out of the bracket.
For example if you are typing "Sandeep", as soon as you enter ".. it will be like ""... then you enter rest of the text "sandeep".. and at the end type " again... it will take you out of the double quotes.
I have demonstrated above for double quotes , you can do the same for any brackets.
After a long period of creating apps with Android Studio I returned to Eclipse to program a pure Java application. Of course, I have noticed large differences in terms of auto completion between IntelliJ IDEA and Eclipse but IntelliJ is no alternative for me because of various reasons.
That is why I started to change the settings in Eclipse, inter alia, for the content assist. I want to have suggestions for variable names too, without having to write a dot first. As you can see in this image, I have changed the auto activation triggers to ._#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ as suggested in another thread on Stack Overflow.
The problem is, if I write short variable names like d it completes them automatically to something different (in this case DEFAULT_CURSOR) when I press the dot key. To avoid this, I have to choose the variable first, before pressing the dot key.
However, having to do it this way is a large waste of time. Is there a possibility to use the suggested variables or methods only when I have pressed the enter key, just like in IntelliJ?
Maybe there is an option to bind the dot key to the closing of the content assist?
No, Eclipse and IntelliJ are different and IntelliJ's level of auto completion is unique to itself. If you are comfortable with it, you should use it and then copy and paste to eclipse for windowbuilder. Also FYI there is a free alternative to windowbuilder for IntelliJ, you can read about it here: WindowBuilder equivalent for IntelliJ?
I have been working with Java in an Eclipse IDE. I can type every single character just fine except for the '{' character. I need to resort to Ctrl+c and Ctrl+v every single time when I want to create a new block of {}.
In the Window>Preferences>Editor>Typing Braces are on, and they autocorrect just fine after I manage to copy a {.
Outside eclipse, in a text editor, or even in this question, I can type { by hitting Atl Gr + B, so I am thinking the problem is inside Eclipse.
Any help would be really appreciated, this error is getting quite annoying.
The problem is with the skip breakpoints option.
After unbinding the Alt+B key command, try to unbind the Ctr+Alt+B (skip brakepoints).
This solved my problem.
If you try to type the "{" you can see the skip breakpoint option flashing.
Go Windows-> Preferences type in search field 'binding' click on Keys, look up for Alt+B, click on it and then click Unbind Command.
Because people work differently and on different things, Eclipse makes it easy to change shortcuts and also to view shortcuts for the commands you use a lot.
In your case:
Window->Preferences->Keys -> ctrl+alt+b Unbind Command should do the trick. It also the same in Spring Tool Suite 4(It is an Eclipse-based development environment.) There is a usefull article about eclipse commands: How do you manage keyboard shortcuts
Solution: Window → Perspective → Customize Perspective → Debug - → point on Skip All Breakpoints → Key bindings and change it form Ctrl + Alt + B to Ctrl + Alt + M.
so I just downloaded eclipse and it came with a basic hello world program, and the auto complete works on this. It will work with the auto trigger "." and by using ctrl+space, and it shows all the suggestions you would expect. When I started my own project though, the auto correct must be called to work and there are not any suggestions in the auto complete drop down box. Does anyone know what could cause this????
2 things come to mind.
1) make sure setting in the preferences page under Java -> editor -> Content Assist is enabled. and that the delay is short.
2) check your build libraries and path are correct. it may be having trouble finding any methods that you can use.
just a dumb question but its hard to search because there are so many topics about eclipse auto complete and its hard to find something matching to my problem.
so there problem is:
If i write :
"MyClass MyVarName" and then hit space, (to add the " = new MyClass()")
Eclipse automatically adds : "MyClass MyVarName_MyClass " or something like that to the variable-name..... (just without underscore.... stackoverflow just wont to mark as bold else...)
That is really annoying, and because i imported the eclipse configuration of a co-worker... I really don't know how to disable....
thanks in advance
//EDIT:
It seems to be the same effect as i type "MyC" and then press space, it also completes the "MyClass" and not add just the space... its like hitting enter. but i dont want to automplete on space...
i also didn't found a custom key option on space or else.... :(
In Window->Preferences->Java->Editor->Content Assist:
check the box at "Disable Insertion triggers except 'Enter' ".
I've found all other answers to also disable the auto-suggestion features of Eclipse, which are rather useful in my opinion.
Window -> Preferences -> Java -> Editor -> Content Assist -> Advanced: In the top list box, uncheck "Java Non-Type Proposals", "Java Proposals" and "Java Proposals (Task-Focused)".
I cannot find a way to solve it decently.
So, just, press Esc before press Space.
Look into
Window -> Preferences -> Java -> Code Style
There you can see Conventions for variable names. Make sure all prefixes and suffixes are empty. Also check in
Window -> Preferences -> Java -> Editor -> Content Assist
Looks to me that you might have the Control key pressed without knowing it. Happens sometimes on laptops with Fn key that Fn+Ctrl kind of "locks" the Ctrl. I conclude this because Eclipse auto-complete feature should not work on pressing Spacebar only. Normally you should get the effect you describe only by pressing CTRL+Spacebar. Thus, try pressing Fn+Ctrl to unlock the "pressed down" Ctrl key and then you should be fine.
In Window -> Preferences -> Java -> Editor -> Content Assist, there is the option "Auto Activation". If you have it checked, it will activate even if you don't press ctrl and you'll see that behaviour. Uncheck it and you'll only get content assist when you use ctrl+space.
S!
My suggestion, and what I do, is similar to GreenEyed's approach but instead of disabling auto activation put it to a reasonable value for the delay, like 3000 (3 seconds).
I had plain Eclipse IDE for Java EE Developers and installed the Spring plugin to try it out. I didn't like it and didn't use it so I uninstalled it. After uninstalling, it still had the setting that you describe. So annoying!
After search for hours, I finally found out how to disable it.
Windows > Preferences > Java > Editor > Content Assist
Set Auto activation triggers for Java to: .
That's all that's necessary.
If you want to restore other Eclipse defaults regarding content assist:
Set Auto activation delay to 200.
I had previously disabled Java Proposals, Java Proposals (Task-Focused), and Java Type Proposals, as others recommended, but these should actually stay checked, so I re-enabled them.