/** * This API allows clients to declare that they are about to make a * "large" change to the model. This change might be in terms of content * or it might be in terms of the model id or base location. * * Note that in the case of embedded calls, notification to listners is * sent only once. * * Note that the client who is making these changes has the responsibility * to restore the models state once finished with the changes. See * getMemento and restoreState. * * The method isModelStateChanging can be used by a client to determine if * the model is already in a change sequence. */ public void aboutToChangeModel() { super.aboutToChangeModel(); // technically, no need to call beginChanging so often, // since aboutToChangeModel can be nested. // but will leave as is for this release. // see modelChanged, and be sure stays coordinated there. getModelNotifier().beginChanging(); }
/** */ private void handleRefresh() { if (!this.refresh) return; XMLModelNotifier notifier = getModelNotifier(); boolean isChanging = notifier.isChanging(); if (!isChanging) notifier.beginChanging(true); XMLModelParser parser = getModelParser(); setActive(parser); this.document.removeChildNodes(); try { parser.replaceStructuredDocumentRegions(getStructuredDocument().getRegionList(), null); } catch (Exception ex) { Logger.logException(ex); } finally { setActive(null); if (!isChanging) notifier.endChanging(); this.refresh = false; } }
boolean isChanging = notifier.isChanging(); if (!isChanging) notifier.beginChanging(); XMLModelParser parser = getModelParser(); setActive(parser);
boolean isChanging = notifier.isChanging(); if (!isChanging) notifier.beginChanging(); XMLModelParser parser = getModelParser(); setActive(parser);
boolean isChanging = notifier.isChanging(); if (!isChanging) notifier.beginChanging(); XMLModelParser parser = getModelParser(); setActive(parser);
boolean isChanging = notifier.isChanging(); getModelNotifier().beginChanging(true); XMLModelParser parser = getModelParser(); setActive(parser);