Examples of WorkbenchContentProvider


Examples of org.eclipse.ui.model.WorkbenchContentProvider

  protected TreeViewer createTreeViewer(Composite parent) {
    int style = SWT.BORDER | SWT.SINGLE;

    TreeViewer treeViewer = new TreeViewer(new Tree(parent, style));   
    treeViewer.setContentProvider(new WorkbenchContentProvider());
    treeViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
    treeViewer.setComparator(new NameSorter());
    treeViewer.addFilter(getFilter());   
    IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
    treeViewer.setInput(workspaceRoot);
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

  protected TreeViewer createTreeViewer(Composite parent) {
    int style = SWT.BORDER | SWT.SINGLE;

    TreeViewer tableViewer = new TreeViewer(new Tree(parent, style));
    tableViewer.setContentProvider(new WorkbenchContentProvider());
    tableViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
    tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        updateOKStatus();
      }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

  protected TreeViewer createTreeViewer(Composite parent) {
    int style = SWT.BORDER | (false ? SWT.MULTI : SWT.SINGLE);

    TreeViewer tableViewer = new TreeViewer(new Tree(parent, style));
    tableViewer.setContentProvider(new WorkbenchContentProvider());
    tableViewer.setLabelProvider(WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
    tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
      public void selectionChanged(SelectionChangedEvent event) {
        updateOKStatus();
      }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

        setControl(composite);
    }

    void doAdd() {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setValidator(new ISelectionStatusValidator() {
            public IStatus validate(Object[] selection) {
                if (selection.length > 0 && selection[0] instanceof IFile) {
                    return new Status(IStatus.OK, Plugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
                }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

            launchTargetTxt.setText(selected.getName());
        }
    }

    void doBrowseBndrun() {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(launchTargetTxt.getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setValidator(new ISelectionStatusValidator() {
            public IStatus validate(Object[] selection) {
                if (selection.length > 0 && selection[0] instanceof IFile) {
                    return new Status(IStatus.OK, Plugin.PLUGIN_ID, IStatus.OK, "", null); //$NON-NLS-1$
                }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

        checkboxTreeViewer.refresh(true);
        checkboxTreeViewer.getControl().redraw();
    }

    private void setupTree(final List<IResource> bndFiles) {
        checkboxTreeViewer.setContentProvider(new WorkbenchContentProvider() {

            @Override
            public Object[] getChildren(Object element) {
                Object[] children = super.getChildren(element);
                List<IResource> resources = new ArrayList<IResource>();
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

        gd.heightHint = 75;
        table.setLayoutData(gd);
    }

    private void doAddJar() {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getSection().getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setAllowMultiple(true);
        dialog.setTitle("JAR Selection");
        dialog.setMessage("Select JAR Files to add to the Classpath.");
        dialog.addFilter(new FileExtensionFilter("jar")); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

            }
        }
    }

    private void doAddFolder() {
        ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getSection().getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
        dialog.setAllowMultiple(true);
        dialog.setTitle("Class Folder Selection");
        dialog.setMessage("Select Class Folders to add to the Classpath.");
        dialog.addFilter(new ClassFolderFilter());
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

        }
        final ViewerFilter filter = new TypedViewerFilter(acceptedClasses,
                rejectedElements.toArray());

        final ILabelProvider lp = new WorkbenchLabelProvider();
        final ITreeContentProvider cp = new WorkbenchContentProvider();

        IResource initSelection = null;
        if (outputLocation != null) {
            initSelection = root.findMember(outputLocation);
        }
View Full Code Here

Examples of org.eclipse.ui.model.WorkbenchContentProvider

            public void widgetSelected(SelectionEvent e) {
                String path = null;
                if (project != null) {
                    ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(Display
                            .getDefault().getActiveShell(), new WorkbenchLabelProvider(),
                            new WorkbenchContentProvider());
                    dialog.setValidator(new ISelectionStatusValidator() {
                        private final IStatus errorStatus = new Status(IStatus.ERROR, IvyPlugin.ID,
                                0, "", null);

                        public IStatus validate(Object[] selection) {
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.