List Info

Thread: Getting an instance of org.eclipse.php.internal.ui.explorer.ExplorerPart




Getting an instance of org.eclipse.php.internal.ui.explorer.Exp lorerPart
user name
2007-08-07 09:44:06
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().getPartSe
rvice().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-deveclipse.org
http
s://dev.eclipse.org/mailman/listinfo/pdt-dev

Re: Getting an instance of org.eclipse.php.internal.ui.explorer.Exp lorerPart
user name
2007-08-07 22:40:49
 
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 < wcandillongmail.com">wcandillongmail.com> 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-deveclipse.org">pdt-deveclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev



--
Michael
Re: Getting an instance of org.eclipse.php.internal.ui.explorer.Exp lorerPart
user name
2007-08-08 01:57:41
Exactly what I was looking for.
Thanks a lot 

On 8/8/07, Michael Spector <spektomgmail.com> wrote:
>
> Hi,
>
> You can use an Eclipse mechanism for finding views:
>
> IWorkbenchPage page =
>
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi
vePage();
> 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 <wcandillongmail.com> 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().getPartSe
rvice().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-deveclipse.org
> > http
s://dev.eclipse.org/mailman/listinfo/pdt-dev
> >
>
>
>
> --
> Michael
> _______________________________________________
> pdt-dev mailing list
> pdt-deveclipse.org
> http
s://dev.eclipse.org/mailman/listinfo/pdt-dev
>
>


-- 
William Candillon
http://phpaspect.org
_______________________________________________
pdt-dev mailing list
pdt-deveclipse.org
http
s://dev.eclipse.org/mailman/listinfo/pdt-dev

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )