Skip to content

Commit

Permalink
improve getCurrentAttribute method for AbstractPositionReqest
Browse files Browse the repository at this point in the history
  • Loading branch information
Seiphon committed Oct 24, 2019
1 parent 68d9292 commit d292aab
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import org.eclipse.lsp4j.Position;
import org.eclipse.lsp4xml.commons.BadLocationException;
import org.eclipse.lsp4xml.dom.DOMAttr;
import org.eclipse.lsp4xml.dom.DOMDocument;
import org.eclipse.lsp4xml.dom.DOMElement;
import org.eclipse.lsp4xml.dom.DOMNode;
Expand Down Expand Up @@ -101,6 +102,9 @@ public String getCurrentTag() {

@Override
public String getCurrentAttributeName() {
if (node != null && node.isAttribute() && ((DOMAttr) node).getName() != null) {
return ((DOMAttr) node).getName();
}
return currentAttributeName;
}

Expand Down

0 comments on commit d292aab

Please sign in to comment.