本文整理汇总了Java中com.intellij.openapi.vfs.VirtualFileEvent.getRequestor方法的典型用法代码示例。如果您正苦于以下问题:Java VirtualFileEvent.getRequestor方法的具体用法?Java VirtualFileEvent.getRequestor怎么用?Java VirtualFileEvent.getRequestor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vfs.VirtualFileEvent
的用法示例。
在下文中一共展示了VirtualFileEvent.getRequestor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onFileContentChanged
import com.intellij.openapi.vfs.VirtualFileEvent; //导入方法依赖的package包/类
private void onFileContentChanged(final VirtualFileEvent event) {
VirtualFile file = event.getFile();
if (event.getRequestor() == null && isFileUnder(file, myVFSBaseDir) && !myInsideSave) {
File ioFile = new File(file.getPath());
E scheme = findSchemeFor(ioFile.getName());
ArrayList<E> read = new ArrayList<E>();
T oldCurrentScheme = null;
if (scheme != null) {
oldCurrentScheme = getCurrentScheme();
@SuppressWarnings("unchecked") T t = (T)scheme;
removeScheme(t);
myProcessor.onSchemeDeleted(scheme);
}
readSchemeFromFile(read, file, true);
if (!read.isEmpty()) {
E readScheme = read.get(0);
myProcessor.initScheme(readScheme);
myProcessor.onSchemeAdded(readScheme);
T newCurrentScheme = getCurrentScheme();
if (oldCurrentScheme != null && newCurrentScheme == null) {
setCurrentSchemeName(readScheme.getName());
newCurrentScheme = getCurrentScheme();
}
if (oldCurrentScheme != newCurrentScheme) {
myProcessor.onCurrentSchemeChanged(oldCurrentScheme);
}
}
}
}
示例2: projectStorageFileChanged
import com.intellij.openapi.vfs.VirtualFileEvent; //导入方法依赖的package包/类
private void projectStorageFileChanged(@Nonnull VirtualFileEvent event, @Nonnull StateStorage storage, @Nullable Project project) {
VirtualFile file = event.getFile();
if (!StorageUtil.isChangedByStorageOrSaveSession(event) && !(event.getRequestor() instanceof ProjectManagerImpl)) {
registerProjectToReload(project, file, storage);
}
}
示例3: isChangedByStorageOrSaveSession
import com.intellij.openapi.vfs.VirtualFileEvent; //导入方法依赖的package包/类
public static boolean isChangedByStorageOrSaveSession(@Nonnull VirtualFileEvent event) {
return event.getRequestor() instanceof StateStorage.SaveSession || event.getRequestor() instanceof StateStorage;
}