efl/src/bin
Xavi Artigas 04a41a3712 mono-docs: Allow embedding external examples
Summary:
New option added to eolian_gen: -e <dir>
This specifies a directory to search for examples. If a file is found with the
same name as an EFL C# class (e.g. Efl.Ui.Button.cs) or as an EFL C# method or
property (e.g. Efl.IText.Text.cs, Efl.IText.SetText.cs) its full
contents will be embedded in the documentation for that class or method within
<example> and <code> tags. This is, in turn, is parsed by DocFX and shown
in Example boxes in the generated pages.
If an example file is not found, no examples are embedded for that object.
If -e is not used, no examples are embedded for any object.

New option added to meson: mono-examples-dir to point to the examples directory.
This directory is then passed to eolian_mono through -e.
Do not use it (or define it to nothing) to disable example embedding.

No performance drop has been observed because of these extra tests.

Right now examples can only be given for base classes, not for derived ones
(i.e. Efl.IText.Text but not Efl.Ui.Button.Text). This will be addressed in a
later commit.

Feature
Depends on D8587

Test Plan:
Create an examples folder and put some files in it:
```
mkdir /tmp/examples
echo 'var button = new Efl.Ui.Button();' > /tmp/examples/Efl.Ui.Button.cs
echo 'button.AutoRepeatEnabled = true;' > /tmp/examples/Efl.Ui.IAutorepeat.AutorepeatEnabled.cs
echo 'button.SetAutoRepeatEnabled(true);' > /tmp/examples/Efl.Ui.IAutorepeat.SetAutorepeatEnabled.cs
```
Configure meson to embed examples and build:
```
meson configure -Dmono-examples-dir=/tmp/examples
ninja
```
Examine the generated efl_ui_button.eo.cs file to see embedded <example> tags,
or run DocFX and bask in the glory of documentation pages with examples:
```
cd doc/docfx
./gendoc.sh
```

Reviewers: lauromoura, felipealmeida, vitor.sousa, zmike, bu5hm4n

Reviewed By: vitor.sousa

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8592
2019-04-11 10:39:09 +02:00
..
ecore_buffer meson: modify install path of bqmgr binary 2019-02-27 21:20:31 +01:00
ecore_con cmake: remove! 2018-12-20 20:07:26 +01:00
ecore_evas here comes meson 2018-10-02 17:22:50 +02:00
edje add EFL_VERSION_1_23 define 2019-04-05 20:17:27 -04:00
eet meson - dont install eina bench cmp and use install_mode 2018-12-27 17:17:13 +00:00
eeze efl: remove EFL_EO_API_SUPPORT macro 2019-03-18 12:13:59 +01:00
efl efl: remove EFL_EO_API_SUPPORT macro 2019-03-18 12:13:59 +01:00
efl_js efl-js: JavaScript Eolian binding 2015-12-23 23:59:40 -02:00
efl_mono_msbuild_gen efl_mono: Add msbuild file generator 2017-12-04 15:47:51 -03:00
efl_wl meosn - fix install of scripts and bins and their timestamps and modes 2018-12-27 15:24:08 +00:00
efreet efreetd: remove a tentative global variable definition 2019-04-04 09:14:08 -04:00
eina eina - btlog - fix warnign about uninit struct field 2018-11-09 11:43:58 +00:00
eldbus ledbus - fix codegen to not conflict keys with eldbus inyternal 2019-01-09 18:57:22 +00:00
elementary Revert "test/efl_ui_pager_scroll: fix demo" 2019-04-02 16:35:12 +09:00
elua build: fix macos build 2019-02-22 08:53:20 -05:00
embryo docs: Fix assorted typos in legacy documentation 2019-01-28 13:14:20 +01:00
eolian eolian: Fix resource leak 2019-03-12 11:31:51 -04:00
eolian_cxx build: remove unused meson file 2018-12-17 17:43:06 +01:00
eolian_js evas: remove render2 2018-08-21 10:36:55 -04:00
eolian_mono mono-docs: Allow embedding external examples 2019-04-11 10:39:09 +02:00
ethumb here comes meson 2018-10-02 17:22:50 +02:00
ethumb_client here comes meson 2018-10-02 17:22:50 +02:00