aboutsummaryrefslogtreecommitdiff
path: root/src/Analysis/CoreProjectFileIndex.kt
blob: 916eab736df75625859871b03d0c883499856f7f (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
package org.jetbrains.dokka

import com.intellij.openapi.module.Module
import com.intellij.openapi.roots.ContentIterator
import com.intellij.openapi.roots.OrderEntry
import com.intellij.openapi.roots.ProjectFileIndex
import com.intellij.openapi.vfs.VirtualFile
import org.jetbrains.jps.model.module.JpsModuleSourceRootType

/**
 * Workaround for the lack of ability to create a ProjectFileIndex implementation using only
 * classes from projectModel-{api,impl}.
 */
class CoreProjectFileIndex(): ProjectFileIndex {
    override fun getContentRootForFile(p0: VirtualFile): VirtualFile? {
        throw UnsupportedOperationException()
    }

    override fun getContentRootForFile(p0: VirtualFile, p1: Boolean): VirtualFile? {
        throw UnsupportedOperationException()
    }

    override fun getPackageNameByDirectory(p0: VirtualFile): String? {
        throw UnsupportedOperationException()
    }

    override fun isInLibrarySource(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun getClassRootForFile(p0: VirtualFile): VirtualFile? {
        throw UnsupportedOperationException()
    }

    override fun getOrderEntriesForFile(p0: VirtualFile): List<OrderEntry> = emptyList()

    override fun isInLibraryClasses(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isExcluded(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun getSourceRootForFile(p0: VirtualFile): VirtualFile? {
        throw UnsupportedOperationException()
    }

    override fun isUnderIgnored(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isLibraryClassFile(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun getModuleForFile(p0: VirtualFile): Module? = null

    override fun getModuleForFile(p0: VirtualFile, p1: Boolean): Module? {
        throw UnsupportedOperationException()
    }

    override fun isInSource(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isIgnored(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isContentSourceFile(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isInSourceContent(p0: VirtualFile): Boolean = false

    override fun iterateContent(p0: ContentIterator): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isInContent(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun iterateContentUnderDirectory(p0: VirtualFile, p1: ContentIterator): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isInTestSourceContent(p0: VirtualFile): Boolean {
        throw UnsupportedOperationException()
    }

    override fun isUnderSourceRootOfType(p0: VirtualFile, p1: MutableSet<out JpsModuleSourceRootType<*>>): Boolean {
        throw UnsupportedOperationException()
    }
}