Community
Participate
Working Groups
Build Identifier: There is already IDiagramTypeProvider.resourceReloaded(Diagram diagram) method. I propose to add another method called resourceStored(). It should be called immediately after Diagram instance gets stored to the file system. This change will make API symmetric and will enable user to store their custom model separately from Diagram model but at the same time when Diagram gets stored. I modified DiagramEditorInternal.doSave() method as shown below @Override public void doSave(IProgressMonitor monitor) { getBehavior().doSave(monitor); commandStackChanged(null); IDiagramTypeProvider provider = getConfigurationProvider().getDiagramTypeProvider(); provider.resourceStored(); } and tested this change. It worked just perfectly. Thanks and best regards, Sergej Reproducible: Always Steps to Reproduce: NA
The same can already be achieved by overriding doSave() in DiagramEditor (part of API). Besides convenience, do you see further benefits by introducing this? The reload hook exists because there is no public API hook in the editor to get notified about that event. Michael
Maybe you are right. The only reason for me would be keeping business model handling at one place - in DiagramTypeProvider. As I didn't implement DiagramEditor but used one from graphiti.examples that we the only acceptable way to store my business model after diagram is stored. Maybe I can answer this question in more details once I'm done with own editor. Best regards, Sergej
I have added a resourcesSaved method to the AbstractDiagramTypeProvider and its interface. This methods gets called after saving a diagram and gets the affected diagram and the saved resources passed as parameters. Just checked in to head. Michael
Mark as iplog relevant.
Part of Graphiti Indigo 0.8.0