Examples of ISourceProviderService


Examples of org.eclipse.ui.internal.services.ISourceProviderService

     * Phase 2 of the initialization of commands. The source providers that
     * the workbench provides are creating and registered with the above
     * services. These source providers notify the services when particular
     * pieces of workbench state change.
     */
    final ISourceProviderService sourceProviderService = new SourceProviderService();
    serviceLocator.registerService(ISourceProviderService.class,
        sourceProviderService);
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final ActiveShellSourceProvider activeShellSourceProvider = new ActiveShellSourceProvider(
            Workbench.this);
        evaluationService.addSourceProvider(activeShellSourceProvider);
        handlerService[0].addSourceProvider(activeShellSourceProvider);
        contextService.addSourceProvider(activeShellSourceProvider);
        menuService.addSourceProvider(activeShellSourceProvider);
        sourceProviderService.registerProvider(activeShellSourceProvider);   
      }});
   
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final ActivePartSourceProvider activePartSourceProvider = new ActivePartSourceProvider(
            Workbench.this);
        evaluationService.addSourceProvider(activePartSourceProvider);
        handlerService[0].addSourceProvider(activePartSourceProvider);
        contextService.addSourceProvider(activePartSourceProvider);
        menuService.addSourceProvider(activePartSourceProvider);
        sourceProviderService.registerProvider(activePartSourceProvider);
      }});
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final ActiveContextSourceProvider activeContextSourceProvider = new ActiveContextSourceProvider(
            contextService);
        evaluationService.addSourceProvider(activeContextSourceProvider);
        handlerService[0].addSourceProvider(activeContextSourceProvider);
        menuService.addSourceProvider(activeContextSourceProvider);
        sourceProviderService.registerProvider(activeContextSourceProvider);
      }});
    StartupThreading.runWithoutExceptions(new StartupRunnable() {

      public void runWithException() {
        final CurrentSelectionSourceProvider currentSelectionSourceProvider = new CurrentSelectionSourceProvider(
            Workbench.this);
        evaluationService.addSourceProvider(currentSelectionSourceProvider);
        handlerService[0].addSourceProvider(currentSelectionSourceProvider);
        contextService.addSourceProvider(currentSelectionSourceProvider);
        menuService.addSourceProvider(currentSelectionSourceProvider);
        sourceProviderService.registerProvider(currentSelectionSourceProvider);
       
        actionSetSourceProvider = new ActionSetSourceProvider();
        evaluationService.addSourceProvider(actionSetSourceProvider);
        handlerService[0].addSourceProvider(actionSetSourceProvider);
        contextService.addSourceProvider(actionSetSourceProvider);
        menuService.addSourceProvider(actionSetSourceProvider);
        sourceProviderService.registerProvider(actionSetSourceProvider);
       
        FocusControlSourceProvider focusControl = new FocusControlSourceProvider();
        serviceLocator.registerService(IFocusService.class, focusControl);
        evaluationService.addSourceProvider(focusControl);
        handlerService[0].addSourceProvider(focusControl);
        contextService.addSourceProvider(focusControl);
        menuService.addSourceProvider(focusControl);
        sourceProviderService.registerProvider(focusControl);
       
       
        menuSourceProvider = new MenuSourceProvider();
        evaluationService.addSourceProvider(menuSourceProvider);
        handlerService[0].addSourceProvider(menuSourceProvider);
        contextService.addSourceProvider(menuSourceProvider);
        menuService.addSourceProvider(menuSourceProvider);
        sourceProviderService.registerProvider(menuSourceProvider);
      }});
   
    /*
     * Phase 3 of the initialization of commands. This handles the creation
     * of wrappers for legacy APIs. By the time this phase completes, any
View Full Code Here

Examples of org.eclipse.ui.services.ISourceProviderService

    updateSourceProviders(scanInstance);

   
  }
  private void updateSourceProviders(IScanInstance scanInstance) {
    final ISourceProviderService sps = (ISourceProviderService) PlatformUI.getWorkbench().getService(ISourceProviderService.class);
    updatePauseStateSourceProvider((PauseStateSourceProvider) sps.getSourceProvider(PauseStateSourceProvider.PAUSE_STATE), scanInstance);
    updateScannerStateSourceProvider((ScannerStateSourceProvider) sps.getSourceProvider(ScannerStateSourceProvider.SCAN_SELECTION_STATE), scanInstance);
  }
View Full Code Here

Examples of org.eclipse.ui.services.ISourceProviderService

      Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();
      ErrorDialog.displayError(shell, "Proxy service is null");
      return null;
    }
   
    ISourceProviderService sourceProviderService = (ISourceProviderService) HandlerUtil.getActiveWorkbenchWindow(event).getService(ISourceProviderService.class);
    ProxyStateSourceProvider proxyState = (ProxyStateSourceProvider) sourceProviderService.getSourceProvider(ProxyStateSourceProvider.PROXY_STATE);
    if(proxyState == null) {
      Shell shell = HandlerUtil.getActiveWorkbenchWindow(event).getShell();
      ErrorDialog.displayError(shell, "Proxy state provider is null");
      return null;
    }
View Full Code Here

Examples of org.eclipse.ui.services.ISourceProviderService

    });
  }
 
  private void doUpdate() {
    transactionManager.updateTransactionInfo(transactionInfo);
    ISourceProviderService sourceProviderService = (ISourceProviderService) getViewSite().getWorkbenchWindow().getService(ISourceProviderService.class);
    InterceptQueueStateSourceProvider provider = (InterceptQueueStateSourceProvider) sourceProviderService.getSourceProvider(InterceptQueueStateSourceProvider.INTERCEPT_QUEUE_STATE);
    if (transactionInfo.isPending() == true) {
      provider.setPending(true);
    } else {
      provider.setSent(transactionInfo.getRequestStatus() == TransactionManager.TransactionStatus.STATUS_SENT);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.