Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] ViewModel, FeaturePath and Table controls([EMF Forms] ViewModel, FeaturePath and Table control Questions)
[EMF Forms] ViewModel, FeaturePath and Table controls [message #1802062] Thu, 31 January 2019 14:39 Go to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Hi,

we have been using EMF Forms for a few years now and we greatly appreciate its features. Nice framework. We are doing not bad but we still think we are missing important feature details. We tried to find infos in examples, code and documentation with no success. We hope someone could guide and give us some tips about the following questions:


  1. FeaturePath Support
    We define view models for specific EObject. Our view models include controls that refer direct structural feature, in other words a feature that belongs to the specified EObject? Is there a way, to refer a feature inside a feature of that EObject. Is it possible to have a kind of FeaturePath? With the view model editor, we are unable to figure out how to model such FeaturePath.

  2. Level of customisation of Table control
    a) Is there a recommended way to customize columns (e.g. Label provider, cell renderer etc) through the viewModels. Is it possible to customize the getText/getImage for each column?

    b) If we want to customize the buttons (+, -, up, down), and if we want to add and support new buttons what is the best strategy? We are thinking about including custom annotations and implement a renderer that expands customize and default features.

  3. Extend EMFForm view model meta-model
    EMF is extensible by default. Do you recommend to use custom annotation and custom renderer to add features to the default EMF Forms framework, or to create a new EMF Forms ++ meta-model that extends default EMF Forms view model meta-model. e.g. CustomTableControl extends DefaultEMFFormsTableControl. We'd like to stay as close as possible to the default use case.

  4. Advanced EMF Forms view model examples
    Is there a place to look for advanced use of view models with complex Feature Reference etc.


I know there are a lot of questions. Help and tips would be appreciated. Meanwhile we continue to dig into the world of EMF Forms.

Thanks ;-)
Re: [EMF Forms] ViewModel, FeaturePath and Table controls [message #1802103 is a reply to message #1802062] Fri, 01 February 2019 08:50 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Hi,

Happy to hear that EMF Forms works well for your use case!

About 1:
From your description, I am not 100% sure, whether I understand your requirement. Do you want to reference a feature, which is defined by a sub object of the root EObject. As an example, if you have person as a root object and a person containing an address, do you want to show a control with "street" (being a feature of address). This would be supported, if you want something else, please provide an example.

About 2 a): You can register cell renderers to implement any behavior. If you want to configure that in the view model, you need to add an option, either to the view model or to the template model (i.e. styling)

about 2 b): Best strategy is to customize the table renderer. The parts creating the buttons can be overriden. If you want to have this configurable in the view model or the template model, you again need to add this option.

about 3: An annotation is the fastest path, but if you use an extension very frequently, you can extend the view meta model, it was designed for that. If the extension is useful for others, too, you might contribute that, so you can even influence the default use case.

About 4: We have customer projects with very advanced use cases and feature references, but those are unfortunately not open source.

I hope I could help, best regards,

Jonas




--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] ViewModel, FeaturePath and Table controls [message #1802141 is a reply to message #1802103] Fri, 01 February 2019 18:20 Go to previous messageGo to next message
Regent LArcheveque is currently offline Regent LArchevequeFriend
Messages: 94
Registered: May 2010
Member
Thanks Jonas for your answers.

About 1
It is exactly like your example:
"As an example, if you have person as a root object and a person containing an address, do you want to show a control with "street" (being a feature of address)".

I just do not know how to create the binding with the view model editor. I tried several ways with no success. I am sure I do something stupid. Any tips.

Thanks for 2,3 and 4.

Regent ;-)

Re: [EMF Forms] ViewModel, FeaturePath and Table controls [message #1802207 is a reply to message #1802141] Mon, 04 February 2019 09:30 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Hi,

about 1):
Let us assume you have User containing an Address and you create a view model for User. Click on "generate Controls", select the containment reference "address" of user and the Address. Now you should be able to add controls for the attributes of address.

Let me know if that worked for you.

Best regards,
Jonas


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:sub metamodel detection
Next Topic:Problem with rendering of Collapsible Group
Goto Forum:
  


Current Time: Tue Apr 16 07:15:17 GMT 2024

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

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

Back to the top