Community
Participate
Working Groups
Build Identifier: e4.1 M7 I have a WorkbenchPartListener which is called on close of my editors. Inside the listener I have private Object getEntity(IWorkbenchPartReference ref) { IWorkbenchPart part = ref.getPart(true); if (!(part instanceof IEditorPart)) { return null; } IEditorPart editor = (IEditorPart) part; to get access to the actual editor part and its input. But the call to ref.getPart(true) returns null in my case. Sadly I do not correctly understand the inner workings of this method, legacypart of the reference is null in my case but size of children after the init is not 1. Would be great if we could investigate this, as my database record stays locked until timeout as long as the close of my editors is not recognised. Reproducible: Always
PS if this should be going to "runtime" please change it, I'm not sure.
(In reply to comment #0) > Build Identifier: e4.1 M7 > > I have a WorkbenchPartListener which is called on close of my editors. Inside > the listener I have > private Object getEntity(IWorkbenchPartReference ref) { > IWorkbenchPart part = ref.getPart(true); > if (!(part instanceof IEditorPart)) { > return null; > } > IEditorPart editor = (IEditorPart) part; > > to get access to the actual editor part and its input. But the call to > ref.getPart(true) returns null in my case. This sounds to me like the same problem as bug 342366. http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R4_development&id=faeb9c58f9da28ab87e2f96edb03dd1d41365553 (In reply to comment #1) > PS if this should be going to "runtime" please change it, I'm not sure. With 4.1 out the door, you can just open bugs against Platform/UI and then put the version as 4.1, Thomas.
Thanks Remy, that solved my problem. I fail to update my target platform :) is always trouble with my patches and getting the build to work again.