Examples of FilteredTree


Examples of org.eclipse.ui.dialogs.FilteredTree

    int selectionModel = -1;
    if ((settings & ALLOW_MULTISELECTION) != 0)
      selectionModel = SWT.MULTI;
    else
      selectionModel = SWT.SINGLE;
    FilteredTree tree = new FilteredTree(composite, selectionModel | SWT.BORDER,
        new PatternFilter(), true);
    branchTree = tree.getViewer();
    branchTree
        .setLabelProvider(new RepositoriesViewStyledCellLabelProvider());
    branchTree.setContentProvider(new RepositoriesViewContentProvider());
    ColumnViewerToolTipSupport.enableFor(branchTree);
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

    GridDataFactory.fillDefaults().grab(true, true).applyTo(tableComposite);

    final TreeColumnLayout layout = new TreeColumnLayout();

    FilteredTree filteredTree = new FilteredTree(tableComposite, SWT.NONE
        | SWT.BORDER | SWT.FULL_SELECTION, new PatternFilter(), true) {
      @Override
      protected void createControl(Composite composite, int treeStyle) {
        super.createControl(composite, treeStyle);
        treeComposite.setLayout(layout);
      }
    };

    toolkit.adapt(filteredTree);
    refLogTableTreeViewer = filteredTree.getViewer();
    refLogTableTreeViewer.getTree().setLinesVisible(true);
    refLogTableTreeViewer.getTree().setHeaderVisible(true);
    refLogTableTreeViewer
        .setContentProvider(new ReflogViewContentProvider());
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

        main);

    GridDataFactory.fillDefaults().grab(true, true).applyTo(main);

    // use a filtered tree
    FilteredTree tree = new FilteredTree(main, SWT.SINGLE | SWT.BORDER
        | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), true);

    tv = tree.getViewer();
    GridDataFactory.fillDefaults().grab(true, true).applyTo(tree);
    tv.setContentProvider(new RepositoriesViewContentProvider() {
      // we never show children, only the Repository nodes
      @Override
      public Object[] getChildren(Object parentElement) {
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

    GridLayoutFactory.fillDefaults().numColumns(2).margins(0, 0)
        .applyTo(main);

    GridDataFactory.fillDefaults().grab(true, true).applyTo(main);
    // use a filtered tree
    FilteredTree tree = new FilteredTree(main, SWT.SINGLE | SWT.BORDER
        | SWT.H_SCROLL | SWT.V_SCROLL, new PatternFilter(), true);

    tv = tree.getViewer();
    GridDataFactory.fillDefaults().grab(true, true).applyTo(tree);
    tv.setContentProvider(new RepositoryLocationContentProvider());

    tv.setLabelProvider(new RepositoryLocationLabelProvider());
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

      data.heightHint = SIZING_LISTS_HEIGHT;
    }
    composite.setLayoutData(data);

    filteredTreeFilter = new WizardPatternFilter();
    FilteredTree filterTree = new FilteredTree(composite, SWT.SINGLE
        | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, filteredTreeFilter,
        true);

    final TreeViewer treeViewer = filterTree.getViewer();
    treeViewer.setContentProvider(new WizardContentProvider());
    treeViewer.setLabelProvider(new WorkbenchLabelProvider());
    treeViewer.addSelectionChangedListener(this);

    ArrayList inputArray = new ArrayList();

    for (int i = 0; i < primaryWizards.length; i++) {
      inputArray.add(primaryWizards[i]);
    }

    if (!projectsOnly) {

      IWizardCategory phpCategory = wizardCategories
          .findCategory(new Path("org.eclipse.php.project.ui")); //$NON-NLS-1$
      // IWizardCategory[] children = wizardCategories.getCategories();
      // for (int i = 0; i < children.length; i++) {
      // if ("org.eclipse.php.project.ui".equals(children[i].getId())) {
      // phpCategory = children[i];
      // }
      // }
      if (phpCategory != null) {
        IWizardDescriptor[] wizards = phpCategory.getWizards();
        for (int i = 0; i < wizards.length; i++) {
          inputArray.add(wizards[i]);
        }
        inputArray = sortWizard(inputArray);
        IWizardCategory[] categories = phpCategory.getCategories();
        for (int i = 0; i < categories.length; i++) {
          inputArray.add(categories[i]);
        }
        IWizardDescriptor folder = wizardCategories
            .findWizard("org.eclipse.ui.wizards.new.folder"); //$NON-NLS-1$
        if (folder != null) {
          inputArray.add(folder);
        }
      }
      NewWizardCollectionComparator comparator = NewWizardCollectionComparator.INSTANCE;
      Set set = new HashSet();
      set.addAll(inputArray);
      comparator.setPrimaryWizards(set);
      treeViewer.setComparator(comparator);
    } else {
      NewWizardCollectionComparator comparator = NewWizardCollectionComparator.INSTANCE;
      comparator.setPrimaryWizards(null);
      treeViewer.setComparator(comparator);
    }

    boolean expandTop = false;

    if (wizardCategories != null) {
      if (wizardCategories.getParent() == null) {
        IWizardCategory[] children = wizardCategories.getCategories();
        for (int i = 0; i < children.length; i++) {
          if (!"org.eclipse.php.project.ui".equals(children[i] //$NON-NLS-1$
              .getId())) {
            inputArray.add(children[i]);
          }
        }
      } else {
        expandTop = true;
        inputArray.add(wizardCategories);
      }
    }

    // ensure the category is expanded. If there is a remembered expansion
    // it will be set later.
    if (expandTop) {
      treeViewer.setAutoExpandLevel(2);
    }

    AdaptableList input = new AdaptableList(inputArray);

    treeViewer.setInput(input);

    filterTree.setBackground(parent.getDisplay().getSystemColor(
        SWT.COLOR_WIDGET_BACKGROUND));

    treeViewer.getTree().setFont(parent.getFont());

    treeViewer.addDoubleClickListener(new IDoubleClickListener() {
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

        openLogFolderAction = new OpenLogFolderAction();
        toolBarManager.add(openLogFolderAction);
    }

    private void initViewer(Composite parent) {
        logFilteredTree = new FilteredTree(parent, SWT.FULL_SELECTION, new PatternFilter() {
            @Override
            protected boolean isLeafMatch(Viewer viewer, Object element) {
                if (element instanceof LogEntry) {
                    LogEntry logEntry = (LogEntry) element;
                    String message = logEntry.getMessage();
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

           
            this.managedForm = managedForm;
           
            final MasterDetailsContentOutline contentTree = outline();
           
            final FilteredTree filteredTree = createContentOutline( client, contentTree, true );
            this.treeViewer = filteredTree.getViewer();
            this.tree = this.treeViewer.getTree();
           
            this.sectionPart = new org.eclipse.ui.forms.SectionPart( this );
            this.managedForm.addPart( this.sectionPart );
   
            contentTree.attach
            (
                new FilteredListener<MasterDetailsContentOutline.SelectionChangedEvent>()
                {
                    @Override
                    protected void handleTypedEvent( final MasterDetailsContentOutline.SelectionChangedEvent event )
                    {
                        handleSelectionChangedEvent( event.selection() );
                    }
                }
            );
           
            final ToolBar toolbar = new ToolBar( this, SWT.FLAT | SWT.HORIZONTAL );
            setTextClient( toolbar );
           
            final SapphireActionGroup actions = part.getActions( CONTEXT_EDITOR_PAGE_OUTLINE_HEADER );
           
            final SapphireActionPresentationManager actionPresentationManager
                = new SapphireActionPresentationManager( MasterDetailsEditorPage.this.presentation, actions );
           
            final SapphireToolBarActionPresentation toolbarActionsPresentation = new SapphireToolBarActionPresentation( actionPresentationManager );
           
            toolbarActionsPresentation.setToolBar( toolbar );
            toolbarActionsPresentation.render();
           
            final SapphireKeyboardActionPresentation keyboardActionsPresentation = new SapphireKeyboardActionPresentation( actionPresentationManager );
            keyboardActionsPresentation.attach( filteredTree.getFilterControl() );
            keyboardActionsPresentation.render();
           
            toolkit.paintBordersFor( this );
            setClient( client );
           
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

  public void setInitialFilter(String initialFilter) {
    fInitialFilter = initialFilter;
  }

  protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
    FilteredTree tree = new FilteredTreeWithFilter(parent, style,
        fInitialFilter, fIsDeepFiltering);
    tree.setLayoutData(new GridData(GridData.FILL_BOTH));

    applyDialogFont(tree);

    TreeViewer viewer = tree.getViewer();
    SWTUtil.setAccessibilityText(viewer.getControl(),
        Strings.removeMnemonicIndicator(getMessage()));
    return viewer;
  }
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

  }

  private TreeViewer createViewer(Composite composite) {
    PatternFilter patternFilter = new PatternFilter();
    // patternFilter.setIncludeLeadingWildcard(true);
    FilteredTree filteredTree = new FilteredTree(composite, SWT.SINGLE
        | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, patternFilter, true);
    return filteredTree.getViewer();
  }
View Full Code Here

Examples of org.eclipse.ui.dialogs.FilteredTree

          return wordMatches(labelText);
        }
      };

      /* Filtered Tree to make it easier to chose an element */
      fFilteredTree = new FilteredTree(composite, SWT.BORDER, filter) {
        @Override
        protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
          fViewer = new CheckboxTreeViewer(parent, SWT.BORDER) {
            @Override
            public void refresh(boolean updateLabels) {
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.