Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IConfigurationElement


      final IConfigurationElement[] configurationElements,
      final int configurationElementCount) {
    final List warningsToLog = new ArrayList(1);

    for (int i = 0; i < configurationElementCount; i++) {
      final IConfigurationElement element = configurationElements[i];

      // Read the viewer contribution identifier.
      final String id = readRequired(element, ATT_ID, warningsToLog,
          "Viewer contributions need an id"); //$NON-NLS-1$
      if (id == null) {
View Full Code Here


    if (keywordReferences == null) {
      IConfigurationElement[] references = getConfigurationElement()
          .getChildren(TAG_KEYWORD_REFERENCE);
      HashSet list = new HashSet(references.length);
      for (int i = 0; i < references.length; i++) {
        IConfigurationElement page = references[i];
        String id = page.getAttribute(IWorkbenchRegistryConstants.ATT_ID);
        if (id != null) {
          list.add(id);
        }
      }
View Full Code Here

      String id = configElements[i].getAttribute(IWorkbenchRegistryConstants.ATT_ID);
     
      // Define the initial URI spec
      String uriSpec = "toolbar:" + id; //$NON-NLS-1$
      if (configElements[i].getChildren(TAG_LOCATION).length > 0) {
        IConfigurationElement location = configElements[i].getChildren(TAG_LOCATION)[0];
        if (location.getChildren(TAG_ORDER).length > 0) {
          IConfigurationElement order = location.getChildren(TAG_ORDER)[0];
         
          String pos = order.getAttribute(IWorkbenchRegistryConstants.ATT_POSITION);
          String relTo = order.getAttribute(IWorkbenchRegistryConstants.ATT_RELATIVE_TO);
          uriSpec += "?" + pos + "=" + relTo; //$NON-NLS-1$ //$NON-NLS-2$
         
          // HACK! We expect that the new trim group is -always- relative to
          // one of the 'default' groups; indicating which trim area they're in
          MenuLocationURI uri = new MenuLocationURI("toolbar:" + relTo); //$NON-NLS-1$
View Full Code Here

   * @return <code>true</code> iff the group is positioned at the start
   * (or 'before') the entry that it is relative to. Default is true
   *
   */
  public boolean isAtStart() {
    IConfigurationElement location = additionElement.getChildren(IWorkbenchRegistryConstants.TAG_LOCATION)[0];
    if (location.getChildren(IWorkbenchRegistryConstants.TAG_ORDER).length > 0) {
      IConfigurationElement order = location.getChildren(IWorkbenchRegistryConstants.TAG_ORDER)[0];
     
      String pos = order.getAttribute(IWorkbenchRegistryConstants.ATT_POSITION);
      if (pos != null)
        return (pos.equals("start") | pos.equals("before"))//$NON-NLS-1$//$NON-NLS-2$
    }
    return true;
  }
View Full Code Here

   */
  public boolean fillMajor(IConfigurationElement widgetElement) {
    if (widgetElement.getChildren(IWorkbenchRegistryConstants.TAG_LAYOUT).length==0) {
      return false;
    }
    IConfigurationElement layout = widgetElement.getChildren(IWorkbenchRegistryConstants.TAG_LAYOUT)[0];
    String fillMajorVal = layout.getAttribute(IWorkbenchRegistryConstants.ATT_FILL_MAJOR);

    return (fillMajorVal != null && fillMajorVal.equals("true")); //$NON-NLS-1$
  }
View Full Code Here

   */
  public boolean fillMinor(IConfigurationElement widgetElement) {
    if (widgetElement.getChildren(IWorkbenchRegistryConstants.TAG_LAYOUT).length==0) {
      return false;
    }
    IConfigurationElement layout = widgetElement.getChildren(IWorkbenchRegistryConstants.TAG_LAYOUT)[0];
    String fillMinorVal = layout.getAttribute(IWorkbenchRegistryConstants.ATT_FILL_MINOR);

    return (fillMinorVal != null && fillMinorVal.equals("true")); //$NON-NLS-1$
  }
View Full Code Here

      if (!IWorkbenchRegistryConstants.TAG_WIDGET.equals(widgetElements[i].getName()))
        continue;
     
      // Define the initial URI spec
      if (widgetElements[i].getChildren(IWorkbenchRegistryConstants.TAG_LOCATION).length > 0) {
        IConfigurationElement location = widgetElements[i].getChildren(IWorkbenchRegistryConstants.TAG_LOCATION)[0];
        if (location.getChildren(IWorkbenchRegistryConstants.TAG_BAR).length > 0) {
          IConfigurationElement bar = location.getChildren(IWorkbenchRegistryConstants.TAG_BAR)[0];

          // The bar's path represents the 'group' it should go into
          String path = bar.getAttribute(IWorkbenchRegistryConstants.ATT_PATH);
          if (path != null && path.equals(getId()))
              widgetConfigs.add(widgetElements[i]);
        }
      }
    }
View Full Code Here

   
    // Get the widget config elements for this 'group'
    List widgetConfigs = getWidgetConfigs();
    for (Iterator iterator = widgetConfigs.iterator(); iterator
        .hasNext();) {
      IConfigurationElement widgetCE = (IConfigurationElement) iterator.next();
     
      // skip elements that are known to fail
      if (failedWidgets.containsKey(widgetCE))
        continue;
     
View Full Code Here

          editorDelegate = (IEditorActionDelegate) delegate;
        } else if ("org.eclipse.ui.viewActions".equals(name) //$NON-NLS-1$
            && delegate instanceof IViewActionDelegate) {
          viewDelegate = (IViewActionDelegate) delegate;
        } else if ("org.eclipse.ui.popupMenus".equals(name)) { //$NON-NLS-1$
          IConfigurationElement parent = (IConfigurationElement) element
              .getParent();
          if ("objectContribution".equals(parent.getName()) //$NON-NLS-1$
              && delegate instanceof IObjectActionDelegate) {
            objectDelegate = (IObjectActionDelegate) delegate;
          } else if (viewId == null
              && delegate instanceof IEditorActionDelegate) {
            editorDelegate = (IEditorActionDelegate) delegate;
View Full Code Here

      if (product.getId().equals(productId) && targetId[0] == null) { // we
        // found the target ID
        targetId[0] = configurationElement
            .getAttribute(IWorkbenchRegistryConstants.ATT_SPLASH_ID);
        // check all currently located splashes
        IConfigurationElement splashElement = (IConfigurationElement) idToSplash
            .get(targetId[0]);
        if (splashElement != null)
          return create(splashElement);
      }
    }
View Full Code Here

TOP

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

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.