File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
commonMain/kotlin/org/modelix/model/sync
jvmMain/kotlin/org/modelix/model/sync Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import org.modelix.model.api.getDescendants
8
8
import org.modelix.model.api.remove
9
9
import org.modelix.model.data.ModelData
10
10
import org.modelix.model.data.NodeData
11
+ import kotlin.jvm.JvmName
11
12
12
13
/* *
13
14
* A ModelImporter updates an existing [INode] and its subtree based on a [ModelData] specification.
@@ -30,6 +31,7 @@ class ModelImporter(private val root: INode) {
30
31
*
31
32
* @param data the model specification
32
33
*/
34
+ @JvmName(" importData" )
33
35
fun import (data : ModelData ) {
34
36
originalIdToExisting.clear()
35
37
postponedReferences.clear()
Original file line number Diff line number Diff line change @@ -3,12 +3,6 @@ package org.modelix.model.sync
3
3
import org.modelix.model.data.ModelData
4
4
import java.io.File
5
5
6
- // import is a reserved keyword in java
7
- @Deprecated(" Use importFile instead" , ReplaceWith (" importFile(jsonFile)" ))
8
- fun ModelImporter.import (jsonFile : File ) {
9
- this .importFile(jsonFile)
10
- }
11
-
12
6
/* *
13
7
* Incrementally updates the root of the receiver [ModelImporter]
14
8
* based on the [ModelData] specification contained in the given file.
@@ -17,7 +11,8 @@ fun ModelImporter.import(jsonFile: File) {
17
11
*
18
12
* @throws IllegalArgumentException if the file is not a json file or the file does not exist.
19
13
*/
20
- fun ModelImporter.importFile (jsonFile : File ) {
14
+ @JvmName(" importFile" )
15
+ fun ModelImporter.import (jsonFile : File ) {
21
16
require(jsonFile.exists())
22
17
require(jsonFile.extension == " json" )
23
18
You can’t perform that action at this time.
0 commit comments