@Test public void testLoadAnnotationsWithoutSources() { when(dataModelerService.resolveSourceRequest(any(AnnotationSourceRequest.class))).thenReturn(sourceResponse); when(sourceResponse.getAnnotationSources()).thenReturn(annotationSourcesMap); annotationListEditor.loadAnnotations(annotations); verifyAnnotationsLoaded(); }
public void loadAnnotations(List<Annotation> annotations) { this.annotations = annotations; if (annotations != null && annotations.size() > 0) { AnnotationSourceRequest sourceRequest = new AnnotationSourceRequest(); sourceRequest.withAnnotations(annotations); modelerService.call(getLoadAnnotationSourcesSuccessCallback()) .resolveSourceRequest(sourceRequest); } }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void loadAnnotations(List<Annotation> annotations) { this.annotations = annotations; if (annotations != null && annotations.size() > 0) { AnnotationSourceRequest sourceRequest = new AnnotationSourceRequest(); sourceRequest.withAnnotations(annotations); modelerService.call(getLoadAnnotationSourcesSuccessCallback()) .resolveSourceRequest(sourceRequest); } } }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void loadAnnotations(List<Annotation> annotations) { this.annotations = annotations; if (annotations != null && annotations.size() > 0) { AnnotationSourceRequest sourceRequest = new AnnotationSourceRequest(); sourceRequest.withAnnotations(annotations); modelerService.call(getLoadAnnotationSourcesSuccessCallback()) .resolveSourceRequest(sourceRequest); } } @Inject  AdvancedAnnotationListEditor(AdvancedAnnotationListEditorView view,
                                        Caller<DataModelerService> modelerService,
                                        Instance<ValuePairEditorPopup> valuePairEditorInstance,
                                        Instance<AnnotationListItem> itemInstance); }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void loadAnnotations(List<Annotation> annotations) { this.annotations = annotations; if (annotations != null && annotations.size() > 0) { AnnotationSourceRequest sourceRequest = new AnnotationSourceRequest(); sourceRequest.withAnnotations(annotations); modelerService.call(getLoadAnnotationSourcesSuccessCallback()) .resolveSourceRequest(sourceRequest); } } @Inject  AdvancedAnnotationListEditor(AdvancedAnnotationListEditorView view,
                                        Caller<DataModelerService> modelerService,
                                        Instance<ValuePairEditorPopup> valuePairEditorInstance,
                                        Instance<AnnotationListItem> itemInstance); @Override Widget asWidget(); void init(final KieModule module,
                     final ElementType elementType); void loadAnnotations(List<Annotation> annotations); void loadAnnotations(List<Annotation> annotations,
                                Map<String, AnnotationSource> annotationSources); boolean isReadonly(); void setReadonly(boolean readonly); @Override void onAddAnnotation(); void addDeleteAnnotationHandler(AdvancedAnnotationListEditorView.DeleteAnnotationHandler deleteAnnotationHandler); void addClearValuePairHandler(AdvancedAnnotationListEditorView.ClearValuePairHandler clearValuePairHandler); void addValuePairChangeHandler(AdvancedAnnotationListEditorView.ValuePairChangeHandler valuePairChangeHandler); void addAddAnnotationHandler(AdvancedAnnotationListEditorView.AddAnnotationHandler addAnnotationHandler); void clear(); void removeAnnotation(Annotation annotation); }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void loadAnnotations(List<Annotation> annotations) { this.annotations = annotations; if (annotations != null && annotations.size() > 0) { AnnotationSourceRequest sourceRequest = new AnnotationSourceRequest(); sourceRequest.withAnnotations(annotations); modelerService.call(getLoadAnnotationSourcesSuccessCallback()) .resolveSourceRequest(sourceRequest); } } @Inject  AdvancedAnnotationListEditor(AdvancedAnnotationListEditorView view,
                                        Caller<DataModelerService> modelerService,
                                        Instance<ValuePairEditorPopup> valuePairEditorInstance,
                                        Instance<AnnotationListItem> itemInstance); @Override Widget asWidget(); void init(final KieModule module,
                     final ElementType elementType); void loadAnnotations(List<Annotation> annotations); void loadAnnotations(List<Annotation> annotations,
                                Map<String, AnnotationSource> annotationSources); boolean isReadonly(); void setReadonly(boolean readonly); @Override void onAddAnnotation(); void addDeleteAnnotationHandler(AdvancedAnnotationListEditorView.DeleteAnnotationHandler deleteAnnotationHandler); void addClearValuePairHandler(AdvancedAnnotationListEditorView.ClearValuePairHandler clearValuePairHandler); void addValuePairChangeHandler(AdvancedAnnotationListEditorView.ValuePairChangeHandler valuePairChangeHandler); void addAddAnnotationHandler(AdvancedAnnotationListEditorView.AddAnnotationHandler addAnnotationHandler); void clear(); void removeAnnotation(Annotation annotation);  }