Found the limitation of getCurrentAttributeName() method of AbstractPositionRequest class #583
Labels
completion
This issue or enhancement is related to completion support
debt
This issue or enhancement is related to technical debt
hover
Milestone
Hi @angelozerr and @fbricon
I found a limitation for getCurrentAtrributeName() method of AbstractPositionReqest class.
When I try to support hover feature for attribute name, I found it's difficult to get correct attribute name.
@Override public String getCurrentAttributeName() { return currentAttributeName; }
It because before we use get method, we should set the attribute name first (Like XMLCompletions.doComplete method does).
How about try to get the attribute name by DOM first. Like getCurrentTag() does.
Like follows:
@Override
public String getCurrentAttributeName() {
if (node != null && node.isAttribute() && ((DOMAttr) node).getName() != null) {
return ((DOMAttr) node).getName();
}
return currentAttributeName;
}
The text was updated successfully, but these errors were encountered: