aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavi Artigas <xavierartigas@yahoo.es>2019-02-28 10:38:47 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-02-28 16:40:04 +0100
commit7269fdc1e2ec0101e6c69a2f4c44c072d9ed401f (patch)
treea4f8f8e5288782279b116b6eed457dca7a131508
parentinterfaces: don't inherit efl.ui.layout anymore (diff)
downloadefl-7269fdc1e2ec0101e6c69a2f4c44c072d9ed401f.tar.gz
eolian_mono: Generate proper doc refs for Constants
Summary: Support for global constant variables has been recently added to the C# bindings. This patch fixes doc references so they use the proper name. This brings the mono doc warnings from 71 down to 29. Depends on https://phab.enlightenment.org/D8048 Test Plan: Just build and see less doc warnings when building the C# bindings. Also, doc refs to constants are links now. Reviewers: lauromoura, vitor.sousa Reviewed By: lauromoura Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8051
-rw-r--r--src/bin/eolian_mono/eolian/mono/documentation.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/documentation.hh b/src/bin/eolian_mono/eolian/mono/documentation.hh
index c00b449365..764ecb8f36 100644
--- a/src/bin/eolian_mono/eolian/mono/documentation.hh
+++ b/src/bin/eolian_mono/eolian/mono/documentation.hh
@@ -135,6 +135,18 @@ struct documentation_generator
case ::EOLIAN_OBJECT_FUNCTION:
ref += function_conversion(data, (const ::Eolian_Function *)data2, name_tail);
break;
+ case ::EOLIAN_OBJECT_VARIABLE:
+ if (::eolian_variable_type_get((::Eolian_Variable *)data) == ::EOLIAN_VAR_CONSTANT)
+ {
+ auto names = utils::split(name_helpers::managed_namespace(::eolian_object_name_get(data)), '.');
+ names.pop_back(); // Remove var name
+ ref = name_helpers::join_namespaces(names, '.');
+ ref += "Constants.";
+ ref += name_helpers::managed_name(::eolian_object_short_name_get(data));
+ }
+ // Otherwise, do nothing and no <see> tag will be generated. Because, who would
+ // reference a global (non-constant) variable in the docs?
+ break;
case ::EOLIAN_OBJECT_UNKNOWN:
// If the reference cannot be resolved, just return an empty string and
// it won't be converted into a <see> tag.