@@ -173,15 +173,6 @@ void JvmScript::get_script_property_list(List<PropertyInfo>* p_list) const {
173173 if (is_valid ()) { kotlin_class->get_property_list (p_list); }
174174}
175175
176- void JvmScript::get_script_exported_property_list (List<PropertyInfo>* p_list) const {
177- List<PropertyInfo> all_properties;
178- get_script_property_list (&all_properties);
179-
180- for (const PropertyInfo& property_info : all_properties) {
181- if (property_info.usage & PropertyUsageFlags::PROPERTY_USAGE_EDITOR) { p_list->push_back (property_info); }
182- }
183- }
184-
185176void JvmScript::get_constants (HashMap<StringName, Variant> *p_constants) {}
186177
187178void JvmScript::get_members (HashSet<StringName> *p_members){
@@ -203,13 +194,19 @@ const Variant JvmScript::get_rpc_config() const {
203194}
204195
205196#ifdef TOOLS_ENABLED
206- Vector<DocData::ClassDoc> JvmScript::get_documentation () const {
207- // TODO: Add ability to register documentation to Godot
208- return {};
197+
198+ void JvmScript::get_script_exported_property_list (List<PropertyInfo>* p_list) const {
199+ List<PropertyInfo> all_properties;
200+ get_script_property_list (&all_properties);
201+
202+ p_list->push_back (get_class_category ());
203+ for (const PropertyInfo& property_info : all_properties) {
204+ if (property_info.usage & PropertyUsageFlags::PROPERTY_USAGE_EDITOR) { p_list->push_back (property_info); }
205+ }
209206}
210207
211- PropertyInfo JvmScript::get_class_category () const {
212- // TODO: Investigate what it's supposed to do.
208+ Vector<DocData::ClassDoc> JvmScript::get_documentation () const {
209+ // TODO: Add ability to register documentation to Godot
213210 return {};
214211}
215212
@@ -219,19 +216,21 @@ String JvmScript::get_class_icon_path() const {
219216}
220217
221218StringName JvmScript::get_doc_class_name () const {
222- // TODO: Add ability to register documentation to Godot
223- return {};
219+ String class_name = get_global_name ();
220+ if (class_name.is_empty ()) {
221+ return get_path ().get_file ();
222+ }
223+ return class_name;
224224}
225225
226226PlaceHolderScriptInstance* JvmScript::placeholder_instance_create (Object* p_this) {
227227 PlaceHolderScriptInstance* placeholder {memnew (JvmPlaceHolderInstance (GdjLanguage::get_instance (), Ref<Script>(this ), p_this))};
228228
229+ update_script_exports ();// Update in case this method is called between the (re)loading and the delayed update_script_exports().
230+
229231 List<PropertyInfo> exported_properties;
230232 get_script_exported_property_list (&exported_properties);
231-
232- update_script_exports ();// Update in case this method is called between the (re)loading and the delayed update_script_exports().
233233 placeholder->update (exported_properties, exported_members_default_value_cache);
234-
235234 placeholders.insert (placeholder);
236235 return placeholder;
237236}
0 commit comments