@@ -177,6 +177,7 @@ void JvmScript::get_script_exported_property_list(List<PropertyInfo>* p_list) co
177177 List<PropertyInfo> all_properties;
178178 get_script_property_list (&all_properties);
179179
180+ p_list->push_back (get_class_category ());
180181 for (const PropertyInfo& property_info : all_properties) {
181182 if (property_info.usage & PropertyUsageFlags::PROPERTY_USAGE_EDITOR) { p_list->push_back (property_info); }
182183 }
@@ -208,30 +209,27 @@ Vector<DocData::ClassDoc> JvmScript::get_documentation() const {
208209 return {};
209210}
210211
211- PropertyInfo JvmScript::get_class_category () const {
212- // TODO: Investigate what it's supposed to do.
213- return {};
214- }
215-
216212String JvmScript::get_class_icon_path () const {
217213 // TODO: Add ability to register an icon to Godot
218214 return {};
219215}
220216
221217StringName JvmScript::get_doc_class_name () const {
222- // TODO: Add ability to register documentation to Godot
223- return {};
218+ String class_name = get_global_name ();
219+ if (class_name.is_empty ()) {
220+ return get_path ().get_file ();
221+ }
222+ return class_name;
224223}
225224
226225PlaceHolderScriptInstance* JvmScript::placeholder_instance_create (Object* p_this) {
227226 PlaceHolderScriptInstance* placeholder {memnew (JvmPlaceHolderInstance (GdjLanguage::get_instance (), Ref<Script>(this ), p_this))};
228227
228+ update_script_exports ();// Update in case this method is called between the (re)loading and the delayed update_script_exports().
229+
229230 List<PropertyInfo> exported_properties;
230231 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().
233232 placeholder->update (exported_properties, exported_members_default_value_cache);
234-
235233 placeholders.insert (placeholder);
236234 return placeholder;
237235}
0 commit comments