Package org.springframework.ide.eclipse.wizard.gettingstarted.content

Examples of org.springframework.ide.eclipse.wizard.gettingstarted.content.CodeSet


      System.out.println("name   : "+item.getName());
      System.out.println("type    : "+buildtype);
      System.out.println();
     
      String projectName = item.getName();
      CodeSet codeset = item.getCodeSet();
      IRunnableWithProgress importOp = buildtype.getImportStrategy().createOperation(importConfig(
          /*location*/
          Platform.getLocation().append(projectName),
          /*name*/
          projectName,
 
View Full Code Here


  public static void validateZipStructure(ReferenceApp app) throws IOException, Exception {
    File zipFile = app.getZip().getFile();
    assertTrue("Could not download "+ app.getZip(),
        zipFile!=null && zipFile.exists());
   
    CodeSet allData = CodeSet.fromZip("all", app.getZip(), new Path("/"));
    assertTrue("ZipFile is empty", allData.exists());
   
//    CodeSet.Processor<Void> printEntry = new CodeSet.Processor<Void>() {
//      public Void doit(CodeSetEntry e) {
//        System.out.println(e);
//        return null;
//      };
//    };
//    allData.each(printEntry);
   
    assertFolder(allData, app.getRootPath());
    String readme = app.getReadme();
    assertNotNull("No README.md file", readme);
   
    CodeSet codeset = app.getCodeSet();
    String codesetName = codeset.getName();
    assertTrue("No '"+codeset.getName()+"' codeset", codeset.exists());
   
    boolean isGradle = codeset.hasFile("build.gradle");
    boolean isMaven = codeset.hasFile("pom.xml");
    assertTrue("Codeset "+codesetName+" has neither a build.gradle nor a pom.xml", isGradle||isMaven);

  }
View Full Code Here

        public void doit(IProgressMonitor mon) throws Exception {
          File zipFile = guide.getZip().getFile();
          assertTrue("Could not download "+ guide.getZip(),
              zipFile!=null && zipFile.exists());
         
          CodeSet allData = CodeSet.fromZip("all", guide.getZip(), new Path("/"));
          assertTrue("ZipFile is empty", allData.exists());
         
  //        CodeSet.Processor<Void> printEntry = new CodeSet.Processor<Void>() {
  //          public Void doit(CodeSetEntry e) {
  //            System.out.println(e);
  //            return null;
View Full Code Here

    try {
      downloader = new DownloadManager().allowUIThread(allowUIThread);

      DownloadableItem zip = new DownloadableItem(newURL(downloadUrl .getValue()), downloader);
      String projectNameValue = projectName.getValue();
      CodeSet cs = CodeSet.fromZip(projectNameValue, zip, new Path("/"));

      IRunnableWithProgress oper = getImportStrategy().createOperation(ImportUtils.importConfig(
          new Path(location.getValue()),
          projectNameValue,
          cs
View Full Code Here

            return ValidationResult.error("No build type selected");
          } else {
            List<String> codesetNames = codesets.getValues();
            if (codesetNames!=null) {
              for (String csname : codesetNames) {
                CodeSet cs = g.getCodeSet(csname);
                if (cs!=null) {
                  ValidationResult result = cs.validateBuildType(bt);
                  if (!result.isOk()) {
                    return result.withMessage("CodeSet '"+csname+"': "+result.msg);
                  }
                  ImportStrategy importStrategy = bt.getImportStrategy();
                  if (!importStrategy.isSupported()) {
View Full Code Here

    Set<String> codesetNames = codesets.getValue();

    mon.beginTask("Import guide content", codesetNames.size()+1);
    try {
      for (String name : codesetNames) {
        CodeSet cs = g.getCodeSet(name);
        if (cs==null) {
          //Ignore 'invalid' codesets. This is a bit of a hack so that we can retain selected codeset names
          //  across guide selection changes. To do that we remember 'selected' cs names even if they
          //  aren't valid for the current guide. That way the checkbox state stays consistent
          //  when switching between guides (otherwise 'invalid' names would have to be cleared when switching to
View Full Code Here

          boolean codesetSelected = false;
          try {
            Set<String> names = selectedNames.getValue();
            if (names != null && !names.isEmpty()) {
              for (String name : names) {
                CodeSet cs = g.getCodeSet(name);
                if (cs!=null) {
                  codesetSelected = true;
                  ImportConfiguration conf = ImportUtils.importConfig(g, cs);
                  ValidationResult valid = ImportUtils.validateImportConfiguration(conf);
                  if (!valid.isOk()) {
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.wizard.gettingstarted.content.CodeSet

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.