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 gmail.com">wcandillon gmail.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-dev eclipse.org">pdt-dev eclipse.org
https://dev.eclipse.org/mailman/listinfo/pdt-dev
-- Michael
|