| 49 | |
| 50 | - The last step is to update the modification stamp of the {{{ResourceSetInfo}}}. This is an inner class of your {{{XXXDocumentProvider}}}. If you don't update the modification stamp, you get an error similar to "The file has been changed on the file system" when you save your diagram. Modify the method {{{notifyChanged}}} of class {{{ResourceSetModificationListener}}} (inner class of {{{XXXDocumentProvider}}}): |
| 51 | {{{ |
| 52 | if (!notification.isTouch() |
| 53 | && myModifiedFilter.matches(notification)) { |
| 54 | // Update modification stamp if new Resource was added to ResourceSet |
| 55 | if (notification.getNotifier() instanceof ResourceSet) { |
| 56 | if (notification.getEventType() == Notification.ADD) { |
| 57 | myInfo.setModificationStamp(computeModificationStamp(myInfo)); |
| 58 | } |
| 59 | } |
| 60 | // ... |
| 61 | } |
| 62 | }}} |