Examples of ViewRegistry


Examples of org.eclipse.ui.internal.registry.ViewRegistry

     * @return IViewRegistry the view registry for the
     * receiver.
     */
    public IViewRegistry getViewRegistry() {
        if (viewRegistry == null) {
            viewRegistry = new ViewRegistry();
        }
        return viewRegistry;
    }
View Full Code Here

Examples of org.eclipse.ui.internal.registry.ViewRegistry

                .getArray(STORE_EXPANDED_CATEGORIES_ID);
        if (expandedCategoryIds == null) {
      return;
    }

        ViewRegistry reg = (ViewRegistry) viewReg;
        ArrayList categoriesToExpand = new ArrayList(expandedCategoryIds.length);
        for (int i = 0; i < expandedCategoryIds.length; i++) {
            IViewCategory category = reg.findCategory(expandedCategoryIds[i]);
            if (category != null) {
        categoriesToExpand.add(category);
      }
        }

        if (!categoriesToExpand.isEmpty()) {
      filteredTree.getViewer().setExpandedElements(categoriesToExpand.toArray());
    }
       
        String selectedViewId = settings.get(STORE_SELECTED_VIEW_ID);
        if (selectedViewId != null) {
            IViewDescriptor viewDesc = reg.find(selectedViewId);
            if (viewDesc != null) {
                filteredTree.getViewer().setSelection(new StructuredSelection(viewDesc), true);
            }
        }
    }
View Full Code Here

Examples of org.sonatype.nexus.componentviews.ViewRegistry

  /**
   * Reloading a view in response to a configuration change.
   */
  public void reloadView() {
    final ViewFactorySource factorySource = mock(ViewFactorySource.class);
    final ViewRegistry viewRegistry = mock(ViewRegistry.class);

    // A changed (and persisted) configuration created by an admin
    final ViewConfig config = mock(ViewConfig.class);

    final ViewFactory factory = factorySource.getFactory(config.getFactoryName());
    final View newView = factory.createView(config);

    // De-register the existing view
    final View existingView = viewRegistry.findViewByName(config.getViewName());
    if (existingView != null) {
      viewRegistry.unregisterView(existingView);
    }
    // Register its replacement
    viewRegistry.registerView(newView);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.