Package com.google.gdt.eclipse.designer.util

Examples of com.google.gdt.eclipse.designer.util.ModuleVisitor


      script = StringUtils.replace(script, "##CLASS_PATH_ELEMENTS##", classpathElements);
    }
    // set servlets
    {
      final StringBuffer buffer = new StringBuffer();
      ModuleVisitor.accept(m_selectedModule, new ModuleVisitor() {
        @Override
        public void endVisitModule(ModuleElement module) {
          List<ServletElement> servletElements = module.getServletElements();
          for (ServletElement servletElement : servletElements) {
            String servletName = servletElement.getClassName();
View Full Code Here


      addWarFolder(moduleDescription);
    }
    {
      final Set<String> visitedModules = Sets.newTreeSet();
      final Set<String> visitedPackages = Sets.newTreeSet();
      ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
        private ResourceFolder m_moduleFolder;

        @Override
        public boolean visitModule(ModuleElement module) {
          String moduleName = module.getName();
View Full Code Here

      final IFile file,
      final IDocument document) throws Exception {
    final IJavaProject javaProject = JavaCore.create(file.getProject());
    // prepare list of source packages
    final List<SourcePackageDescriptor> sourcePackages = Lists.newArrayList();
    ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
      @Override
      public void visitSourcePackage(ModuleElement module, String packageName, boolean superSource)
          throws Exception {
        sourcePackages.add(new SourcePackageDescriptor(packageName, superSource));
      }
View Full Code Here

  /**
   * @return the script for assigning property values into "values" map, declared in "__start.html".
   */
  private String getPropertyProviderValuesScript() throws Exception {
    final StringBuilder sb = new StringBuilder();
    ModuleVisitor.accept(m_moduleDescription, new ModuleVisitor() {
      @Override
      public void endVisitModule(ModuleElement module) {
        for (PropertyProviderElement provider : module.getPropertyProviderElements()) {
          String script = provider.getScript();
          if (script != null) {
View Full Code Here

  /**
   * Test for using default {@link ModuleVisitor} implementation. No any action expected.
   */
  public void test_defaultFlow() throws Exception {
    ModuleDescription moduleDescription = getModuleDescription();
    ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
    });
  }
View Full Code Here

   * Test that we visit all required modules, source and public folders.
   */
  public void test_normalFlow() throws Exception {
    ModuleDescription moduleDescription = getModuleDescription();
    final StringBuilder buffer = new StringBuilder();
    ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
      @Override
      public boolean visitModule(ModuleElement module) {
        String moduleName = module.getName();
        if ("test.Module".equals(moduleName)) {
          buffer.append("|+project module|");
View Full Code Here

    assertThat(output).contains("|std Core module public|");
  }

  public void test_dontEnterModule() throws Exception {
    ModuleDescription moduleDescription = getModuleDescription();
    ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
      @Override
      public boolean visitModule(ModuleElement module) {
        if ("test.Module".equals(module.getName())) {
          return false;
        }
View Full Code Here

            "</module>"));
    ModuleDescription moduleDescription = getModuleDescription();
    waitForAutoBuild();
    // try to visit, exception expected
    try {
      ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
        @Override
        public boolean visitModule(ModuleElement module) {
          assertFalse("no.such.Module".equals(module.getName()));
          return true;
        }
View Full Code Here

            "</module>"));
    ModuleDescription moduleDescription = getModuleDescription();
    waitForAutoBuild();
    // try to visit, exception expected
    try {
      ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
      });
      fail();
    } catch (DesignerException e) {
      assertEquals(IExceptionConstants.INHERITS_NO_NAME, e.getCode());
    }
View Full Code Here

      assertTrue(moduleFile_inOutput.exists());
      moduleFile_inOutput.delete(true, null);
    }
    // try to visit, no exceptions
    ModuleDescription moduleDescription = getModuleDescription();
    ModuleVisitor.accept(moduleDescription, new ModuleVisitor() {
    });
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.util.ModuleVisitor

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.