DataContext (VirtualFile vFile, Editor editor, Component componentParent) { DataContext parent = DataManager.getInstance().getDataContext(componentParent); return SimpleDataContext.builder() .setParent(parent) .add(CommonDataKeys.VIRTUAL_FILE, vFile) .add(CommonDataKeys.VIRTUAL_FILE_ARRAY, new VirtualFile[]{vFile}) .add(CommonDataKeys.PROJECT, editor.getProject()) .add(PlatformCoreDataKeys.CONTEXT_COMPONENT, editor.getComponent()) .build(); }