private static void registerRGBProfiles(ModuleContext moduleContext) throws CoreException { ExtensionPoint rgbExtensionPoint = moduleContext.getModule().getExtensionPoint("rgbProfiles"); Extension[] rgbExtensions = rgbExtensionPoint.getExtensions(); RGBImageProfileManager profileManager = RGBImageProfileManager.getInstance(); for (Extension extension : rgbExtensions) { ConfigurationElement confElem = extension.getConfigurationElement(); ConfigurationElement[] rgbElements = confElem.getChildren("rgbProfile"); for (ConfigurationElement rgbElement : rgbElements) { RGBImageProfile rgbImageProfile = new RGBImageProfile(); rgbImageProfile.configure(rgbElement); profileManager.addProfile(rgbImageProfile); } } }
private void registerHelpSets(ModuleContext moduleContext) { this.helpSetRegistry = new TreeNode<>(""); ExtensionPoint hsExtensionPoint = moduleContext.getModule().getExtensionPoint("helpSets"); Extension[] hsExtensions = hsExtensionPoint.getExtensions(); for (Extension extension : hsExtensions) { ConfigurationElement confElem = extension.getConfigurationElement(); ConfigurationElement[] helpSetElements = confElem.getChildren("helpSet"); for (ConfigurationElement helpSetElement : helpSetElements) { final Module declaringModule = extension.getDeclaringModule(); if (declaringModule.getState().is(ModuleState.RESOLVED)) { registerHelpSet(helpSetElement, declaringModule); } } } addNodeToHelpSys(helpSetRegistry); }