Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EObject IDocument support
EObject IDocument support [message #425005] Thu, 13 November 2008 03:42 Go to next message
Ralph Markham is currently offline Ralph MarkhamFriend
Messages: 10
Registered: July 2009
Junior Member
I am current looking at providing enhanced editing support for Cdata in my
model. I would prefer to use existing editors like the groovy script
editor with as little customization as possible. Is there any existing
support / functionality that would help me support this, beyond just
writing my own DocumentProvider?
Re: EObject IDocument support [message #425009 is a reply to message #425005] Thu, 13 November 2008 11:29 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ralph,

I'm not sure I really understand your question. You want a source view
of the serialization? Or maybe you want a fancier cell editor when
editing a string property than you get by default?


Ralph Markham wrote:
> I am current looking at providing enhanced editing support for Cdata
> in my model. I would prefer to use existing editors like the groovy
> script editor with as little customization as possible. Is there any
> existing support / functionality that would help me support this,
> beyond just writing my own DocumentProvider?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EObject IDocument support [message #425034 is a reply to message #425009] Thu, 13 November 2008 20:34 Go to previous messageGo to next message
Ralph Markham is currently offline Ralph MarkhamFriend
Messages: 10
Registered: July 2009
Junior Member
Example:

<scripts>
<script name="myscript">
<![CDATA[
try {
return scope.get("server").get("name");
} catch( Exception e ) { }
return "";
]]>
</script>
<script name="myscript2">
<![CDATA[scope.get("name")]]>
</script>
</scripts>

I want to be able to take the text in the cdata and open it up in an
editor. The easiest way I can think of to do this and provide a powerful
editing environment, is to use existing editors like the one that exist
for groovy.
Re: EObject IDocument support [message #425035 is a reply to message #425034] Thu, 13 November 2008 20:51 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ralph,

Well, editors aren't typically designed to deal with snippets from
files. Certainly you can mark the GenFeature for this to say it's
multi-line text and then you can edit it using a multi-line text
control. There's nothing fancy in EMF beyond that.


Ralph Markham wrote:
> Example:
>
> <scripts>
> <script name="myscript">
> <![CDATA[
> try {
> return scope.get("server").get("name");
> } catch( Exception e ) { }
> return "";
> ]]>
> </script>
> <script name="myscript2">
> <![CDATA[scope.get("name")]]>
> </script>
> </scripts>
>
> I want to be able to take the text in the cdata and open it up in an
> editor. The easiest way I can think of to do this and provide a
> powerful editing environment, is to use existing editors like the one
> that exist for groovy.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:EMF Compare Webinar - Dec. 10
Next Topic:[DataBinding]Examples?
Goto Forum:
  


Current Time: Thu Apr 25 09:21:37 GMT 2024

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

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

Back to the top