I register my editor as a part listener
and then use the following
publicvoid
partBroughtToTop(final
IWorkbenchPart part) {
if
(part == this)
{
try
{
final
IWorkbench workbench = PlatformUI.getWorkbench();
final
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
workbench.showPerspective(Perspective.ID,
window);
} catch
(final
WorkbenchException e) {
e.printStackTrace();
}
}
}