|
Lines 133-138
Link Here
|
| 133 |
import org.eclipse.ui.internal.services.ISourceProviderService; |
133 |
import org.eclipse.ui.internal.services.ISourceProviderService; |
| 134 |
import org.eclipse.ui.internal.services.ServiceLocator; |
134 |
import org.eclipse.ui.internal.services.ServiceLocator; |
| 135 |
import org.eclipse.ui.internal.util.PrefUtil; |
135 |
import org.eclipse.ui.internal.util.PrefUtil; |
|
|
136 |
import org.eclipse.ui.internal.util.Util; |
| 136 |
import org.eclipse.ui.presentations.AbstractPresentationFactory; |
137 |
import org.eclipse.ui.presentations.AbstractPresentationFactory; |
| 137 |
|
138 |
|
| 138 |
/** |
139 |
/** |
|
Lines 524-531
Link Here
|
| 524 |
* </p> |
525 |
* </p> |
| 525 |
*/ |
526 |
*/ |
| 526 |
void submitGlobalActions() { |
527 |
void submitGlobalActions() { |
| 527 |
final IHandlerService handlerService = (IHandlerService) PlatformUI |
528 |
final IHandlerService handlerService = (IHandlerService) Util.getAdapter(PlatformUI |
| 528 |
.getWorkbench().getAdapter(IHandlerService.class); |
529 |
.getWorkbench(), IHandlerService.class); |
| 529 |
|
530 |
|
| 530 |
/* |
531 |
/* |
| 531 |
* Mash the action sets and global actions together, with global actions |
532 |
* Mash the action sets and global actions together, with global actions |
|
Lines 850-857
Link Here
|
| 850 |
IWorkbenchHelpContextIds.WORKBENCH_WINDOW); |
851 |
IWorkbenchHelpContextIds.WORKBENCH_WINDOW); |
| 851 |
|
852 |
|
| 852 |
// initializeDefaultServices(); |
853 |
// initializeDefaultServices(); |
| 853 |
final IContextService contextService = (IContextService) workbench |
854 |
final IContextService contextService = (IContextService) Util.getAdapter( |
| 854 |
.getAdapter(IContextService.class); |
855 |
workbench, IContextService.class); |
| 855 |
contextService.registerShell(shell, IContextService.TYPE_WINDOW); |
856 |
contextService.registerShell(shell, IContextService.TYPE_WINDOW); |
| 856 |
|
857 |
|
| 857 |
trackShellActivation(shell); |
858 |
trackShellActivation(shell); |
|
Lines 1466-1473
Link Here
|
| 1466 |
|
1467 |
|
| 1467 |
// Remove the handler submissions. Bug 64024. |
1468 |
// Remove the handler submissions. Bug 64024. |
| 1468 |
final IWorkbench workbench = getWorkbench(); |
1469 |
final IWorkbench workbench = getWorkbench(); |
| 1469 |
final IHandlerService handlerService = (IHandlerService) workbench |
1470 |
final IHandlerService handlerService = (IHandlerService) Util.getAdapter(workbench, |
| 1470 |
.getAdapter(IHandlerService.class); |
1471 |
IHandlerService.class); |
| 1471 |
handlerService.deactivateHandlers(handlerActivations); |
1472 |
handlerService.deactivateHandlers(handlerActivations); |
| 1472 |
final Iterator activationItr = handlerActivations.iterator(); |
1473 |
final Iterator activationItr = handlerActivations.iterator(); |
| 1473 |
while (activationItr.hasNext()) { |
1474 |
while (activationItr.hasNext()) { |
|
Lines 1479-1486
Link Here
|
| 1479 |
globalActionHandlersByCommandId.clear(); |
1480 |
globalActionHandlersByCommandId.clear(); |
| 1480 |
|
1481 |
|
| 1481 |
// Remove the enabled submissions. Bug 64024. |
1482 |
// Remove the enabled submissions. Bug 64024. |
| 1482 |
final IContextService contextService = (IContextService) workbench |
1483 |
final IContextService contextService = (IContextService) Util.getAdapter(workbench, |
| 1483 |
.getAdapter(IContextService.class); |
1484 |
IContextService.class); |
| 1484 |
contextService.unregisterShell(getShell()); |
1485 |
contextService.unregisterShell(getShell()); |
| 1485 |
|
1486 |
|
| 1486 |
closeAllPages(); |
1487 |
closeAllPages(); |
|
Lines 2446-2453
Link Here
|
| 2446 |
// Get the input. |
2447 |
// Get the input. |
| 2447 |
IAdaptable input = page.getInput(); |
2448 |
IAdaptable input = page.getInput(); |
| 2448 |
if (input != null) { |
2449 |
if (input != null) { |
| 2449 |
IPersistableElement persistable = (IPersistableElement) input |
2450 |
IPersistableElement persistable = (IPersistableElement) Util.getAdapter(input, |
| 2450 |
.getAdapter(IPersistableElement.class); |
2451 |
IPersistableElement.class); |
| 2451 |
if (persistable == null) { |
2452 |
if (persistable == null) { |
| 2452 |
WorkbenchPlugin |
2453 |
WorkbenchPlugin |
| 2453 |
.log("Unable to save page input: " //$NON-NLS-1$ |
2454 |
.log("Unable to save page input: " //$NON-NLS-1$ |