If I type “new Runnable” and hit CTRL+SPACE, Eclipse allows me to create an anonymous inner class. However when I do the same with “Thread”, it does not.
It is a bit annoying that every time I need an anonymous thread, I have to create a new Runnable and then change the “Runnable” to “Thread”.
Is there a way to let Eclipse automatically create a thread as well?
As a workaround you could create a new template for the thread creation.
Eclise (at least in 3.7) alreay has one for Runnable. You can try it if you type
runnableand thenCtrl+Spaceuntil the template proposals are shown.To create a new template for
Thread:Window > Show View > TemplatesrunnableRunnablewithThread