How to enable "Go To Line" (Ctrl+G) for non text FileEditors

I have implemented com.intellij.openapi.fileEditor.FileEditor for editing data coming from a database table. The main component of the editor is a JTable, populated from an editable ResultSet.

I want to enable the "go to line" functionality for this editor, but the menu entry seems to get enabled only for TextEditors.
Is there a way to enable this functionality for my custom FileEditor?

2 comments

Hello Dan,

I have implemented com.intellij.openapi.fileEditor.FileEditor for
editing data coming from a database table. The main component of the
editor is a JTable, populated from an editable ResultSet.

I want to enable the "go to line" functionality for this editor, but
the menu entry seems to get enabled only for TextEditors.

Is there a way to enable this functionality for my custom FileEditor?


You can't make the standard action work, but you can provide your own goto
line action and hook it to the same keyboard shortcut.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Thanks Dmitry.
This will still leave the "Go To Line" menu entry disabled, but I think no one really uses this menu entry in our days. Hence.. it's ok to create my own action...

0

Please sign in to leave a comment.