blob: 002070e0243e544be5fbf5bf333e2e5bb571737b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
/*
* Copyright 2000-2014 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.openapi.vfs;
import org.jetbrains.annotations.NotNull;
import java.util.EventListener;
/**
* Receives notifications about changes in the virtual file system.
*
* @see com.intellij.openapi.vfs.VirtualFileManager#addVirtualFileListener(VirtualFileListener)
* @see com.intellij.openapi.vfs.VirtualFileAdapter
*/
public interface VirtualFileListener extends EventListener {
/**
* Fired when a virtual file is renamed from within IDEA, or its writable status is changed.
* For files renamed externally, {@link #fileCreated} and {@link #fileDeleted} events will be fired.
*
* @param event the event object containing information about the change.
*/
void propertyChanged(@NotNull VirtualFilePropertyEvent event);
/**
* Fired when the contents of a virtual file is changed.
*
* @param event the event object containing information about the change.
*/
void contentsChanged(@NotNull VirtualFileEvent event);
/**
* Fired when a virtual file is created. This event is not fired for files discovered during initial VFS initialization.
*
* @param event the event object containing information about the change.
*/
void fileCreated(@NotNull VirtualFileEvent event);
/**
* Fired when a virtual file is deleted.
*
* @param event the event object containing information about the change.
*/
void fileDeleted(@NotNull VirtualFileEvent event);
/**
* Fired when a virtual file is moved from within IDEA.
*
* @param event the event object containing information about the change.
*/
void fileMoved(@NotNull VirtualFileMoveEvent event);
/**
* Fired when a virtual file is copied from within IDEA.
*
* @param event the event object containing information about the change.
*/
void fileCopied(@NotNull VirtualFileCopyEvent event);
/**
* Fired before the change of a name or writable status of a file is processed.
*
* @param event the event object containing information about the change.
*/
void beforePropertyChange(@NotNull VirtualFilePropertyEvent event);
/**
* Fired before the change of contents of a file is processed.
*
* @param event the event object containing information about the change.
*/
void beforeContentsChange(@NotNull VirtualFileEvent event);
/**
* Fired before the deletion of a file is processed.
*
* @param event the event object containing information about the change.
*/
void beforeFileDeletion(@NotNull VirtualFileEvent event);
/**
* Fired before the movement of a file is processed.
*
* @param event the event object containing information about the change.
*/
void beforeFileMovement(@NotNull VirtualFileMoveEvent event);
}
|