Link Here
|
16 |
import org.eclipse.swt.widgets.Event; |
16 |
import org.eclipse.swt.widgets.Event; |
17 |
import org.eclipse.swt.widgets.Listener; |
17 |
import org.eclipse.swt.widgets.Listener; |
18 |
import org.eclipse.ui.IEditorPart; |
18 |
import org.eclipse.ui.IEditorPart; |
19 |
import org.eclipse.ui.IKeyBindingService; |
|
|
20 |
import org.eclipse.ui.INestableKeyBindingService; |
21 |
import org.eclipse.ui.forms.IFormPart; |
19 |
import org.eclipse.ui.forms.IFormPart; |
22 |
import org.eclipse.ui.forms.IManagedForm; |
20 |
import org.eclipse.ui.forms.IManagedForm; |
23 |
import org.eclipse.ui.forms.ManagedForm; |
21 |
import org.eclipse.ui.forms.ManagedForm; |
24 |
import org.eclipse.ui.forms.widgets.ScrolledForm; |
22 |
import org.eclipse.ui.forms.widgets.ScrolledForm; |
25 |
import org.eclipse.ui.internal.forms.widgets.FormUtil; |
23 |
import org.eclipse.ui.internal.forms.widgets.FormUtil; |
26 |
import org.eclipse.ui.internal.services.INestable; |
|
|
27 |
|
24 |
|
28 |
/** |
25 |
/** |
29 |
* A variation of {@link FormEditor}, this editor has a stable header that does |
26 |
* A variation of {@link FormEditor}, this editor has a stable header that does |
Link Here
|
134 |
// fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=177331 |
131 |
// fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=177331 |
135 |
int activePage = getActivePage(); |
132 |
int activePage = getActivePage(); |
136 |
if (SharedHeaderFormEditor.this.wasHeaderActive != wasHeaderActive && activePage != -1 && pages.get(activePage) instanceof IEditorPart) { |
133 |
if (SharedHeaderFormEditor.this.wasHeaderActive != wasHeaderActive && activePage != -1 && pages.get(activePage) instanceof IEditorPart) { |
137 |
IEditorPart activePart = (IEditorPart) pages.get(activePage); |
|
|
138 |
IKeyBindingService keyBindingService = getSite().getKeyBindingService(); |
139 |
|
134 |
|
140 |
if (wasHeaderActive) { |
135 |
if (wasHeaderActive) { |
141 |
|
136 |
deactivateSite(true); |
142 |
if (activePart.getSite() instanceof INestable) |
|
|
143 |
((INestable) activePart.getSite()).deactivate(); |
144 |
|
145 |
if (keyBindingService instanceof INestableKeyBindingService) |
146 |
((INestableKeyBindingService) keyBindingService).activateKeyBindingService(null); |
147 |
|
148 |
} else { |
137 |
} else { |
149 |
|
138 |
activateSite(); |
150 |
if (keyBindingService instanceof INestableKeyBindingService) |
|
|
151 |
((INestableKeyBindingService) keyBindingService).activateKeyBindingService(activePart.getSite()); |
152 |
|
153 |
if (activePart.getSite() instanceof INestable) |
154 |
((INestable) activePart.getSite()).activate(); |
155 |
|
156 |
} |
139 |
} |
157 |
} |
140 |
} |
158 |
|
141 |
|