Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 163428 - User create Java Code Template broken - Contexts not set
User create Java Code Template broken - Contexts not set
Status: RESOLVED DUPLICATE of bug 160771
Product: editor
Classification: Unclassified
Component: Completion & Templates
All Linux
: P3 (vote)
: 6.x
Assigned To: Dusan Balek
Depends on:
  Show dependency treegraph
Reported: 2009-04-22 20:04 UTC by trvs2cool
Modified: 2009-04-24 12:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description trvs2cool 2009-04-22 20:04:21 UTC
When I create a new Java Code Template (via options->Editor->Code Template->New), the new template never appears in the
code completion popup.

However, if I edit an existing one, the existing one works as expected (including the changes I made).  

Looking at
$userdir/6.5/config/Editors/text/x-java/CodeTemplates/org-netbeans-modules-editor-settings-CustomCodeTemplates.xml, it
appears that the user created one does not have a context set, while the existing edited one does.

If I hand edit the xml and include a context on the user created one, everything works as expected.

So, either a context has to be set automatically on user created code templates or code templates without a context need
to be shown every where.

Additionally, it would be nice to know what contexts are available in the Java editor since they are just arbitrary

I believe this is probably the same issue as mentioned in 160771, but that was incorrectly marked as an enhancement so I
created a new bug.
Comment 1 Vitezslav Stejskal 2009-04-24 12:45:43 UTC
Ideally the context should be selectable in Tools-Options -> Editor -> Code Templates. As you said it's the same problem
as issue #160771.

*** This issue has been marked as a duplicate of 160771 ***

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo