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
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.
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.
Hi Matthew, Any update on the issue?
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:
Related
Feature Requests: #125
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
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 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