Hi Tom, et al., Thanks for explaining the architecture. I do agree this is an improvement.
But there is still a lot of work to be done to the Presentation Tab (StylePanel class) before we reach this goal: It makes use of the TargetManager in combination with the "active diagram" to know which Figs are selected. This should hence be changed to work with GEF's Fig based selection mechanism, in order to stop using the "active diagram" notion. To clarify: - The TargetManager is designed to know which UML model elements are selected, not making a distinction between different presentations on diagrams or in trees. - GEF has a SelectionManager class that keeps track of selected Figs, independent of the diagram they are on. If you select e.g. a class by clicking in the explorer, and then change its background colour on the presentation tab, then it changes only the Fig on the active diagram. We do not want to make a distinction between the action of selecting a model-element vs. the action of selecting a Fig for usability (users do not understand this difference). Regards, Michiel Tom Morris wrote: > On Sun, Jan 18, 2009 at 4:02 PM, Bob Tarling <[email protected]> wrote: > >> What is the concept of the 'active' diagram in that case? A TabDiagram >> should contain a diagram, I think the term active is meaningless >> though and possibly misleading. > > 2009/1/18 Michiel van der Wulp <[email protected]>: > >> Anyhow, it is a bit early to deprecate functions that have no >> replacement (architecture) yet. > > Bob questions the concept of an active diagram in an MDI world, but > it's really irrelevant even now for the vast majority of the cases. > The reason those methods are deprecated without a replacement being > defined is because the entire concept is wrong. > > When a piece of code is asking about the "active" diagram, it really > means it wants to know the diagram containing the Fig that it is > working on or the diagram contained in the window the user clicked on > or something else which can be better gotten via an entirely different > method. > > DiagramUtils.getActiveDiagram() will get the diagram for the window > that last contained the mouse (from GEF). To get the diagram from a > Fig, use > ((LayerPerspective) getLayer()).getDiagram() > > If folks come across a need that isn't being met by one of these two > methods, file a bug report and we'll create some other little utility > to fill the gap. > >> One small remark: If the TabDiagram maintains the notion of the active >> diagram, then the Presentation Tab depends on it, since it only works on >> Figs on the current diagram. > > Why can't it just work on the selected Figs? I don't see anything > there that even needs to know what diagram the Fig is located on, but > if it does, it can ask the Figs. Of course it should support multiple > selected Figs and be prepared for them to be on different diagrams > (another reason the concept of an active diagram breaks down). > > Tom > > ------------------------------------------------------ > http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1034029 > > To unsubscribe from this discussion, e-mail: > [[email protected]]. ------------------------------------------------------ http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1034101 To unsubscribe from this discussion, e-mail: [[email protected]].
