@Test public void testRemoveAnnotation() { annotationListEditor.loadAnnotations(annotations, annotationSourcesMap); annotationListEditor.removeAnnotation(annotations.get(2)); verify(view, times(1)).removeItem(itemInstances.get(2)); verify(itemInstance, times(1)).destroy(itemInstances.get(2)); }
public void removeAnnotation(Annotation annotation) { AnnotationListItem listItem = annotationItems.get(annotation); if (listItem != null) { view.removeItem(listItem); annotationItems.remove(annotation); dispose(listItem); } }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void removeAnnotation(Annotation annotation) { AnnotationListItem listItem = annotationItems.get(annotation); if (listItem != null) { view.removeItem(listItem); annotationItems.remove(annotation); dispose(listItem); } } }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void removeAnnotation(Annotation annotation) { AnnotationListItem listItem = annotationItems.get(annotation); if (listItem != null) { view.removeItem(listItem); annotationItems.remove(annotation); dispose(listItem); } } @Inject  AdvancedAnnotationListEditor(AdvancedAnnotationListEditorView view,
                                        Caller<DataModelerService> modelerService,
                                        Instance<ValuePairEditorPopup> valuePairEditorInstance,
                                        Instance<AnnotationListItem> itemInstance); }
AdvancedAnnotationListEditor implements IsWidget,
                   AdvancedAnnotationListEditorView.Presenter { public void removeAnnotation(Annotation annotation) { AnnotationListItem listItem = annotationItems.get(annotation); if (listItem != null) { view.removeItem(listItem); annotationItems.remove(annotation); dispose(listItem); } } @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 removeAnnotation(Annotation annotation) { AnnotationListItem listItem = annotationItems.get(annotation); if (listItem != null) { view.removeItem(listItem); annotationItems.remove(annotation); dispose(listItem); } } @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);  }