Introduction a.k.a. what do I intend to do
feel free to skip this part, no real information is comprised in here
Because of the lack of a good, free (as in speech) vim
-Mode for the otherwise excellent JavaEditor in Eclipse(3.4), I'm thinking about writing one. The available solutions are:
- ViPlugin: commercial and not good (e.g. no
vim
text-objects
, such asdaW
) - VimPlugin: new editor, not the power of the built in JavaEditor
- see SO: Painless integration of Eclipse with Vim? : nothing really good turned up
(However feel free to mention other solutions than the ones above which could help me.)
In my opinion, it's the wrong way of writing a completely new editor based on TextEditor
, because you will then loose the cool features the standard JavaEditor gives you for free (such as 'organize imports', 'refactor menu', ...).
I'm thinking of a 'skin' to the normal JavaEditor which behaves like vim
, everything else should be unchanged.
Now the questions
- How can I detect if a
IWorkbenchPart
given byIPartListener.partActivated()
is the JavaEditor? - How can I then replace JavaEditor's
KeyListener
; something like theITextViewerExtension.prependVerifyKeyListener
is needed? - Is this a good way to go on?