Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.TreeViewer


        // Element passes the filter if the string matcher is undefined or the
        // viewer is not a tree viewer
        if (fStringMatcher == null || !(viewer instanceof TreeViewer)) {
            return true;
        }
        final TreeViewer treeViewer = (TreeViewer) viewer;
        // Match the pattern against the label of the given element
        final String matchName = ((ILabelProvider) treeViewer.getLabelProvider())
                .getText(element);
        // Element passes the filter if it matches the pattern
        if (matchName != null && fStringMatcher.match(matchName)) {
            return true;
        }
View Full Code Here


                btnBrowse.setLayoutData(formData);
            }
            btnBrowse.setText("Browse...");
        }
        {
            final TreeViewer treeViewer = new TreeViewer(sourceComposite, SWT.BORDER);
            final Tree sources_tree = treeViewer.getTree();
            {
                final FormData formData = new FormData();
                formData.left = new FormAttachment(0, 10);
                formData.right = new FormAttachment(btnSource, -6);
                formData.top = new FormAttachment(lblSourceFoldersIn, 6);
                formData.bottom = new FormAttachment(btnAllowOutputFolders, -6);
                sources_tree.setLayoutData(formData);
            }
        }

        final Button btnWhenCleaningDelete = new Button(sourceComposite, SWT.CHECK);
        final FormData fd_btnWhenCleaningDelete = new FormData();
        fd_btnWhenCleaningDelete.top = new FormAttachment(output_text, 6);
        fd_btnWhenCleaningDelete.left = new FormAttachment(lblSourceFoldersIn, 0,
                SWT.LEFT);
        btnWhenCleaningDelete.setLayoutData(fd_btnWhenCleaningDelete);
        btnWhenCleaningDelete
                .setText("When cleaning, delete the whole output directory (faster)");
        sourceComposite.setTabList(new Control[] { btnFolder, btnSource, btnEdit,
                btnRemove, btnAllowOutputFolders, output_text, btnBrowse });

        final TabItem includeTab = new TabItem(tabFolder, SWT.NONE);
        includeTab.setText("Include");

        final Composite includeComposite = new Composite(tabFolder, SWT.NONE);
        includeComposite.setLayout(new FormLayout());
        includeComposite.setBounds(0, 0, 443, 305);
        includeTab.setControl(includeComposite);

        final Label lblFoldersWithInclude = new Label(includeComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.right = new FormAttachment(100, -10);
            formData.top = new FormAttachment(0, 10);
            formData.left = new FormAttachment(0, 10);
            lblFoldersWithInclude.setLayoutData(formData);
        }
        lblFoldersWithInclude.setText("Folders with include files:");

        final Button btnAddFolder = new Button(includeComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.top = new FormAttachment(lblFoldersWithInclude, 9);
            formData.right = new FormAttachment(lblFoldersWithInclude, 0, SWT.RIGHT);
            btnAddFolder.setLayoutData(formData);
        }
        btnAddFolder.setText("Add folder...");

        final Button btnEdit_1 = new Button(includeComposite, SWT.NONE);
        FormData formData_1;
        {
            formData_1 = new FormData();
            formData_1.right = new FormAttachment(lblFoldersWithInclude, 0, SWT.RIGHT);
            formData_1.width = 77;
            btnEdit_1.setLayoutData(formData_1);
        }
        btnEdit_1.setText("Edit...");

        final Button btnRemove_1 = new Button(includeComposite, SWT.NONE);
        formData_1.bottom = new FormAttachment(100, -216);
        {
            final FormData formData_7 = new FormData();
            formData_7.top = new FormAttachment(btnEdit_1, 7);
            formData_7.right = new FormAttachment(lblFoldersWithInclude, 0, SWT.RIGHT);
            formData_7.width = 77;
            btnRemove_1.setLayoutData(formData_7);
        }
        btnRemove_1.setText("Remove");
        {
            final ListViewer listViewer = new ListViewer(includeComposite, SWT.BORDER);
            final org.eclipse.swt.widgets.List includes_list = listViewer.getList();
            {
                final FormData formData = new FormData();
                formData.right = new FormAttachment(btnAddFolder, -6);
                formData.left = new FormAttachment(0, 10);
                formData.bottom = new FormAttachment(100, -10);
                formData.top = new FormAttachment(lblFoldersWithInclude, 6);
                includes_list.setLayoutData(formData);
            }
        }

        final TabItem projectsTab = new TabItem(tabFolder, SWT.NONE);
        projectsTab.setText("Projects");

        final Composite dependenciesComposite = new Composite(tabFolder, SWT.NONE);
        dependenciesComposite.setLayout(new FormLayout());
        projectsTab.setControl(dependenciesComposite);

        final Label lblProjectsOnThe = new Label(dependenciesComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.right = new FormAttachment(100, -10);
            formData.top = new FormAttachment(0, 10);
            formData.left = new FormAttachment(0, 10);
            lblProjectsOnThe.setLayoutData(formData);
        }
        lblProjectsOnThe.setText("Required projects on the build path:");

        final Button button = new Button(dependenciesComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.top = new FormAttachment(lblProjectsOnThe, 6);
            formData.right = new FormAttachment(lblProjectsOnThe, 0, SWT.RIGHT);
            button.setLayoutData(formData);
        }
        button.setText("New Button");

        final Button button_1 = new Button(dependenciesComposite, SWT.NONE);
        FormData formData_8;
        {
            formData_8 = new FormData();
            formData_8.right = new FormAttachment(lblProjectsOnThe, 0, SWT.RIGHT);
            button_1.setLayoutData(formData_8);
        }
        button_1.setText("New Button");

        final Button button_2 = new Button(dependenciesComposite, SWT.NONE);
        formData_8.bottom = new FormAttachment(button_2, -6);
        {
            final FormData formData = new FormData();
            formData.top = new FormAttachment(0, 110);
            formData.right = new FormAttachment(lblProjectsOnThe, 0, SWT.RIGHT);
            button_2.setLayoutData(formData);
        }
        button_2.setText("New Button");
        {
            final ListViewer listViewer = new ListViewer(dependenciesComposite,
                    SWT.BORDER);
            final org.eclipse.swt.widgets.List projects_list = listViewer.getList();
            {
                final FormData formData = new FormData();
                formData.right = new FormAttachment(button, -6);
                formData.left = new FormAttachment(0, 10);
                formData.bottom = new FormAttachment(100, -6);
                formData.top = new FormAttachment(lblProjectsOnThe, 6);
                projects_list.setLayoutData(formData);
            }
        }

        final Collection<RuntimeInfo> rs = BackendCore.getRuntimeInfoCatalog()
                .getRuntimes();
        final List<String[]> vv = new ArrayList<String[]>();
        for (final RuntimeInfo ri : rs) {
            vv.add(new String[] { ri.getName(), ri.getName() });
        }
        @SuppressWarnings("unused")
        final String[][] values = vv.toArray(new String[][] {});

        final TabItem librariesTab = new TabItem(tabFolder, SWT.NONE);
        librariesTab.setText("Libraries");

        final Composite librariesComposite = new Composite(tabFolder, SWT.NONE);
        librariesComposite.setLayout(new FormLayout());
        librariesTab.setControl(librariesComposite);

        final Label lblExternalLibrariesRequired = new Label(librariesComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.right = new FormAttachment(100, -10);
            formData.top = new FormAttachment(0, 10);
            formData.left = new FormAttachment(0, 10);
            lblExternalLibrariesRequired.setLayoutData(formData);
        }
        lblExternalLibrariesRequired
                .setText("External libraries required on build path:");

        final Button button_3 = new Button(librariesComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.top = new FormAttachment(lblExternalLibrariesRequired, 6);
            formData.right = new FormAttachment(100, -10);
            button_3.setLayoutData(formData);
        }
        button_3.setText("New Button");

        final Button button_4 = new Button(librariesComposite, SWT.NONE);
        {
            final FormData formData = new FormData();
            formData.top = new FormAttachment(button_3, 6);
            formData.right = new FormAttachment(lblExternalLibrariesRequired, 0,
                    SWT.RIGHT);
            button_4.setLayoutData(formData);
        }
        button_4.setText("New Button");

        final Button button_5 = new Button(librariesComposite, SWT.NONE);
        FormData formData_9;
        {
            formData_9 = new FormData();
            formData_9.right = new FormAttachment(lblExternalLibrariesRequired, 0,
                    SWT.RIGHT);
            button_5.setLayoutData(formData_9);
        }
        button_5.setText("New Button");

        final Button button_6 = new Button(librariesComposite, SWT.NONE);
        formData_9.bottom = new FormAttachment(100, -226);
        {
            final FormData formData = new FormData();
            formData.top = new FormAttachment(button_5, 6);
            formData.right = new FormAttachment(lblExternalLibrariesRequired, 0,
                    SWT.RIGHT);
            button_6.setLayoutData(formData);
        }
        button_6.setText("New Button");
        {
            final TreeViewer treeViewer = new TreeViewer(librariesComposite, SWT.BORDER);
            final Tree libraries_tree = treeViewer.getTree();
            {
                final FormData formData = new FormData();
                formData.right = new FormAttachment(button_3, -6);
                formData.left = new FormAttachment(0, 10);
                formData.top = new FormAttachment(lblExternalLibrariesRequired, 4);
View Full Code Here

    }

    @Override
    public void createControl(final Composite parent) {
        final Tree tree = new Tree(parent, SWT.MULTI);
        fOutlineViewer = new TreeViewer(tree);
        fOutlineViewer.setAutoExpandLevel(0);
        fOutlineViewer.setUseHashlookup(true);
        if (SystemConfiguration.hasFeatureEnabled(Features.NEW_MODEL)) {
            fOutlineViewer.setContentProvider(new NewErlContentProvider());
            fOutlineViewer.setLabelProvider(new NewErlLabelProvider());
View Full Code Here

        // Configure the layout
        final GridData data = new GridData(GridData.FILL_BOTH);
        data.heightHint = widget.getItemHeight() * 12;
        widget.setLayoutData(data);
        // Create the tree viewer
        fTreeViewer = new TreeViewer(widget);
        // Add member filter, don't show attributes
        final FilterDescriptor filterDescriptor = FilterDescriptor
                .getFilterDescriptor("attributesFilter");
        fTreeViewer.addFilter(filterDescriptor.getViewerFilter());
        // Add the name pattern filter
View Full Code Here

        } else {
            final ContentOutline outline = (ContentOutline) activePart;
            erlangOutlinePage = (ErlangOutlinePage) outline
                    .getAdapter(ErlangOutlinePage.class);
        }
        final TreeViewer viewer = erlangOutlinePage.getTreeViewer();
        if (viewer == null) {
            return;
        }
        if (value) {
            viewer.addFilter(filter);
        } else {
            viewer.removeFilter(filter);
        }
    }
View Full Code Here

        } else {
            final ContentOutline outline = (ContentOutline) activePart;
            erlangOutlinePage = (ErlangOutlinePage) outline
                    .getAdapter(ErlangOutlinePage.class);
        }
        final TreeViewer viewer = erlangOutlinePage.getTreeViewer();
        if (viewer == null) {
            return;
        }
        viewer.setFilters(filters.toArray(new ViewerFilter[filters.size()]));
    }
