Code Snippet and Templates

The Welkin Suite Forum

Code Snippet and Templates



Code Snippet and Templates

  • Please log in to reply

#1

jean.jaenicke

    Posted 29 Apr 2016

    Hi,


    Are they any way to create templates from trigger or classes and/or snippet for code structures like Try-Catch?


    Regards,

    Jean



    11 replies to this topic

    #2

    jean.jaenicke

      Posted 29 Apr 2016

      Hi,


      Regarding the Snippet I see an option in the tools menu and that there are some already existing.

      Now is there a way to personalize them? (that could answer my other question regarding bracketing options).


      My question regarding classe templates still stands


      Thank you

      Jean



      #3

      kate.dulko

        Posted 29 Apr 2016

        Hi Jean,


        Thank you for your question.


        Yes, you can use the Code Snippets functionality for the code structure like 'Try-Catch' template. To get more info about the editing or adding your own snippets you can find in our Blog under this topic.

        These snippets you can use  for both classes and triggers.


        Regards,

        Kate


        Kate Dulko
        Customer Relations

        The Welkin Suite

        twitter: @KateDulko
        skype id: d_katerina
        e-mail: kate.dulko@welkinsuite.com

         

          


        #4

        jean.jaenicke

          Posted 29 Apr 2016

          Thanks I'll try this


          regards,

          Jean



          #5

          jean.jaenicke

            Posted 14 May 2016

            I get an error while trying to import my snippets in the snippet folder:

            The Code snippet cannot be saved to this location, please check your permissions and try again

            is that something linked to TWS or just my windows file system?



            #6

            kate.dulko

              Posted 16 May 2016

              Hi Jean, 


              Thank you for your question.


              May I please clarify with you if you have imported your own snippets to the default TWS folder with the snippets?

              Please, create a separate custom folder for your snippets and then import this folder into the Code Snippets manager.


              I kindly ask you to inform us if this action will solve the issue for you.


              Thank you,

              kate


              Kate Dulko
              Customer Relations

              The Welkin Suite

              twitter: @KateDulko
              skype id: d_katerina
              e-mail: kate.dulko@welkinsuite.com

               

                


              #7

              jean.jaenicke

                Posted 20 May 2016

                Hi Kate,


                Thank you for your reply, unfortunately I wasn't able to add my snippets.

                I created them in a personnal forder under my Documents, go to the snippet manager and try the following:

                - Click on Import, select my snippets and add them to the default snippet folder in extension\application\editor\Codesnippets

                - Click on Add and add my snippet folder to the snippet manager (that add the folder but not the snippets and while restarting its gone)

                - Add a folder under the codesnippets folder and add the snippets from my folder which works but at the end with the same result as my second try (snippets not showing and everything gone while restarting)


                Do you have any idea what I could have done wrong?


                regards,

                Jean



                #8

                kate.dulko

                  Posted 20 May 2016

                  Hi Jean,


                  Thank you for these details.


                  The third way you have used is the recommended one to import custom snippets.

                  As a result of your post, we have found the issue related to the imported snippets. They are not saved as imported after the restarting of the IDE, but should.


                  Our team is going to fix this issue.

                  I'll keep you updated when this will be resolved inside the IDE.


                  Thank you,
                  Kate


                  Kate Dulko
                  Customer Relations

                  The Welkin Suite

                  twitter: @KateDulko
                  skype id: d_katerina
                  e-mail: kate.dulko@welkinsuite.com

                   

                    


                  #9

                  jean.jaenicke

                    Posted 20 May 2016

                    Hi,


                    I may have find an issue on my side, in my snippet definition I used

                    <Shortcut>Method</Shortcut>

                    with Method in place of method.

                    I changed the M for m and now after import my snippet are showing...


                    please keep me informed when the saving issue is resolved


                    thanks

                    Jean



                    #10

                    kate.dulko

                      Posted 20 May 2016

                      Hi again Jean,


                      Of course, I'll keep you informed.


                      Regards,

                      Kate


                      Kate Dulko
                      Customer Relations

                      The Welkin Suite

                      twitter: @KateDulko
                      skype id: d_katerina
                      e-mail: kate.dulko@welkinsuite.com

                       

                        


                      #11

                      jean.jaenicke

                        Posted 08 Jul 2016

                        Hi,


                        I can't see my snippet in code completion, is that something from the new version?


                        regards,

                        jean



                        #12

                        kate.dulko

                          Posted 11 Jul 2016

                          Hi Jean,


                          Thank you for drawing our attention to this issue.


                          I've added this to our agenda. We will solve this issue as soon as possible.


                          As a workaround, you can use the 'Ctrl+K+X' hotkey for inserting your snippets into your code. In this case, you will get the list of all the snippets, and you can select the necessary one.


                          I'll keep you updated when your issue will be solved.


                          Regards,

                          Kate


                          Kate Dulko
                          Customer Relations

                          The Welkin Suite

                          twitter: @KateDulko
                          skype id: d_katerina
                          e-mail: kate.dulko@welkinsuite.com

                           

                            





                          Boost Your Productivity. Get Started Today

                          Try Free Trial