Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EMFForms] Support for Nebula's GeoMap widget(Is there interest for support for Nebula's GeoMap widget?)
[EMFForms] Support for Nebula's GeoMap widget [message #1754499] Sat, 18 February 2017 22:10 Go to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
Hi,

I'm the developer of Nebula's GeoMap widget (https://eclipse.org/nebula/widgets/geomap/geomap.php), and I'm considering adding support for it to EMF Forms (as an extension in its own bundle, of course). GeoMap is both an SWT-based widget for showing a tile-based map and supports JFace, where it is a viewer and editor for geo-locations on top of the map. There are interfaces for providing support for viewing and editing geo-locations in pojos, and I've already made a view that attaches to any IEditingDomainProvider and shows the geo-locations in EObjects within an Resource or EObject hierarchy. Hence, I don't expect it to be a huge effort.

But is it worth it? Do you think it is a good idea?

Regards,

Hallvard
---
Hallvard Trætteberg (hal@idi.ntnu.no)
Associate Professor, IS group, Dept. of Computer and Information Science at the
Norwegian Univ. of Science and Technology
Re: [EMFForms] Support for Nebula's GeoMap widget [message #1754566 is a reply to message #1754499] Mon, 20 February 2017 11:10 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Hi,

adding a custom renderer is not much effort. Is is basically wrapping your SWT code within the renderer class and using the EMF Forms services to connect it to the model (using databinding). The advantage is that you can then embedd it wherever you like and you have all other EMF Forms features available (such as layouting etc.)

Best regards
Jonas

--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms] Support for Nebula's GeoMap widget [message #1754669 is a reply to message #1754566] Tue, 21 February 2017 12:22 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
There are several issues that complicates the matters:
- a map can show lots of locations, e.g. all locations within a hierarchy of EObjects
- the location to show may be stored in a single EAttribute of a known type (LatLong), or two double EAttributes or be computed by implementing an interface (GeoLocated).
- each location in the map can a label, typically depending on some other attribute(s)

So in some ways a map is more like a tree or table, and hence I was thinking I need a simple custom view model for the GeoMap element, instead of (re)using the generic one for controls.
Re: [EMFForms] Support for Nebula's GeoMap widget [message #1754788 is a reply to message #1754669] Wed, 22 February 2017 11:57 Go to previous messageGo to next message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Hi,

it is a little hard to judge without having a detailled look. The "TreeMasterDetail" element is displaying a tree with a details view. So you can definitly create a renderer, which renders the information of a complete tree of objects.

Best regards

Jonas

--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: [EMFForms] Support for Nebula's GeoMap widget [message #1754791 is a reply to message #1754788] Wed, 22 February 2017 12:57 Go to previous messageGo to next message
Hallvard Traetteberg is currently offline Hallvard TraettebergFriend
Messages: 673
Registered: July 2009
Location: Trondheim, Norway
Senior Member
The GeoMapViewer has a content provider that returns all the elements for which it should show a location. This is similar to the content provider of a table (or tree, but a tree content provider also returns children/parents). Then a location provider returns a geo-location for each of the elements returned by the content provider. In addition, a label provider gives the text shown by the location marker. A view model could allow me to add a GeoMap element with attributes/references that allowed me to create the content provider, location provider and label provider. The existing view model contains elements that are similar, in the sense that they are used for providing (sub)elements and labels, so these could be reused. E.g. FeaturePathDomainModelReference could be used for all these, one for the elements, one or two for the location and one for the label (although you could have more, and a format string, for greater flexibility). Extending the view model (view.ecore) is natural in this case, since there are more things to configure than for simpler controls. I've found table.ecore in org.eclipse.emf.ecp.view.table.model, should I use this as the starting point/inspiration?
Re: [EMFForms] Support for Nebula's GeoMap widget [message #1754849 is a reply to message #1754791] Thu, 23 February 2017 08:17 Go to previous message
Jonas Helming is currently offline Jonas HelmingFriend
Messages: 111
Registered: September 2016
Senior Member
Absolutly, seems to make sense..

Best regards

Jonas

--
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/


--
Jonas Helming
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:[EMF Forms] Working with TransactionalEditingDomain
Next Topic:[Xcore] Project does not build anymore after git clean -fdx
Goto Forum:
  


Current Time: Thu Apr 25 16:23:33 GMT 2024

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

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

Back to the top