Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Allowing custom extension to my model(Allowing my model to be extended)
Allowing custom extension to my model [message #886982] Fri, 15 June 2012 23:11 Go to next message
Praveen Balaji is currently offline Praveen BalajiFriend
Messages: 2
Registered: May 2012
Junior Member
I have a base structure for my model (ecore). The UI that uses this model allows users to configure properties for Persistence Data Stores. The Data Stores configurations themselves are pluggable and the configuration for each of these Data Stores is very specific to the Data Store.

index.php/fa/10321/0/
[Attaching an image to show two such configurations]

Considering the UI is pluggable, I would like the model to be pluggable as well. The provider of the UI extensions would also provide model extensions and would know how to populate the model. Is there some way to achieve this?

I see EMF Facets (www.eclipse.org/modeling/emft/facet/) tries to address this problem, but it's in incubation. Are there any other creative ways someone achieved this?

- Praveen

[Updated on: Fri, 15 June 2012 23:13]

Report message to a moderator

Re: Allowing custom extension to my model [message #887095 is a reply to message #886982] Sat, 16 June 2012 03:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Praveen,<br>
<br>
Comments below.<br>
<br>
On 16/06/2012 1:11 AM, Praveen Balaji wrote:
<blockquote cite="mid:jrgfev$nak$1@xxxxxxxxe.org" type="cite">
<pre wrap="">I have a base structure for my model (ecore). The UI that uses this model allows users to configure properties for Persistence Data Stores. The Data Stores configurations themselves are pluggable and the configuration for each of these Data Stores is very specific to the Data Store.


[Attaching an image to show two such configurations]</pre>
</blockquote>
This is normally done by encoding all this information in the URI
and specializing URIHandlers or by providing specialized resource
implementations.<br>
<blockquote cite="mid:jrgfev$nak$1@xxxxxxxxe.org" type="cite">
<pre wrap="">

Considering the UI is pluggable, I would like the model to be pluggable as well.</pre>
</blockquote>
What does that mean?<br>
<blockquote cite="mid:jrgfev$nak$1@xxxxxxxxe.org" type="cite">
<pre wrap=""> The provider of the UI extensions would also provide model extensions and would know how to populate the model. Is there some way to achieve this?</pre>
</blockquote>
I don't know what "this" is. Is it similar to this:<small><br>
</small>
<blockquote><small><a
href="http://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CFQQFjAA&amp;url=http%3A%2F%2Fed-merks.blogspot.com%2F2008%2F01%2Fcreating-children-you-didnt-know.html&amp;ei=zvzbT62HHo7IswaklfnwDQ&amp;usg=AFQjCNHF1uSyjy4GPqpXfF_M1_WaeWGFbg&amp;sig2=F0vRw3L-WxRCDVLle24n8Q"
class="l vst" onmousedown="return
rwt(this,'','','','1','AFQjCNHF1uSyjy4GPqpXfF_M1_WaeWGFbg','F0vRw3L-WxRCDVLle24n8Q','0CFQQFjAA',null,event)">Merks'
Meanderings: Creating <em>Children You Didn't Know Existed</em></a></small></blockquote>
<blockquote cite="mid:jrgfev$nak$1@xxxxxxxxe.org" type="cite">
<pre wrap="">

I see EMF Facets (<a class="moz-txt-link-abbreviated" href="http://www.eclipse.org/modeling/emft/facet/">www.eclipse.org/modeling/emft/facet/</a>) tries to address this problem, but it's in incubation. Are there any other creative ways someone achieved this?</pre>
</blockquote>
You can always model your objects so they can be annotated with
other objects, much as EModelElement can contain EAnnotations which
in turn can contain any other object or can reference any other
object.<br>
<blockquote cite="mid:jrgfev$nak$1@xxxxxxxxe.org" type="cite">
<pre wrap="">

- Praveen
</pre>
</blockquote>
</body>
</html>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Allowing custom extension to my model [message #888332 is a reply to message #887095] Mon, 18 June 2012 02:10 Go to previous message
Praveen Balaji is currently offline Praveen BalajiFriend
Messages: 2
Registered: May 2012
Junior Member
Thanks for the response.

Quote:
This is normally done by encoding all this information in the URI
and specializing URIHandlers or by providing specialized resource
implementations.


Yes, I had a similar alternative in mind (a generic list of name-value pair "extension element") if nothing else was available.

Quote:

> Considering the UI is pluggable, I would like the model to be pluggable as well.

What does that mean?

Is it similar to this: [creating-children-you-didnt-know.html]


Probably not. What I need to do is capture configuration information in a model. The base model captures the configuration from the base UI. When you extend the UI, you are expected to provide extensions to the model as well and the code that binds the extension UI and the extension model.

I think the simple solution is to declare a base class in the model. And UI extension provides in its model, an extension of the model base class.

Does that make any sense?
Previous Topic:Teneo & Juno
Next Topic:XML file reading using ecore and java program
Goto Forum:
  


Current Time: Fri Apr 19 15:35:24 GMT 2024

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

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

Back to the top