I'm trying to clean up the dependencies on ProjectManager so that a) multiple projects are possible some day in ArgoEclipse and b) there aren't huge dependency tangles. My current focus is on things that need the currently active diagram since a whole bunch of new dependencies got introduced through the use of the idiom ProjectManager.getManager().getCurrentProject().getActiveDiagram().
Since we usually want the Diagram associated with the active window and we can use GEF to follow Globals.curEditor().getLayerManager().getActiveLayer().getDiagram() to get this we can break the dependency on the ProjectManager. Before I deprecate Project.getActiveDiagram() entirely though, I want to make sure that no one has a need for it. Say we've got projects A, B, and C open with windows for diagrams A1, B3, and B4. If diagram A1 is active, do we ever need to know that B3 was the last diagram in project B that was touched? I don't think so and I'd like to get rid of Project.getActiveDiagram so people aren't tempted to use it. Anyone have a good reason to keep it? On a related note, the constructors for four FigEdges are using this idiom to set their owning GEF Layer which seems hugely backwards to me. Anyone know why this is being done in the constructor instead of by the PGML parser? (The comments seem to imply that it's only required because of some special condition during load). The four Figs are FigAssociation, FigAssociationEnd, FigDependency, and FigGeneralization. BTW, if you ever find yourself tempted to type ProjectManager.getManager().getCurrentProject(), please don't! You should be able to figure out the right project from some other piece of context that you have. Tom --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
