Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-975

Template Wizard does not create files on config FS

    XMLWordPrintableJSON

Details

    Description

      I wanted to use the

      o.o.loaders.TemplateWizard

      to create some files on config FS. I have vound that when the Wizard completes, the resulting FileObject is placed correctly, but comes from the underlying physical filesystem. Then checks like the following fail:

       

      wizard.setTargetFolder(DataFolder.findFolder(FileUtil.getConfigFile("scripts"));
      Set<DataObject> result = wizard.instantiate();
      FileObject fo = result.iterator().next().getPrimaryFile();
      FileObject cfRoot = FileUtil.getConfigRoot(); 
      if (FileUtil.isParentOf(cfRoot, fo)) {
        // never reached
      }
      

       

       

       

      Attachments

        Issue Links

          Activity

            People

              sdedic Svatopluk Dedic
              sdedic Svatopluk Dedic
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m