|
|
|
Re: How can I prevent a part stack from switching view parts? [message #902801 is a reply to message #902779] |
Mon, 20 August 2012 13:49 |
|
It sounds like you would need to customize the PartService:
org.eclipse.e4.ui.internal.workbench.PartServiceImpl {
...
private void activate(MPart part, boolean requiresFocus, boolean activateBranch) {
if (windowContext.getParent().getActiveChild() == windowContext && part == activePart) {
// insert it in the beginning of the activation history, it may not have been inserted
// pending when this service was instantiated
partActivationHistory.prepend(part);
UIEvents.publishEvent(UIEvents.UILifeCycle.ACTIVATE, part);
return;
} /* NEW CODE: */
else {
UIEvents.publishEvent(UIEvents.UILifeCycle.DEACTIVATE, activePart);
}
The use of deactivate might be a little missleading, but it demonstrates the point (maybe something like LOSTACTIVEPART). Not sure how broad of an application this would have or if it would be a feature others would be intersted in, however, it seems as though it would be relatively straight forward to implement.
JD
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04131 seconds