This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 243697 - xml completion on attribute values is missing context
Summary: xml completion on attribute values is missing context
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0.1
Hardware: PC Mac OS X
: P1 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-09 13:49 UTC by Milos Kleint
Modified: 2015-09-07 11:34 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milos Kleint 2014-04-09 13:49:56 UTC
consider this xml snippet (| signifies where completion is triggered)
<resource type="freemarker" name="edit" location="e|ditTask.ftl"/>

codewise it is routed to org.netbeans.modules.xml.api.model.GrammarQuery's
Enumeration<GrammarResult> queryValues(HintContext virtualTextCtx) method.

unfortunately the resulting HintContext instance returns null on getParentNode() this disallows discovering the context of the query (that the enclosing element is "resource")

getParentNode() typically works in other places (attribute keys, element names, text values)
Comment 1 Svata Dedic 2015-09-07 11:34:10 UTC
API was not designed in a way which would provide a context.