View Full Code Here

        label = new Label(control, SWT.NONE);
        label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
        label.setText("");

        treeViewer = new TreeViewer(control, SWT.NONE);
        treeViewer.setSorter(new TestResultSorter());
        final Tree tree = treeViewer.getTree();
        tree.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseDoubleClick(final MouseEvent e) {
View Full Code Here

        layout.marginWidth = 0;
        editorComposite.setLayout(layout);
        GridData gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
        editorComposite.setLayoutData(gd);

        fListViewer = new TreeViewer(editorComposite, SWT.SINGLE | SWT.BORDER);
        final Tree tree = fListViewer.getTree();
        final GridData gdTree = new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1);
        gdTree.widthHint = 100;
        tree.setLayoutData(gdTree);
        fListViewer.setLabelProvider(new ColorListLabelProvider());
View Full Code Here

        final Composite container = new Composite(parent, SWT.NONE);
        container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
        container.setLayout(new GridLayout());

        // treeViewer = new TreeViewer(container, SWT.VIRTUAL);
        treeViewer = new TreeViewer(container, SWT.SINGLE);
        treeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

        // providers
        treeViewer.setContentProvider(new TreeContentProvider(treeViewer, false));
        treeViewer.setLabelProvider(new TreeLabelProvider());
View Full Code Here

    public DebuggerTraceView() {
    }

    @Override
    protected Viewer createViewer(final Composite parent) {
        viewer = new TreeViewer(new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI
                | SWT.FULL_SELECTION));
        // setViewer(viewer);
        // super.createPartControl(parent);
        // parent.setLayout(new FillLayout());
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.TreeViewer

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.