I am working on an Eclipse based RCP. We have a need to prevent one of the opened editors from being closed by the user.
The desired behavior is:
Not directly related but I was looking for a way to prevent an Editor to be closed and found this little hack, hope it could help.
page.addPartListener(new IPartListener2() {
// [...]
@Override
public void partClosed(IWorkbenchPartReference partRef) {
try {
page.openEditor(input, id);
} catch (PartInitException e) {
e.printStackTrace();
}
}
});