Menu

#125 Custom Code Template with comment patterns

open
nobody
None
5
2017-05-31
2017-05-18
Sagar
No

A custom code template with only commented pattern doesn't get picked when content assist (ctrl + space) is used.

Example Template:
Name: check_output
Context: SystemVerilog Template Context
Description: check_output
Pattern: //check_output

I could not get the pattern //check_output when I typed check_output and pressed Ctrl+space.
Content assist did not insert or even list out the above check_output template.

Please let Content assist print custom code templates with comments in the beginning of the pattern.
Currently only the template with the name being same as pattern (+ any other strings/comments) are shown by content assist.

Thanks and Regards,
Sagar

Related

Feature Requests: #125

Discussion

  • Sagar

    Sagar - 2017-05-19

    The issue is seen on 1.9.1 version of SVEditor.

    Following https://sourceforge.net/p/sveditor/feature-requests/85/, I tried using check_output as id for the template in the xml file and imported the xml file . I still could not get the pattern associated with check_output template when I typed check_output and Ctrl+space. On the other hand I was able to see check_output listed among many other in-built templates starting with c (like cazex, casez etc) after I typed c and ctrl+space twice. And further when i continued typing heck_output (after existing c) and pressed enter I was able to see all the comments (pattern) associated with check_output in the editor.

    However this is not the case when we have only one (or none) default template with a specific letter (example d), and we intend to add a template whose name starts with very same specific letter(d). For example,
    There is a default template do. And there are no other templates starting with d. Now I added a template disable_port with its id, name and description as disable_port and pattern as //disable_port.
    If I type d and press ctrl+space, I directly have the pattern associated with do written in the file.
    This fails content assist feature for custom templates in such cases.

     
  • Matthew Ballance

    I'm playing with this a bit. It seems that the underscore has something to do with this issue. Specifically, if I request content-assist on 'check', I receive a check_output proposal. However, requesting content assist on check_ or anything beyond doesn't produce any proposals.

     
  • Sagar

    Sagar - 2017-05-24

    Hi Matthew, Any update on the issue?

     
    • Matthew Ballance

      Hi Sagar,
      I looked investigated this up to the point where it appeared that the
      check_output proposal was being added to the list of proposals being
      returned to Eclipse. It also appeared that requesting content assist on
      anything that didn't include the underscore worked (eg ch<>, chec<>,
      check<>).
      So, at the moment I'm wondering whether there's an Eclipse issue at
      play here.

      Best Regards,
      Matthew

      On Wed, May 24, 2017 at 5:28 AM, Sagar sagarjogur@users.sf.net wrote:

      Hi Matthew, Any update on the issue?

      Status: open
      Group: Next_Release_(example)
      Created: Thu May 18, 2017 09:17 AM UTC by Sagar
      Last Updated: Fri May 19, 2017 05:30 AM UTC
      Owner: nobody

      A custom code template with only commented pattern doesn't get picked when
      content assist (ctrl + space) is used.

      Example Template:
      Name: check_output
      Context: SystemVerilog Template Context
      Description: check_output
      Pattern: //check_output

      I could not get the pattern //check_output when I typed check_output
      and pressed Ctrl+space.
      Content assist did not insert or even list out the above check_output
      template.

      Please let Content assist print custom code templates with comments in the
      beginning of the pattern.
      Currently only the template with the name being same as pattern (+ any
      other strings/comments) are shown by content assist.

      Thanks and Regards,
      Sagar


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/sveditor/feature-requests/125/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Feature Requests: #125

  • Sagar

    Sagar - 2017-05-30

    Hi Mathew,

    Is there a way to bundle the Code Templates into a .epf file (via Export) and save them into our worksapce. This way the Code templates could be picked from the same .epf for different projects as long as we are in same worksapce.

    Thanks and Regards,
    Sagar Jogur

     
    • Matthew Ballance

      Hi Sagar,
      There isn't currently a way to do this, but I've added support for the
      2.0.0 release.

      Best Regards,
      Matthew

      On Mon, May 29, 2017 at 9:03 PM, Sagar sagarjogur@users.sf.net wrote:

      Hi Mathew,

      Is there a way to bundle the Code Templates into a .epf file (via Export)
      and save them into our worksapce. This way the Code templates could be
      picked from the same .epf for different projects as long as we are in same
      worksapce.

      Thanks and Regards,
      Sagar Jogur


      Status: open
      Group: Next_Release_(example)
      Created: Thu May 18, 2017 09:17 AM UTC by Sagar
      Last Updated: Wed May 24, 2017 12:28 PM UTC
      Owner: nobody

      A custom code template with only commented pattern doesn't get picked when
      content assist (ctrl + space) is used.

      Example Template:
      Name: check_output
      Context: SystemVerilog Template Context
      Description: check_output
      Pattern: //check_output

      I could not get the pattern //check_output when I typed check_output
      and pressed Ctrl+space.
      Content assist did not insert or even list out the above check_output
      template.

      Please let Content assist print custom code templates with comments in the
      beginning of the pattern.
      Currently only the template with the name being same as pattern (+ any
      other strings/comments) are shown by content assist.

      Thanks and Regards,
      Sagar


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/sveditor/feature-requests/125/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Sagar

    Sagar - 2017-05-31

    Hi Matthew,

    With 2.0.0 version, I see ADD written on my linux command prompt whenever I use Content Assist for Code Templates. The number of ADD written on terminal depends on the number of propsals returned by content assist. For example when I type case and press Ctrl+space, I see ADD three times on command prompt which is the number of default code template propsals for case (i.e, case, casex and casez).

    Thanks and Regards,
    Sagar Jogur

     

Log in to post a comment.

MongoDB Logo MongoDB