use of org.eclipse.core.runtime.IExtensionPoint in project liferay-ide by liferay.
the class RegistryReader method readRegistry.
public void readRegistry() {
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(pluginId, extensionPointId);
if (point != null) {
IConfigurationElement[] elements = point.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
_internalReadElement(elements[i]);
}
}
if (_JEM_PLUGIN_ID.equals(pluginId)) {
return;
}
point = Platform.getExtensionRegistry().getExtensionPoint(_JEM_PLUGIN_ID, extensionPointId);
if (point == null) {
return;
}
IConfigurationElement[] elements = point.getConfigurationElements();
for (int i = 0; i < elements.length; i++) {
_internalReadElement(elements[i]);
}
}
use of org.eclipse.core.runtime.IExtensionPoint in project liferay-ide by liferay.
the class NewPluginProjectDropDownAction method getNewProjectActions.
public static NewWizardAction[] getNewProjectActions() {
ArrayList<NewWizardAction> containers = new ArrayList<>();
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, PL_NEW);
if (extensionPoint != null) {
IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
for (IConfigurationElement element : elements) {
if (element.getName().equals(TAG_WIZARD) && _isProjectWizard(element, getTypeAttribute())) {
containers.add(new NewWizardAction(element));
}
}
}
NewWizardAction[] actions = (NewWizardAction[]) containers.toArray(new NewWizardAction[containers.size()]);
Arrays.sort(actions);
return actions;
}
use of org.eclipse.core.runtime.IExtensionPoint in project liferay-ide by liferay.
the class NewPluginProjectDropDownAction method getActionFromDescriptors.
public NewWizardAction[] getActionFromDescriptors(String typeAttribute) {
ArrayList<NewWizardAction> containers = new ArrayList<>();
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(PlatformUI.PLUGIN_ID, PL_NEW);
if (extensionPoint != null) {
IConfigurationElement[] elements = extensionPoint.getConfigurationElements();
for (IConfigurationElement element : elements) {
if (element.getName().equals(TAG_WIZARD) && _isLiferayArtifactWizard(element, typeAttribute)) {
containers.add(new NewWizardAction(element));
}
}
}
NewWizardAction[] actions = (NewWizardAction[]) containers.toArray(new NewWizardAction[containers.size()]);
Arrays.sort(actions);
return actions;
}
use of org.eclipse.core.runtime.IExtensionPoint in project jbosstools-hibernate by jbosstools.
the class ServiceLookup method initialize.
private static void initialize() {
SERVICES_MAP = new HashMap<String, IService>();
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(SERVICES_EXTENSION_ID);
for (IExtension extension : extensionPoint.getExtensions()) {
for (IConfigurationElement configurationElement : extension.getConfigurationElements()) {
try {
Object object = configurationElement.createExecutableExtension("class");
String name = configurationElement.getAttribute("name");
if (object != null && name != null && object instanceof IService) {
SERVICES_MAP.put(name, (IService) object);
}
} catch (CoreException e) {
HibernateServicePlugin.getDefault().log(e);
}
}
}
ArrayList<String> list = new ArrayList<String>(SERVICES_MAP.keySet());
Collections.sort(list);
VERSIONS = list.toArray(new String[list.size()]);
DEFAULT_SERVICE = SERVICES_MAP.get(VERSIONS[VERSIONS.length - 1]);
}
use of org.eclipse.core.runtime.IExtensionPoint in project jbosstools-hibernate by jbosstools.
the class RuntimeServiceManager method initializeServicesMap.
private void initializeServicesMap() {
servicesMap = new HashMap<String, IService>();
initiallyEnabledVersions = new HashSet<String>();
IExtensionRegistry extensionRegistry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = extensionRegistry.getExtensionPoint(SERVICES_EXTENSION_ID);
for (IExtension extension : extensionPoint.getExtensions()) {
for (IConfigurationElement configurationElement : extension.getConfigurationElements()) {
try {
Object object = configurationElement.createExecutableExtension("class");
String name = configurationElement.getAttribute("name");
if (object != null && name != null && object instanceof IService) {
servicesMap.put(name, (IService) object);
if (!"true".equals(configurationElement.getAttribute("disabled"))) {
initiallyEnabledVersions.add(name);
}
}
} catch (CoreException e) {
HibernateServicePlugin.getDefault().log(e);
}
}
}
}
Aggregations