Examples of IServiceLocator


Examples of com.m4f.business.service.ifc.IServiceLocator

 
  public void doGet(HttpServletRequest req, HttpServletResponse resp)
     throws IOException {
    LOGGER.severe("+++++++++++++++++++++++++++++++++++++++++++++klao");
    ApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext());
    IServiceLocator serviceLocator = (IServiceLocator)context.getBean("serviceLocator");
    serviceLocator.init();
  }
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

    // done
    if (getActivePage() == -1) {
      setActivePage(0);
      IEditorPart part = getEditor(0);
      if (part!=null) {
        final IServiceLocator serviceLocator = part.getEditorSite();
        if (serviceLocator instanceof INestable) {
          activeServiceLocator = (INestable) serviceLocator;
          activeServiceLocator.activate();
        }
      }
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

          .setActivePage(activeEditor);
    }
    if (activeEditor != null) {

      // Activate the services for the new service locator.
      final IServiceLocator serviceLocator = activeEditor.getEditorSite();
      if (serviceLocator instanceof INestable) {
        activeServiceLocator = (INestable) serviceLocator;
        activeServiceLocator.activate();
      }
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

    Assert.isNotNull(multiPageEditor);
    Assert.isNotNull(editor);
    this.multiPageEditor = multiPageEditor;
    this.editor = editor;

    final IServiceLocator parentServiceLocator = multiPageEditor.getSite();
    serviceLocator = new ServiceLocator(parentServiceLocator);

    initializeDefaultServices();
  }
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

      // Clean up the activations.
      final Iterator activationItr = activationsByActionIdByServiceLocator
          .entrySet().iterator();
      while (activationItr.hasNext()) {
        final Map.Entry value = (Map.Entry) activationItr.next();
        final IServiceLocator locator = (IServiceLocator) value
            .getKey();
        final IHandlerService service = (IHandlerService) locator
            .getService(IHandlerService.class);
        final Map activationsByActionId = (Map) value.getValue();
        final Iterator iterator = activationsByActionId.values()
            .iterator();
        while (iterator.hasNext()) {
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

    this.page = page;
    extensionID = "org.eclipse.ui.UnknownID"; //$NON-NLS-1$
    extensionName = "Unknown Name"; //$NON-NLS-1$

    // Initialize the service locator.
    final IServiceLocator parentServiceLocator = page.getWorkbenchWindow();
    this.serviceLocator = new ServiceLocator(parentServiceLocator);

    initializeDefaultServices();
  }
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

   * Creates {@link ExecutionEvent} based on current selection
   *
   * @return {@link ExecutionEvent} with current selection
   */
  protected ExecutionEvent createExecutionEvent() {
    IServiceLocator locator = getServiceLocator();
    ICommandService srv = CommonUtils.getService(locator, ICommandService.class);
    IHandlerService hsrv = CommonUtils.getService(locator, IHandlerService.class);
    Command command = srv.getCommand(commandId);

    ExecutionEvent event = hsrv.createExecutionEvent(command, null);
View Full Code Here

Examples of org.eclipse.ui.services.IServiceLocator

  @Before
  public void setUp() throws Exception {
    switchToMenu = new SwitchToMenu();
    handlerService = mock(IHandlerService.class);
    IServiceLocator serviceLocator = mock(IServiceLocator.class);
    when(serviceLocator.getService(IHandlerService.class)).thenReturn(
        handlerService);
    switchToMenu.initialize(serviceLocator);
  }
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.