We wrap the “update document” in an undo group, but if we already have an undo group at a higher level then our “end group” would be postponed to the root group, which would delay updating the document revision, and thus the revision we use as the disk revision would be wrong.
We workaround this by forcing the undo group to end and thus ignore the one at the higher level, which should be safe.
This is implemented by observing NSOutlineView’s did expand/collapse item notification and then asking for a full reload of the outline view.
None of the granular reload methods would cause the view to be recreated, and there is no “isExpanded” property that the view can bind to.
Given the above, it might be a good idea to introduce an NSTableCellView subclass / view controller for the group view and have this handle it, to avoid the overhead of asking for a full reload each time an item is expanded/collapsed (which is multiplied by number of items when using expand/collapse all).
When linking with the 10.10 SDK our cell was misbehaving, showing either no image or only the image. The explanation might be NSCell’s setImage: implementation which is documented as: “If the receiver is not an image-type cell, the method converts it to that type of cell.”.
This doesn’t seem to be a requirement when using view-based NSOutlineViews, and as our implementation wasn’t actually doing any copying, better to not pretend we conform to this interface.
This function is called when running ‘bl’ and ‘test_network’, so previously we would end up with ‘bl.plist’ and ‘test_network.plist’ in ~/Library/Preferences.
The menu items containing ‘«unit» / Selection’ in their default title are automatically updated to show the proper unit by our text view’s menu validation.
Some commands clearly should not share output window frame, OTOH it might be tedious having to position every new command used (if the default position is undesired).
We should probably re-use last command’s frame if there isn’t already a frame stored for the command (that’s what TextMate 1.x did). It might also be possible to group commands via its semantic class, so all run commands use the same window frame, though currently semantic classes have unique (language) suffixes.
This is to decrease the tab width which technically should be doen by creating NSTextTab objects (with tab positions), but that is too complex and I think ideally we should visualize the tabs (e.g. “‣”) like we do in the search/clipboard history windows.
Previously, the commit window was changed from a "always on top" window to a more typical window that could be minimized or sent to the background. While this made viewing the diffs more convenient, we could easily loose track of it or at worst end up with multiple dangling commit windows. By making it document modal, this prevents dangling windows. Furthermore, since the commit window is now attached to the main project window and the file browser already has the SCM status, we hide the file list by default and dropped the action button. Users can choose to show the file list via a checkbox and the action button's menu is still available via the file list's context menu.