eolian_mono: add more verbs to generate C# method beginning with verb

Summary:
C# language binding generates C# method name beginning with verb by
checking verb list in name_helpers.hh.

Some verbs used in eo method are missing in the current verb list. So
they are added into the verb list.

In this scheme, there is a problem that some words can be used as a verb
in some methods but they also can be used as a noun in other methods.
(e.g. drag_start as a verb / cursor_word_start as a noun)

So "start" and "scroll" are not added to verb list in this patch.
To resolve the above problem, we may need a new eo syntax to rename or
reverse the name in language bindings.

Test Plan: Check C# method names in .eo.cs files if the name begins with verb.

Reviewers: felipealmeida, SanghyeonLee, woohyun, Jaehyun_Cho, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10001
This commit is contained in:
Jaehyun Cho 2019-09-20 19:14:02 -03:00 committed by Lauro Moura
parent 53a3326ddc
commit 01875756eb
3 changed files with 40 additions and 5 deletions

View File

@ -123,7 +123,42 @@ static const std::vector<std::string> verbs =
"unpack",
"emit",
"call",
"append"
"append",
"apply",
"bind",
"cancel",
"copy",
"create",
"cut",
"delete",
"deselect",
"detach",
"do",
"gen",
"insert",
"iterate",
"join",
"leave",
"limit",
"paste",
"parse",
"prepend",
"process",
"query",
"refresh",
"remove",
"register",
"reject",
"release",
"reply",
"send",
"select",
"serialize",
"steal",
"sync",
"toggle",
"unbind",
"unregister"
};
const std::vector<std::string> not_verbs =

View File

@ -37,7 +37,7 @@ public class BindableProperty<T>
{
if (this.partName == null)
{
return this.binder.PropertyBind(this.propertyName, modelProperty);
return this.binder.BindProperty(this.propertyName, modelProperty);
}
else
{
@ -59,7 +59,7 @@ public class BindableProperty<T>
var partBinder = partMethod.Invoke(partHolder, new System.Object[] { this.partName }) as Efl.Ui.IPropertyBind;
if (partBinder != null)
{
return partBinder.PropertyBind(this.propertyName, modelProperty);
return partBinder.BindProperty(this.propertyName, modelProperty);
}
else
{
@ -112,7 +112,7 @@ public class BindableFactoryPart<T>
/// <summary>Binds the given factory to this part.</summary>
public Eina.Error BindFactory(Efl.Ui.IFactory factory)
{
this.Binder.FactoryBind(this.PartName, factory);
this.Binder.BindFactory(this.PartName, factory);
return Eina.Error.NO_ERROR;
}
}

View File

@ -55,7 +55,7 @@ public static class TestMVVMParts
{
var factory = new Efl.Ui.ItemFactory<Efl.Ui.ListDefaultItem>();
var iconFactory = new Efl.Ui.ImageFactory(null);
iconFactory.PropertyBind("filename", "modelProperty");
iconFactory.BindProperty("filename", "modelProperty");
var error = factory.IconPart().BindFactory(iconFactory);
Test.AssertEquals(error, Eina.Error.NO_ERROR);