Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFForms] Additional model-specific services
[EMFForms] Additional model-specific services [message #1547206] Mon, 05 January 2015 09:41 Go to next message
Eclipse UserFriend
Hi folks, I would like to provide additional functionality on top of base EMFForms renderers, like (but not limited to) auto complete, and I'm wondering if there's a way to do this in a generic way.

So, rather than implementing custom renderers which are aware of specific model element (which is the only way I know about right now), I would like to implement a generic renderer with autocomplete feature and then somehow bind to a model-specific "service" providing required info. I don't mind if this binding is done in a declarative way or programatically in code.

Thanks in advance for any ideas.
Re: [EMFForms] Additional model-specific services [message #1550814 is a reply to message #1547206] Wed, 07 January 2015 08:31 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

in any case you need a custom renderer, which adds the desired behavior
to the UI. However, this custom renderer can in most cases be "generic"
meaning, it will work for all domain model elements. The custom renderer
could access a generic interface abstracting the service you want to
provide or a registry, where you can retreieve a service which is
specific for the model instance.
Maybe you can describe your use case more in detail, it is a little bit
difficult to answer this in an fully generic way.

Best regards

Jonas

Am 05.01.2015 um 10:41 schrieb Ondrej Ilcik:
> Hi folks, I would like to provide additional functionality on top of
> base EMFForms renderers, like (but not limited to) auto complete, and
> I'm wondering if there's a way to do this in a generic way.
>
> So, rather than implementing custom renderers which are aware of
> specific model element (which is the only way I know about right now), I
> would like to implement a generic renderer with autocomplete feature and
> then somehow bind to a model-specific "service" providing required info.
> I don't mind if this binding is done in a declarative way or
> programatically in code.
> Thanks in advance for any ideas.


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms] Additional model-specific services [message #1561978 is a reply to message #1550814] Tue, 13 January 2015 12:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi Jonas, thanks for your explanation and sorry for a bit late response.

Could you please elaborate a bit more on the following?

Quote:
Custom renderer
could access a generic interface abstracting the service you want to
provide or a registry, where you can retreieve a service which is
specific for the model instance


How to access that service from my renderer? You mean registry as a general concept or is there a specific registry in EMF Forms I can use for services which are aware of a model and provide additional information to renderers?

To be more specific, let's say I'm implementing my own textbox renderer, which should provide the aforementioned autocomplete feature. Values provided by the autocomplete service might depend not only on a model, but also on some external conditions. This is the reason I would like have this in a separate service instead of being in a model directly.
Re: [EMFForms] Additional model-specific services [message #1563529 is a reply to message #1561978] Wed, 14 January 2015 08:48 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

Am 13.01.2015 um 13:17 schrieb Ondrej Ilcik:
> Hi Jonas, thanks for your explanation and sorry for a bit late response.
> Could you please elaborate a bit more on the following?
>
> Quote:
>> Custom renderer
>> could access a generic interface abstracting the service you want to
>> provide or a registry, where you can retreieve a service which is
>> specific for the model instance
>
>
> How to access that service from my renderer? You mean registry as a
> general concept or is there a specific registry in EMF Forms I can use
> for services which are aware of a model and provide additional
> information to renderers?

You could either access the service as an OSGi service or alternatively
register it as a view service (second one is EMF Forms specific)

>
> To be more specific, let's say I'm implementing my own textbox renderer,
> which should provide the aforementioned autocomplete feature. Values
> provided by the autocomplete service might depend not only on a model,
> but also on some external conditions. This is the reason I would like
> have this in a separate service instead of being in a model directly.

I would definitly not add this kind of behavior directly to the model,
so I think your are going the right path.

Best regards

Jonas



--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms] Additional model-specific services [message #1563705 is a reply to message #1563529] Wed, 14 January 2015 10:54 Go to previous message
Eclipse UserFriend
That makes it clear for me, thanks Jonas.

Ondrej
Previous Topic:[EMFForms] Render and RenderTester in different Bundles
Next Topic:[EMF Client] running e3 demo with CDO repository
Goto Forum:
  


Current Time: Thu Apr 25 08:45:55 GMT 2024

Powered by FUDForum. Page generated in 0.02920 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top