Examples of WizardCollectionElement


Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

    }
    for (int i = 0; i < objects.length; i++) {
      Object object = objects[i];
      if (object instanceof WizardCollectionElement) {
        // TODO: should we move child wizards to the "other" node?
        WizardCollectionElement collection = (WizardCollectionElement) object;
        collection.getParentCollection().remove(collection);
      } else if (object instanceof WorkbenchWizardElement) {
        WorkbenchWizardElement wizard = (WorkbenchWizardElement) object;
        WizardCollectionElement parent = wizard.getCollectionElement();
        if (parent != null) {
          parent.remove(wizard);
        }
        IWizardDescriptor[] primaryWizards = getPrimaryWizards();
        for (int j = 0; j < primaryWizards.length; j++) {
          if (primaryWizards[j] == wizard) {
            WorkbenchWizardElement[] newPrimary = new WorkbenchWizardElement[primaryWizards.length - 1];
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

  public Object[] getChildren(Object parentElement) {
        if (parentElement instanceof WizardCollectionElement) {
            @SuppressWarnings("rawtypes")
      ArrayList list = new ArrayList();
            WizardCollectionElement element = (WizardCollectionElement) parentElement;
           
            if(!((WizardCollectionElement) parentElement).getId().equals("cgfiles")&&
                !((WizardCollectionElement) parentElement).getId().equals("xvrengine.category.wizards.xvr")&&
                !((WizardCollectionElement) parentElement).getId().equals("xvrengine.category.wizards.html")&&
                !((WizardCollectionElement) parentElement).getId().equals("xvrengine.category.wizards.others"))
              return new Object[0];
            Object[] childCollections = element.getChildren();
            for (int i = 0; i < childCollections.length; i++) {
                handleChild(childCollections[i], list);
            }

            Object[] childWizards = element.getWizards();
            for (int i = 0; i < childWizards.length; i++) {
                handleChild(childWizards[i], list);
            }

            // flatten lists with only one category
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

public class XVRWizardTreeSorter extends ViewerSorter {

  @Override
  public int category(Object element) {
    if (element instanceof WizardCollectionElement){
      WizardCollectionElement collection = (WizardCollectionElement) element;
      String id = collection.getId();
      if(id.equals("xvrengine.category.wizards.xvr"))
        return 0;
      if(id.equals("cgfiles"))
        return 1;
      if(id.equals("xvrengine.category.wizards.html"))
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

     * @param parent
     * @param element
     * @since 3.1
     */
    private WizardCollectionElement createCollectionElement(WizardCollectionElement parent, IConfigurationElement element) {
        WizardCollectionElement newElement = new WizardCollectionElement(
        element, parent);

        parent.add(newElement);
        return newElement;   
  }
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

     @param label java.lang.String
     */
    protected WizardCollectionElement createCollectionElement(
            WizardCollectionElement parent, String id, String pluginId,
            String label) {
        WizardCollectionElement newElement = new WizardCollectionElement(id,
                pluginId, label, parent);

        parent.add(newElement);
        return newElement;
    }
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

    /**
     * Creates empty element collection. Overrider to fill
     * initial elements, if needed.
     */
    protected void createEmptyWizardCollection() {
        wizardElements = new WizardCollectionElement("root", null, "root", null);//$NON-NLS-2$//$NON-NLS-1$
    }
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

    /**
     * Save new category definition.
     */
    private void finishCategory(Category category) {
        String[] categoryPath = category.getParentPath();
        WizardCollectionElement parent = wizardElements; // ie.- root

        // Traverse down into parent category. 
        if (categoryPath != null) {
            for (int i = 0; i < categoryPath.length; i++) {
                WizardCollectionElement tempElement = getChildWithID(parent,
                        categoryPath[i]);
                if (tempElement == null) {
                    // The parent category is invalid.  By returning here the
                    // category will be dropped and any wizard within the category
                    // will be added to the "Other" category.
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

        StringTokenizer familyTokenizer = new StringTokenizer(
                getCategoryStringFor(config), CATEGORY_SEPARATOR);

        // use the period-separated sections of the current Wizard's category
        // to traverse through the NamedSolution "tree" that was previously created
        WizardCollectionElement currentCollectionElement = wizardElements; // ie.- root
        boolean moveToOther = false;

        while (familyTokenizer.hasMoreElements()) {
            WizardCollectionElement tempCollectionElement = getChildWithID(
                    currentCollectionElement, familyTokenizer.nextToken());

            if (tempCollectionElement == null) { // can't find the path; bump it to uncategorized
                moveToOther = true;
                break;
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

     */
    protected WizardCollectionElement getChildWithID(
            WizardCollectionElement parent, String id) {
        Object[] children = parent.getChildren(null);
        for (int i = 0; i < children.length; ++i) {
            WizardCollectionElement currentChild = (WizardCollectionElement) children[i];
            if (currentChild.getId().equals(id)) {
        return currentChild;
      }
        }
        return null;
    }
View Full Code Here

Examples of org.eclipse.ui.internal.dialogs.WizardCollectionElement

    /**
     *  Moves given element to "Other" category, previously creating one if missing.
     */
    protected void moveElementToUncategorizedCategory(
            WizardCollectionElement root, WorkbenchWizardElement element) {
        WizardCollectionElement otherCategory = getChildWithID(root,
                UNCATEGORIZED_WIZARD_CATEGORY);

        if (otherCategory == null) {
      otherCategory = createCollectionElement(root,
                    UNCATEGORIZED_WIZARD_CATEGORY, null,
                    UNCATEGORIZED_WIZARD_CATEGORY_LABEL);
    }

        otherCategory.add(element);
        element.setParent(otherCategory);
    }
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.