Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMF Forms] TreeMasterDetail view priority issue(TreeMasterDetail not displaying in makeithappen example)
[EMF Forms] TreeMasterDetail view priority issue [message #1828827] Fri, 19 June 2020 12:15 Go to next message
Hal Smith is currently offline Hal SmithFriend
Messages: 3
Registered: June 2020
Junior Member
Hi,

I'm trying to run "makeithappen_e3.product" as an application with a TreeMasterDetail. I have three views set up:

1. UserGroup_Detail.view (just contains a tree master detail).
2. UserGroup.view (just contains "Control users").
3. User.view (unchanged from example).

The problem is that the view defaults to "UserGroup.view" so does not display the tree master detail. I have set up the detail filter in "plugin.xml" as described in the example.

I have tried debugging to check which view is being selected by "ECPSWTViewRenderer.INSTANCE.render(Composite, EObject)" and it seems that the "UserGroup_Detail" gets assigned a priority of 1.0 and "UserGroup" gets 2.0.

I saw in a post (https://www.eclipse.org/forums/index.php?t=msg&th=1085262&goto=1758575&#msg_1758575 ) that it is possible to set the view directly using "ECPSWTViewRenderer.INSTANCE.render(Composite, EObject, VView)". When I tried this I got the error "SWTException: Widget is disposed". The code that causes this can be seen commented out in the provided View.java file.

I have included the *.view, View.java, plugin.xml and error log files in the attached zip file.

I'm quite new to emf and emf forms so maybe I've missed something obvious. Any help would be greatly appreciated!

Thanks,

Hal
Re: [EMF Forms] TreeMasterDetail view priority issue [message #1828982 is a reply to message #1828827] Tue, 23 June 2020 15:19 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 168
Registered: May 2015
Senior Member
Hi Hal,

could you attach the full eclipse project?

I would check then.

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] TreeMasterDetail view priority issue [message #1828986 is a reply to message #1828982] Tue, 23 June 2020 16:19 Go to previous messageGo to next message
Hal Smith is currently offline Hal SmithFriend
Messages: 3
Registered: June 2020
Junior Member
Hi Eugen,

Thanks for your reply. I've attached the projects that are needed to run the makeithappen example.

Hal
Re: [EMF Forms] TreeMasterDetail view priority issue [message #1829042 is a reply to message #1828986] Wed, 24 June 2020 09:42 Go to previous messageGo to next message
Eugen Neufeld is currently offline Eugen NeufeldFriend
Messages: 168
Registered: May 2015
Senior Member
Hi Hal,

so I checked the zip.
I think you mixed up elements in the view models:
UserGroup.view contains a Control
UserGroup_Detail.view contains the tree
in the plugin.xml:
<file filePath="viewmodels/UserGroup_Detail.view">
<filter key="detail" value="true">
</filter>
</file>
<file filePath="viewmodels/UserGroup.view"/>

You need to switch the two view models.
The one which contains the Tree should have no filter.
The one with the control should have the detail filter.

Best,
Eugen


--
Eugen Neufeld

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMF Forms] TreeMasterDetail view priority issue [message #1829046 is a reply to message #1829042] Wed, 24 June 2020 10:17 Go to previous message
Hal Smith is currently offline Hal SmithFriend
Messages: 3
Registered: June 2020
Junior Member
Hi Eugen,

Thank you very much! You are right, I mixed up the detail filter so I've swapped it around and now it works.

Hal
Previous Topic:EMF form editor not available
Next Topic:Unrecognized variable: (name) error in Acceleo
Goto Forum:
  


Current Time: Fri Sep 25 11:30:55 GMT 2020

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

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

Back to the top