Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtensionRegistry


   * @return IConfigurationElement[]
   */
  public IConfigurationElement[] getSettingTransfers() {

    settingsTransfers = new ArrayList();
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    readRegistry(registry, WorkbenchPlugin.PI_WORKBENCH,
        IWorkbenchRegistryConstants.PL_PREFERENCE_TRANSFER);

    IConfigurationElement[] transfers = new IConfigurationElement[settingsTransfers
        .size()];
View Full Code Here


 
  public void readTrimAdditions() {
    if (menuService == null)
      return;
   
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    final IConfigurationElement[] configElements = registry
        .getConfigurationElementsFor(EXTENSION_MENUS);

    // Create a cache entry for every menu addition
    for (int i = 0; i < configElements.length; i++) {
      // Only process 'group' entries
View Full Code Here

      }
    }
  }
 
  public void readAdditions() {   
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    final IConfigurationElement[] menusExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_MENUS);

    // Create a cache entry for every menu addition
    for (int i = 0; i < menusExtensionPoint.length; i++) {
      if (PL_MENU_CONTRIBUTION.equals(menusExtensionPoint[i].getName())) {
View Full Code Here

   
    // Return to the 'root' of the config tree and gather all elements
    // for this 'group'. Note that while this is sub-optimal
    // performace-wise that there are expected to be -very-
    // few contributions in total (i.e. 10's, not 100's)
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    final IConfigurationElement[] widgetElements = registry
        .getConfigurationElementsFor(IWorkbenchRegistryConstants.EXTENSION_MENUS);

    // Locate all 'widget' additions appropriate for -this- group
    for (int i = 0; i < widgetElements.length; i++) {
      // Only process 'widget' entries
View Full Code Here

   */
  protected final void read() {
    super.read();

    // Create the extension registry mementos.
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    int activeSchemeElementCount = 0;
    int bindingDefinitionCount = 0;
    int schemeDefinitionCount = 0;
    final IConfigurationElement[][] indexedConfigurationElements = new IConfigurationElement[3][];

    // Sort the bindings extension point based on element name.
    final IConfigurationElement[] bindingsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_BINDINGS);
    for (int i = 0; i < bindingsExtensionPoint.length; i++) {
      final IConfigurationElement configurationElement = bindingsExtensionPoint[i];
      final String name = configurationElement.getName();

      // Check if it is a binding definition.
      if (TAG_KEY.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_BINDING_DEFINITIONS, bindingDefinitionCount++);
      } else
      // Check to see if it is a scheme definition.
      if (TAG_SCHEME.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements, INDEX_SCHEME_DEFINITIONS,
            schemeDefinitionCount++);
      }

    }

    // Sort the commands extension point based on element name.
    final IConfigurationElement[] commandsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_COMMANDS);
    for (int i = 0; i < commandsExtensionPoint.length; i++) {
      final IConfigurationElement configurationElement = commandsExtensionPoint[i];
      final String name = configurationElement.getName();

      // Check if it is a binding definition.
      if (TAG_KEY_BINDING.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_BINDING_DEFINITIONS, bindingDefinitionCount++);

        // Check if it is a scheme defintion.
      } else if (TAG_KEY_CONFIGURATION.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements, INDEX_SCHEME_DEFINITIONS,
            schemeDefinitionCount++);

        // Check if it is an active scheme identifier.
      } else if (TAG_ACTIVE_KEY_CONFIGURATION.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements, INDEX_ACTIVE_SCHEME,
            activeSchemeElementCount++);
      }
    }

    /*
     * Sort the accelerator configuration extension point into the scheme
     * definitions.
     */
    final IConfigurationElement[] acceleratorConfigurationsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_ACCELERATOR_CONFIGURATIONS);
    for (int i = 0; i < acceleratorConfigurationsExtensionPoint.length; i++) {
      final IConfigurationElement configurationElement = acceleratorConfigurationsExtensionPoint[i];
      final String name = configurationElement.getName();

View Full Code Here

   */
  protected final void read() {
    super.read();

    // Create the extension registry mementos.
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    int imageCount = 0;
    final IConfigurationElement[][] indexedConfigurationElements = new IConfigurationElement[1][];

    // Sort the commands extension point based on element name.
    final IConfigurationElement[] commandImagesExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_COMMAND_IMAGES);
    for (int i = 0; i < commandImagesExtensionPoint.length; i++) {
      final IConfigurationElement configurationElement = commandImagesExtensionPoint[i];
      final String name = configurationElement.getName();

View Full Code Here

   */
  protected final void read() {
    super.read();

    // Create the extension registry mementos.
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    int commandDefinitionCount = 0;
    int categoryDefinitionCount = 0;
    int parameterTypeDefinitionCount = 0;
    final IConfigurationElement[][] indexedConfigurationElements = new IConfigurationElement[3][];

    // Sort the commands extension point based on element name.
    final IConfigurationElement[] commandsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_COMMANDS);
    for (int i = 0; i < commandsExtensionPoint.length; i++) {
      final IConfigurationElement configurationElement = commandsExtensionPoint[i];
      final String name = configurationElement.getName();

      // Check if it is a binding definition.
      if (TAG_COMMAND.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_COMMAND_DEFINITIONS, commandDefinitionCount++);
      } else if (TAG_CATEGORY.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_CATEGORY_DEFINITIONS, categoryDefinitionCount++);
      } else if (TAG_COMMAND_PARAMETER_TYPE.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_PARAMETER_TYPE_DEFINITIONS,
            parameterTypeDefinitionCount++);
      }
    }

    final IConfigurationElement[] actionDefinitionsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_ACTION_DEFINITIONS);
    for (int i = 0; i < actionDefinitionsExtensionPoint.length; i++) {
      final IConfigurationElement configurationElement = actionDefinitionsExtensionPoint[i];
      final String name = configurationElement.getName();

View Full Code Here

   * from withing the getProperty method which is synchronized
   */
  /* package */ IPropertyTester[] loadTesters(Class type) {
    if (fConfigurationElementMap == null) {
      fConfigurationElementMap= new HashMap();
      IExtensionRegistry registry= Platform.getExtensionRegistry();
      IConfigurationElement[] ces= registry.getConfigurationElementsFor(
        ExpressionPlugin.getPluginId(),
        fExtensionPoint);
      for (int i= 0; i < ces.length; i++) {
        IConfigurationElement config= ces[i];
        String typeAttr= config.getAttribute(TYPE);
View Full Code Here

    Expression cachedExpression= (Expression)getCache().get(id);
    if (cachedExpression != null) {
      return cachedExpression;
    }

    IExtensionRegistry registry= Platform.getExtensionRegistry();
    IConfigurationElement[] ces= registry.getConfigurationElementsFor("org.eclipse.core.expressions", "definitions"); //$NON-NLS-1$ //$NON-NLS-2$

    Expression foundExpression= null;
    for (int i= 0; i < ces.length; i++) {
      String cid= ces[i].getAttribute("id"); //$NON-NLS-1$
      if (cid != null && cid.equals(id)) {
View Full Code Here

     */
    private void initEntryEditorExtensions()
    {
        entryEditorExtensions = new HashMap<String, EntryEditorExtension>();

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint( BrowserUIConstants.ENTRY_EDITOR_EXTENSION_POINT );
        IConfigurationElement[] members = extensionPoint.getConfigurationElements();

        // For each extension:
        for ( int m = 0; m < members.length; m++ )
        {
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.IExtensionRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.