-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine the MockContentEntry classes.
- Loading branch information
Showing
3 changed files
with
114 additions
and
250 deletions.
There are no files selected for viewing
104 changes: 0 additions & 104 deletions
104
src/intellij-compat/src/223/compat/com/intellij/compat/openapi/roots/MockContentEntry.kt
This file was deleted.
Oops, something went wrong.
127 changes: 0 additions & 127 deletions
127
src/intellij-compat/src/223/native/com/intellij/compat/openapi/roots/MockContentEntry.kt
This file was deleted.
Oops, something went wrong.
133 changes: 114 additions & 19 deletions
133
src/intellij-test/main/uk/co/reecedunn/intellij/plugin/core/tests/roots/MockContentEntry.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,123 @@ | ||
/* | ||
* Copyright (C) 2018, 2022 Reece H. Dunn | ||
* | ||
* 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. | ||
*/ | ||
// Copyright (C) 2018, 2022-2023 Reece H. Dunn. SPDX-License-Identifier: Apache-2.0 | ||
package uk.co.reecedunn.intellij.plugin.core.tests.roots | ||
|
||
import com.intellij.compat.openapi.roots.MockContentEntry | ||
import com.intellij.openapi.roots.* | ||
import com.intellij.compat.openapi.roots.ContentEntry | ||
import com.intellij.openapi.roots.ExcludeFolder | ||
import com.intellij.openapi.roots.ModuleRootModel | ||
import com.intellij.openapi.roots.ProjectModelExternalSource | ||
import com.intellij.openapi.roots.SourceFolder | ||
import com.intellij.openapi.vfs.VirtualFile | ||
import org.jetbrains.jps.model.JpsElement | ||
import org.jetbrains.jps.model.java.JavaSourceRootType | ||
import org.jetbrains.jps.model.module.JpsModuleSourceRootType | ||
|
||
@Suppress("UnstableApiUsage") | ||
class MockContentEntry(private val file: VirtualFile) : ContentEntry { | ||
override fun isSynthetic(): Boolean = TODO() | ||
|
||
override fun getFile(): VirtualFile = TODO() | ||
|
||
override fun getUrl(): String = TODO() | ||
|
||
@Suppress("NonExtendableApiUsage") | ||
class MockContentEntry(private val file: VirtualFile) : MockContentEntry() { | ||
override fun getSourceFolders(): Array<SourceFolder> { | ||
return arrayOf(MockSourceFolder(file, JavaSourceRootType.SOURCE)) | ||
} | ||
|
||
override fun getSourceFolders(rootType: JpsModuleSourceRootType<*>): MutableList<SourceFolder> = TODO() | ||
|
||
override fun getSourceFolders( | ||
rootTypes: MutableSet<out JpsModuleSourceRootType<*>> | ||
): MutableList<SourceFolder> = TODO() | ||
|
||
override fun getSourceFolderFiles(): Array<VirtualFile> = TODO() | ||
|
||
override fun getExcludeFolders(): Array<ExcludeFolder> = TODO() | ||
|
||
override fun getExcludeFolderUrls(): MutableList<String> = TODO() | ||
|
||
override fun getExcludeFolderFiles(): Array<VirtualFile> = TODO() | ||
|
||
override fun addSourceFolder(file: VirtualFile, isTestSource: Boolean): SourceFolder = TODO() | ||
|
||
override fun addSourceFolder( | ||
file: VirtualFile, | ||
isTestSource: Boolean, | ||
packagePrefix: String | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement> addSourceFolder( | ||
file: VirtualFile, | ||
type: JpsModuleSourceRootType<P>, | ||
properties: P | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement?> addSourceFolder( | ||
file: VirtualFile, | ||
type: JpsModuleSourceRootType<P> | ||
): SourceFolder = TODO() | ||
|
||
override fun addSourceFolder(url: String, isTestSource: Boolean): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement?> addSourceFolder( | ||
url: String, | ||
type: JpsModuleSourceRootType<P> | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement?> addSourceFolder( | ||
url: String, | ||
type: JpsModuleSourceRootType<P>, | ||
externalSource: ProjectModelExternalSource | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement?> addSourceFolder( | ||
url: String, | ||
type: JpsModuleSourceRootType<P>, | ||
useSourceOfContentRoot: Boolean | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement> addSourceFolder( | ||
url: String, | ||
type: JpsModuleSourceRootType<P>, | ||
properties: P | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement> addSourceFolder( | ||
url: String, | ||
type: JpsModuleSourceRootType<P>, | ||
properties: P, | ||
isAutomaticallyImported: Boolean | ||
): SourceFolder = TODO() | ||
|
||
override fun <P : JpsElement> addSourceFolder( | ||
url: String, | ||
type: JpsModuleSourceRootType<P>, | ||
properties: P, | ||
externalSource: ProjectModelExternalSource? | ||
): SourceFolder = TODO() | ||
|
||
override fun removeSourceFolder(sourceFolder: SourceFolder): Unit = TODO() | ||
|
||
override fun clearSourceFolders(): Unit = TODO() | ||
|
||
override fun addExcludeFolder(file: VirtualFile): ExcludeFolder = TODO() | ||
|
||
override fun addExcludeFolder(url: String): ExcludeFolder = TODO() | ||
|
||
override fun addExcludeFolder(url: String, isAutomaticallyImported: Boolean): ExcludeFolder = TODO() | ||
|
||
override fun removeExcludeFolder(excludeFolder: ExcludeFolder): Unit = TODO() | ||
|
||
override fun removeExcludeFolder(url: String): Boolean = TODO() | ||
|
||
override fun clearExcludeFolders(): Unit = TODO() | ||
|
||
override fun getExcludePatterns(): MutableList<String> = TODO() | ||
|
||
override fun addExcludePattern(pattern: String): Unit = TODO() | ||
|
||
override fun removeExcludePattern(pattern: String): Unit = TODO() | ||
|
||
override fun setExcludePatterns(patterns: MutableList<String>): Unit = TODO() | ||
|
||
override fun getRootModel(): ModuleRootModel = TODO() | ||
} |