Examples of StrutsFacetConfiguration


Examples of com.intellij.struts2.facet.StrutsFacetConfiguration

   * @param strutsXmlPaths Paths to files.
   */
  protected void createStrutsFileSet(@NonNls final String... strutsXmlPaths) {
    final StrutsFacet strutsFacet = StrutsFacet.getInstance(myModule);
    assertNotNull(strutsFacet);
    final StrutsFacetConfiguration facetConfiguration = strutsFacet.getConfiguration();

    final StrutsFileSet fileSet = new StrutsFileSet("test", "test", facetConfiguration);
    for (final String fileName : strutsXmlPaths) {
      final VirtualFile file;
      final String path;
      if (fileName.contains("!")) {
        path = PathManager.getHomePath() + TEST_DATA_PATH + "/" + fileName;
        file = JarFileSystem.getInstance().refreshAndFindFileByPath(path);
      }
      else {
        path = fileName;
        file = myFixture.copyFileToProject(fileName);
      }

      assertNotNull("could not find file: '" + path + "'", file);
      fileSet.addFile(file);
    }
    final Set<StrutsFileSet> strutsFileSetSet = facetConfiguration.getFileSets();
    strutsFileSetSet.add(fileSet);
  }
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.