summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-08-24 00:06:56 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-08-24 00:06:56 -0300
commit36e0a72c77348d4a1f2195937dff8dba88f7e044 (patch)
treea3e798e46199c18f729ab9c692dde990e3c3250b /core
parent3d1c03187132677800b7f6bc609eeef8fe51f315 (diff)
-Code completion for enumerations
-Disabled GDNative and GDNativeScript so build compiles again
Diffstat (limited to 'core')
-rw-r--r--core/class_db.cpp23
-rw-r--r--core/script_language.h2
2 files changed, 17 insertions, 8 deletions
diff --git a/core/class_db.cpp b/core/class_db.cpp
index ff31ea7b06..cd55219b53 100644
--- a/core/class_db.cpp
+++ b/core/class_db.cpp
@@ -598,14 +598,23 @@ void ClassDB::bind_integer_constant(const StringName &p_class, const StringName
type->constant_map[p_name] = p_constant;
#ifdef DEBUG_METHODS_ENABLED
- List<StringName> *constants_list = type->enum_map.getptr(p_enum);
- if (constants_list) {
- constants_list->push_back(p_name);
- } else {
- List<StringName> new_list;
- new_list.push_back(p_name);
- type->enum_map[p_enum] = new_list;
+ String enum_name = p_enum;
+ if (enum_name!=String()) {
+ if (enum_name.find(".")!=-1) {
+ enum_name=enum_name.get_slicec('.',1);
+ }
+
+ List<StringName> *constants_list = type->enum_map.getptr(enum_name);
+
+ if (constants_list) {
+ constants_list->push_back(p_name);
+ } else {
+ List<StringName> new_list;
+ new_list.push_back(p_name);
+ type->enum_map[enum_name] = new_list;
+ }
+
}
type->constant_order.push_back(p_name);
diff --git a/core/script_language.h b/core/script_language.h
index 7aba3ec0f1..5baf2e6f80 100644
--- a/core/script_language.h
+++ b/core/script_language.h
@@ -207,7 +207,7 @@ public:
virtual String make_function(const String &p_class, const String &p_name, const PoolStringArray &p_args) const = 0;
virtual Error open_in_external_editor(const Ref<Script> &p_script, int p_line, int p_col) { return ERR_UNAVAILABLE; }
- virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, String &r_call_hint) { return ERR_UNAVAILABLE; }
+ virtual Error complete_code(const String &p_code, const String &p_base_path, Object *p_owner, List<String> *r_options, bool &r_force, String &r_call_hint) { return ERR_UNAVAILABLE; }
struct LookupResult {
enum Type {