[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sapphire-dev] how to do a "richer" editor of a property

Hi sapphire experts,

I've got a property on a model that I'm working with that represents a user defined java/groovy script.  So I want to let the user edit this java/groovy script in a more "rich" way (code assist, validation, etc).  Right now I'm  just using the  standard property editor for a long string (textarea).  What I would really like to have is the full fledged groovy editor for Eclipse (lets assume that the groovy eclipse plugins are installed) that has all of those "rich" features.   Are there any suggestions for how to pull this off ?  I can throw out a few potential ideas but I don't know how feasible any of them would be, I would really love to hear some expert opinions :)

Some options:
- inline java/groovy editor right in the master/details page (not sure if this is even possible with Eclipse 3.x API)
- dedicated "script" page and could be automatically focused when the user wants to "edit a script" (not sure how intuitive this would be)
- dynamically create a temp script file in workspace and open this temp file in a new stand-alone editor (new tab in eclipse) that would be full-fledged groovy/java editor whenever the user wants to "edit" that script.  On save, this would close the editor and re-focus the original property editor in master/detail page (may be the simplest solution).  Would then need to figure out what to put in the property editor for the script property, like a button or link to "edit" the property?

I appreciate any feedback on this.

Greg Amerson
Liferay, Inc.