/** * Add all children as candidates * * @param root the root context * @param parent the parent context * @param metaData the structure meta data * @param deployers the structure deployers * @param attributes the visitor attributes uses {@link VisitorAttributes#DEFAULT} when null * @throws Exception for any error */ protected void addChildren(VirtualFile root, VirtualFile parent, StructureMetaData metaData, VFSStructuralDeployers deployers, VisitorAttributes attributes) throws Exception { if (parent == null) throw new IllegalArgumentException("Null parent"); VirtualFileVisitor visitor = candidateStructureVisitorFactory.createVisitor(root, parent, metaData, deployers, attributes); parent.visit(visitor); }
/** * Add all children as candidates * * @param context the structure context * @param attributes the visitor attributes uses {@link VisitorAttributes#DEFAULT} when null * @throws Exception for any error */ protected void addChildren(StructureContext context, VisitorAttributes attributes) throws Exception { if (context == null) throw new IllegalArgumentException("Null context"); VirtualFile file = context.getFile(); VirtualFileVisitor visitor = candidateStructureVisitorFactory.createVisitor(context, attributes); file.visit(visitor); }