int end = node.getPosition().getEnd(); if (node.astPackageDeclaration() != null) start = Math.min(start, node.astPackageDeclaration().getPosition().getStart()); if (!node.astImportDeclarations().isEmpty()) start = Math.min(start, node.rawImportDeclarations().first().getPosition().getStart()); if (!node.astTypeDeclarations().isEmpty()) start = Math.min(start, node.rawTypeDeclarations().first().getPosition().getStart()); if (start == Integer.MAX_VALUE) start = node.getPosition().getStart(); return set(node, setPos(start, end, topLevel));
int end = node.getPosition().getEnd(); if (node.astPackageDeclaration() != null) start = Math.min(start, node.astPackageDeclaration().getPosition().getStart()); if (!node.astImportDeclarations().isEmpty()) start = Math.min(start, node.rawImportDeclarations().first().getPosition().getStart()); if (!node.astTypeDeclarations().isEmpty()) start = Math.min(start, node.rawTypeDeclarations().first().getPosition().getStart()); if (start == Integer.MAX_VALUE) start = node.getPosition().getStart(); return set(node, setPos(start, end, topLevel));
int end = node.getPosition().getEnd(); if (node.astPackageDeclaration() != null) start = Math.min(start, node.astPackageDeclaration().getPosition().getStart()); if (!node.astImportDeclarations().isEmpty()) start = Math.min(start, node.rawImportDeclarations().first().getPosition().getStart()); if (!node.astTypeDeclarations().isEmpty()) start = Math.min(start, node.rawTypeDeclarations().first().getPosition().getStart()); if (start == Integer.MAX_VALUE) start = node.getPosition().getStart(); return set(node, setPos(start, end, topLevel));