After talking to Ann, I consolidated the comments that she and I made in the code on bit bucket into a set of 7 items to address:
1.
in core/igb/src/main/java/com/affymetrix/igb/view/load/DataManagementTableModel.java
public DataSet getRowFeature(int row) {
I will have to re-word the comments to make that clearer. What I meant is this:
If there are two tracks of joined graphs, and 4 other tracks, then there will be 4 "features" (DataSets). The table will have 6 rows: 4 for the tracks that have a feature, then 2 for the joined graph tracks. For each row, the system will determine the corresponding "feature". For row 1 its the first DataSet in "features", for row 2 its the second, etc. For rows 5 and 6, there is no feature. Those rows are "after the last feature".
2.
in core/igb/src/main/java/com/affymetrix/igb/view/load/DataManagementTableModel.java
public ITrackStyleExtended getStyleFromRow(int row){
This function is used for all rows (graph tracks, joined graphs, and annotation tracks). The function name should remain. BUT The if block, is for things that have an associated feature (graphs, annotations). The code in the implied else block is for joined graphs. ---> that distinction is what needs to be clearer. I think it just needs comments to make this clear (no name changes).
in core/igb/src/main/java/com/affymetrix/igb/view/load/DataManagementTableModel.java
3.
change name of variable "comboTrackStyles" to "joinedGraphStyles"
4.
generateFeature2StyleReference
—make private, or specify permission
-change name to refreshStyles
—include a comment explaining that this method gets called when a user opens or deletes a data set. Instance variables that keep track of the relationship between style objects and data set objects get updated in this method.
5.
Add general comments:
This is the function that creates the feature2styleReference, which uses the DataSet as a key to link to the corresponding style.
DataSets do not include a pointer to the corresponding style, but styles (well, some styles) include a pointer to the corresponding DataSet.
generateFeature2StyleReference() works essentially like an outer for loop, with createPrimaryVirtualFeatures() as an inner for loop.
pseudo-code:
for every DataSet that is passed in:
– look at all of the current styles,
– for each of these styles:
– -- if it is the style that goes with this DataSet, put this DataSet and this style into feature2styleReference as a key/value pair.
When the DataManagementTable is generated, a row is made for each DataSet and this object is used to retrieve the style info to use for each row (foreground color, background color, hidden/visible, and the name to display) With the new code, rows are generated the same way, BUT THEN additional rows are made for each style in comboTrackStyles using only the style info, with no corresponding DataSet (so in those rows, there is no option to refresh or delete the track or change the load mode).
6.
change name ”catchComboStyles” to match up to “createPrimaryVirtualFeatures”.
7.
check: is it better to use ItrackStyle or ITrackStyleExtended ?
I have laid out a plan for myself to make these changes while running $ git rebase --interactive
so the git history will be easy to follow.
amend to 5bfba49 “Added a container (a list called comboTrackStyles) to the DataManagementTableModel to”
(DataManagementTableModel.java)
variable names: 3,6
comments: 5
amend to 283c325 “Modifiy DataManagementTable and DataManagementTableModel so that the Data Manag”
(DataManagementTableModel.java)
comments: 1,2
new commit
(DataManagementTableModel.java)
comments, variable name, permissions: 4
Note: I will need to force push this to my cloud fork, which may erase the comments that I and I made there.
I saved them as a pdf for my own reference.
This looks like a good place for Ivory to get started with IGB code.