wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes A user-friendly XML editor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "A user-friendly XML editor" Watch "A user-friendly XML editor" New topic
Author

A user-friendly XML editor

Jane Jukowsky
Ranch Hand

Joined: Mar 28, 2009
Posts: 145
Hi,

My users know nothing about xml. I am thinking of having an XML config file (very limited schema obviously), and trying to find a good 3rd party tool (java-based or not) to let users edit it without knowing that they are editing an xml. TO a user, it would appear just some tree-like settings dialog, like Eclipse's Preferences. Can be done, right?


I am soooo tired of coding GUI every time I want to ask user's preference! THere has to be a better way.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Take a look at the Eclipse Modeling Framework (EMF). EMF is an advanced Java-based framework and code generation facility for building tools and other applications based on a structured data model, e.g. your configuration specs.

Good luck!
Jane Jukowsky
Ranch Hand

Joined: Mar 28, 2009
Posts: 145
Frank Bennett wrote:Take a look at the Eclipse Modeling Framework (EMF). EMF is an advanced Java-based framework and code generation facility for building tools and other applications based on a structured data model, e.g. your configuration specs.

Good luck!


Confused. Will it do what I need out of the box, without coding?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
You need to take some time and actually read the EMF documentation. There is however an sub-component that does generate an Eclipse-based editor tool for your specific EMF model. The code generation facility creates the code for the editor tool.

A fully functional Eclipse editor can be generated for any EMF model. An EMF model can be defined via Java classes, XMI syntax, or XML Schema instance.
Jane Jukowsky
Ranch Hand

Joined: Mar 28, 2009
Posts: 145
Thanks for the heads up. How do you estimate this emf project for a small app with about a dozen or two properties, in terms of man-hours and considering the learning curve? I am very familiar with eclipse, zero familiarity with emf. Probably more man-hours than I can afford, that's my guess.. :-(
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
There are a few different ways to create a model. Since your goal is to generate an editor for your XML-based configuration data, then you most likely would choose to generate the model from an XML Schema. The high-level steps are:

1. Create an XML Schema for your application's configuration language

2. Create an EMF model using the XML schema

3. Create the Eclipse editor plug-in using the EMF model


If you learn how this works, then you can use the EMF framework for future projects as well as your current one.

EMF: Eclipse Modeling Framework
Paperback: 744 pages
Publisher: Addison-Wesley Professional; 2 edition
Language: English
ISBN-10: 0321331885
ISBN-13: 978-0321331885


Good luck!
Jane Jukowsky
Ranch Hand

Joined: Mar 28, 2009
Posts: 145
744 pages, that's about the level of complexity of Hibernate? My client can't afford that right now :-(

But why code generation? This should be accomplished without code generation I'd think!
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
If you want to create an editor for your markup language, then you certainly would need to "generate" code.
 
Consider Paul's rocket mass heater.
 
subject: A user-friendly XML editor
 
Similar Threads
security: declarative vs. programmatic
JSTL forEach
A user-friendly XML editor in Swing?
Is it possible to retrive multiple objects at one time ?
security related web.xml elements - small tips