slisson / mps-tables

Table Editor Component for JetBrains MPS
Apache License 2.0
7 stars 3 forks source link

Wrong columnIndex? #16

Closed markusvoelter closed 11 years ago

markusvoelter commented 11 years ago

Hi have developed a table. When clicking into the second column in the first non-header row, I get a columnIndex of three. However, (I think) it should be 1.

slisson commented 11 years ago

Please check if the index is correct now and close the issue.

slisson commented 11 years ago

Can you please check, if the latest version solves this problem?

markusvoelter commented 11 years ago

I still get the exception. I am happy to demo or to let you look at the code. Maybe there is a bug somewhere in my logic.

[1160348] ERROR - s.mps.nodeEditor.EditorManager - Failed to create cell for node [entries] TableEntry [5149698356471770263] in test.ex.blocks.basic java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 at java.util.ArrayList.RangeCheck(ArrayList.java:547) at java.util.ArrayList.get(ArrayList.java:322) at jetbrains.mps.internal.collections.runtime.AbstractListSequence.get(AbstractListSequence.java:51) at jetbrains.mps.internal.collections.runtime.AbstractListSequence.getElement(AbstractListSequence.java:151) at com.lmsintl.accent.blocks.test.editor.TableEntry_table_Editor$12.queryCells(TableEntry_table_Editor.java:294) at com.lmsintl.accent.blocks.test.editor.TableEntry_table_Editor$12.loadElements(TableEntry_table_Editor.java:286) at com.lmsintl.accent.blocks.test.editor.TableEntry_table_Editor.createTableCellQuery_74se8c_c0a(TableEntry_table_Editor.java:301) at com.lmsintl.accent.blocks.test.editor.TableEntry_table_Editor.createStaticHorizontal_74se8c_a0(TableEntry_table_Editor.java:94) at com.lmsintl.accent.blocks.test.editor.TableEntry_table_Editor.createPartialTable_74se8c_a(TableEntry_table_Editor.java:60) at com.lmsintl.accent.blocks.test.editor.TableEntry_table_Editor.createEditorCell(TableEntry_table_Editor.java:56) at jetbrains.mps.nodeEditor.cells.EditorCellFactoryImpl.createEditorCell(EditorCellFactoryImpl.java:64) at jetbrains.mps.nodeEditor.EditorManager.createEditorCell_internal(EditorManager.java:419) at jetbrains.mps.nodeEditor.EditorManager.createEditorCell(EditorManager.java:375) at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:161) at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:202) at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:58) at com.lmsintl.accent.blocks.test.editor.TableBlockTestBody_table_Editor.createChildsVertical_kqf20l_a0b0(TableBlockTestBody_table_Editor.java:205) at com.lmsintl.accent.blocks.test.editor.TableBlockTestBody_table_Editor$1.getCells(TableBlockTestBody_table_Editor.java:105) at de.slisson.mps.tables.runtime.model.TableModelNodeCollectionAdapter.getNode(Unknown Source) at de.slisson.mps.tables.runtime.GridMapper.mergeTableNodeCollection(Unknown Source) at de.slisson.mps.tables.runtime.GridMapper.tableNodeToGrid(Unknown Source) at de.slisson.mps.tables.runtime.GridMapper.loadNode(Unknown Source) at de.slisson.mps.tables.runtime.TableEditor.loadModel(Unknown Source) at de.slisson.mps.tables.runtime.TableEditor.(Unknown Source) at com.lmsintl.accent.blocks.test.editor.TableBlockTestBody_table_Editor.createTable_kqf20l_a1a(TableBlockTestBody_table_Editor.java:112) at com.lmsintl.accent.blocks.test.editor.TableBlockTestBody_table_Editor.createCollection_kqf20l_b0(TableBlockTestBody_table_Editor.java:85) at com.lmsintl.accent.blocks.test.editor.TableBlockTestBody_table_Editor.createCollection_kqf20l_a(TableBlockTestBody_table_Editor.java:65) at com.lmsintl.accent.blocks.test.editor.TableBlockTestBody_table_Editor.createEditorCell(TableBlockTestBody_table_Editor.java:57) at jetbrains.mps.nodeEditor.cells.EditorCellFactoryImpl.createEditorCell(EditorCellFactoryImpl.java:64) at jetbrains.mps.nodeEditor.EditorManager.createEditorCell_internal(EditorManager.java:419) at jetbrains.mps.nodeEditor.EditorManager.createEditorCell(EditorManager.java:375) at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:161) at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:202) at jetbrains.mps.nodeEditor.EditorContext.createNodeCell(EditorContext.java:58)

