Closed GoogleCodeExporter closed 8 years ago
Original comment by delmyers...@gmail.com
on 24 Jun 2011 at 7:42
Fixed - task 171: Encapsulate resource set selections/changes in commands.
http://code.google.com/p/choosel/issues/detail?id=171
As far as I could tell, there were two main places where selections were
created/changed:
SwitchSelectionOnClickViewItemBehaviour and SelectionResourceSetAvatarFactory
I extended these two classes to create
CommandDrivenSwitchSelectionOnClickViewItemBehaviour (that's a mouthful) and
CommandDrivenSelectionResourceSetAvatarFactory. This was done so that previous
API would not be broken. For example, it might not be necessary to have
command-driven selections in smaller applications that are based on choosel,
because there may be no need to undo selections.
This change ended up propagating into the choosel workbench. The
SelectionDragAvatarFactoryProvider now uses the
CommandDrivenSelectionResourceSetAvatarFactory and the
ViewWindowContentProducer uses the
CommandDrivenSwitchSelectionOnClickViewItemBehaviour, so that applications
based on the Choosel Workbench will keep track of selection changes in their
undo stacks.
This change also required a new command: SwitchSelectionCommand, which updates
the selection in the view. Also, ReplaceSelectionCommand has been updated to
allow for null (empty) selections.
Original comment by delmyers...@gmail.com
on 25 Jun 2011 at 1:42
Original issue reported on code.google.com by
delmyers...@gmail.com
on 24 Jun 2011 at 7:42