Package org.eclipse.ui.internal.registry

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


     * @return the descriptors corresponding to the given editable working set
     *         ids
     */
    private static WorkingSetDescriptor[] getSupportedEditableDescriptors(
            String[] supportedWorkingSetIds) {
        WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
                .getWorkingSetRegistry();
        if (supportedWorkingSetIds == null) {
            return registry.getNewPageWorkingSetDescriptors();
        }
        List result = new ArrayList(supportedWorkingSetIds.length);
        for (int i = 0; i < supportedWorkingSetIds.length; i++) {
            WorkingSetDescriptor desc = registry
                    .getWorkingSetDescriptor(supportedWorkingSetIds[i]);
            if (desc != null && desc.isEditable()) {
                result.add(desc);
            }
        }
View Full Code Here


     * @since 2.1
     */
    public IWorkingSetEditWizard createWorkingSetEditWizard(
            IWorkingSet workingSet) {
        String editPageId = workingSet.getId();
        WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
                .getWorkingSetRegistry();
        IWorkingSetPage editPage = null;

        if (editPageId != null) {
            editPage = registry.getWorkingSetPage(editPageId);
        }
        // the following block kind of defeats IWorkingSet.isEditable() and it
    // doesn't make sense for there to be a default page in such a case.
   
       if (editPage == null) {
      editPage = registry.getDefaultWorkingSetPage();
      if (editPage == null) {
        return null;
      }
    }
    
View Full Code Here

     * @return the working set registry
     * @since 2.0
     */
    public WorkingSetRegistry getWorkingSetRegistry() {
        if (workingSetRegistry == null) {
            workingSetRegistry = new WorkingSetRegistry();
            workingSetRegistry.load();
        }
        return workingSetRegistry;
    }
View Full Code Here

   * @return the descriptor for this working set or <code>null</code> if it
   *         cannot be determined
   * @since 3.3
   */
  private WorkingSetDescriptor getDescriptor(String defaultId) {
    WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
        .getWorkingSetRegistry();
    String id = getId();
    if (id == null)
      id = defaultId;
    if (id == null)
      return null;

    return registry.getWorkingSetDescriptor(id);
  }
View Full Code Here

     */
    public void addPages() {
        super.addPages();

        IWizardPage page;
        WorkingSetRegistry registry = WorkbenchPlugin.getDefault().getWorkingSetRegistry();
       
        if (descriptors.length > 1) {
            page = workingSetTypePage = new WorkingSetTypePage(this.descriptors);
        } else {
            editPageId = descriptors[0].getId();
            page = workingSetEditPage = registry.getWorkingSetPage(editPageId);
        }
        page.setWizard(this);
        addPage(page);
        setForcePreviousAndNextButtons(descriptors.length > 1);
    }
View Full Code Here

    public IWizardPage getNextPage(IWizardPage page) {
        if (workingSetTypePage != null && page == workingSetTypePage) {
            String pageId = workingSetTypePage.getSelection();
            if (pageId != null) {
                if (workingSetEditPage == null || pageId != editPageId) {
                    WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
                            .getWorkingSetRegistry();
                    workingSetEditPage = registry.getWorkingSetPage(pageId);
                    addPage(workingSetEditPage);
                    editPageId = pageId;
                }
                return workingSetEditPage;
            }
View Full Code Here

   */
  protected void updateButtonAvailability() {
    List selection = getSelectedWorkingSets();
    boolean hasSelection = selection != null && !selection.isEmpty();
    boolean hasSingleSelection = hasSelection;
    WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
        .getWorkingSetRegistry();

    newButton.setEnabled(registry.hasNewPageWorkingSetDescriptor());

    removeButton.setEnabled(hasSelection);

    IWorkingSet selectedWorkingSet = null;
    if (hasSelection) {
View Full Code Here

  protected IWorkingSet[][] splitSets() {
    IWorkingSet[] allSets = getWindow().getWorkbench().getWorkingSetManager()
        .getWorkingSets();

    Map map = new HashMap();
    WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
        .getWorkingSetRegistry();

    for (int i = 0; i < allSets.length; i++) {
      String setType = allSets[i].getId();
      if (WorkbenchActivityHelper.filterItem(registry
          .getWorkingSetDescriptor(setType))) {
        continue;
      }
      List setsOfType = (List) map.get(setType);
      if (setsOfType == null) {
View Full Code Here

  public static void main(String[] args) {
    org.eclipse.ui.IWorkingSet ws = null;
    IWorkingSetManager manager = WorkbenchPlugin.getDefault()
        .getWorkingSetManager();
    WorkingSetRegistry registry = WorkbenchPlugin.getDefault()
        .getWorkingSetRegistry();
    WorkingSetDescriptor descriptor = null;
    registry.addWorkingSetDescriptor(descriptor);
   
    ImportProjectSetMainPage ip;
   
    PsfUrlStore.getInstance();
   
View Full Code Here

TOP

Related Classes of org.eclipse.ui.internal.registry.WorkingSetRegistry

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.