@Produces public ResourceFactory getResourceFactory() { return addonRegistry.getServices(ResourceFactory.class).get(); }
@Produces public ConverterFactory getConverterFactory() { return addonRegistry.getServices(ConverterFactory.class).get(); }
@Produces public CommandControllerFactory getControllerFactory() { return addonRegistry.getServices(CommandControllerFactory.class).get(); }
@Override public UICommand getCommand(AddonRegistry addonRegistry, UIContext context) { return addonRegistry.getServices(type).get(); }
public CommandLineUtil(AddonRegistry addonRegistry) { this.converterFactory = addonRegistry.getServices(ConverterFactory.class).get(); ConfigurationFactory configFactory = addonRegistry.getServices(ConfigurationFactory.class).get(); this.userConfig = configFactory.getUserConfiguration(); }
private Imported<TemplateGenerator> getTemplateGenerators() { if (generators == null) { AddonRegistry addonRegistry = SimpleContainer.getFurnace(getClass().getClassLoader()).getAddonRegistry(); generators = addonRegistry.getServices(TemplateGenerator.class); } return generators; } }
ForgeScriptEngine(ForgeScriptEngineFactory factory) { this.factory = factory; AddonRegistry addonRegistry = Furnace.instance(getClass().getClassLoader()).getAddonRegistry(); this.shellFactory = addonRegistry.getServices(ShellFactory.class).get(); this.resourceFactory = addonRegistry.getServices(ResourceFactory.class).get(); }
/** * @return the addonManager */ private AddonManager getAddonManager() { if (addonManager == null) { this.addonManager = getAddonRegistry().getServices(AddonManager.class).get(); } return addonManager; }
private GitIgnoreConfig getGitIgnoreConfig() { if (gitIgnoreConfig == null) { AddonRegistry addonRegistry = SimpleContainer.getFurnace(getClass().getClassLoader()).getAddonRegistry(); gitIgnoreConfig = addonRegistry.getServices(GitIgnoreConfig.class).get(); } return gitIgnoreConfig; }
private ResourceFactory getResourceFactory() { if (factory == null) { AddonRegistry addonRegistry = SimpleContainer.getFurnace(getClass().getClassLoader()).getAddonRegistry(); factory = addonRegistry.getServices(ResourceFactory.class).get(); } return factory; }
@Override public ShellUIPromptImpl createPrompt(UIContext context) { ShellContext shellContext = (ShellContext) context; ConverterFactory converterFactory = addonRegistry.getServices(ConverterFactory.class).get(); return new ShellUIPromptImpl(shellContext, converterFactory); }
public ConverterFactory getConverterFactory() { if (converterFactory == null) { AddonRegistry addonRegistry = furnace.getAddonRegistry(); Imported<ConverterFactory> converterFactoryImport = addonRegistry.getServices(ConverterFactory.class); converterFactory = converterFactoryImport.get(); } return converterFactory; }
@Override public T produce(CreationalContext<T> ctx) { return furnaceProducer.getFurnace().getAddonRegistry().getServices(type).iterator().next(); }
/** * @return the possible value choices for the extends input */ protected Collection<JavaResource> getExtendsValueChoices(Project project) { AddonRegistry addonRegistry = Furnace.instance(getClass().getClassLoader()).getAddonRegistry(); ProjectOperations projectOperations = addonRegistry.getServices(ProjectOperations.class).get(); return projectOperations.getProjectClasses(project); }
/** * @return the possible value choices for the implements input */ protected Collection<JavaResource> getImplementsValueChoices(Project project) { AddonRegistry addonRegistry = Furnace.instance(getClass().getClassLoader()).getAddonRegistry(); ProjectOperations projectOperations = addonRegistry.getServices(ProjectOperations.class).get(); return projectOperations.getProjectInterfaces(project); }
private void initRegistry() { FurnaceClasspathScanner furnaceClasspathScanner = getFurnace().getAddonRegistry().getServices(FurnaceClasspathScanner.class).get(); this.registeredTypes = new HashMap<>(); this.typeRegistry = new TypeRegistry(); GraphModelScanner.loadFrames(furnaceClasspathScanner).forEach(this::addTypeToRegistry); }
private GraphTypeManager getGraphTypeManager() { if (this.graphTypeManager == null) this.graphTypeManager = getFurnace().getAddonRegistry().getServices(GraphTypeManager.class).get(); return this.graphTypeManager; }
@Override public Project createTempProject(Iterable<Class<? extends ProjectFacet>> facetTypes) throws IllegalStateException { Imported<ProjectProvider> buildSystems = getAddonRegistry().getServices(ProjectProvider.class); if (buildSystems.isAmbiguous()) throw new IllegalStateException( "Cannot create generic temporary project in environment where multiple build systems are available. " + "A single build system must be selected."); ProjectProvider buildSystem = buildSystems.get(); return createTempProject(buildSystem, facetTypes); }
private void startServer() { System.out.println("Calling ToolingRMIServer start..."); furnace.getAddonRegistry().getServices(ToolingRMIServer.class).get().startServer(port, Bootstrap.getVersion()); }
private GraphApiCompositeClassLoaderProvider getGraphApiCompositeClassLoaderProvider() { if (this.graphApiCompositeClassLoaderProvider == null) this.graphApiCompositeClassLoaderProvider = getFurnace().getAddonRegistry().getServices(GraphApiCompositeClassLoaderProvider.class) .get(); return this.graphApiCompositeClassLoaderProvider; }