Package com.google.gdt.eclipse.designer.model.module

Examples of com.google.gdt.eclipse.designer.model.module.InheritsElement


      ExecutionUtils.runLog(new RunnableEx() {
        public void run() throws Exception {
          ModuleDescription moduleDescription = Utils.getSingleModule(marker.getResource());
          DefaultModuleProvider.modify(moduleDescription, new ModuleModification() {
            public void modify(ModuleElement moduleElement) throws Exception {
              InheritsElement inheritsElement = new InheritsElement();
              moduleElement.addChild(inheritsElement);
              inheritsElement.setName(m_moduleNameToImport);
            }
          });
        }
      });
    }
View Full Code Here


            return;
          }
        }
        // import I18N
        {
          InheritsElement inheritsElement = new InheritsElement();
          moduleElement.addChild(inheritsElement);
          inheritsElement.setName(I18N_MODULE);
        }
      }
    });
  }
View Full Code Here

        "<module>",
        "  <inherits name='some.id'/>",
        "</module>"});
    assertThat(m_module.getChildren()).hasSize(1);
    // prepare single "<inherits>" element
    InheritsElement inheritsElement;
    {
      List<InheritsElement> inheritsElements = m_module.getInheritsElements();
      assertThat(inheritsElements).hasSize(1);
      inheritsElement = inheritsElements.get(0);
    }
    //
    assertSame(inheritsElement, m_module.getInheritsElement("some.id"));
    assertNull(m_module.getInheritsElement("other.id"));
    // current "name" value
    assertEquals("some.id", inheritsElement.getName());
    // set new "name" value
    {
      inheritsElement.setName("new.id");
      assertUpdatedModuleFile(StringUtils.replace(m_moduleContent, "some.id", "new.id"));
    }
  }
View Full Code Here

TOP

Related Classes of com.google.gdt.eclipse.designer.model.module.InheritsElement

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.