@Override @Nonnull public T get() { return find(serviceClass); } };
protected ModuleActorGroupActivator (final @Nonnull Class<? extends ActorGroupActivator> activatorClass) { actorActivator = Locator.find(activatorClass); }
/******************************************************************************************************************* * * ******************************************************************************************************************/ public void init (final @Nonnull Repository repository) { taxonomyManager = Locator.find(TaxonomyManager.class); }
@Override @Nonnull public T get() { return find(serviceClass); } };
/******************************************************************************************************************* * * ******************************************************************************************************************/ @Override public void preVisit (final @Nonnull ObservationSet observationSet) { primaryTaxonLocale = Locator.find(TaxonomyPreferences.class).getTaxonomyLocales().get(0); buffer.append(NbBundle.getMessage(_, "csvHeader").replace("$", separator) + "\n"); }
public IntegrityCheckerPresentationTopComponent() { super(Locator.find(IntegrityCheckerPresentationBuilder.class), new IntegrityCheckerUIActivator()); setName(NbBundle.getMessage(IntegrityCheckerPresentationTopComponent.class, "CTL_IntegrityCheckerPresentationTopComponent")); } }
/******************************************************************************************************************* * * ******************************************************************************************************************/ public void import_ (final @Nonnull File file) throws IOException { final TaxonomyManager taxonomyManager = Locator.find(TaxonomyManager.class); final Importer importer = taxonomyManager.as(Importer.class); importer.import_(repository, file); }
@Override @Nonnull public Connection getConnection() { logger.fine("getConnection()"); final EntityManager em = TxTask.getEntityManager(); final PersistenceImpl persistence = (PersistenceImpl)Locator.find(Persistence.class); return persistence.getJdbcConnection(em); }
@Test public void mustBeRegisteredInMETAINF() { Lookup.getDefault().lookupAll(CapabilitiesProvider.class); // FIXME: since 4-Mar-2011 it's needed for the test.. Locator.find(HViewManagerRootNodeProviderProvider.class); }
@Test public void mustBeRegisteredInMETAINF() { Locator.find(HViewNodeDelegateFactoryProvider.class); }
@Test public void mustBeRegisteredInMETA_INF() { final HViewManager hvManager = Locator.find(HViewManager); assertThat(hvManager, is(instanceOf(SimpleHViewManager.class))); } }
@Override public Void run() throws NotFoundException { final GeoSchemaManager geoSchemaManager = Locator.find(GeoSchemaManager.class); final GeoSchema geoSchema = geoSchemaManager.findSchemaByName("GeoNames"); // FIXME EventBus.getDefault().publish(new GeoLocationSet(geoSchema, geoLocations)); return null; } });
@Test public void shouldBeRegisteredInMetaInf() { assertThat(Locator.find(EnhancedWindowManager.class), is(notNullValue())); } }
@Test public void mustBeRegisteredInMETA_INF() { assertTrue(Locator.find(Persistence.class) instanceof PersistenceImpl); }
@Test public void mustBeRegisteredInMETA_INFAndOverrideHibernatePersistenceProvider() { assertTrue(Locator.find(javax.persistence.spi.PersistenceProvider.class) instanceof HibernatePersistenceDecorator); } }
public GeoExplorerTestFrame() throws NotFoundException { setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width - 400) / 2, (screenSize.height - 600) / 2, 400, 600); getContentPane().add(treeView, BorderLayout.CENTER); final GeoCoder geoCoder = Locator.find(GeoCoderManager.class).findDefaultGeoCoder(); explorerManager.setRootContext(geoCoder.getLookup().lookup(RootNodeProvider.class).getRootNode()); }
@Test public void shouldBeRegisteredInTheDefaultLookup() { final GeoSchemaManager schemaManager = Locator.find(GeoSchemaManager.class); assertNotNull(schemaManager); assertTrue(schemaManager instanceof ElmoGeoSchemaManager); } }
@Test public void testShutdown() { logger.info("**************** shutdown"); TestPersistenceConfigurator tpc = (TestPersistenceConfigurator)Locator.find(PersistenceConfigurator.class); assertFalse(tpc.isClosed()); fixture.shutdown(); assertTrue(tpc.isClosed()); }
@Before public void setUp() { hViewManager = Locator.find(HViewManager); hViewManager.as(Resettable.class).reset(); assertThat(hViewManager.findViews().count(), is(0)); hViews[0] = hViewManager.createView().withDisplayName("view 1").build(); hViews[1] = hViewManager.createView().withDisplayName("view 2").build(); hViews[2] = hViewManager.createView().withDisplayName("view 3").build(); }
@Before public void setUp() { hViewManager = Locator.find(HViewManager); hViewManager.as(Resettable.class).reset(); hView = hViewManager.createView().withDisplayName("view 1").build(); hItems[0] = hView.createChild().withDisplayName("item 1").build(); hItems[1] = hView.createChild().withDisplayName("item 2").build(); hItems[2] = hView.createChild().withDisplayName("item 3").build(); }