Package org.eclipse.rap.rwt.internal.application

Examples of org.eclipse.rap.rwt.internal.application.ApplicationContextImpl


  }

  @Test
  public void testRegistersTabrisLoader() {
    ApplicationImpl application = mockConfiguration();
    ApplicationContextImpl applicationContext = application.getApplicationContext();

    TabrisClientInstaller.install( application );

    verify( applicationContext.getResourceRegistry() ).add( eq( "index.json" ), any( TabrisResourceLoader.class ) );
  }
View Full Code Here


  }

  @Test
  public void testRegistersTabrisLoaderWithId() {
    ApplicationImpl application = mockConfiguration();
    ApplicationContextImpl applicationContext = application.getApplicationContext();

    TabrisClientInstaller.install( application, "foo" );

    verify( applicationContext.getResourceRegistry() ).add( eq( "index.json" ), any( TabrisResourceLoader.class ) );
  }
View Full Code Here

    TabrisClientInstaller.install( application, "" );
  }

  private ApplicationImpl mockConfiguration() {
    ApplicationImpl application = mock( ApplicationImpl.class );
    ApplicationContextImpl context = mock( ApplicationContextImpl.class );
    ThemeManager themeManager = mock( ThemeManager.class );
    when( context.getThemeManager() ).thenReturn( themeManager );
    when( context.getServletContext() ).thenReturn( mock( ServletContext.class ) );
    when( application.getApplicationContext() ).thenReturn( context );
    ResourceRegistry resourceRegistry = mock( ResourceRegistry.class );
    when( context.getResourceRegistry() ).thenReturn( resourceRegistry );
    return application;
  }
View Full Code Here

        return new ByteArrayInputStream( "".getBytes() );
      }
    };
    StyleSheet styleSheet = CssFileReader.readStyleSheet( "", resourceLoader );
    Theme theme = new Theme( themeId, "unknown", styleSheet );
    ApplicationContextImpl applicationContext = ContextProvider.getContext().getApplicationContext();
    environment.resetThemes();
    ThemeManager themeManager = applicationContext.getThemeManager();
    themeManager.registerTheme( theme );
  }
View Full Code Here

        return new ByteArrayInputStream( "".getBytes() );
      }
    };
    StyleSheet styleSheet = CssFileReader.readStyleSheet( "", resourceLoader );
    Theme theme = new Theme( themeId, "unknown", styleSheet );
    ApplicationContextImpl applicationContext = ContextProvider.getContext().getApplicationContext();
    environment.resetThemes();
    ThemeManager themeManager = applicationContext.getThemeManager();
    themeManager.registerTheme( theme );
  }
View Full Code Here

   * @param path The path to register the lookup. Needs to start with a "/".
   *
   * @since 0.9
   */
  public void registerEntryPointLookup( Bundle bundle, String path ) {
    ApplicationContextImpl appContext = application.getApplicationContext();
    BundleContext bundleContext = bundle.getBundleContext();
    httpServiceTracker = new HttpServiceTracker( bundleContext, appContext, path );
    httpServiceTracker.open();
  }
View Full Code Here

TOP

Related Classes of org.eclipse.rap.rwt.internal.application.ApplicationContextImpl

Copyright © 2018 www.massapicom. 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.