use of org.eclipse.ui.INestableKeyBindingService in project jbosstools-hibernate by jbosstools.
the class ReverseEngineeringEditor method pageChange.
protected void pageChange(int newPageIndex) {
if (newPageIndex == 0) {
IKeyBindingService service = getSite().getKeyBindingService();
if (service instanceof INestableKeyBindingService) {
INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
nestableService.activateKeyBindingService(null);
}
}
saveLastActivePageIndex(newPageIndex);
super.pageChange(newPageIndex);
}
use of org.eclipse.ui.INestableKeyBindingService in project jbosstools-jst by jbosstools.
the class JSPMultiPageEditorPart method setFocus.
private void setFocus(int pageIndex) {
final IKeyBindingService service = getSite().getKeyBindingService();
if (pageIndex < 0 || pageIndex >= getPageCount()) {
if (service instanceof INestableKeyBindingService) {
final INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
nestableService.activateKeyBindingService(null);
}
return;
}
IEditorPart editor = getEditor(pageIndex);
if (editor != null) {
editor.setFocus();
if (service instanceof INestableKeyBindingService) {
INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
if (editor != null) {
nestableService.activateKeyBindingService(editor.getEditorSite());
} else {
nestableService.activateKeyBindingService(null);
}
}
} else {
if (service instanceof INestableKeyBindingService) {
INestableKeyBindingService nestableService = (INestableKeyBindingService) service;
nestableService.activateKeyBindingService(null);
}
Control control = getControl(pageIndex);
if (control != null) {
control.setFocus();
}
}
}
Aggregations