/** */ private void notifyStructureChanged(Node root) { if (root == null) return; INodeNotifier notifier = (INodeNotifier) root; try { // Its important to "keep going" if exception occurs, since this // notification // comes in between "about to change" and "changed" events. We do // log, however, // since would indicate a program error. notifier.notify(INodeNotifier.STRUCTURE_CHANGED, null, null, null, -1); } catch (Exception e) { Logger.logException("A structured model client threw following exception during adapter notification (" + INodeNotifier.EVENT_TYPE_STRINGS[INodeNotifier.STRUCTURE_CHANGED] + " )", e); //$NON-NLS-1$ //$NON-NLS-2$ } }
/** */ private void notify(INodeNotifier notifier, int eventType, Object changedFeature, Object oldValue, Object newValue, int pos) { if (notifier == null) return; if (this.changing && !this.flushing) { // defer notification if (this.events == null) this.events = new Vector(); // we do not defer anything if we are doing a new Model, // except for the document event, since all others are // trivial and not needed at that initial point. // But even for that one document event, in the new model case, // it is still important to defer it. if ((!doingNewModel) || (((Node) notifier).getNodeType() == Node.DOCUMENT_NODE)) { this.events.addElement(new NotifyEvent(notifier, eventType, changedFeature, oldValue, newValue, pos)); } return; } try { // Its important to "keep going" if exception occurs, since this // notification // comes in between "about to change" and "changed" events. We do // log, however, // since would indicate a program error. notifier.notify(eventType, changedFeature, oldValue, newValue, pos); } catch (Exception e) { Logger.logException("A structured model client threw following exception during adapter notification (" + INodeNotifier.EVENT_TYPE_STRINGS[eventType] + " )", e); //$NON-NLS-1$ //$NON-NLS-2$ } }