From 87c69e4ff1f8830d1da935e751be122783576cfd Mon Sep 17 00:00:00 2001 From: Max Medvedev Date: Thu, 7 Mar 2024 19:35:32 +0100 Subject: [PATCH] add some docs for VFileCreateEvent GitOrigin-RevId: 605b03c9ae33ec0a8dd94bd713a2dcce16cd7415 --- .../vfs/newvfs/events/VFileCreateEvent.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileCreateEvent.java b/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileCreateEvent.java index 31441b7b55e8..059dfd44c90c 100644 --- a/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileCreateEvent.java +++ b/platform/core-api/src/com/intellij/openapi/vfs/newvfs/events/VFileCreateEvent.java @@ -10,6 +10,11 @@ import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +/** + * Create event for a {@link VirtualFile}.
+ * The created file name is {@link #getChildName()}.
+ * The created file is {@link #getFile()}. Use this method with caution, it can cause performance issues. + */ public final class VFileCreateEvent extends VFileEvent { private final VirtualFile myParent; private final boolean myDirectory; @@ -95,7 +100,14 @@ public final class VFileCreateEvent extends VFileEvent { return createdFile; } - public ChildInfo @Nullable("null means children not available (e.g. the created file is not a directory) or unknown") [] getChildren() { + /** + * Children of the created file if it's a directory. + *
+ * null is returned if the file is not a directory or the children are not known. + * + * @return children of the created file if it's a directory + */ + public ChildInfo @Nullable [] getChildren() { return myChildren; }