Package org.eclipse.ui.part

Examples of org.eclipse.ui.part.ISetSelectionTarget


        final Iterator<IWorkbenchPart> itr = parts.iterator();
        while (itr.hasNext()) {
            final IWorkbenchPart part = itr.next();

            // get the part's ISetSelectionTarget implementation
            ISetSelectionTarget target = null;
            if (part instanceof ISetSelectionTarget) {
                target = (ISetSelectionTarget) part;
            } else {
                target = (ISetSelectionTarget) part.getAdapter(ISetSelectionTarget.class);
            }

            if (target != null) {
                // select and reveal resource
                final ISetSelectionTarget finalTarget = target;
                window.getShell().getDisplay().asyncExec(new Runnable() {
                    @Override
                    public void run() {
                        finalTarget.selectReveal(selection);
                    }
                });
            }
        }
    }
View Full Code Here


        if (data == null) {
            return;
        }
        IViewPart part = getView(JavaUI.ID_PACKAGES);
        if (part instanceof ISetSelectionTarget) {
            ISetSelectionTarget target = (ISetSelectionTarget) part;
            target.selectReveal(new StructuredSelection(data));
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.part.ISetSelectionTarget

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.