public IExtension getExtension(String pluginId, String extensionPointName, String extensionId) { // this is just a convenience API - no need to do any sync'ing here IExtensionPoint extPoint = getExtensionPoint(pluginId, extensionPointName); if (extPoint != null) return extPoint.getExtension(extensionId); return null; }
public CallbackHandler loadCallbackHandler(String configName) { IExtensionRegistry registry = RegistryFactory.getRegistry(); // First, map config name -> callback handler ID IExtensionPoint point = registry.getExtensionPoint(POINT_MAPPING); IExtension[] extenders = point.getExtensions(); String extensionId = null; for (int i = 0; i < extenders.length; i++) { IConfigurationElement[] confEelements = extenders[i].getConfigurationElements(); if (confEelements.length != 1) continue; // TBD error message? extensionId = loadMappingEntry(confEelements[0], configName); if (extensionId != null) break; } if (extensionId == null) return null; // Next, load class specified by the callback handler ID IExtensionPoint pointCallbackHandler = registry.getExtensionPoint(POINT_HANDLER); IExtension extension = pointCallbackHandler.getExtension(extensionId); if (extension == null) return null; IConfigurationElement[] elements = extension.getConfigurationElements(); if (elements.length != 1) return null; // TBD error message? return loadHandlerClass(elements[0]); }
public CallbackHandler loadCallbackHandler(String configName) { IExtensionRegistry registry = RegistryFactory.getRegistry(); // First, map config name -> callback handler ID IExtensionPoint point = registry.getExtensionPoint(POINT_MAPPING); IExtension[] extenders = point.getExtensions(); String extensionId = null; for (int i = 0; i < extenders.length; i++) { IConfigurationElement[] confEelements = extenders[i].getConfigurationElements(); if (confEelements.length != 1) continue; // TBD error message? extensionId = loadMappingEntry(confEelements[0], configName); if (extensionId != null) break; } if (extensionId == null) return null; // Next, load class specified by the callback handler ID IExtensionPoint pointCallbackHandler = registry.getExtensionPoint(POINT_HANDLER); IExtension extension = pointCallbackHandler.getExtension(extensionId); if (extension == null) return null; IConfigurationElement[] elements = extension.getConfigurationElements(); if (elements.length != 1) return null; // TBD error message? return loadHandlerClass(elements[0]); }
@Override public IExtension getExtension(String pluginId, String extensionPointName, String extensionId) { // this is just a convenience API - no need to do any sync'ing here IExtensionPoint extPoint = getExtensionPoint(pluginId, extensionPointName); if (extPoint != null) return extPoint.getExtension(extensionId); return null; }
public IExtension getExtension(String pluginId, String extensionPointName, String extensionId) { // this is just a convenience API - no need to do any sync'ing here IExtensionPoint extPoint = getExtensionPoint(pluginId, extensionPointName); if (extPoint != null) return extPoint.getExtension(extensionId); return null; }
public IExtension getExtension(String pluginId, String extensionPointName, String extensionId) { // this is just a convenience API - no need to do any sync'ing here IExtensionPoint extPoint = getExtensionPoint(pluginId, extensionPointName); if (extPoint != null) return extPoint.getExtension(extensionId); return null; }
protected IConfigurationElement[] getExtendedConfigurationElements() { IExtensionRegistry registry = Platform.getExtensionRegistry(); IExtensionPoint exampleWizardXP = registry.getExtensionPoint(EXAMPLE_WIZARD_XP_ID); if (exampleWizardXP == null) { return new IConfigurationElement[0]; } IExtension extension = exampleWizardXP.getExtension(getWizardExtensionId()); if (extension != null) { return extension.getConfigurationElements(); } IConfigurationElement[] exampleWizardCEs = exampleWizardXP.getConfigurationElements(); return exampleWizardCEs; }
/** * Check to see that we have processors for all the steps in the given descriptor * @param descriptor the descriptor to check * @return whether or not processors for all the descriptor's steps are installed */ public static boolean canProcess(IArtifactDescriptor descriptor) { IExtensionRegistry registry = RegistryFactory.getRegistry(); IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID); if (point == null) return false; IProcessingStepDescriptor[] steps = descriptor.getProcessingSteps(); for (int i = 0; i < steps.length; i++) { if (point.getExtension(steps[i].getProcessorId()) == null) return false; } return true; }
/** * Check to see that we have processors for all the steps in the given descriptor * @param descriptor the descriptor to check * @return whether or not processors for all the descriptor's steps are installed */ public static boolean canProcess(IArtifactDescriptor descriptor) { IExtensionRegistry registry = RegistryFactory.getRegistry(); IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID); if (point == null) return false; IProcessingStepDescriptor[] steps = descriptor.getProcessingSteps(); for (int i = 0; i < steps.length; i++) { if (point.getExtension(steps[i].getProcessorId()) == null) return false; } return true; }
/** * Check to see that we have processors for all the steps in the given descriptor * @param descriptor the descriptor to check * @return whether or not processors for all the descriptor's steps are installed */ public static boolean canProcess(IArtifactDescriptor descriptor) { IExtensionRegistry registry = RegistryFactory.getRegistry(); IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID); if (point == null) return false; IProcessingStepDescriptor[] steps = descriptor.getProcessingSteps(); for (int i = 0; i < steps.length; i++) { if (point.getExtension(steps[i].getProcessorId()) == null) return false; } return true; }
/** * Check to see that we have processors for all the steps in the given descriptor * @param descriptor the descriptor to check * @return whether or not processors for all the descriptor's steps are installed */ public static boolean canProcess(IArtifactDescriptor descriptor) { IExtensionRegistry registry = RegistryFactory.getRegistry(); IExtensionPoint point = registry.getExtensionPoint(PROCESSING_STEPS_EXTENSION_ID); if (point == null) return false; IProcessingStepDescriptor[] steps = descriptor.getProcessingSteps(); for (int i = 0; i < steps.length; i++) { if (point.getExtension(steps[i].getProcessorId()) == null) return false; } return true; }