Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » EMF Client Platform
EMF Client Platform [message #1065830] Thu, 27 June 2013 12:08 Go to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Hi,

Very excited about EMF Client Platform project. I started reading docs and have a question.

Having a model, can I generate and customize artifacts that ECP provides without building full fledged Eclipse application? I want to integrate artifacts that ECP provides in my own application context.

Thanks,
Alex
Re: EMF Client Platform [message #1065832 is a reply to message #1065830] Thu, 27 June 2013 12:26 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 419
Registered: July 2009
Senior Member
Hi Alex,

do you want to use components such as the model explorer or the editor
in your own application? That is absolutly possible and actually the
goal of the framework. Maybe you could describe more in detail, what you
want to do, so I can give you more hints.

Regards
Jonas

Am 27.06.2013 18:08, schrieb Alex Kravets:
> Hi,
>
> Very excited about EMF Client Platform project. I started reading docs
> and have a question.
>
> Having a model, can I generate and customize artifacts that ECP provides
> without building full fledged Eclipse application? I want to integrate
> artifacts that ECP provides in my own application context.
>
> Thanks,
> Alex
Re: EMF Client Platform [message #1065833 is a reply to message #1065832] Thu, 27 June 2013 12:42 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Thanks Jonas.

I mainly want to use the editor for the model and may some variation of model explorer.

What I am doing is generating model editors using EMF generators (http://christiandietrich.files.wordpress.com/2011/07/xtend-emf-models.png) and refactor them for so that similar components have one base editor and other things that go with it. It's a bit of slow process, and in some instances error prone. My model is relatively simple, just a root node with children going to depth 3 and some constraints described in schema that is used by ecore. I was wondering if using ECP would make what I am trying to do easier and more maintainable.

Regards,
Alex
Re: EMF Client Platform [message #1065897 is a reply to message #1065833] Fri, 28 June 2013 03:55 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 419
Registered: July 2009
Senior Member
Hi Alex,
that sounds like a good use case for ECP. The basic idea is always, you
can start with using the default components, you can adapt them step by
step or, if they don't fit at all, you can replace them.
As you only right the code you need for adaptations, this approach
should be very maintanable. Even if you would later on stop to use ECP,
you would only had coded thing, you need anyways.
Have you tried to get started using the default model explorer and the
default editor?

Regards

Jonas

Am 27.06.2013 18:42, schrieb Alex Kravets:
> Thanks Jonas.
>
> I mainly want to use the editor for the model and may some variation of
> model explorer.
>
> What I am doing is generating model editors using EMF generators
> (http://christiandietrich.files.wordpress.com/2011/07/xtend-emf-models.png)
> and refactor them for so that similar components have one base editor
> and other things that go with it. It's a bit of slow process, and in
> some instances error prone. My model is relatively simple, just a root
> node with children going to depth 3 and some constraints described in
> schema that is used by ecore. I was wondering if using ECP would make
> what I am trying to do easier and more maintainable.
>
> Regards,
> Alex
Re: EMF Client Platform [message #1065979 is a reply to message #1065897] Fri, 28 June 2013 11:35 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Thanks Jonas,

Just starting to get familiar with the framework. Will post here if I'll have any questions. Thanks!

Jonas Helming wrote on Fri, 28 June 2013 03:55
Hi Alex,
that sounds like a good use case for ECP. The basic idea is always, you
can start with using the default components, you can adapt them step by
step or, if they don't fit at all, you can replace them.
As you only right the code you need for adaptations, this approach
should be very maintanable. Even if you would later on stop to use ECP,
you would only had coded thing, you need anyways.
Have you tried to get started using the default model explorer and the
default editor?

Regards

Jonas

Am 27.06.2013 18:42, schrieb Alex Kravets:
> Thanks Jonas.
>
> I mainly want to use the editor for the model and may some variation of
> model explorer.
>
> What I am doing is generating model editors using EMF generators
> (http://christiandietrich.files.wordpress.com/2011/07/xtend-emf-models.png)
> and refactor them for so that similar components have one base editor
> and other things that go with it. It's a bit of slow process, and in
> some instances error prone. My model is relatively simple, just a root
> node with children going to depth 3 and some constraints described in
> schema that is used by ecore. I was wondering if using ECP would make
> what I am trying to do easier and more maintainable.
>
> Regards,
> Alex

Re: EMF Client Platform [message #1069396 is a reply to message #1065979] Mon, 15 July 2013 16:22 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Let's say I want to create my own editor with a TreeViewer that uses the same content and label providers as Model Explorer, is there extension that I can use to do that, or should I just dig into the code and figure it out?

Is there documentation other than what's available on Eclipse Source?

Thanks,
Alex

Re: EMF Client Platform [message #1069546 is a reply to message #1069396] Tue, 16 July 2013 01:12 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4027
Registered: July 2009
Senior Member
Hi

The default editor that EMF creates for any model contains all these
editors and so this provides a uisefull starting point for your own usage.

Regards

Ed Willink


On 15/07/2013 21:22, Alex Kravets wrote:
> Let's say I want to create my own editor with a TreeViewer that uses
> the same content and label providers as Model Explorer, is there
> extension that I can use to do that, or should I just dig into the
> code and figure it out?
>
> Is there documentation other than what's available on Eclipse Source?
>
> Thanks,
> Alex
>
>
Re: EMF Client Platform [message #1069726 is a reply to message #1069396] Tue, 16 July 2013 09:01 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 419
Registered: July 2009
Senior Member
Hi,
do I understand this right: You want to manually implement an editor,
which also display a Tree within the editor? What is the input of that
editor?

Regards
Jonas

Am 15.07.2013 22:22, schrieb Alex Kravets:
> Let's say I want to create my own editor with a TreeViewer that uses the
> same content and label providers as Model Explorer, is there extension
> that I can use to do that, or should I just dig into the code and figure
> it out?
>
> Is there documentation other than what's available on Eclipse Source?
>
> Thanks,
> Alex
>
>
Re: EMF Client Platform [message #1069797 is a reply to message #1069726] Tue, 16 July 2013 11:25 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Yes, that is correct Jonas. Input for the editor is the model that I presume is used by Model Explorer. I am looking for the similar functionality as when generating editor from EMF model.

This functionality is for the a plugin that I have that is written in GMF where use can construct particular model using editor with a Tree representing the model. Model Explorer as it is now is something I will use as well, the editor will serve the purpose of axillary input option.
Re: EMF Client Platform [message #1070081 is a reply to message #1069797] Wed, 17 July 2013 03:55 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 419
Registered: July 2009
Senior Member
Hi,
so you want to use the model explorer to select the model element to
open. Which elements should the tree of the editor show then? All
children of the selected element?
Regards
Jonas

Am 16.07.2013 17:25, schrieb Alex Kravets:
> Yes, that is correct Jonas. Input for the editor is the model that I
> presume is used by Model Explorer. I am looking for the similar
> functionality as when generating editor from EMF model.
>
> This functionality is for the a plugin that I have that is written in
> GMF where use can construct particular model using editor with a Tree
> representing the model. Model Explorer as it is now is something I will
> use as well, the editor will serve the purpose of axillary input option.
Re: EMF Client Platform [message #1070282 is a reply to message #1070081] Wed, 17 July 2013 12:15 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
I want to use Model Explorer content and label providers as well XMI input to construct a tree based on that XMI. So let's say user creates Libaray model in Model Explorer:

Library
----Book
------Title

Then editor will be tied to this model with extension .library (for example) and opening this file with the editor will render similar model as in Model Explorer. So opening Library element from Explorer will open Library and all its children and opening Book element will open Book and Title.

Use case for this is our current application written in GMF. There is an editor that allows user to represent model using blocks

http://i.imgur.com/UnraM0K.png

We are looking into changing this to tree based approach because GMF is too difficult to maintain for such a simplistic model. The reason it's in the editor is because user can work in an editor to create model and editor can maximized. Editor can be broken up into different sections using SashForms for example.

Hope this makes sense.

Thanks,
Alex

[Updated on: Wed, 17 July 2013 13:17]

Report message to a moderator

Re: EMF Client Platform [message #1070556 is a reply to message #1070282] Thu, 18 July 2013 03:56 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 419
Registered: July 2009
Senior Member
Hi Alex,

currently the editor does not support this case (including a tree
viewer), which is some kind of master detail view. However, we are
currently working on these kind of layout. But it will take some month,
until this will be released. In the meantime, I think it is pretty easy
for you, to build something like that yourself. Basically you only have
to implement a composite with two parts. On the left you use a standard
treeviewer, showing the element and its children. If you double click
the element, you render the existing editor of ECP to the right side and
pass the element which was double clicked.
Does that makes sense?
Regards
Jonas

Am 17.07.2013 18:15, schrieb Alex Kravets:
> I want to use Model Explorer content and label providers as well XMI
> input to construct a tree based on that XMI. So let's say user creates
> Libaray model in Model Explorer:
>
> Library
> ----Book
> ------Title
>
> Then editor will be tied to this model with extension .library (for
> example) and opening this file with the editor will render similar model
> as in Model Explorer. So opening Library element from Explorer will open
> Library and all its children and opening Book element will open Book and
> Title.
>
> Use case for this is our current application written in GMF. There is an
> editor that allows user to represent model using blocks (). We are
> looking into changing this to tree based approach because GMF is too
> difficult to maintain for such a simplistic model. The reason it's in
> the editor is because user can work in an editor to create model and
> editor can maximized. Editor can be broken up into different sections
> using SashForms for example.
>
> Hope this makes sense.
>
> Thanks,
> Alex
>
Re: EMF Client Platform [message #1070738 is a reply to message #1070556] Thu, 18 July 2013 11:07 Go to previous messageGo to next message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Yup that's exactly what I want to do, and obviously not a big deal. Are there any help classes available in ECP that I can use for example to initialize TreeViewer from the model and a base content provider that ECP utilized? I can of course do this myself, but wanted to see if there is something already available since ECP already uses reflection to do that and I would like to take advantage of that if possible. Also, how can I use constraints actions to create children based on schemas rules that is already done by ECP.

Lastly, I pulled source code for ECP, but resolving target definition fails because some entries couldn't be resolved. I am using Eclipse 4.3.
Re: EMF Client Platform [message #1071026 is a reply to message #1070738] Fri, 19 July 2013 03:21 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas Helming
Messages: 419
Registered: July 2009
Senior Member
Hi,
I suggest you look at the class ModelExplorerView in *ecp.ui.e3. It
should contain everything you need (actually it does propably much
more). About the target definition: Can you tell me which elements do
not resolve?
Regards
Jonas

Am 18.07.2013 17:07, schrieb Alex Kravets:
> Yup that's exactly what I want to do, and obviously not a big deal. Are
> there any help classes available in ECP that I can use for example to
> initialize TreeViewer from the model and a base content provider that
> ECP utilized? I can of course do this myself, but wanted to see if there
> is something already available since ECP already uses reflection to do
> that and I would like to take advantage of that if possible. Also, how
> can I use constraints actions to create children based on schemas rules
> that is already done by ECP.
> Lastly, I pulled source code for ECP, but resolving target definition
> fails because some entries couldn't be resolved. I am using Eclipse 4.3.
Re: EMF Client Platform [message #1071217 is a reply to message #1071026] Fri, 19 July 2013 11:22 Go to previous message
Alex Kravets is currently offline Alex Kravets
Messages: 380
Registered: November 2009
Senior Member
Thanks Jonas. I will also look for the documentation mentioned in another thread. Regarding target definition, it all works now after I hit "update" button in the TD editor.

Alex
Jonas Helming wrote on Fri, 19 July 2013 03:21
Hi,
I suggest you look at the class ModelExplorerView in *ecp.ui.e3. It
should contain everything you need (actually it does propably much
more). About the target definition: Can you tell me which elements do
not resolve?
Regards
Jonas

Am 18.07.2013 17:07, schrieb Alex Kravets:
> Yup that's exactly what I want to do, and obviously not a big deal. Are
> there any help classes available in ECP that I can use for example to
> initialize TreeViewer from the model and a base content provider that
> ECP utilized? I can of course do this myself, but wanted to see if there
> is something already available since ECP already uses reflection to do
> that and I would like to take advantage of that if possible. Also, how
> can I use constraints actions to create children based on schemas rules
> that is already done by ECP.
> Lastly, I pulled source code for ECP, but resolving target definition
> fails because some entries couldn't be resolved. I am using Eclipse 4.3.

Previous Topic:Exception in EMF Compare 2.1.0
Next Topic:[Edapt] One ecore file extended with other ecore files
Goto Forum:
  


Current Time: Fri Aug 22 17:47:39 EDT 2014

Powered by FUDForum. Page generated in 0.02175 seconds