public void onRestore(@Observes RestoreEvent restore) { if (path == null || restore == null || restore.getPath() == null) { return; } if (path.equals(restore.getPath())) { loadContent(); notification.fire(new NotificationEvent(CommonConstants.INSTANCE.ItemRestored())); } }
@OnStartup public void onStartup(final ObservablePath path, final PlaceRequest place) { loading = true; setSourceEditionGrant(); init(path, place, resourceType); initContext(path); currentMessageType = "DataModeler" + path.toURI(); cleanSystemMessages(getCurrentMessageType()); javaSourceEditor.addChangeHandler( new EditJavaSourceWidget.TextChangeHandler() { @Override public void onTextChange() { if (context != null) { context.setEditionStatus(DataModelerContext.EditionStatus.SOURCE_CHANGED); } } }); }