Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Best Way to Create Custom Form Based on Selected Object in Tree(Best Approach to create Custom Form on Selected EMF Object)
Best Way to Create Custom Form Based on Selected Object in Tree [message #493251] Fri, 23 October 2009 22:35 Go to next message
Richard Catlin is currently offline Richard CatlinFriend
Messages: 50
Registered: July 2009
Member
I am new to creating a custom RCP application based on the EMF Model and Edit frameworks.

I am creating a custom application and will navigate the data structure with JFace Viewers.

I have already built my Ecore model and have programmatically manipulated the EMF.Edit and EMF model frameworks, so I understand the ItemProviderAdapterFactory and the ItemProvider itself. I want to stay within the EMF.Edit framework to accomplish this.

I know PropertySheet can edit the attributes of the selected Object, but what if I want to create a custom form to display and edit the attributes, and possibly upload an image.

Should I extend ContentViewer? PropertySheet? Am I missing a JFace Viewer that does this already?

Thanks for any help.
Richard
Re: Best Way to Create Custom Form Based on Selected Object in Tree [message #493277 is a reply to message #493251] Sat, 24 October 2009 07:55 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

For custom (=not generated) editors I'd go with EMF-Edit-Databinding
which integrates itself fully into the EMF-Edit-Framework.

If you are at ESE I'll give a tutorial on using EMF-Databinding as part
of the EMF-Tutorial. An introduction and example is part of a tutorial
series I publish as part of the Galileo Release [1].

Tom

[1] http://tomsondev.bestsolution.at/2009/06/06/galileo-improved -emf-databinding-support/

Richard Catlin schrieb:
> I am new to creating a custom RCP application based on the EMF Model and
> Edit frameworks.
>
> I am creating a custom application and will navigate the data structure
> with JFace Viewers.
>
> I have already built my Ecore model and have programmatically
> manipulated the EMF.Edit and EMF model frameworks, so I understand the
> ItemProviderAdapterFactory and the ItemProvider itself. I want to stay
> within the EMF.Edit framework to accomplish this.
>
> I know PropertySheet can edit the attributes of the selected Object, but
> what if I want to create a custom form to display and edit the
> attributes, and possibly upload an image.
>
> Should I extend ContentViewer? PropertySheet? Am I missing a JFace
> Viewer that does this already?
>
> Thanks for any help.
> Richard
Re: Best Way to Create Custom Form Based on Selected Object in Tree [message #493279 is a reply to message #493251] Sat, 24 October 2009 08:18 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060204070507090407060409
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Richard,

Data binding most certainly is the new improved way of producing forms.
The EEF project is just getting started too and it might well be able to
generate exactly the kinds of things you're looking for

http://www.eclipse.org/proposals/eef/

You can implement and IPropertySheetPage to look like anything...


Richard Catlin wrote:
> I am new to creating a custom RCP application based on the EMF Model
> and Edit frameworks.
>
> I am creating a custom application and will navigate the data
> structure with JFace Viewers.
>
> I have already built my Ecore model and have programmatically
> manipulated the EMF.Edit and EMF model frameworks, so I understand the
> ItemProviderAdapterFactory and the ItemProvider itself. I want to
> stay within the EMF.Edit framework to accomplish this.
>
> I know PropertySheet can edit the attributes of the selected Object,
> but what if I want to create a custom form to display and edit the
> attributes, and possibly upload an image.
>
> Should I extend ContentViewer? PropertySheet? Am I missing a JFace
> Viewer that does this already?
>
> Thanks for any help.
> Richard

--------------060204070507090407060409
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Richard,<br>
<br>
Data binding most certainly is the new improved way of producing
forms.  The EEF project is just getting started too and it might well
be able to generate exactly the kinds of things you're looking for<br>
<blockquote><a href="http://www.eclipse.org/proposals/eef/">http://www.eclipse.org/proposals/eef/</a><br>
</blockquote>
You can implement and IPropertySheetPage to look like anything...<br>
<br>
<br>
Richard Catlin wrote:
<blockquote cite="mid:hbtb3f$761$1@build.eclipse.org" type="cite">I am
new to creating a custom RCP application based on the EMF Model and
Edit frameworks.
<br>
<br>
I am creating a custom application and will navigate the data structure
with JFace Viewers.
<br>
<br>
I have already built my Ecore model and have programmatically
manipulated the EMF.Edit and EMF model frameworks, so I understand the
ItemProviderAdapterFactory and the ItemProvider itself.  I want to stay
within the EMF.Edit framework to accomplish this.
<br>
<br>
I know PropertySheet can edit the attributes of the selected Object,
but what if I want to create a custom form to display and edit the
attributes, and possibly upload an image.
<br>
<br>
Should I extend ContentViewer? PropertySheet?  Am I missing a JFace
Viewer that does this already?
<br>
<br>
Thanks for any help.
<br>
Richard
<br>
</blockquote>
</body>
</html>

--------------060204070507090407060409--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Best Way to Create Custom Form Based on Selected Object in Tree [message #493798 is a reply to message #493279] Wed, 28 October 2009 04:02 Go to previous messageGo to next message
Richard Catlin is currently offline Richard CatlinFriend
Messages: 50
Registered: July 2009
Member
Ed,

I have found EMF to be powerful yet fairly complex. I do have to say that the framework is attainable. I have only known about Eclipse and its frameworks for less than 5 months. I have read the EMF book, the Modeling Project book, Eclipse Plugins, and BIRT.

I am fairly versed on EMF Model, Model Query, and EMF.Edit. Yet find that the RCP integration portion to EMF.Edit is still complex and doesn't have many "getting started" examples.

I know that understanding how PropertySheet works will shed light on it for me, but PropertySheet is very complex and after days of reading the code, I'm not sure how close I am to getting it (the light bulb going off).

You say that implementing IPropertySheetPage is all I have to do, but I am confused. I realize that I want to stay in the same paradigm, and use EMF.Edit and the EditingDomain to access the model, like PropertySheet does.

I find a disjoint (and maybe I'm wrong) between the EMF book and the Eclipse Plugins book. It seems the Eclipse Plugins book is not focused on using EMF as its model, but catering to the "easier" SessionFacades and models, such as EJBs and JPA.

Is there a simpler example than PropertySheet to demonstrate to me how to implement IPropertySheetPage for EMF.Edit access to the model?

Regards,
Richard
Re: Best Way to Create Custom Form Based on Selected Object in Tree [message #493805 is a reply to message #493798] Wed, 28 October 2009 06:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Richard,

Comments below.

Richard Catlin wrote:
> Ed,
>
> I have found EMF to be powerful yet fairly complex.
Simple things tend not be be so powerful, nor if well used, to remain
simple.
> I do have to say that the framework is attainable. I have only known
> about Eclipse and its frameworks for less than 5 months. I have read
> the EMF book, the Modeling Project book, Eclipse Plugins, and BIRT.
>
> I am fairly versed on EMF Model, Model Query, and EMF.Edit. Yet find
> that the RCP integration portion to EMF.Edit is still complex and
> doesn't have many "getting started" examples.
If only someone would write one. :-)
>
> I know that understanding how PropertySheet works will shed light on
> it for me, but PropertySheet is very complex and after days of reading
> the code, I'm not sure how close I am to getting it (the light bulb
> going off).
And much of that is JFace underlying implementations... I hope you're
using the debugger to step through the code to dynamically analyze the
behavior rather than trying to figure out how it works just by looking
at static code.
>
> You say that implementing IPropertySheetPage is all I have to do, but
> I am confused. I realize that I want to stay in the same paradigm,
> and use EMF.Edit and the EditingDomain to access the model, like
> PropertySheet does.
>
> I find a disjoint (and maybe I'm wrong) between the EMF book and the
> Eclipse Plugins book. It seems the Eclipse Plugins book is not
> focused on using EMF as its model, but catering to the "easier"
> SessionFacades and models, such as EJBs and JPA.
I'm sure that's true.
>
> Is there a simpler example than PropertySheet to demonstrate to me how
> to implement IPropertySheetPage for EMF.Edit access to the model?
No, I think implementing that will necessarily be complex. It makes
you more of a framework builder than a casual user of an existing
framework.
>
> Regards,
> Richard


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Best Way to Create Custom Form Based on Selected Object in Tree [message #493955 is a reply to message #493277] Wed, 28 October 2009 15:28 Go to previous messageGo to next message
Richard Catlin is currently offline Richard CatlinFriend
Messages: 50
Registered: July 2009
Member
Tom,

Thanks. The "Project Administration" screen shot demonstrates a custom form. This is exactly what I am trying to accomplish. I will look at your posts and the sample code in CVS.

Regards,
Richard Catlin
Re: Best Way to Create Custom Form Based on Selected Object in Tree [message #493958 is a reply to message #493805] Wed, 28 October 2009 15:32 Go to previous message
Richard Catlin is currently offline Richard CatlinFriend
Messages: 50
Registered: July 2009
Member
Ed,

Thank you for your responses. I am going to try to follow Tom's databinding example to see if I can accomplish what I need to do.

If I do something different from Tom's example, I will try to write it up as a "Getting Started" example.

Regards,
Richard Catlin
Previous Topic:ChangeRecorder question
Next Topic:How to implement Tabbed Properties for a model generated from EMF?
Goto Forum:
  


Current Time: Wed Apr 24 16:15:20 GMT 2024

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

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

Back to the top