Just installed Eclipse Helios (Win7 64) and I'm having a strange problem. I type syso-Ctrl-Space which is expected to complete to System.out.println("") but it doesn't work! I searched the web for about an hour now, I set Preferences > Java > Editor > Content Assist to defaults, nothing. Everything else seems to work. Ideas?
To be clear: the shortcut works, it completes everything except "syso" as seen so far, on syso (also tried sysout) it says "No Default Proposals". I couldn't find this kind of shortcuts in the Content Assist, but I set them to default anyway.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
I am using Eclipse Galileo and had the same problem. Even after trying the above proposed solutions but it didn't work. After making the below change it finally comes out.
And it worked for me. I hope this will be helpful for you.
I believe the right template is "sysout" and I believe this can be configured somewhere but could not tell you where. Try sysout and then Ctrl+Space It's a template, you can find all templates under
Window -> Preferences -> Java -> Editor -> Templates
There you can see that the template name is "sysout" this will then trigger the string substitution for System.out.writeln() but you can change both the template name (if you prefer syso) and/or the actual code produced by invoking the template
Cheers
Also check in this eclipse menu: Windows -> Preferences -> Java -> Appearance -> Type Filters
If you see
java.*
orjavax.*
here then try removing it (or Restore Default will do the job) and see that works, it did for me.DIRTY WORKAROUND: You can try out the following AutoHotkey-Code if you're still struggling like I am (STILL haven't been able to fix it myself)
You need to write this in a .ahk file and run it (AutoHotkey needs to be installed). You might wanna put this file into your startup folder. It's a very useful tool, you might wanna expand it one day.
Just go to the below address:
Windows->Preferences->Java->Editor->Content Assist->Advanced
and click restore default..........that's all
its work like a charm again.
As Peter stated, it is under Window -> Java -> editor -> templates. Look for the line with the following values.
sysout "Java Statements" "Print to standard out" "on"
the preview should be as follows...