Table (grid) editor with autocomplete, intentions etc.

Hi,

I am trying to figure out what would be the best approach to accomplish the following task: for .robot (google's robot framework) files create an editor which will display a file contents in a grid (table), similar to google's RIDE. Each grid row is a line of code and grid cell is a keyword, parameter, etc. It should appear as a second tab along with the standard text editor, somewhat similar to properties plugin (as I understand it means that I have to implement a FileEditor). That part looks pretty simple but it would be nice to have all the standard text editor features in that grid editor like highlighting, code folding, intentions, autocomplete, goto reference etc. The only difference is presentation of the text in a table grid.

Is it possible to reuse standard text editor for this somehow?

thanks for any help with this
--
  Oleg

3 comments
Comment actions Permalink

Representation of text in standard editor is pretty much fixed, it's not possible to adjust it that way. But you can probably try to use standard editor for each cell of your table separately, using it as cell renderer/editor.

0
Comment actions Permalink

Is it possible to limit the standard editor to display/edit only a small part of the underlying documnt? And won't it be a performance overkill - having hundreds of editor instances for one file? And it means problems with implementing folding and go to reference because it will require interactions between multiple editors?

0
Comment actions Permalink

Is it possible to limit the standard editor to display/edit only a small part of the underlying documnt?

Not 'out-of-the-box', but possible, if you will create corresponding document wrapper instance - check e.g. how DocumentWindowImpl works.

And won't it be a performance overkill - having hundreds of editor instances for one file?

Quite probable. Maybe an editor instance can be reused, just like table cell renderer components are usually are.

And it means problems with implementing folding and go to reference because it will require interactions between multiple editors?

Yes, a lot of fun stuff to do ;)

0

Please sign in to leave a comment.