use of com.android.tools.lint.detector.api.Position in project android by JetBrains.
the class DomPsiParser method getLocation.
@NonNull
@Override
public Location getLocation(@NonNull XmlContext context, @NonNull Node node, int startDelta, int endDelta) {
TextRange textRange = DomPsiConverter.getTextRange(node);
Position start = new LintXmlPosition(node, textRange.getStartOffset() + startDelta);
Position end = new LintXmlPosition(node, textRange.getStartOffset() + endDelta);
return Location.create(context.file, start, end);
}
use of com.android.tools.lint.detector.api.Position in project android by JetBrains.
the class DomPsiParser method getLocation.
@NonNull
@Override
public Location getLocation(@NonNull XmlContext context, @NonNull Node node) {
TextRange textRange = DomPsiConverter.getTextRange(node);
Position start = new LintXmlPosition(node, textRange.getStartOffset());
Position end = new LintXmlPosition(node, textRange.getEndOffset());
return Location.create(context.file, start, end);
}
use of com.android.tools.lint.detector.api.Position in project android by JetBrains.
the class DomPsiParser method getValueLocation.
@NonNull
@Override
public Location getValueLocation(@NonNull XmlContext context, @NonNull Attr node) {
TextRange textRange = DomPsiConverter.getTextValueRange(node);
Position start = new LintXmlPosition(node, textRange.getStartOffset());
Position end = new LintXmlPosition(node, textRange.getEndOffset());
return Location.create(context.file, start, end);
}
use of com.android.tools.lint.detector.api.Position in project android by JetBrains.
the class DomPsiParser method getNameLocation.
@NonNull
@Override
public Location getNameLocation(@NonNull XmlContext context, @NonNull Node node) {
TextRange textRange = DomPsiConverter.getTextNameRange(node);
Position start = new LintXmlPosition(node, textRange.getStartOffset());
Position end = new LintXmlPosition(node, textRange.getEndOffset());
return Location.create(context.file, start, end);
}