@Override public void onFocus() { viewSource.setContent( view.getContent() ); }
@Override public void callback( final EnumModelContent response ) { view.setContent( response.getModel().getDRL() ); view.hideBusyIndicator(); } };
@IsDirty public boolean isDirty() { return view.isDirty(); }
@Override public void callback( final Path path ) { view.setNotDirty(); view.hideBusyIndicator(); metadataWidget.resetDirty(); notification.fire( new NotificationEvent( CommonConstants.INSTANCE.ItemSavedSuccessfully() ) ); } };
@Override public void execute( final String commitMessage ) { view.showBusyIndicator( CommonConstants.INSTANCE.Saving() ); enumService.call( getSaveSuccessCallback(), new HasBusyIndicatorDefaultErrorCallback( view ) ).save( path, view.getContent(), metadataWidget.getContent(), commitMessage ); } } );
@OnMayClose public boolean checkIfDirty() { if ( isDirty() ) { return view.confirmClose(); } return true; }
@OnSave public void onSave() { if ( isReadOnly ) { view.alertReadOnly(); return; } new SaveOperationService().save( path, new CommandWithCommitMessage() { @Override public void execute( final String commitMessage ) { view.showBusyIndicator( CommonConstants.INSTANCE.Saving() ); enumService.call( getSaveSuccessCallback(), new HasBusyIndicatorDefaultErrorCallback( view ) ).save( path, view.getContent(), metadataWidget.getContent(), commitMessage ); } } ); }
makeMenuBar(); view.showBusyIndicator( CommonConstants.INSTANCE.Loading() );