について読みましorg.eclipse.e4.core.contexts.IContextFunction
たが、実際の例をオンラインで見つけることができませんでした。
私の理解では、コンポーネントは を実装し、別のオブジェクトIContextFunction
を呼び出すと、compute
遅延して作成されます。
しかし、compute
メソッドがいつどのように呼び出されるかは明確ではありません。
たとえば、次のようにします。
<?xml version="1.0" encoding="UTF-8"?>
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
name="com.example.e4.rcp.todo.contextservice.translate">
<implementation class="com.example.e4.rcp.todo.contextservice.Test"/>
<service>
<provide interface="org.eclipse.e4.core.contexts.IContextFunction"/>
</service>
<property name="service.context.key" type="String"
value="com.example.e4.rcp.todo.contextservice.test"/>
</scr:component>
誰かがcom.example.e4.rcp.todo.contextservice.test
forcompute
を呼び出す必要がありますが、これがどのように使用されるかは不明です。
誰かが参照例を持っていますか?