This topic contains 8 replies, has 0 voices, and was last updated by starlingMark 7 years, 4 months ago.

  • Author
    Posts
  • #18423

    starlingMark

    I almost feel ashamed of myself for asking this. But here goes. Total noob question.

    What is the default folder for SS2.0 templates in Eclipse?
    This is a cached copy. Click here to see the original post.

  • #18424

    erictgrubaugh

    You can put them in the same folder as the 1.0 templates. If you don’t have a custom folder already, the default one is packed away in one of the plugin JARs. I’ve got a template repository, and the README explains how to set them up: https://gitlab.com/erictgrubaugh/ecl…ript-templates I haven’t used Eclipse in a while so hopefully it’s all still correct.

  • #18425

    starlingMark

    Very helpful – thank you!

  • #18426

    starlingMark

    Eric,

    I have been tinkering with this. These are excellent. One question/issue – I can’t seem to get the variables to populate. For instance, ${year} and ${author} don’t populate with the proper values. They just show up as text. Any thoughts?

  • #18427

    erictgrubaugh

    That’s odd; how are you creating new files with the templates? As long as you’re using the standard “SuiteScript File” creation dialog, they should populate.

  • #18428

    starlingMark

    I am creating the new file as you describe. I typically have a folder already setup and will click on New -> SuiteScript File. Then I will select my type from the dialog menu. The proper template is sourced, but the ${date} and ${author} don’t populate – they just show up as text.

  • #18429

    erictgrubaugh

    Well you’re doing it correctly; I don’t know if I can help further as I don’t know what might be going on. Are there any other template variables that *do* populate?

  • #18430

    starlingMark

    Yup – the ${modules}, ${modulesJsDoc} and ${moduleParameters} all populate properly. Just not ${date} and ${author}. I’ve also tried removing these two variables from the commented section at the top, but this does not change the behaviour.

  • #18431

    starlingMark

    Just to add a bit more strangeness to the whole affair – if I put ${date} and ${author} in the ss_2_0_header file, it works properly.

You must be logged in to reply to this topic.