@Test public void testOnOpen() { NewResourceHandler rh1 = new NewFileUploader(); NewResourceHandler rh2 = new NewJavaFileTextHandler(); doReturn(Arrays.asList(rh1, rh2)).when(resourceHandlerManager).getNewResourceHandlers(); addAssetScreen.initialize(); addAssetScreen.onOpen(); assertEquals(1, addAssetScreen.newResourceHandlers.size()); assertEquals(rh2, addAssetScreen.newResourceHandlers.get(0)); }
@OnOpen public void onOpen() { this.filter = ""; this.view.setCategories(this.categoryUtils.createCategories()); profilesPreferences.load(this::filterNewResourcesHandlersAndUpdate, RuntimeException::new); }
AddAssetScreen { @OnOpen public void onOpen() { this.filter = ""; this.view.setCategories(this.categoryUtils.createCategories()); profilesPreferences.load(this::filterNewResourcesHandlersAndUpdate, RuntimeException::new); } }
AddAssetScreen { @OnOpen public void onOpen() { this.filter = ""; this.view.setCategories(this.categoryUtils.createCategories()); profilesPreferences.load(this::filterNewResourcesHandlersAndUpdate, RuntimeException::new); } AddAssetScreen(); @Inject  AddAssetScreen(final AddAssetScreen.View view,
                          final TranslationService ts,
                          final ResourceHandlerManager resourceHandlerManager,
                          final CategoriesManagerCache categoriesManagerCache,
                          final ManagedInstance<NewAssetHandlerCardWidget> newAssetHandlerCardWidgets,
                          final LibraryConstants libraryConstants,
                          final CategoryUtils categoryUtils,
                          final LibraryPlaces libraryPlaces,
                          final ProfilePreferences profilesPreferences); }
AddAssetScreen { @OnOpen public void onOpen() { this.filter = ""; this.view.setCategories(this.categoryUtils.createCategories()); profilesPreferences.load(this::filterNewResourcesHandlersAndUpdate, RuntimeException::new); } AddAssetScreen(); @Inject  AddAssetScreen(final AddAssetScreen.View view,
                          final TranslationService ts,
                          final ResourceHandlerManager resourceHandlerManager,
                          final CategoriesManagerCache categoriesManagerCache,
                          final ManagedInstance<NewAssetHandlerCardWidget> newAssetHandlerCardWidgets,
                          final LibraryConstants libraryConstants,
                          final CategoryUtils categoryUtils,
                          final LibraryPlaces libraryPlaces,
                          final ProfilePreferences profilesPreferences); @PostConstruct void initialize(); @OnOpen void onOpen(); void setFilter(String filter); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView AddAssetScreen.View getView(); void setFilterType(String filterType); void cancel(); }
AddAssetScreen { @OnOpen public void onOpen() { this.filter = ""; this.view.setCategories(this.categoryUtils.createCategories()); profilesPreferences.load(this::filterNewResourcesHandlersAndUpdate, RuntimeException::new); } AddAssetScreen(); @Inject  AddAssetScreen(final AddAssetScreen.View view,
                          final TranslationService ts,
                          final ResourceHandlerManager resourceHandlerManager,
                          final CategoriesManagerCache categoriesManagerCache,
                          final ManagedInstance<NewAssetHandlerCardWidget> newAssetHandlerCardWidgets,
                          final LibraryConstants libraryConstants,
                          final CategoryUtils categoryUtils,
                          final LibraryPlaces libraryPlaces,
                          final ProfilePreferences profilesPreferences); @PostConstruct void initialize(); @OnOpen void onOpen(); void setFilter(String filter); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView AddAssetScreen.View getView(); void setFilterType(String filterType); void cancel();  }