public void loadMetaContent( final HasWorkItemDefinitionElements handler ) { if ( metaContent == null ) { workItemsService.call( getMetaContentSuccessCallback( handler ) ).loadDefinitionElements(); } else { handler.setDefinitionElements( metaContent ); } }
protected void loadContent() { view.showLoading(); workItemsService.call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(versionRecordManager.getCurrentPath()); }
@Override protected void save(String commitMessage) { workItemsService.call(getSaveSuccessCallback(view.getContent().hashCode()), new HasBusyIndicatorDefaultErrorCallback(view)).save(versionRecordManager.getCurrentPath(), view.getContent(), metadata, commitMessage); }
@Test public void commandIsCalled() throws Exception { doReturn(new ArrayList<ValidationMessage>()).when(service).validate(any(Path.class), anyString()); final Command afterValidation = mock(Command.class); presenter.onValidate(afterValidation); verify(afterValidation).execute(); }
consumedFQCNs); final Set<PortableWorkDefinition> workItemDefinitions = workItemsService.loadWorkItemDefinitions(path);
@Override public void create( final Package pkg, final String baseFileName, final NewResourcePresenter presenter ) { busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() ); workItemsEditorService.call( getSuccessCallback( presenter ), new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(), buildFileName( baseFileName, resourceType ), "", "" ); }
@Override protected void onValidate(final Command finished) { workItemsService.call( validationPopup.getValidationCallback(finished), new CommandErrorCallback(finished)).validate(versionRecordManager.getCurrentPath(), view.getContent()); }
when(path.toURI()).thenReturn("default://project/src/main/resources/mypackage/dtable.gdst"); when(dataModelService.getDataModel(eq(path))).thenReturn(oracle); when(workItemsService.loadWorkItemDefinitions(eq(path))).thenReturn(workItemDefinitions);
public void loadMetaContent( final HasWorkItemDefinitionElements handler ) { if ( metaContent == null ) { workItemsService.call( getMetaContentSuccessCallback( handler ) ).loadDefinitionElements(); } else { handler.setDefinitionElements( metaContent ); } }
protected void loadContent() { view.showLoading(); workItemsService.call(getModelSuccessCallback(), getNoSuchFileExceptionErrorCallback()).loadContent(versionRecordManager.getCurrentPath()); }
@Override protected void save(String commitMessage) { workItemsService.call(getSaveSuccessCallback(view.getContent().hashCode()), new HasBusyIndicatorDefaultErrorCallback(view)).save(versionRecordManager.getCurrentPath(), view.getContent(), metadata, commitMessage); }
@Override public void create( final Package pkg, final String baseFileName, final NewResourcePresenter presenter ) { busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() ); workItemsEditorService.call( getSuccessCallback( presenter ), new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(), buildFileName( baseFileName, resourceType ), "", "" ); }
@Override protected void onValidate(final Command finished) { workItemsService.call( validationPopup.getValidationCallback(finished), new CommandErrorCallback(finished)).validate(versionRecordManager.getCurrentPath(), view.getContent()); }
when(path.toURI()).thenReturn("default://project/src/main/resources/mypackage/dtable.gdst"); when(dataModelService.getDataModel(eq(path))).thenReturn(oracle); when(workItemsService.loadWorkItemDefinitions(eq(path))).thenReturn(workItemDefinitions);
@Test public void callFailsAndCommandIsCalled() throws Exception { doThrow(new IOException()).when(service).validate(any(Path.class), anyString()); final Command afterValidation = mock(Command.class); presenter.onValidate(afterValidation); verify(afterValidation).execute(); } }