Tabular Editor (Turn on/off of borders)


I´m creating an tabular Editor for my language.
Therefore I´m using: jetbrains.mps.lang.editor.table

All table elements have by default visible borders.
Based on User-Actions I want to turn on/off the left or right border of an Individual cell.

How can I do that?
I don't think that you can change it. Is is hard coded.

You could extend EditorCell_Table, override paintCell() and add the table as a custom cell like:

new AbstractCellProvider() { 
  public EditorCell createEditorCell(EditorContext editorContext) { 
    new YourEditorCell_Table(...); 
Hi fxlex,

thanks for the reply.

from your response I understand the changes to be:
1. Each instance of a tabular cell will need properties defining which border would be allowed to be displayed.

2. I extend EditorCell_Table and override paintCell():  
paintCell() accesses the roperties of a tabular cell to decide if a border gets displayed or not.

Is my understanding correct?
Did I miss any other important changes that need to be done?
Yes, this is my guess on how to achieve this.
Perhaps de.slisson.mps.tables would be a better choice and already has abilities like this. Maybe @slisson could answer this question better because he seems to have more experience with tables.

Please sign in to leave a comment.