Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » ECP reuse a ViewModel
ECP reuse a ViewModel [message #1498791] Thu, 04 December 2014 17:22 Go to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Hello,

is there a way to reuse a view model? I created a "base" view model and want to add this in other viewmodels.

Regards,
Dennis
Re: ECP reuse a ViewModel [message #1499581 is a reply to message #1498791] Fri, 05 December 2014 08:37 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
If the domain model elements inherit from each other, you can use View
proxies for this...

Am 04.12.2014 18:22, schrieb Dennis Melzer:
> Hello,
>
> is there a way to reuse a view model? I created a "base" view model and
> want to add this in other viewmodels.
>
> Regards,
> Dennis


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: ECP reuse a ViewModel [message #1499625 is a reply to message #1499581] Fri, 05 December 2014 09:21 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
If i click View Proxy in the IDE-Tooling , it will create a new VerticalLayout which contains some controls. But how can I select another view?
Re: ECP reuse a ViewModel [message #1502271 is a reply to message #1499625] Sun, 07 December 2014 13:57 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

what do you mean exactly by "It will create a new VerticalLayout"?
During runtime? Do you reference another view by its ID?

Best regards

Jonas

Am 05.12.2014 10:21, schrieb Dennis Melzer:
> If i click View Proxy in the IDE-Tooling , it will create a new
> VerticalLayout which contains some controls. But how can I select
> another view?


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: ECP reuse a ViewModel [message #1503406 is a reply to message #1502271] Mon, 08 December 2014 12:37 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
I add to a viewmodel (screenshot1) a view proxy model (screenshot2) the result are two vertical layouts (screenshot 3).

EDIT:
That occurs when i click the refresh button in the preview editor

[Updated on: Mon, 08 December 2014 12:41]

Report message to a moderator

Re: ECP reuse a ViewModel [message #1504886 is a reply to message #1503406] Tue, 09 December 2014 16:59 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
Hi,

could it be, that this occurs only, if the preview is open? If so, this
seems to be a bug. View proxies are replaced during runtim and the
preview might do that. It should therefore work on a copy. Could you
retest this and report a BR?

Thanks!

Jonas

Am 08.12.2014 13:37, schrieb Dennis Melzer:
> I add to a viewmodel (screenshot1) a view proxy model (screenshot2) the result are two vertical layouts (screenshot 3).
>


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: ECP reuse a ViewModel [message #1504918 is a reply to message #1504886] Tue, 09 December 2014 17:30 Go to previous messageGo to next message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Yes first it's a view proxy model. If i press the refresh button it will replaced by the vertical layout.

What is the view proxy id? A Resource URI? The path to the other view model?
Re: ECP reuse a ViewModel [message #1505721 is a reply to message #1504918] Wed, 10 December 2014 08:56 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 699
Registered: July 2009
Senior Member
That is the id which is used to register the view model (in the
extension point).


Am 09.12.2014 18:30, schrieb Dennis Melzer:
> Yes first it's a view proxy model. If i press the refresh button it will
> replaced by the vertical layout.
>
> What is the view proxy id? A Resource URI? The path to the other view
> model?


--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: ECP reuse a ViewModel [message #1505726 is a reply to message #1505721] Wed, 10 December 2014 09:01 Go to previous message
Dennis Melzer is currently offline Dennis MelzerFriend
Messages: 244
Registered: July 2009
Senior Member
Ah okay perfect.
Thanks Smile
Previous Topic:Radio Buttons ECP
Next Topic:[EMF Facet] How to add new elements into the ModelExplorer
Goto Forum:
  


Current Time: Wed Apr 08 19:16:02 GMT 2020

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

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

Back to the top