The user can create comments for subsets, but there seems to be no way to have an overview on the comment distribution for the molecules. Adding a column in the table with all associated (probably abbreviated) comments might improve the use of the commenting a lot.
A first implementation can be found on this branch ([6a3706]). Abbreviation is not applied yet, and tests have still to be run.
Related
Commit: [6a3706]
Last edit: Philipp Mewes 2018-04-16
This feature does not break session compatibility. However the new column is not displayed if an old session is loaded. For the table view this is not a problem since the new column can be made visible with the column filter. For the dendogram view this is not possible. The only way is to close the view and re open it again.
I think this is caused by the view state. The order of all columns is saved there. Columns which are not part of this order are hidden by default. Added a new bug which describes this problem.
Works good so far, but i think it would also be nice if the cell zoom always shows the entire comments regardless they are shortened in the table or not. I'm currently looking for a solution for that.
Unfortunately that will not work. The cell zoom displays the same component that is used to render the cell itself. The component had to differ between this two cases in any way to adapt the text representation. Currently i see no appropriate way to do this.
Ran final tests. Seems to work good.
(1) The comments for the current selected subset and all its descendants are currently displayed. Shall the root-subset be used always instead?
(2) The comments are separated by a line break. Increasing the row height shows the hidden comments. But maybe another delimiter is more suitable.
(3) A session saved on the master can be opened without errors, so i think that is not related to this bug. Furthermore i did not touch any state. The only thing is the new column which is not part of the state (see bug #301)
(4) Could reproduce this, but it seems to appear a bit randomly. Not every click on the table header causes this exception. However it happens frequently. I'm not pretty sure, but this might has something to do with the type of the column, which is an array of subsets.
Added this to perform the comment merging in a separate renderer, but this can also be done in the model. In this case the type of the column would be string and shouldn't cause any errors.
(5) The fixes are not related to the database. The subset-molecule relationship is calculated by the model. Maybe a different bug?
Last edit: Philipp Mewes 2018-05-18
Updates:
(2) Changed the delimiter ([bfc41f])
(4) The model is responsible for the comments again and the type of the column is String. Could not observe the exception again. Seems to fix this ([f3f834]).
Related
Commit: [bfc41f]
Commit: [f3f834]
(1) Yes.
(2) Line break is fine. The problem was that an empty line has been added at the end. This caused the depiction of the three dots although no content was hidden. Please use line break and avoid adding an unnecessary break at the end.
(3) Ok.
(4) This exception typically is thrown when sorting objects that do not implement Comparable in a consistent way. Please check this and open a bug report if necessary that blocks this feature.
(5) Ok, I have not seen this exception again.
(1) Changed this ([c70eee]).
(2) Fixed this ([184560]).
(4) According to this the JTable has a strategy for objects that does not implement Comparable (like an array of subsets). It uses a Collator to sort the values according to their string values. Since no string converter is specified, toString() is called on each object. This results in something like [Ledu.udo.scaffoldhunter.model.db.Subset;@4e5cd174 So the values are actually sorted by their memory addresses as strings. Since the array was created everytime getValueAt() was called, the adresses may differ from sort action to sort action and caused the exception.
However this is not a problem any longer, since the type of the column is String again now and therefore the column can be sorted like expected.
Related
Commit: [184560]
Commit: [c70eee]
Thanks for fixing this! Is there anything else you want to change before the next review? Otherwise, please set the bug to needs-review.
Checked two things:
- Was not sure. whether sorting makes sense for the comment column, since each cell at least contains the comment for the root subset, which is identical for all cells in this column. But it can be used to group molecues that belong to the same subsets
- It seemed that the order of comments in a cell changed when the subset was changed, but this was caused by the fact that molecules that belong to this subset where displayed below in the table and were moved to the top by selecting this subset
Encountered two new bugs: Bug #305 and bug #306, which are not related to this feature. They also occur at the master.