Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pdt-dev] Getting an instance of org.eclipse.php.internal.ui.explorer.ExplorerPart

Exactly what I was looking for.
Thanks a lot :-)

On 8/8/07, Michael Spector <spektom@xxxxxxxxx> wrote:
>
> Hi,
>
> You can use an Eclipse mechanism for finding views:
>
> IWorkbenchPage page =
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
> if (page != null) {
>     ExplorerPart explorerPart = (ExplorerPart)
> page.findView("org.eclipse.php.ui.explorer");
>     if (explorerPart != null) {
>         // Do something
>     }
> }
>
> Does this help?
>
> On 8/7/07, William Candillon <wcandillon@xxxxxxxxx> wrote:
> >
> > Hi,
> >
> > I need to get an instance of ExplorerPart for my own custom plug-in in
> > order to refresh PHP Explorer view.
> > So far I access it with
> >
> Workbench.getInstance().getActiveWorkbenchWindow().getPartService().getActivePart().getSite()
> > while the active view is the PHP Explorer.
> >
> > I was wondering if there is a smarter to do get this instance ?
> > In the jdt explorer there is a getFromActivePerspective() method and
> > I'm looking for something similar: ExplorerPart phpExplorer =
> > ExplorerPart.getFromActivePerspective();
> >
> > Best regards,
> >
> > William
> >
> > --
> > William Candillon
> > http://phpaspect.org
> > _______________________________________________
> > pdt-dev mailing list
> > pdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/pdt-dev
> >
>
>
>
> --
> Michael
> _______________________________________________
> pdt-dev mailing list
> pdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/pdt-dev
>
>


-- 
William Candillon
http://phpaspect.org


Back to the top