Issue
Template in Eclipse is not working for me. I'm using a Macbook Air and I have installed the latest version of Eclipse. However, whenever I used my own template code or the built in code made by Eclipse it always shows no template proposals.
I recently want to add a couple more shortcut to my Ecplise. I toggled on the content assist and at first sysout with control space on mac could work. After adding some more code I made my self and press control space after, it says no template proposals. I also toggled on Java Template proposals, enabled auto insert for my code. After all of this, I pressed sysout it shows a method sub which then creates a method private void sysout(){. I checked the error logs and saw one error which command w has two commands. I changed that and still after it shows again no template proposals.
Solution
Templates are provided only where they make sense. For example, sysout
makes sense in the body of a method or in a static code block. According to "I pressed sysout it shows a method sub which then creates a method private void sysout(){" you are at a location where System.out.println();
would be invalid:
class Sample {
// `sysout` template not(!) provided here
{
// `sysout` template provided here
}
void sample() {
// `sysout` template provided here
}
}
Answered By - howlger
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.