Posts

Showing posts from 2009

griffon – rich app using groovy and swing

In my constant search for rich app platforms, griffon has appeared on the radar. Griffon ( http://groovy.codehaus.org/Griffon ) uses grails-like thinking to help you create an application. It includes plugins that bolt on large components into your application such as different builders and java components for web services. While it is still a young project, it looks promising and I encourage people to start using it and developing with it. One are of development is to get spring and gorm moved over to griffon so that ORM technology is more easily available inside groovy similar to what is available in grails. You can use the 0.3 snapshot to create a spring enabled griffon application and if you compile the 0.3 snapshot compatible only gorm plugin (and manually install it), you can use gorm as well. Recently, gorm was enhanced so that it could be used outside of grails, however, you must use a specially configured session factory that knows it should scan the domain classes and augme...

eclipse e4 – create Application.xmi

How do you create this? The XMI is just a serialized form of the model instances. Its really xml so create an xml file the usual eclipse way. Just ran into this. I don't know if there is a wizard that has already been made (there is a sample Application.xmi in the workbench fragment bundle) but you can just create an XML file with .xmi extension and add the application namespace to it. Then just right click and select the generic ecore emf form editor or "other..." (and find the generic ecore emf form editor in the etools feature). I think you can add these entries to the top element: 1: < application:MApplication xmi:version ="2.0" 2: xmlns:xmi ="http://www.omg.org/XMI" 3: xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance" 4: xmlns:application ="http://www.eclipse.org/ui/2008/Application" 5: xmlns:workbench ="http://www.eclipse.org./ui/2008/Workbench" > 6:   7: .....

Hibernate, EMF objects and eclipse databinding – ensure you have an equals method

Ran into a few problems the other day around creating UI forms with EMF that is backed by Hibernate and Teneo. The jface databinding snippets almost always use strings as the model object, however, most model objects have embedded objects in them that then, down the road, relate back to user-readable strings.  Hence the snippets don’t always show some nuances around the model objects. Its important to realize that some of the jface databinding support classes, such as those producing object-to-label maps (which is why there are always IObservableMaps being used for everything are good in the sense that you can create a map between domain objects and the strings that should be displayed. These can be created automatically for you using jface databinding or you can create the maps directly yourself (no one really does that though). The real issues is to realize that many of these object-to-label maps that are created automatically use a backing map (hashtable) that hashes the object...