On Tue, Sep 3, 2013 at 8:18 PM, slisson notifications@github.com wrote:

Can you please check, if the latest version solves this problem?

— Reply to this email directly or view it on GitHubhttps://github.com/slisson/mps-tables/issues/16#issuecomment-23734926 .

Markus Völter

voelter - ingenieurbüro für softwaretechnologie/itemis Ötztaler Strasse 38, 70327 Stuttgart-Untertürkheim, Germany

Phone: +49 (0) 171 / 86 01 869 Email: voelter@acm.org

http://www.voelter.de http://twitter.com/markusvoelter https://plus.google.com/116287041150844298254

http://dslbook.org http://mbeddr.com http://omegataupodcast.net

slisson commented 11 years ago

That's a different issue. The stacktrace says, that it is caused by the code in the "cell:" function. I was working on the "substitute node:" function.

There is not much that can go wrong here. "columnIndex" should always be between 0 and the value returned by "column count:" minus 1. The same for "rowIndex" and "row count:".

markusvoelter commented 11 years ago

There is not much that can go wrong here. "columnIndex" should always be between 0 and the value returned by "column count:" minus 1. The same for "rowIndex" and "row count:".

well, it is not :-)

Markus Völter

voelter - ingenieurbüro für softwaretechnologie/itemis Ötztaler Strasse 38, 70327 Stuttgart-Untertürkheim, Germany

Phone: +49 (0) 171 / 86 01 869 Email: voelter@acm.org

http://www.voelter.de http://twitter.com/markusvoelter https://plus.google.com/116287041150844298254

http://dslbook.org http://mbeddr.com http://omegataupodcast.net

slisson commented 11 years ago

I added some debug output for the return values of "column count" and "row count" and for the parameters passed to "cell:". Can you send me the output in the "Messages" window?

markusvoelter commented 11 years ago

I do not get any output.

On Wed, Sep 4, 2013 at 2:06 PM, slisson notifications@github.com wrote:

I added some debug output for the return values of "column count" and "row count" and for the parameters passed to "cell:". Can you send me the output in the "Messages" window?

— Reply to this email directly or view it on GitHubhttps://github.com/slisson/mps-tables/issues/16#issuecomment-23784149 .

Markus Völter

voelter - ingenieurbüro für softwaretechnologie/itemis Ötztaler Strasse 38, 70327 Stuttgart-Untertürkheim, Germany

Phone: +49 (0) 171 / 86 01 869 Email: voelter@acm.org

http://www.voelter.de http://twitter.com/markusvoelter https://plus.google.com/116287041150844298254

http://dslbook.org http://mbeddr.com http://omegataupodcast.net

slisson commented 11 years ago
markusvoelter commented 11 years ago

rebuild the tables languages

I have downloaded the new plugin from the build server and installed it. Built at 14:05

rebuild the editor of your concept

hadn't done that before, but did it now.

clear the messages window

did that.

open a model that contains instances of your concept (or update by pressing F5)

nothing happens.

The exception shows up when I press enter or shift-enter in a table cell. However, even in this case I get no output in the messages view.

Markus Völter

voelter - ingenieurbüro für softwaretechnologie/itemis Ötztaler Strasse 38, 70327 Stuttgart-Untertürkheim, Germany

Phone: +49 (0) 171 / 86 01 869 Email: voelter@acm.org

http://www.voelter.de http://twitter.com/markusvoelter https://plus.google.com/116287041150844298254

http://dslbook.org http://mbeddr.com http://omegataupodcast.net