use of lombok.ast.Position in project kotlin by JetBrains.
the class JavaContext method isSuppressedWithComment.
/**
* @deprecated Use {@link #isSuppressedWithComment(PsiElement, Issue)} instead
*/
@Deprecated
public boolean isSuppressedWithComment(@NonNull Node scope, @NonNull Issue issue) {
// Check whether there is a comment marker
String contents = getContents();
// otherwise we wouldn't be here
assert contents != null;
Position position = scope.getPosition();
if (position == null) {
return false;
}
int start = position.getStart();
return isSuppressedWithComment(start, issue);
}
use of lombok.ast.Position in project android by JetBrains.
the class LintIdeJavaParser method getRangeLocation.
@NonNull
@Override
public Location getRangeLocation(@NonNull JavaContext context, @NonNull Node from, int fromDelta, @NonNull Node to, int toDelta) {
Position position1 = from.getPosition();
Position position2 = to.getPosition();
if (position1 == null) {
return getLocation(context, to);
} else if (position2 == null) {
return getLocation(context, from);
}
int start = Math.max(0, from.getPosition().getStart() + fromDelta);
int end = to.getPosition().getEnd() + toDelta;
return Location.create(context.file, null, start, end);
}
use of lombok.ast.Position in project kotlin by JetBrains.
the class IdeaJavaParser method getRangeLocation.
@Override
public Location getRangeLocation(@NonNull JavaContext context, @NonNull Node from, int fromDelta, @NonNull Node to, int toDelta) {
Position position1 = from.getPosition();
Position position2 = to.getPosition();
if (position1 == null) {
return getLocation(context, to);
} else if (position2 == null) {
return getLocation(context, from);
}
int start = Math.max(0, from.getPosition().getStart() + fromDelta);
int end = to.getPosition().getEnd() + toDelta;
return Location.create(context.file, null, start, end);
}