summaryrefslogtreecommitdiff
path: root/modules/gdscript/gd_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/gd_editor.cpp')
-rw-r--r--modules/gdscript/gd_editor.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index 00b080190f..19472d3d46 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -364,10 +364,12 @@ static GDCompletionIdentifier _get_type_from_variant(const Variant& p_variant) {
if (p_variant.get_type()==Variant::OBJECT) {
Object *obj = p_variant;
if (obj) {
- //if (obj->cast_to<GDNativeClass>()) {
- // t.obj_type=obj->cast_to<GDNativeClass>()->get_name();
- // t.value=Variant();
- //} else {
+ /*
+ if (obj->cast_to<GDNativeClass>()) {
+ t.obj_type=obj->cast_to<GDNativeClass>()->get_name();
+ t.value=Variant();
+ } else {
+ */
t.obj_type=obj->get_class();
//}
}
@@ -671,7 +673,7 @@ static bool _guess_expression_type(GDCompletionContext& context,const GDParser::
if (!script.ends_with(".gd")) {
//not a script, try find the script anyway,
//may have some success
- script=script.basename()+".gd";
+ script=script.get_basename()+".gd";
}
if (FileAccess::exists(script)) {
@@ -1168,7 +1170,7 @@ static bool _guess_identifier_type(GDCompletionContext& context,int p_line,const
if (!script.ends_with(".gd")) {
//not a script, try find the script anyway,
//may have some success
- script=script.basename()+".gd";
+ script=script.get_basename()+".gd";
}
if (FileAccess::exists(script)) {
@@ -1771,7 +1773,7 @@ static void _find_type_arguments(GDCompletionContext& context,const GDParser::No
String s = E->get().name;
if (!s.begins_with("autoload/"))
continue;
- // print_line("found "+s);
+ //print_line("found "+s);
String name = s.get_slice("/",1);
result.insert("\"/root/"+name+"\"");
}
@@ -1998,10 +2000,10 @@ static void _find_call_arguments(GDCompletionContext& context,const GDParser::No
List<MethodInfo> methods;
ClassDB::get_method_list(type,&methods);
for(List<MethodInfo>::Element *E=methods.front();E;E=E->next()) {
- //if (E->get().arguments.size())
- // result.insert(E->get().name+"(");
- //else
- // result.insert(E->get().name+"()");
+ if (E->get().arguments.size())
+ result.insert(E->get().name+"(");
+ else
+ result.insert(E->get().name+"()");
}*/
}
break;
@@ -2832,7 +2834,7 @@ Error GDScriptLanguage::lookup_code(const String& p_code, const String& p_symbol
if (!script.ends_with(".gd")) {
//not a script, try find the script anyway,
//may have some success
- script=script.basename()+".gd";
+ script=script.get_basename()+".gd";
}
if (FileAccess::exists(script)) {