diff --git a/harness/flattened-library-tests/src/main/kotlin/godot/tests/library/flattened/Simple.kt b/harness/flattened-library-tests/src/main/kotlin/godot/tests/library/flattened/Simple.kt index f4868950b..c905ae2ce 100644 --- a/harness/flattened-library-tests/src/main/kotlin/godot/tests/library/flattened/Simple.kt +++ b/harness/flattened-library-tests/src/main/kotlin/godot/tests/library/flattened/Simple.kt @@ -2,7 +2,7 @@ package godot.tests.library.flattened import godot.Node3D import godot.annotation.Export -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript @@ -11,6 +11,6 @@ class Simple: Node3D() { @Export var testProperty = "Hello from flattened-library-test!" - @GodotMember + @Member fun provideGreeting(): String = testProperty } diff --git a/harness/fqname-library-tests/src/main/kotlin/godot/tests/library/fqname/Simple.kt b/harness/fqname-library-tests/src/main/kotlin/godot/tests/library/fqname/Simple.kt index 10240ffff..d1f2544f3 100644 --- a/harness/fqname-library-tests/src/main/kotlin/godot/tests/library/fqname/Simple.kt +++ b/harness/fqname-library-tests/src/main/kotlin/godot/tests/library/fqname/Simple.kt @@ -2,7 +2,7 @@ package godot.tests.library.fqname import godot.Node3D import godot.annotation.Export -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript @@ -11,6 +11,6 @@ open class Simple: Node3D() { @Export var testProperty = "Hello from fqname-library-test!" - @GodotMember + @Member fun provideGreeting(): String = testProperty } diff --git a/harness/hierarchical-library-tests/src/main/kotlin/godot/tests/library/hierarchical/Simple.kt b/harness/hierarchical-library-tests/src/main/kotlin/godot/tests/library/hierarchical/Simple.kt index 2f9760e96..b85e8d173 100644 --- a/harness/hierarchical-library-tests/src/main/kotlin/godot/tests/library/hierarchical/Simple.kt +++ b/harness/hierarchical-library-tests/src/main/kotlin/godot/tests/library/hierarchical/Simple.kt @@ -2,7 +2,7 @@ package godot.tests.library.hierarchical import godot.Node3D import godot.annotation.Export -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript @@ -11,6 +11,6 @@ class Simple: Node3D() { @Export var testProperty = "Hello from hierarchical-library-test!" - @GodotMember + @Member fun provideGreeting(): String = testProperty } diff --git a/harness/tests/otherSourceDir/CoreTypePropertyChecks.kt b/harness/tests/otherSourceDir/CoreTypePropertyChecks.kt index 1f03f13e3..b79481cad 100644 --- a/harness/tests/otherSourceDir/CoreTypePropertyChecks.kt +++ b/harness/tests/otherSourceDir/CoreTypePropertyChecks.kt @@ -1,6 +1,6 @@ import godot.Node import godot.annotation.Export -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Vector3 @@ -18,10 +18,10 @@ class CoreTypePropertyChecks: Node() { var exportedNormalCoreType: Vector3 = Vector3.ZERO // not allowed -// @GodotMember +// @Member // lateinit var lateinitCoreType: Vector3 // allowed - @GodotMember + @Member var normalCoreType: Vector3 = Vector3.ZERO } diff --git a/harness/tests/otherSourceDir/ScriptInOtherSourceDir.kt b/harness/tests/otherSourceDir/ScriptInOtherSourceDir.kt index ce8bc317e..174d1080c 100644 --- a/harness/tests/otherSourceDir/ScriptInOtherSourceDir.kt +++ b/harness/tests/otherSourceDir/ScriptInOtherSourceDir.kt @@ -1,10 +1,10 @@ import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript class ScriptInOtherSourceDir: Node() { - @GodotMember + @Member fun greeting() = "HelloWorld" } diff --git a/harness/tests/src/main/java/godot/tests/JavaTestClass.java b/harness/tests/src/main/java/godot/tests/JavaTestClass.java index 96dca070c..b113a00e1 100644 --- a/harness/tests/src/main/java/godot/tests/JavaTestClass.java +++ b/harness/tests/src/main/java/godot/tests/JavaTestClass.java @@ -5,7 +5,7 @@ import godot.RenderingServer; import godot.annotation.EnumTypeHint; import godot.annotation.Export; -import godot.annotation.GodotMember; +import godot.annotation.Member; import godot.annotation.GodotScript; import godot.core.*; import org.jetbrains.annotations.NotNull; @@ -47,18 +47,18 @@ public class JavaTestClass extends Node { @Export public Button exportedButton; - @GodotMember + @Member public String greeting() { return "Hello from java"; } - @GodotMember + @Member public boolean signalEmitted = false; - @GodotMember + @Member public VariantArray variantArray = new VariantArray<>(Integer.class); - @GodotMember + @Member public Dictionary dictionary = new Dictionary<>(Float.class, String.class); public LambdaCallable lambdaCallable = LambdaCallable0.create( @@ -79,7 +79,7 @@ public void _ready() { RenderingServer.getDefaultClearColor(); } - @GodotMember + @Member public void connectAndTriggerSignal() { connect( StringNames.asStringName("test_signal"), @@ -100,7 +100,7 @@ public GodotNotification _notification() { ); } - @GodotMember + @Member public void signalCallback() { signalEmitted = true; } diff --git a/harness/tests/src/main/kotlin/godot/tests/CoreTypesIdentityTest.kt b/harness/tests/src/main/kotlin/godot/tests/CoreTypesIdentityTest.kt index ed2230140..e408d2895 100644 --- a/harness/tests/src/main/kotlin/godot/tests/CoreTypesIdentityTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/CoreTypesIdentityTest.kt @@ -1,7 +1,7 @@ package godot.tests import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.AABB import godot.core.Basis @@ -17,64 +17,64 @@ import godot.core.Vector3 @GodotScript class CoreTypesIdentityTest : Node() { - @GodotMember + @Member var aabb = AABB(Vector3(1, 1, 1), Vector3(2, 2, 2)) - @GodotMember + @Member var basis = Basis(Vector3(0, 1, 2), Vector3(3, 4, 5), Vector3(6, 7, 8)) - @GodotMember + @Member var color = Color(0.1, 0.2, 0.3, 0.4) - @GodotMember + @Member var plane = Plane(1, 2, 3, 4) - @GodotMember + @Member var quaternion = Quaternion(1, 2, 3, 4) - @GodotMember + @Member var rect2 = Rect2(1.0, 2.0, 3.0, 4.0) - @GodotMember + @Member var transform3D = Transform3D(Vector3(0, 1, 2), Vector3(3, 4, 5), Vector3(6, 7, 8), Vector3(9, 10, 11)) - @GodotMember + @Member var transform2D = Transform2D(0, 1, 2, 3, 4, 5) - @GodotMember + @Member var vector2 = Vector2(1, 2) - @GodotMember + @Member var vector3 = Vector3(1, 2, 3) - @GodotMember + @Member fun aabb(aabb: AABB) = aabb - @GodotMember + @Member fun basis(basis: Basis) = basis - @GodotMember + @Member fun color(color: Color) = color - @GodotMember + @Member fun plane(plane: Plane) = plane - @GodotMember + @Member fun quat(quaternion: Quaternion) = quaternion - @GodotMember + @Member fun rect2(rect2: Rect2) = rect2 - @GodotMember + @Member fun transform(transform3D: Transform3D) = transform3D - @GodotMember + @Member fun transform2D(transform2D: Transform2D) = transform2D - @GodotMember + @Member fun vector2(vector2: Vector2) = vector2 - @GodotMember + @Member fun vector3(vector3: Vector3) = vector3 } diff --git a/harness/tests/src/main/kotlin/godot/tests/FuncRefTest.kt b/harness/tests/src/main/kotlin/godot/tests/FuncRefTest.kt index d26aed53c..2a1b89e57 100644 --- a/harness/tests/src/main/kotlin/godot/tests/FuncRefTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/FuncRefTest.kt @@ -1,7 +1,7 @@ package godot.tests import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.annotation.Rpc import godot.core.signal0 @@ -13,60 +13,60 @@ class FuncRefTest : Node() { val test by signal0() - @GodotMember + @Member var blubb: Boolean = false - @GodotMember + @Member var callFlag = false - @GodotMember + @Member var callWithParamFlag = false - @GodotMember + @Member var signalCallFlag = false - @GodotMember + @Member override fun _ready() { test.connect(this, FuncRefTest::testSignalCallback) } @Rpc - @GodotMember + @Member fun testSignalCallback() { signalCallFlag = true } - @GodotMember + @Member fun testSignalCall() { test.emit() } - @GodotMember + @Member fun withoutParamCallback() { callFlag = true } - @GodotMember + @Member fun testCallWithoutParam() { call(this::withoutParamCallback) } - @GodotMember + @Member fun testCallDeferredWithoutParam() { callDeferred(this::withoutParamCallback) } - @GodotMember + @Member fun withParamCallback(flag: Boolean) { callWithParamFlag = flag } - @GodotMember + @Member fun testCallWithParam() { call(this::withParamCallback, true) } - @GodotMember + @Member fun testCallDeferredWithParam() { callDeferred(this::withParamCallback, true) } diff --git a/harness/tests/src/main/kotlin/godot/tests/Invocation.kt b/harness/tests/src/main/kotlin/godot/tests/Invocation.kt index 45be0b949..6a09e4717 100644 --- a/harness/tests/src/main/kotlin/godot/tests/Invocation.kt +++ b/harness/tests/src/main/kotlin/godot/tests/Invocation.kt @@ -14,7 +14,7 @@ import godot.annotation.ExpEasing import godot.annotation.Export import godot.annotation.File import godot.annotation.FloatRange -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.annotation.IntFlag import godot.annotation.IntRange @@ -56,7 +56,7 @@ class Invocation : Node3D() { @Export var enumList = listOf(TestEnum.ENUM_1) - @GodotMember + @Member var vectorList = PackedVector3Array() @Export @@ -72,27 +72,27 @@ class Invocation : Node3D() { //@Export //var lateinitString: String? = null - @GodotMember + @Member lateinit var registerObject: OtherScript - @GodotMember + @Member var registerObjectNullable: OtherScript? = null - @GodotMember + @Member var registerObjectNullablePreInit: OtherScript? = OtherScript() set(value) { field?.free() field = value } - @GodotMember + @Member var registerObjectNonNullablePreInit: OtherScript = OtherScript() set(value) { field.free() field = value } - @GodotMember + @Member var vector = Vector3() @Export @@ -111,7 +111,7 @@ class Invocation : Node3D() { private val otherScriptReference = OtherScript() private fun provideOtherScriptReference() = otherScriptReference - @GodotMember + @Member var invocation = provideOtherScriptReference() @Export @@ -246,28 +246,28 @@ class Invocation : Node3D() { @Export var utf8String = "" - @GodotMember + @Member fun intValue(value: Int) = value - @GodotMember + @Member fun longValue(value: Long) = value - @GodotMember + @Member fun floatValue(value: Float) = value - @GodotMember + @Member fun doubleValue(value: Double) = value - @GodotMember + @Member fun booleanValue(value: Boolean) = value - @GodotMember + @Member fun stringValue(value: String) = value - @GodotMember + @Member fun intAddition(a: Int, b: Int) = a + b - @GodotMember + @Member fun initNullables() { registerObject = OtherScript() registerObjectNullable = OtherScript() @@ -332,202 +332,202 @@ class Invocation : Node3D() { registerObjectNonNullablePreInit.free() } - @GodotMember + @Member fun getRidId() = rid.id - @GodotMember + @Member fun getNavMeshRid() = resourceTest.getRid() - @GodotMember + @Member fun appendToAnyDict(key: Any, value: Any) { anyToAnyDictionary[key] = value } - @GodotMember + @Member fun removeFromAnyDict(key: Any) { anyToAnyDictionary.remove(key) } - @GodotMember + @Member fun getFromAnyDict(key: Any) = anyToAnyDictionary[key] - @GodotMember + @Member fun anyDictSize() = anyToAnyDictionary.size - @GodotMember + @Member fun appendToStringNavMeshDict(key: String, value: NavigationMesh) { navMeshesDictionary[key] = value } - @GodotMember + @Member fun removeFromStringNavMeshDict(key: String) { navMeshesDictionary.remove(key) } - @GodotMember + @Member fun getFromStringNavMeshDict(key: String) = navMeshesDictionary[key] - @GodotMember + @Member fun stringNavMeshDictSize() = navMeshesDictionary.size - @GodotMember + @Member fun appendToStringNavMeshNullableDict(key: String, value: NavigationMesh) { nullableDictionary[key] = value } - @GodotMember + @Member fun removeFromStringNavMeshNullableDict(key: String) { nullableDictionary.remove(key) } // TODO: This will fail to register as we cannot register nullable return type -// @GodotMember +// @Member // fun getFromStringNavMeshNullableDict(key: String) = nullableDictionary[key] - @GodotMember + @Member fun stringNavMeshNullableDictSize() = nullableDictionary.size - @GodotMember + @Member fun appendNullableStandardNavMesh() = nullableArray.append(NavigationMesh()) - @GodotMember + @Member fun appendNullableNavMesh(navigationMesh: NavigationMesh?) = nullableArray.append(navigationMesh) - @GodotMember + @Member fun removeNullableNavMesh(navigationMesh: NavigationMesh?) = nullableArray.remove(navigationMesh) - @GodotMember + @Member fun removeNullableNavMeshWithIndex(index: Int) = nullableArray.removeAt(index) // TODO: This will fail to register as we cannot register nullable return type -// @GodotMember +// @Member // fun getNullableNavMeshFromArray(index: Int) = nullableArray[index] - @GodotMember + @Member fun nullableNavMeshesSize() = nullableArray.size - @GodotMember + @Member fun appendStandardNavMesh() = navMeshes.append(NavigationMesh()) - @GodotMember + @Member fun appendNavMesh(navigationMesh: NavigationMesh) = navMeshes.append(navigationMesh) - @GodotMember + @Member fun removeNavMesh(navigationMesh: NavigationMesh) = navMeshes.remove(navigationMesh) - @GodotMember + @Member fun removeNavMeshWithIndex(index: Int) = navMeshes.removeAt(index) - @GodotMember + @Member fun getNavMeshFromArray(index: Int) = navMeshes[index] - @GodotMember + @Member fun navMeshesSize() = navMeshes.size - @GodotMember + @Member fun appendAnyToArray(any: Any) = testArrayAny.append(any) - @GodotMember + @Member fun removeAnyFromArray(any: Any) = testArrayAny.remove(any) - @GodotMember + @Member fun getAnyFromArray(index: Int) = testArrayAny[index] - @GodotMember + @Member fun arrayAnySize() = testArrayAny.size - @GodotMember + @Member fun countNameshInstance(navigationMesh: NavigationMesh) = navMeshes.count(navigationMesh) - @GodotMember + @Member fun getNavMeshCount() = navMeshes.count() //Type cast checks - @GodotMember + @Member fun parentIsNode3D() = getParent() is Node3D - @GodotMember + @Member fun isObjectNode3D(obj: Object) = obj is Node3D - @GodotMember + @Member fun otherJvmId(invocation: Invocation) = invocation.jvmId - @GodotMember + @Member fun hasCameraNode() = getNodeOrNull(NodePath("Camera")) != null - @GodotMember + @Member fun addByteToPackedArray(byte: Byte) = packedByteArray.append(byte) - @GodotMember + @Member fun addByteArrayToPackedArray(array: PackedByteArray) = packedByteArray.appendArray(array) - @GodotMember + @Member fun deleteByteFromPackedArray(index: Int) = packedByteArray.removeAt(index) - @GodotMember + @Member fun getByteFromPackedArray(index: Int) = packedByteArray[index] - @GodotMember + @Member fun setByteInPackedArray(index: Int, value: Byte) { packedByteArray[index] = value } - @GodotMember + @Member fun resizeBytePackedArray(newSize: Int) { packedByteArray.resize(newSize) } - @GodotMember + @Member fun addColorToPackedArray(color: Color) = packedColorArray.append(color) - @GodotMember + @Member fun addColorArrayToPackedArray(colorArray: PackedColorArray) = packedColorArray.appendArray(colorArray) - @GodotMember + @Member fun deleteColorFromPackedArray(index: Int) = packedColorArray.removeAt(index) - @GodotMember + @Member fun getColorFromPackedArray(index: Int) = packedColorArray[index] - @GodotMember + @Member fun setColorInPackedArray(index: Int, color: Color) { packedColorArray[index] = color } - @GodotMember + @Member fun resizeColorPackedArray(newSize: Int) { packedColorArray.resize(newSize) } - @GodotMember + @Member fun addIntToPackedArray(int: Int) = packedInt32Array.append(int) - @GodotMember + @Member fun addIntArrayToPackedArray(intArray: PackedInt32Array) = this.packedInt32Array.appendArray(intArray) - @GodotMember + @Member fun deleteIntFromPackedArray(index: Int) = packedInt32Array.removeAt(index) - @GodotMember + @Member fun getIntFromPackedArray(index: Int) = packedInt32Array[index] - @GodotMember + @Member fun setIntInPackedArray(index: Int, value: Int) { packedInt32Array[index] = value } - @GodotMember + @Member fun resizeIntPackedArray(newSize: Int) { packedInt32Array.resize(newSize) } - @GodotMember + @Member fun addRealToPackedArray(realT: RealT) = packedFloat64Array.append(realT) - @GodotMember + @Member fun addRealArrayToPackedArray(realArray: PackedFloat64Array) = packedFloat64Array.appendArray(realArray) - @GodotMember + @Member fun readStringFromByteArray() { val asciiArray = testString.toByteArray(Charsets.US_ASCII) @@ -545,94 +545,94 @@ class Invocation : Node3D() { utf8String = packed2.getStringFromUtf8() } - @GodotMember + @Member fun deleteRealFromPackedArray(index: Int) = packedFloat64Array.removeAt(index) - @GodotMember + @Member fun getRealFromPackedArray(index: Int) = packedFloat64Array[index] - @GodotMember + @Member fun setRealInPackedArray(index: Int, value: Double) { packedFloat64Array[index] = value } - @GodotMember + @Member fun resizeRealPackedArray(newSize: Int) { packedFloat64Array.resize(newSize) } - @GodotMember + @Member fun addStringToPackedArray(string: String) = packedStringArray.append(string) - @GodotMember + @Member fun addStringArrayToPackedArray(stringArray: PackedStringArray) = packedStringArray.appendArray(stringArray) - @GodotMember + @Member fun deleteStringFromPackedArray(index: Int) = packedStringArray.removeAt(index) - @GodotMember + @Member fun getStringFromPackedArray(index: Int) = packedStringArray[index] - @GodotMember + @Member fun setStringInPackedArray(index: Int, value: String) { packedStringArray[index] = value } - @GodotMember + @Member fun resizeStringPackedArray(newSize: Int) { packedStringArray.resize(newSize) } - @GodotMember + @Member fun addVector2ToPackedArray(vector2: Vector2) = packedVector2Array.append(vector2) - @GodotMember + @Member fun addVector2ArrayToPackedArray(vector2Array: PackedVector2Array) = packedVector2Array.appendArray(vector2Array) - @GodotMember + @Member fun deleteVector2FromPackedArray(index: Int) = packedVector2Array.removeAt(index) - @GodotMember + @Member fun getVector2FromPackedArray(index: Int) = packedVector2Array[index] - @GodotMember + @Member fun setVector2InPackedArray(index: Int, vector2: Vector2) { packedVector2Array[index] = vector2 } - @GodotMember + @Member fun resizeVector2PackedArray(newSize: Int) { packedVector2Array.resize(newSize) } - @GodotMember + @Member fun addVector3ToPackedArray(vector3: Vector3) = packedVector3Array.append(vector3) - @GodotMember + @Member fun addVector3ArrayToPackedArray(vector3Array: PackedVector3Array) = packedVector3Array.appendArray(vector3Array) - @GodotMember + @Member fun deleteVector3FromPackedArray(index: Int) = packedVector3Array.removeAt(index) - @GodotMember + @Member fun getVector3FromPackedArray(index: Int) = packedVector3Array[index] - @GodotMember + @Member fun setVector3InPackedArray(index: Int, vector3: Vector3) { packedVector3Array[index] = vector3 } - @GodotMember + @Member fun resizeVector3PackedArray(newSize: Int) { packedVector3Array.resize(newSize) } // Singleton tests - @GodotMember + @Member fun isSentXrSameInstanceAsJvmSingleton(arvrServer: XRServer) = XRServer.getInstanceId() == arvrServer.getInstanceId() - @GodotMember + @Member fun createVariantArrayOfUserType() = variantArrayOf() } diff --git a/harness/tests/src/main/kotlin/godot/tests/LambdaCallableTest.kt b/harness/tests/src/main/kotlin/godot/tests/LambdaCallableTest.kt index 23abc9511..86cbde857 100644 --- a/harness/tests/src/main/kotlin/godot/tests/LambdaCallableTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/LambdaCallableTest.kt @@ -1,7 +1,7 @@ package godot.tests import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Signal3 import godot.core.asCallable @@ -14,27 +14,27 @@ class LambdaCallableTest : Node() { val signalNoParam by signal0() - @GodotMember + @Member var hasSignalNoParamBeenTriggered = false val signalWithParams: Signal3 by signal3("str", "long", "node") - @GodotMember + @Member var signalString: String = "" - @GodotMember + @Member var signalLong: Long = Long.MIN_VALUE - @GodotMember + @Member lateinit var signalNode: Node - @GodotMember + @Member var ktCallable = { str: String -> ktCallableString = str }.asCallable() - @GodotMember + @Member var ktCallableString: String = "" - @GodotMember + @Member override fun _ready() { signalNoParam.connect { hasSignalNoParamBeenTriggered = true @@ -47,12 +47,12 @@ class LambdaCallableTest : Node() { } } - @GodotMember + @Member fun emitSignalNoParam() { signalNoParam.emit() } - @GodotMember + @Member fun emitSignalWithParam(str: String, long: Long, node: Node) { signalWithParams.emit(str, long, node) } diff --git a/harness/tests/src/main/kotlin/godot/tests/MultiArgsConstructorTest.kt b/harness/tests/src/main/kotlin/godot/tests/MultiArgsConstructorTest.kt index 5c756856f..2a6841df9 100644 --- a/harness/tests/src/main/kotlin/godot/tests/MultiArgsConstructorTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/MultiArgsConstructorTest.kt @@ -3,44 +3,44 @@ package godot.tests import godot.NavigationMesh import godot.Node import godot.Object -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.VariantArray @GodotScript class MultiArgsConstructorTest : Node { - @GodotMember + @Member var defaultConstructorHasBeenCalled = false - @GodotMember + @Member var oneArgConstructorHasBeenCalled = false - @GodotMember + @Member var threeArgsConstructorHasBeenCalled = false - @GodotMember + @Member constructor() : super() { defaultConstructorHasBeenCalled = true } - @GodotMember + @Member constructor(i: Int) : this() { oneArgConstructorHasBeenCalled = true } - @GodotMember + @Member constructor(i: Int, s: String) : this() { threeArgsConstructorHasBeenCalled = true } - @GodotMember + @Member constructor(i: Int, s: String, obj: Object?) : this() - @GodotMember + @Member constructor(i: Int, s: String, obj: Object?, variantArray: VariantArray) : this() - @GodotMember + @Member constructor(i: Int, s: String, obj: Object?, variantArray: VariantArray?, navMesh: NavigationMesh) : this() constructor( @@ -61,8 +61,8 @@ class MultiArgsConstructorTest : Node { ) : this() // constructors which should fail: -// @GodotMember +// @Member // constructor(iShouldFailAsOverloadingIsNotSupported: String, s: String, obj: Object?, variantArray: VariantArray?, navMesh: NavigationMesh) : this() -// @GodotMember +// @Member // constructor(i: Int, s: Int, obj: Object?, variantArray: VariantArray?, navMesh: NavigationMesh, tooManyArgs: String) : this() } diff --git a/harness/tests/src/main/kotlin/godot/tests/args/ConstructorArgSizeTest.kt b/harness/tests/src/main/kotlin/godot/tests/args/ConstructorArgSizeTest.kt index 95d62b207..e932883c3 100644 --- a/harness/tests/src/main/kotlin/godot/tests/args/ConstructorArgSizeTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/args/ConstructorArgSizeTest.kt @@ -1,7 +1,7 @@ package godot.tests.args import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.VariantArray import godot.core.variantArrayOf @@ -10,14 +10,14 @@ import godot.core.variantArrayOf class ConstructorArgSizeTest(): Node() { private val receivedConstructorArgs: VariantArray = variantArrayOf() - @GodotMember + @Member constructor( p1: String, ): this() { receivedConstructorArgs.add(p1) } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -28,7 +28,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -41,7 +41,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -56,7 +56,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -73,7 +73,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -92,7 +92,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -113,7 +113,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member constructor( p1: String, p2: String, @@ -136,7 +136,7 @@ class ConstructorArgSizeTest(): Node() { } } - @GodotMember + @Member fun getReceivedConstructorArgs(): VariantArray { return receivedConstructorArgs } diff --git a/harness/tests/src/main/kotlin/godot/tests/args/FunctionArgSizeTest.kt b/harness/tests/src/main/kotlin/godot/tests/args/FunctionArgSizeTest.kt index e4d40574a..38d2e070d 100644 --- a/harness/tests/src/main/kotlin/godot/tests/args/FunctionArgSizeTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/args/FunctionArgSizeTest.kt @@ -1,7 +1,7 @@ package godot.tests.args import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.VariantArray import godot.core.variantArrayOf @@ -9,12 +9,12 @@ import godot.core.variantArrayOf @GodotScript class FunctionArgSizeTest : Node() { - @GodotMember + @Member fun arg0(): VariantArray { return variantArrayOf() } - @GodotMember + @Member fun arg1( p1: String, ): VariantArray { @@ -23,7 +23,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg2( p1: String, p2: String, @@ -34,7 +34,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg3( p1: String, p2: String, @@ -47,7 +47,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg4( p1: String, p2: String, @@ -62,7 +62,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg5( p1: String, p2: String, @@ -79,7 +79,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg6( p1: String, p2: String, @@ -98,7 +98,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg7( p1: String, p2: String, @@ -119,7 +119,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg8( p1: String, p2: String, @@ -142,7 +142,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg9( p1: String, p2: String, @@ -167,7 +167,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg10( p1: String, p2: String, @@ -194,7 +194,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg11( p1: String, p2: String, @@ -223,7 +223,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg12( p1: String, p2: String, @@ -254,7 +254,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg13( p1: String, p2: String, @@ -287,7 +287,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg14( p1: String, p2: String, @@ -322,7 +322,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg15( p1: String, p2: String, @@ -359,7 +359,7 @@ class FunctionArgSizeTest : Node() { ) } - @GodotMember + @Member fun arg16( p1: String, p2: String, diff --git a/harness/tests/src/main/kotlin/godot/tests/binding/BindingTest.kt b/harness/tests/src/main/kotlin/godot/tests/binding/BindingTest.kt index 5b9de96b3..2ca349f97 100644 --- a/harness/tests/src/main/kotlin/godot/tests/binding/BindingTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/binding/BindingTest.kt @@ -1,12 +1,12 @@ package godot.tests.binding import godot.Object -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript class BindingTest : Object() { - @GodotMember + @Member fun getClassName(obj: Object) = obj::class.simpleName } diff --git a/harness/tests/src/main/kotlin/godot/tests/callable/CallableMethodBindTest.kt b/harness/tests/src/main/kotlin/godot/tests/callable/CallableMethodBindTest.kt index 2475053a3..cf8b767f0 100644 --- a/harness/tests/src/main/kotlin/godot/tests/callable/CallableMethodBindTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/callable/CallableMethodBindTest.kt @@ -1,7 +1,7 @@ package godot.tests.callable import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.NativeCallable import godot.core.VariantArray @@ -10,30 +10,30 @@ import godot.global.GD @GodotScript class CallableMethodBindTest: Node() { - @GodotMember + @Member var methodBinds: VariantArray = variantArrayOf(-1, -1, -1) - @GodotMember + @Member fun callWithMethodWithAllBinds() { NativeCallable(this, CallableMethodBindTest::readySignalMethodBindTest).bind(1, 2, 3).call() } - @GodotMember + @Member fun callWithMethodWithTwoBinds() { NativeCallable(this, CallableMethodBindTest::readySignalMethodBindTest).bind(2, 3).call(0) } - @GodotMember + @Member fun callWithMethodWithOneBind() { NativeCallable(this, CallableMethodBindTest::readySignalMethodBindTest).bind(3).call(0, 0) } - @GodotMember + @Member fun callWithMethodWithNoBind() { NativeCallable(this, CallableMethodBindTest::readySignalMethodBindTest).bind().call(0, 0, 0) } - @GodotMember + @Member fun readySignalMethodBindTest(a: Int, b: Int, c: Int) { GD.print("Called with args: $a, $b, $c") methodBinds = variantArrayOf(a, b, c) diff --git a/harness/tests/src/main/kotlin/godot/tests/constructor/ConstructorRegistrationTest.kt b/harness/tests/src/main/kotlin/godot/tests/constructor/ConstructorRegistrationTest.kt index ed74ac295..e848f11dc 100644 --- a/harness/tests/src/main/kotlin/godot/tests/constructor/ConstructorRegistrationTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/constructor/ConstructorRegistrationTest.kt @@ -1,7 +1,7 @@ package godot.tests.constructor import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Dictionary import godot.core.VariantArray @@ -9,6 +9,6 @@ import godot.core.VariantArray @GodotScript class ConstructorRegistrationTest(): Node() { - @GodotMember + @Member constructor(param1: Dictionary, param2: VariantArray): this() } diff --git a/harness/tests/src/main/kotlin/godot/tests/coretypes/BasisTest.kt b/harness/tests/src/main/kotlin/godot/tests/coretypes/BasisTest.kt index 14715a9c0..3415aff11 100644 --- a/harness/tests/src/main/kotlin/godot/tests/coretypes/BasisTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/coretypes/BasisTest.kt @@ -1,7 +1,7 @@ package godot.tests.coretypes import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Basis import godot.core.Quaternion @@ -10,26 +10,26 @@ import godot.core.Vector3 @GodotScript class BasisTest : Node() { - @GodotMember + @Member fun getFromBasis(basis: Basis, index: Int) = basis[index] - @GodotMember + @Member fun setInBasis(basis: Basis, index: Int, vector3: Vector3): Basis { basis[index] = vector3 return basis } - @GodotMember + @Member fun getRotationQuat(basis: Basis): Quaternion { return basis.getRotationQuaternion() } - @GodotMember + @Member fun newJvmBasis(): Basis { return Basis() } - @GodotMember + @Member fun isEqualApproxJvm(a: Basis, b: Basis): Boolean { return a.isEqualApprox(b) } diff --git a/harness/tests/src/main/kotlin/godot/tests/coretypes/StringTest.kt b/harness/tests/src/main/kotlin/godot/tests/coretypes/StringTest.kt index ce7107ccf..8e097f81f 100644 --- a/harness/tests/src/main/kotlin/godot/tests/coretypes/StringTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/coretypes/StringTest.kt @@ -1,7 +1,7 @@ package godot.tests.coretypes import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Vector2 import godot.core.asStringName @@ -45,35 +45,35 @@ class StringTest : Node() { """.trimIndent() - @GodotMember + @Member fun identity(str: String) = str - @GodotMember + @Member fun fillTheBuffer(str1: String, str2: String, str3: String, str4: String, str5: String): Boolean { return true } - @GodotMember + @Member fun mixStringAndVariant(i1: Int, str1: String, vec: Vector2, str2: String, f1: Float): Boolean { return true } - @GodotMember + @Member fun getShortString() = _shortString - @GodotMember + @Member fun getLongestShortString() = _longestShortString - @GodotMember + @Member fun getShortestLongString() = _shortestLongString - @GodotMember + @Member fun getLongString() = _longString - @GodotMember + @Member fun getLength(str: String) = str.length - @GodotMember + @Member fun getAsStringName(str: String) = str.asStringName() } diff --git a/harness/tests/src/main/kotlin/godot/tests/coretypes/Vector3Test.kt b/harness/tests/src/main/kotlin/godot/tests/coretypes/Vector3Test.kt index c126a3156..d2a3f61f6 100644 --- a/harness/tests/src/main/kotlin/godot/tests/coretypes/Vector3Test.kt +++ b/harness/tests/src/main/kotlin/godot/tests/coretypes/Vector3Test.kt @@ -1,7 +1,7 @@ package godot.tests.coretypes import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Vector3 import godot.common.util.RealT @@ -9,10 +9,10 @@ import godot.common.util.RealT @GodotScript class Vector3Test : Node() { - @GodotMember + @Member fun getFromVector3(vector3: Vector3, index: Int) = vector3[index] - @GodotMember + @Member fun setInVector3(vector3: Vector3, index: Int, realT: RealT): Vector3 { vector3[index] = realT return vector3 diff --git a/harness/tests/src/main/kotlin/godot/tests/coroutine/CoroutineTest.kt b/harness/tests/src/main/kotlin/godot/tests/coroutine/CoroutineTest.kt index bcbb84da3..cd0aa008f 100644 --- a/harness/tests/src/main/kotlin/godot/tests/coroutine/CoroutineTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/coroutine/CoroutineTest.kt @@ -4,7 +4,7 @@ package godot.tests.coroutine import godot.Object import godot.PackedScene import godot.ResourceLoader -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Vector2 import godot.core.signal0 @@ -29,37 +29,37 @@ class CoroutineTest : Object() { val signalWithManyParameters by signal4("int", "float", "vector2", "string") - @GodotMember + @Member var step: Int = 0 - @GodotMember + @Member fun startCoroutineWithoutParameter() = godotCoroutine { step = 1 signalWithoutParameter.await() step = 2 } - @GodotMember + @Member fun startCoroutineWithOneParameter() = godotCoroutine { step = 3 step = signalWithOneParameter.await() } - @GodotMember + @Member fun startCoroutineWithManyParameters() = godotCoroutine { step = 5 val (int, _, _, _) = signalWithManyParameters.await() step = int } - @GodotMember + @Member fun startCoroutineUndispatched() = godotCoroutine(start = CoroutineStart.UNDISPATCHED) { step = 7 signalWithoutParameter.await() step = 8 } - @GodotMember + @Member fun startCoroutineWithPhysicsFrame() = godotCoroutine(start = CoroutineStart.UNDISPATCHED) { step = 9 awaitPhysicsFrame { @@ -67,7 +67,7 @@ class CoroutineTest : Object() { } } - @GodotMember + @Member fun startCoroutineWithProcessFrame() = godotCoroutine(start = CoroutineStart.UNDISPATCHED) { step = 11 awaitProcessFrame { @@ -75,10 +75,10 @@ class CoroutineTest : Object() { } } - @RegisterSignal + @Member val runOnMainThreadFromBackgroundThreadFinished by signal1("is_test_successful") - @GodotMember + @Member fun runOnMainThreadFromBackgroundThread() { val thread = Thread.currentThread().name @@ -107,7 +107,7 @@ class CoroutineTest : Object() { val asyncLoadResourceFinished by signal1("is_test_successful") - @GodotMember + @Member fun asyncLoadResource() { godotCoroutine { val resource = ResourceLoader.awaitLoadAs("res://Spatial.tscn") { progress -> diff --git a/harness/tests/src/main/kotlin/godot/tests/exception/ExceptionTest.kt b/harness/tests/src/main/kotlin/godot/tests/exception/ExceptionTest.kt index e4d35ecec..d3c401f4e 100644 --- a/harness/tests/src/main/kotlin/godot/tests/exception/ExceptionTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/exception/ExceptionTest.kt @@ -1,13 +1,13 @@ package godot.tests.exception import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript class ExceptionTest: Node() { - @GodotMember + @Member fun throwException() { throw RuntimeException("Test exception") } diff --git a/harness/tests/src/main/kotlin/godot/tests/freeform/FreeformRegistrationFileTestClass.kt b/harness/tests/src/main/kotlin/godot/tests/freeform/FreeformRegistrationFileTestClass.kt index 4c88c62a0..74247c911 100644 --- a/harness/tests/src/main/kotlin/godot/tests/freeform/FreeformRegistrationFileTestClass.kt +++ b/harness/tests/src/main/kotlin/godot/tests/freeform/FreeformRegistrationFileTestClass.kt @@ -1,11 +1,11 @@ package godot.tests.freeform import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript class FreeformRegistrationFileTestClass: Node() { - @GodotMember + @Member fun greeting(): String = "Hello from class with freely moved registration file" } diff --git a/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceChild.kt b/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceChild.kt index d9322d08a..8dcbe63d1 100644 --- a/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceChild.kt +++ b/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceChild.kt @@ -1,6 +1,6 @@ package godot.tests.inheritance -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.signal2 @@ -11,14 +11,14 @@ class AbstractClassInheritanceChild : AbstractClassInheritanceParent() { //---------------- Here to check ------------------ - @GodotMember + @Member var childOpenFunctionHasBeenCalled = false //------------------------------------------------- override var openVar: Int = 100 - @GodotMember + @Member override fun openFunction() { childOpenFunctionHasBeenCalled = true } diff --git a/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceParent.kt b/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceParent.kt index b7e562273..782e8edaf 100644 --- a/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceParent.kt +++ b/harness/tests/src/main/kotlin/godot/tests/inheritance/AbstractClassInheritanceParent.kt @@ -2,7 +2,7 @@ package godot.tests.inheritance import godot.Node import godot.annotation.Export -import godot.annotation.GodotMember +import godot.annotation.Member import godot.core.signal1 import godot.core.signal2 @@ -18,22 +18,22 @@ abstract class AbstractClassInheritanceParent : Node() { //---------------- Here to check ------------------ - @GodotMember + @Member var closedFunctionHasBeenCalled = false //------------------------------------------------- - @GodotMember + @Member var closedVar = 0 - @GodotMember + @Member open var openVar = 0 - @GodotMember + @Member fun closedFunction() { closedFunctionHasBeenCalled = true } - @GodotMember + @Member abstract fun openFunction() } diff --git a/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceChild.kt b/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceChild.kt index 3c6384b38..cdb9aaa34 100644 --- a/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceChild.kt +++ b/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceChild.kt @@ -1,6 +1,6 @@ package godot.tests.inheritance -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.signal2 import godot.global.GD @@ -12,14 +12,14 @@ class ClassInheritanceChild : ClassInheritanceParent() { //---------------- Here to check ------------------ - @GodotMember + @Member var childOpenFunctionHasBeenCalled = false //------------------------------------------------- override var openVar: Int = 100 - @GodotMember + @Member override fun openFunction() { childOpenFunctionHasBeenCalled = true } diff --git a/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceParent.kt b/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceParent.kt index c04de81f6..a8be5e296 100644 --- a/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceParent.kt +++ b/harness/tests/src/main/kotlin/godot/tests/inheritance/ClassInheritanceParent.kt @@ -1,7 +1,7 @@ package godot.tests.inheritance import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.GodotNotification import godot.core.signal1 @@ -17,31 +17,31 @@ open class ClassInheritanceParent : Node() { //---------------- Here to check ------------------ - @GodotMember + @Member var closedFunctionHasBeenCalled = false - @GodotMember + @Member var parentOpenFunctionHasBeenCalled = false //------------------------------------------------- - @GodotMember + @Member var closedVar = 0 - @GodotMember + @Member open var openVar = 0 - @GodotMember + @Member fun closedFunction() { closedFunctionHasBeenCalled = true } - @GodotMember + @Member open fun openFunction() { parentOpenFunctionHasBeenCalled = true } - @GodotMember + @Member var notificationCallBitFlag = 0 override fun _notification(): GodotNotification = godotNotification { diff --git a/harness/tests/src/main/kotlin/godot/tests/packedarray/PackedArrayTest.kt b/harness/tests/src/main/kotlin/godot/tests/packedarray/PackedArrayTest.kt index 0f5e276b2..4249ae3b4 100644 --- a/harness/tests/src/main/kotlin/godot/tests/packedarray/PackedArrayTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/packedarray/PackedArrayTest.kt @@ -1,7 +1,7 @@ package godot.tests.packedarray import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.PackedByteArray import godot.core.PackedFloat32Array @@ -12,61 +12,61 @@ import godot.core.PackedInt64Array @GodotScript class PackedArrayTest : Node() { - @GodotMember + @Member fun convertByteArray() : PackedByteArray { val arr = byteArrayOf(0, 1, 2, 4, 8, 16, 32, 64, 127) return PackedByteArray(arr); } - @GodotMember + @Member fun convertIntArray() : PackedInt32Array { val arr = intArrayOf(0, 1, 2, 4, 8, 16, 32, 64, 127) return PackedInt32Array(arr); } - @GodotMember + @Member fun convertLongArray() : PackedInt64Array { val arr = longArrayOf(0L, 1L, 2L, 4L, 8L, 16L, 32L, 64L, 127L) return PackedInt64Array(arr); } - @GodotMember + @Member fun convertFloatArray() : PackedFloat32Array { val arr = floatArrayOf(0f, 1f, 2f, 4f, 8f, 16f, 32f, 64f, 127f) return PackedFloat32Array(arr); } - @GodotMember + @Member fun convertDoubleArray() : PackedFloat64Array { val arr = doubleArrayOf(0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 127.0) return PackedFloat64Array(arr); } - @GodotMember + @Member fun getByteArrayValue(arr: PackedByteArray, index: Int) : Byte { val kotlinArr = arr.toByteArray() return kotlinArr[index]; } - @GodotMember + @Member fun getIntArrayValue(arr: PackedInt32Array, index: Int) : Int { val kotlinArr = arr.toIntArray() return kotlinArr[index]; } - @GodotMember + @Member fun getLongArrayValue(arr: PackedInt64Array, index: Int) : Long { val kotlinArr = arr.toLongArray() return kotlinArr[index]; } - @GodotMember + @Member fun getFloatArrayValue(arr: PackedFloat32Array, index: Int) : Float { val kotlinArr = arr.toFloatArray() return kotlinArr[index]; } - @GodotMember + @Member fun getDoubleArrayValue(arr: PackedFloat64Array, index: Int) : Double { val kotlinArr = arr.toDoubleArray() return kotlinArr[index]; diff --git a/harness/tests/src/main/kotlin/godot/tests/reflection/BaseReflectionTest.kt b/harness/tests/src/main/kotlin/godot/tests/reflection/BaseReflectionTest.kt index 5163bea9f..b75038d46 100644 --- a/harness/tests/src/main/kotlin/godot/tests/reflection/BaseReflectionTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/reflection/BaseReflectionTest.kt @@ -1,14 +1,14 @@ package godot.tests.reflection import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import kotlin.reflect.full.hasAnnotation @GodotScript class BaseReflectionTest: Node() { - @GodotMember + @Member fun hasRegisterClassAnnotation(): Boolean { return BaseReflectionTest::class.hasAnnotation() } diff --git a/harness/tests/src/main/kotlin/godot/tests/reflection/GH571_ReflectionTest.kt b/harness/tests/src/main/kotlin/godot/tests/reflection/GH571_ReflectionTest.kt index b33312295..f93fc2a14 100644 --- a/harness/tests/src/main/kotlin/godot/tests/reflection/GH571_ReflectionTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/reflection/GH571_ReflectionTest.kt @@ -3,7 +3,7 @@ package godot.tests.reflection import com.fasterxml.jackson.core.type.TypeReference import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @@ -23,7 +23,7 @@ class GH571_ReflectionTest: Node() { val data: String, ) - @GodotMember + @Member fun deserializeJson(): String { val mapper = jacksonObjectMapper() val testClass = mapper.readValue(testJsonString, object : TypeReference() {}) diff --git a/harness/tests/src/main/kotlin/godot/tests/rpctests/RpcTests.kt b/harness/tests/src/main/kotlin/godot/tests/rpctests/RpcTests.kt index ef6cd14e3..8a54e5153 100644 --- a/harness/tests/src/main/kotlin/godot/tests/rpctests/RpcTests.kt +++ b/harness/tests/src/main/kotlin/godot/tests/rpctests/RpcTests.kt @@ -1,7 +1,7 @@ package godot.tests.rpctests import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.annotation.Rpc import godot.annotation.Sync @@ -9,7 +9,7 @@ import godot.annotation.Sync @GodotScript("RPCTests") class RpcTests : Node() { - @GodotMember + @Member var remoteSyncCalled: Boolean = false @Rpc(sync = Sync.SYNC) @@ -17,7 +17,7 @@ class RpcTests : Node() { remoteSyncCalled = called } - @GodotMember + @Member fun triggerFunctionRemoteSyncCall() { rpc(::remoteSyncTest, true) } diff --git a/harness/tests/src/main/kotlin/godot/tests/signal/SignalTest.kt b/harness/tests/src/main/kotlin/godot/tests/signal/SignalTest.kt index 277b8a7b6..2c8020203 100644 --- a/harness/tests/src/main/kotlin/godot/tests/signal/SignalTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/signal/SignalTest.kt @@ -1,7 +1,7 @@ package godot.tests.signal import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.core.Signal0 import godot.core.Signal1 @@ -29,7 +29,7 @@ class SignalTest : Node() { val twoParamSignalField = Signal2("twoParamSignalField","str", "inv") - @GodotMember + @Member var otherScript = OtherScript() override fun _ready() { @@ -68,10 +68,10 @@ class SignalTest : Node() { val signalWithMultipleTargets by signal1("vector2") //To store values emitted by signals - @GodotMember + @Member var array: VariantArray = VariantArray() - @GodotMember + @Member fun targetFunctionOne(vector2: Vector2) { array.append(vector2) //call GodotAPI to insert different parameters in the stack. @@ -83,7 +83,7 @@ class SignalTest : Node() { } - @GodotMember + @Member fun targetFunctionTwo(vector2: Vector2) { array.append(vector2) } diff --git a/harness/tests/src/main/kotlin/godot/tests/static/CallStaticTest.kt b/harness/tests/src/main/kotlin/godot/tests/static/CallStaticTest.kt index ef643a521..6b61ae024 100644 --- a/harness/tests/src/main/kotlin/godot/tests/static/CallStaticTest.kt +++ b/harness/tests/src/main/kotlin/godot/tests/static/CallStaticTest.kt @@ -3,13 +3,13 @@ package godot.tests.static import godot.DirAccess import godot.Node import godot.ProjectSettings -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript class CallStaticTest: Node() { - @GodotMember + @Member fun testStaticCall(): Boolean { return DirAccess.dirExistsAbsolute(ProjectSettings.globalizePath("res://scripts")) } diff --git a/harness/tests/src/main/kotlin/godot/tests/subpackage/OtherScript.kt b/harness/tests/src/main/kotlin/godot/tests/subpackage/OtherScript.kt index aebb7f496..6a3976e89 100644 --- a/harness/tests/src/main/kotlin/godot/tests/subpackage/OtherScript.kt +++ b/harness/tests/src/main/kotlin/godot/tests/subpackage/OtherScript.kt @@ -1,22 +1,22 @@ package godot.tests.subpackage import godot.Node -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript @GodotScript class OtherScript : Node() { - @GodotMember + @Member fun hookNoParam() { println("Hook was called with no param.") } - @GodotMember + @Member fun hookOneParam(b: Boolean) { println("Hook was called with parameter: $b") } - @GodotMember + @Member fun hookTwoParam(str: String, inv: Node) { println("Hook was called with parameters: $str, $inv") } diff --git a/kt/entry-generation/godot-entry-generator/src/main/kotlin/godot/entrygenerator/model/GodotMemberAnnotation.kt b/kt/entry-generation/godot-entry-generator/src/main/kotlin/godot/entrygenerator/model/GodotMemberAnnotation.kt index 1b51fd98a..1673bc119 100644 --- a/kt/entry-generation/godot-entry-generator/src/main/kotlin/godot/entrygenerator/model/GodotMemberAnnotation.kt +++ b/kt/entry-generation/godot-entry-generator/src/main/kotlin/godot/entrygenerator/model/GodotMemberAnnotation.kt @@ -1,3 +1,3 @@ package godot.entrygenerator.model -class GodotMemberAnnotation(override val symbolProcessorSource: Any) : FunctionAnnotation +class MemberAnnotation(override val symbolProcessorSource: Any) : FunctionAnnotation diff --git a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotatedExt.kt b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotatedExt.kt index 0500d29e0..3a906cbb0 100644 --- a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotatedExt.kt +++ b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotatedExt.kt @@ -3,7 +3,7 @@ package godot.annotation.processor.ext import com.google.devtools.ksp.isAnnotationPresent import com.google.devtools.ksp.symbol.KSAnnotated import com.google.devtools.ksp.symbol.KSAnnotation -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import kotlin.reflect.KClass @@ -33,5 +33,5 @@ fun KSAnnotation.hasAnnotation(annotationClass: KClass, alre fun KSAnnotated.hasRegistrationAnnotation(): Boolean { return hasAnnotation(GodotScript::class) - || hasAnnotation(GodotMember::class) + || hasAnnotation(Member::class) } diff --git a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotationExt.kt b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotationExt.kt index 2390c384c..68e056006 100644 --- a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotationExt.kt +++ b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksAnnotationExt.kt @@ -12,7 +12,7 @@ import godot.annotation.EnumFlag import godot.annotation.EnumTypeHint import godot.annotation.ExpEasing import godot.annotation.Export -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.annotation.IntFlag import godot.annotation.MultilineText @@ -27,7 +27,7 @@ import godot.entrygenerator.model.ExportAnnotation import godot.entrygenerator.model.FileHintAnnotation import godot.entrygenerator.model.GodotAnnotation import godot.entrygenerator.model.GodotBaseTypeAnnotation -import godot.entrygenerator.model.GodotMemberAnnotation +import godot.entrygenerator.model.MemberAnnotation import godot.entrygenerator.model.GodotScriptAnnotation import godot.entrygenerator.model.IntFlagHintAnnotation import godot.entrygenerator.model.MultilineTextHintAnnotation @@ -92,15 +92,15 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis symbolProcessorSource = this ) ) - GodotMember::class.qualifiedName -> listOf( - GodotMemberAnnotation(this) + Member::class.qualifiedName -> listOf( + MemberAnnotation(this) ) Tool::class.qualifiedName -> listOf( ToolAnnotation(this) ) Export::class.qualifiedName -> listOf( ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) Rpc::class.qualifiedName -> listOf( RpcAnnotation( @@ -110,7 +110,7 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis transferChannel = rpcChannel, symbolProcessorSource = this ), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) "godot.annotation.GodotBaseType" -> listOf( GodotBaseTypeAnnotation(this) //is internal @@ -137,7 +137,7 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis listOf( EnumFlagHintStringAnnotation(enumValueNames = enumValueNames, source = this), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) } IntFlag::class.qualifiedName -> listOf( @@ -147,42 +147,42 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis this ), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) MultilineText::class.qualifiedName -> listOf( MultilineTextHintAnnotation(this), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) PlaceHolderText::class.qualifiedName -> listOf( PlaceHolderTextHintAnnotation(this), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) ColorNoAlpha::class.qualifiedName -> listOf( ColorNoAlphaHintAnnotation(this), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) godot.annotation.IntRange::class.qualifiedName -> listOf( provideRangeHintAnnotation(-1), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) godot.annotation.LongRange::class.qualifiedName -> listOf( provideRangeHintAnnotation(-1L), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) godot.annotation.FloatRange::class.qualifiedName -> listOf( provideRangeHintAnnotation(-1f), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) godot.annotation.DoubleRange::class.qualifiedName -> listOf( provideRangeHintAnnotation(-1.0), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) EnumTypeHint::class.qualifiedName -> emptyList() ExpEasing::class.qualifiedName -> { @@ -196,7 +196,7 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis source = this ), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) } godot.annotation.File::class.qualifiedName -> { @@ -211,7 +211,7 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis source = this ), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) } Dir::class.qualifiedName -> { @@ -224,7 +224,7 @@ internal fun KSAnnotation.mapToAnnotation(parentDeclaration: KSDeclaration): Lis source = this ), ExportAnnotation(this), - GodotMemberAnnotation(this), + MemberAnnotation(this), ) } else -> emptyList() diff --git a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksClassDeclarationExt.kt b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksClassDeclarationExt.kt index 5a6aa384d..d5754d456 100644 --- a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksClassDeclarationExt.kt +++ b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/ext/ksClassDeclarationExt.kt @@ -10,7 +10,7 @@ import com.google.devtools.ksp.symbol.KSClassDeclaration import com.google.devtools.ksp.symbol.KSFunctionDeclaration import com.google.devtools.ksp.symbol.KSPropertyDeclaration import godot.annotation.GodotApiMember -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.processor.Settings import godot.entrygenerator.model.ClassAnnotation import godot.entrygenerator.model.Clazz @@ -29,7 +29,8 @@ internal fun KSClassDeclaration.mapToClazz( "Qualified name for class declaration of a registered type or it's super types cannot be null! KSClassDeclaration: $this" } val supertypeDeclarations = getAllSuperTypes() - .mapNotNull { it.declaration as? KSClassDeclaration } //we're only interested in classes not interfaces + .mapNotNull { it.declaration as? KSClassDeclaration } + .filter { it.classKind == ClassKind.CLASS } //we're only interested in classes not interfaces .map { it.mapToClazz(settings) } .toList() val mappedAnnotations = annotations @@ -39,7 +40,7 @@ internal fun KSClassDeclaration.mapToClazz( val registeredFunctions = getAllFunctions() .filter { function -> - function.hasAnnotation(GodotMember::class) || function.overridesApiFunction() || function.overridesRegisteredFunction() + function.hasAnnotation(Member::class) || function.overridesApiFunction() || function.overridesRegisteredFunction() } .mapNotNull { it.mapToRegisteredFunction(this, settings) } .toList() @@ -50,23 +51,19 @@ internal fun KSClassDeclaration.mapToClazz( .filter { property -> property.hasRegistrationAnnotation() || property.overridesRegisteredProperty() } + .filter { property -> !property.isSignal() } .map { it.mapToRegisteredProperty(settings) } .toList() val registeredSignals = allProperties .filter { property -> - property - .type - .resolve() - .declaration - .qualifiedName - ?.asString() - ?.startsWith("$godotCorePackage.${GodotKotlinJvmTypes.signal}") == true - && !property.hasAnnotation(GodotApiMember::class) + property.isSignal() } .map { it.mapToRegisteredSignal(declaredProperties.toList(), settings) } .toList() + .toList() + val shouldBeRegistered = (classKind != ClassKind.ANNOTATION_CLASS && hasRegistrationAnnotation()) || isAbstractAndContainsRegisteredMembers(registeredFunctions, registeredProperties, registeredSignals) || @@ -80,7 +77,7 @@ internal fun KSClassDeclaration.mapToClazz( val registeredConstructors = getConstructors() .filter { it.isPublic() } .filter { constructor -> - constructor.hasAnnotation(GodotMember::class) || + constructor.hasAnnotation(Member::class) || constructor.parameters.isEmpty() } .map { it.mapToRegisteredConstructor(settings) } @@ -114,6 +111,15 @@ internal fun KSClassDeclaration.mapToClazz( } } +private fun KSPropertyDeclaration.isSignal() = (this + .type + .resolve() + .declaration + .qualifiedName + ?.asString() + ?.startsWith("$godotCorePackage.${GodotKotlinJvmTypes.signal}") == true + && !this.hasAnnotation(GodotApiMember::class)) + internal fun KSClassDeclaration.isAbstractAndContainsRegisteredMembers( registeredFunctions: List, registeredProperties: List, @@ -154,9 +160,9 @@ private fun KSFunctionDeclaration.overridesApiFunction(isOveridee: Boolean = fal } private fun KSFunctionDeclaration.overridesRegisteredFunction(): Boolean { - return hasAnnotation(GodotMember::class) || (findOverridee() as? KSFunctionDeclaration)?.overridesRegisteredFunction() == true + return hasAnnotation(Member::class) || (findOverridee() as? KSFunctionDeclaration)?.overridesRegisteredFunction() == true } private fun KSPropertyDeclaration.overridesRegisteredProperty(): Boolean { - return hasAnnotation(GodotMember::class) || findOverridee()?.overridesRegisteredProperty() == true + return hasAnnotation(Member::class) || findOverridee()?.overridesRegisteredProperty() == true } diff --git a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/visitor/RegistrationAnnotationVisitor.kt b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/visitor/RegistrationAnnotationVisitor.kt index 73c1a7dbc..250ce840a 100644 --- a/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/visitor/RegistrationAnnotationVisitor.kt +++ b/kt/entry-generation/godot-kotlin-symbol-processor/src/main/kotlin/godot/annotation/processor/visitor/RegistrationAnnotationVisitor.kt @@ -3,7 +3,7 @@ package godot.annotation.processor.visitor import com.google.devtools.ksp.symbol.KSClassDeclaration import com.google.devtools.ksp.symbol.KSFile import com.google.devtools.ksp.symbol.KSVisitorVoid -import godot.annotation.GodotMember +import godot.annotation.Member import godot.annotation.GodotScript import godot.annotation.processor.Settings import godot.annotation.processor.ext.hasCompilationErrors @@ -13,7 +13,7 @@ import godot.entrygenerator.model.RegisteredClass import godot.entrygenerator.model.SourceFile /** - * Collects [GodotScript], [GodotMember] annotations + * Collects [GodotScript], [Member] annotations * for registrar generation and entry generation */ internal class RegistrationAnnotationVisitor( diff --git a/kt/godot-library/src/main/kotlin/godot/annotation/Export.kt b/kt/godot-library/src/main/kotlin/godot/annotation/Export.kt index c6ef12fb6..9a3a145fb 100644 --- a/kt/godot-library/src/main/kotlin/godot/annotation/Export.kt +++ b/kt/godot-library/src/main/kotlin/godot/annotation/Export.kt @@ -14,5 +14,5 @@ package godot.annotation AnnotationTarget.ANNOTATION_CLASS, ) @Retention(AnnotationRetention.RUNTIME) -@GodotMember +@Member annotation class Export diff --git a/kt/godot-library/src/main/kotlin/godot/annotation/GodotMember.kt b/kt/godot-library/src/main/kotlin/godot/annotation/Member.kt similarity index 94% rename from kt/godot-library/src/main/kotlin/godot/annotation/GodotMember.kt rename to kt/godot-library/src/main/kotlin/godot/annotation/Member.kt index a3de93f6c..285d6f02a 100644 --- a/kt/godot-library/src/main/kotlin/godot/annotation/GodotMember.kt +++ b/kt/godot-library/src/main/kotlin/godot/annotation/Member.kt @@ -14,4 +14,4 @@ package godot.annotation AnnotationTarget.ANNOTATION_CLASS ) @Retention(AnnotationRetention.RUNTIME) -annotation class GodotMember +annotation class Member diff --git a/kt/godot-library/src/main/kotlin/godot/annotation/Rpc.kt b/kt/godot-library/src/main/kotlin/godot/annotation/Rpc.kt index 3f43d5347..37ba7a852 100644 --- a/kt/godot-library/src/main/kotlin/godot/annotation/Rpc.kt +++ b/kt/godot-library/src/main/kotlin/godot/annotation/Rpc.kt @@ -11,7 +11,7 @@ package godot.annotation */ @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.RUNTIME) -@GodotMember +@Member annotation class Rpc( val rpcMode: RpcMode = RpcMode.AUTHORITY, val sync: Sync = Sync.NO_SYNC, diff --git a/kt/godot-library/src/main/kotlin/godot/gen/godot/RefCounted.kt b/kt/godot-library/src/main/kotlin/godot/gen/godot/RefCounted.kt index 6b73b8f52..215d9ef0f 100644 --- a/kt/godot-library/src/main/kotlin/godot/gen/godot/RefCounted.kt +++ b/kt/godot-library/src/main/kotlin/godot/gen/godot/RefCounted.kt @@ -18,12 +18,6 @@ import kotlin.Int import kotlin.Long import kotlin.Suppress import kotlin.Unit -import godot.util.VoidPtr -import kotlin.Boolean -import kotlin.Int -import kotlin.Long -import kotlin.Suppress -import kotlin.Unit /** * Base class for any object that keeps a reference count. [Resource] and many other helper objects diff --git a/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/data/model/annotations.kt b/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/data/model/annotations.kt index a9acaf01e..6a752e45a 100644 --- a/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/data/model/annotations.kt +++ b/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/data/model/annotations.kt @@ -5,7 +5,7 @@ import godot.tools.common.constants.godotAnnotationPackage const val GODOT_SCRIPT_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotScript}" const val TOOL_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.tool}" -const val GODOT_MEMBER_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotMember}" +const val GODOT_MEMBER_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.member}" const val GODOT_API_MEMBER_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotApiMemeber}" const val EXPORT_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.export}" const val CORE_TYPE_LOCAL_COPY_ANNOTATION = "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.coreTypeLocalCopy}" diff --git a/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/extension/psiElementExt.kt b/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/extension/psiElementExt.kt index 1eb08e2eb..27485f4bf 100644 --- a/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/extension/psiElementExt.kt +++ b/kt/plugins/godot-intellij-plugin/src/main/kotlin/godot/intellij/plugin/extension/psiElementExt.kt @@ -61,7 +61,7 @@ private fun KtFunction.overridesRegistered(): Boolean { private fun KtAnnotated.hasRegistrationAnnotation(): Boolean { return this.resolveAllAnnotationsRecursively().any { - it.fqName?.asString() == "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotMember}" + it.fqName?.asString() == "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.member}" || it.fqName?.asString() == "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotScript}" } } @@ -96,7 +96,7 @@ private fun PsiModifierListOwner.hasRegistrationAnnotation(): Boolean { private fun PsiAnnotation.isRegistrationAnnotation(alreadyResolvedAnnotations: MutableList = mutableListOf()): Boolean { return this.qualifiedName == "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotScript}" || - this.qualifiedName == "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.godotMember}" || + this.qualifiedName == "$godotAnnotationPackage.${GodotKotlinJvmTypes.Annotations.member}" || run { val annotationsOnAnnotation = this.resolveAnnotationType()?.annotations ?: return false annotationsOnAnnotation diff --git a/kt/plugins/godot-intellij-plugin/src/main/resources/messages/generalLabels.properties b/kt/plugins/godot-intellij-plugin/src/main/resources/messages/generalLabels.properties index 1317e7eea..af19cd98e 100644 --- a/kt/plugins/godot-intellij-plugin/src/main/resources/messages/generalLabels.properties +++ b/kt/plugins/godot-intellij-plugin/src/main/resources/messages/generalLabels.properties @@ -58,15 +58,15 @@ This warning is experimental! If you encounter any false positives, please write quickFix.class.alreadyRegistered.familyName=Show classes registered with same name quickFix.class.alreadyRegistered.popup.title=Jump to class quickFix.class.notRegistered.familyName=Add @GodotScript annotation -quickFix.property.notRegistered.familyName=Add @GodotMember annotation +quickFix.property.notRegistered.familyName=Add @Member annotation quickFix.property.notExported.familyName=Add @Export annotation quickFix.property.removeExportAnnotation.familyName=Remove @Export annotation -quickFix.function.notificationFunctionNotRegistered.familyName=Add @GodotMember annotation +quickFix.function.notificationFunctionNotRegistered.familyName=Add @Member annotation quickFix.function.rpcTransferModeIgnoresChannel.familyName=Remove channel parameter -quickFix.function.connectedFunctionNotRegistered.familyName=Add @GodotMember annotation +quickFix.function.connectedFunctionNotRegistered.familyName=Add @Member annotation quickFix.function.connectedFunctionHasNoRpcAnnotationRegistered.familyName=Add @Rpc annotation quickFix.function.connectedFunctionsRpcAnnotationHasRpcModeDisabled.familyName=Remove RpcMode.DISABLED from target's @Rpc annotation -quickFix.property.connectedPropertyNotRegistered.familyName=Add @GodotMember annotation +quickFix.property.connectedPropertyNotRegistered.familyName=Add @Member annotation quickFix.property.mutability.familyName=Make property mutable notification.property.mutability.error.title=Property Quick Fix notification.property.mutability.error.content=Could not change the mutability of property {0}. Change it manually diff --git a/kt/tools-common/src/main/kotlin/godot/tools/common/constants/Classes.kt b/kt/tools-common/src/main/kotlin/godot/tools/common/constants/Classes.kt index 2ee51909b..104184e1b 100644 --- a/kt/tools-common/src/main/kotlin/godot/tools/common/constants/Classes.kt +++ b/kt/tools-common/src/main/kotlin/godot/tools/common/constants/Classes.kt @@ -48,7 +48,7 @@ object GodotKotlinJvmTypes { const val coreTypeLocalCopy = "CoreTypeLocalCopy" const val godotScript = "GodotScript" - const val godotMember = "GodotMember" + const val member = "Member" const val tool = "Tool" const val export = "Export"