Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IExtensionRegistry


     */
    private OtpErlangBinary getDebuggerBeam(final String module) {
        final String beamname = module + ".beam";
        final Bundle bundle = Platform.getBundle("org.erlide.kernel.debugger");

        final IExtensionRegistry reg = RegistryFactory.getRegistry();
        final IConfigurationElement[] els = reg.getConfigurationElementsFor(
                BackendActivator.PLUGIN_ID, "codepath");

        // TODO: this code assumes that the debugged debugTarget and the
        // erlide-plugin uses the same Erlang version, how can we escape this?

View Full Code Here


  private void readRegistry() {
    readRegistry(EXTENSION_POINT_ID);
  }

  private void readRegistry(String extensionPointId) {
    IExtensionRegistry pluginRegistry = Platform.getExtensionRegistry();
    IExtensionPoint point = pluginRegistry.getExtensionPoint(XMLUIPlugin.ID, extensionPointId);
    if (point != null) {
      IConfigurationElement[] elements = point.getConfigurationElements();
      for (int i = 0; i < elements.length; i++) {
        readElement(elements[i]);
      }
View Full Code Here

    private static final long serialVersionUID = ExtensionPointList.class.hashCode();
    /**
     * Construct <code>ExtensionPointIterator</code>.
     */
    private ExtensionPointList( String xpid ) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null)
            return;

        // For each extension ...
        for( IExtension extension : extensionPoint.getExtensions() ) {
View Full Code Here

     * @param plugin plugin processing this extention point
     * @param xpid The id of the ExtensionPoint for which the extensions are to be processed
     * @param processor The object that wishes to process the extension for the ExtensionPoint
     */
    public static void process( Plugin plugin, String xpid, ExtensionPointProcessor processor ) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null)
            return;
        IExtension[] extensions = extensionPoint.getExtensions();

        // For each extension ...
View Full Code Here

     * @param xpid
     * @param itemCreator Used to process extention points into items for a list
     * @return List
     */
    public static List list( String xpid, ExtensionPointItemCreator itemCreator ) {
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint extensionPoint = registry.getExtensionPoint(xpid);
        if (extensionPoint == null) {
            return Collections.EMPTY_LIST;
        }
        IExtension[] extensions = extensionPoint.getExtensions();
        List<Object> list = new ArrayList<Object>();
View Full Code Here

            graphicalViewer.createControl(composite);
            graphicalViewer.getControl().setBackground(ColorConstants.listBackground);
            graphicalViewer.setRootEditPart(new ScalableRootEditPart());
            IJavaProject javaProject = getJavaProject(projectName);
           
            IExtensionRegistry reg = Platform.getExtensionRegistry();
            IConfigurationElement[] extensions =
                reg.getConfigurationElementsFor(
                    "org.drools.eclipse.processExtension");
            for (IConfigurationElement element: extensions) {
                try {
                    ProcessExtension processExtension = (ProcessExtension)
                        element.createExecutableExtension("className");
View Full Code Here

     *
     * @param mng the manager to read into
     */
    public void readPopupContributors(ObjectActionContributorManager mng) {
        setManager(mng);
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        readRegistry(registry, PlatformUI.PLUGIN_ID,
                IWorkbenchRegistryConstants.PL_POPUP_MENU);
    }
View Full Code Here

     * @return the viewer drop adapter
     */
    protected static IDropActionDelegate getPluginAdapter(
            PluginTransferData data) throws CoreException {

        IExtensionRegistry registry = Platform.getExtensionRegistry();
        String adapterName = data.getExtensionId();
        IExtensionPoint xpt = registry.getExtensionPoint(PlatformUI.PLUGIN_ID,
                IWorkbenchRegistryConstants.PL_DROP_ACTIONS);
        IExtension[] extensions = xpt.getExtensions();
        for (int i = 0; i < extensions.length; i++) {
            IConfigurationElement[] configs = extensions[i]
                    .getConfigurationElements();
View Full Code Here

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

    // Create the extension registry mementos.
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    int commandDefinitionCount = 0;
    int handlerDefinitionCount = 0;
    int handlerSubmissionCount = 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 handler submission or a command definition.
      if (TAG_HANDLER_SUBMISSION.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_HANDLER_SUBMISSIONS, handlerSubmissionCount++);
      } else if (TAG_COMMAND.equals(name)) {
        addElementToIndexedArray(configurationElement,
            indexedConfigurationElements,
            INDEX_COMMAND_DEFINITIONS, commandDefinitionCount++);
      }
    }

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

View Full Code Here

  public final void read() {
    clear();
    LegacyActionPersistence.super.read();

    // Create the extension registry mementos.
    final IExtensionRegistry registry = Platform.getExtensionRegistry();
    int actionSetCount = 0;
    int editorContributionCount = 0;
    int objectContributionCount = 0;
    int viewContributionCount = 0;
    int viewerContributionCount = 0;
    final IConfigurationElement[][] indexedConfigurationElements = new IConfigurationElement[5][];

    // Sort the actionSets extension point.
    final IConfigurationElement[] actionSetsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_ACTION_SETS);
    for (int i = 0; i < actionSetsExtensionPoint.length; i++) {
      final IConfigurationElement element = actionSetsExtensionPoint[i];
      final String name = element.getName();
      if (TAG_ACTION_SET.equals(name)) {
        addElementToIndexedArray(element, indexedConfigurationElements,
            INDEX_ACTION_SETS, actionSetCount++);
      }
    }

    // Sort the editorActions extension point.
    final IConfigurationElement[] editorActionsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_EDITOR_ACTIONS);
    for (int i = 0; i < editorActionsExtensionPoint.length; i++) {
      final IConfigurationElement element = editorActionsExtensionPoint[i];
      final String name = element.getName();
      if (TAG_EDITOR_CONTRIBUTION.equals(name)) {
        addElementToIndexedArray(element, indexedConfigurationElements,
            INDEX_EDITOR_CONTRIBUTIONS, editorContributionCount++);
      }
    }

    // Sort the popupMenus extension point.
    final IConfigurationElement[] popupMenusExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_POPUP_MENUS);
    for (int i = 0; i < popupMenusExtensionPoint.length; i++) {
      final IConfigurationElement element = popupMenusExtensionPoint[i];
      final String name = element.getName();
      if (TAG_OBJECT_CONTRIBUTION.equals(name)) {
        addElementToIndexedArray(element, indexedConfigurationElements,
            INDEX_OBJECT_CONTRIBUTIONS, objectContributionCount++);
      } else if (TAG_VIEWER_CONTRIBUTION.equals(name)) {
        addElementToIndexedArray(element, indexedConfigurationElements,
            INDEX_VIEWER_CONTRIBUTIONS, viewerContributionCount++);
      }
    }

    // Sort the viewActions extension point.
    final IConfigurationElement[] viewActionsExtensionPoint = registry
        .getConfigurationElementsFor(EXTENSION_VIEW_ACTIONS);
    for (int i = 0; i < viewActionsExtensionPoint.length; i++) {
      final IConfigurationElement element = viewActionsExtensionPoint[i];
      final String name = element.getName();
      if (TAG_VIEW_CONTRIBUTION.equals(name)) {
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.