Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Some questions about using EMF in GEF and the draw2d control figures
Some questions about using EMF in GEF and the draw2d control figures [message #152654] Mon, 04 October 2004 07:53 Go to next message
Eclipse UserFriend
Originally posted by: Greenbank.water.pku.edu.cn

Hello

I am trying to write an editor just like the SWT Designer, where users
can arrange controls to layout an interface.But the difference is the
work will be stored in XML files than java ones.So I use EMF to generate
the models, but I think there must be some modifications to the
auto-generated model. And I have read the IBM red book"Eclipse
Development using GEF and EMF", but in chapter7.3.2 "Modifying the code
generated from the model" I can not find anything useful. Can anyone
tell me what should I do if I want to use EMF-Generated results as the
GEF Models?

By the way,if I want to use the draw2d control figures as my view(eg:the
buttons,textfields...),and I want the user to change the text displayed
on buttons and the other controls.But the draw2d button do not provide
any methods to change these properties of the figures after
constructed.Instead,it can be clicked.In a word,I just need an static
editable image of the button,not a real clickable one,can I use the
already existed figures or I must draw them by myself?

Thanks a lot for your help!
Best regards!

Greenbank Tang
Peking University
Beijing,China
Tel:86-010-62759092
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152685 is a reply to message #152654] Mon, 04 October 2004 15:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> I am trying to write an editor just like the SWT Designer, where users
> can arrange controls to layout an interface.But the difference is the
> work will be stored in XML files than java ones.So I use EMF to generate
> the models, but I think there must be some modifications to the
> auto-generated model. And I have read the IBM red book"Eclipse
> Development using GEF and EMF", but in chapter7.3.2 "Modifying the code
> generated from the model" I can not find anything useful. Can anyone
> tell me what should I do if I want to use EMF-Generated results as the
> GEF Models?

We are developing an EMF-based GEF example. It seems very straightforward,
it's just another type of model.

> By the way,if I want to use the draw2d control figures as my view(eg:the
> buttons,textfields...),and I want the user to change the text displayed
> on buttons and the other controls.But the draw2d button do not provide
> any methods to change these properties of the figures after
> constructed.Instead,it can be clicked.In a word,I just need an static
> editable image of the button,not a real clickable one,can I use the
> already existed figures or I must draw them by myself?

Just use a Label figure with a button border or SchemeBorder that looks like
a button.

> Thanks a lot for your help!
> Best regards!
>
> Greenbank Tang
> Peking University
> Beijing,China
> Tel:86-010-62759092
>
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152707 is a reply to message #152685] Mon, 04 October 2004 16:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fei.tian.istark.com

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cjrpqs$ql5$1@eclipse.org...
>> I am trying to write an editor just like the SWT Designer, where users
>> can arrange controls to layout an interface.But the difference is the
>> work will be stored in XML files than java ones.So I use EMF to generate
>> the models, but I think there must be some modifications to the
>> auto-generated model. And I have read the IBM red book"Eclipse
>> Development using GEF and EMF", but in chapter7.3.2 "Modifying the code
>> generated from the model" I can not find anything useful. Can anyone
>> tell me what should I do if I want to use EMF-Generated results as the
>> GEF Models?
I have same issue as you do.
>
> We are developing an EMF-based GEF example. It seems very
> straightforward,
> it's just another type of model.
When and where I can have it?
Is is possible just use EMF generated model to create GEF editor?( less
modification)
>
>> By the way,if I want to use the draw2d control figures as my view(eg:the
>> buttons,textfields...),and I want the user to change the text displayed
>> on buttons and the other controls.But the draw2d button do not provide
>> any methods to change these properties of the figures after
>> constructed.Instead,it can be clicked.In a word,I just need an static
>> editable image of the button,not a real clickable one,can I use the
>> already existed figures or I must draw them by myself?
>
> Just use a Label figure with a button border or SchemeBorder that looks
> like
> a button.
>
>> Thanks a lot for your help!
>> Best regards!
>>
>> Greenbank Tang
>> Peking University
>> Beijing,China
>> Tel:86-010-62759092
>>
>
>
Fei
Thanks
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152714 is a reply to message #152685] Mon, 04 October 2004 17:05 Go to previous messageGo to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Randy Hudson wrote:

> We are developing an EMF-based GEF example. It seems very
> straightforward, it's just another type of model.

Which command stack are you using in your example, GEF or EMF?

Cheers, Steve.
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152746 is a reply to message #152714] Tue, 05 October 2004 01:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Greenbank.water.pku.edu.cn

Steve Jones wrote:
>
> Which command stack are you using in your example, GEF or EMF?
I think that is one of the biggest problem in combining GEF and EMF,in
EMF newsgroup there are lots of postings and discussing about this topic
but no more good solutions. The IBM Redbook develop them in two plugins
to solve the problem. I hope maybe the GEF2.0 can integrate the EMF so
we will not need to pay so much time on it.
And many thanks to Randy Hudson! I am looking foreword to your
EMF-based GEF example :)
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152785 is a reply to message #152714] Tue, 05 October 2004 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

There is no command stack in EMF, only EMF.Edit contains a command stack.

"Steve Jones" <steve@istech.demon.co.uk> wrote in message
news:cjrvbi$69t$1@eclipse.org...
> Randy Hudson wrote:
>
> > We are developing an EMF-based GEF example. It seems very
> > straightforward, it's just another type of model.
>
> Which command stack are you using in your example, GEF or EMF?
>
> Cheers, Steve.
>
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152793 is a reply to message #152746] Tue, 05 October 2004 14:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> And many thanks to Randy Hudson! I am looking foreword to your
> EMF-based GEF example :)

Thanks, but Pratik Shah is doing this example :-)
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152807 is a reply to message #152785] Tue, 05 October 2004 14:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

To be slightly more correct, only EMF.Edit requires the utility plug-in
defining the command stack implementation. The example is using an EMF
model which is split between business and view models.

"Randy Hudson" <none@us.ibm.com> wrote in message
news:cjua3q$aql$1@eclipse.org...
> There is no command stack in EMF, only EMF.Edit contains a command stack.
>
> "Steve Jones" <steve@istech.demon.co.uk> wrote in message
> news:cjrvbi$69t$1@eclipse.org...
> > Randy Hudson wrote:
> >
> > > We are developing an EMF-based GEF example. It seems very
> > > straightforward, it's just another type of model.
> >
> > Which command stack are you using in your example, GEF or EMF?
> >
> > Cheers, Steve.
> >
>
>
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152830 is a reply to message #152785] Tue, 05 October 2004 14:54 Go to previous messageGo to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Randy Hudson wrote:

> There is no command stack in EMF, only EMF.Edit contains a command stack.

OK, I must apologise for my loose talk.

If you use EMF.Edit and generate an editor automatically using the supplied
templates you end up with a fine, working, model editor for little or no
effort.

It would be tempting to use this as the base application on which to add
some graphical views using GEF. You now have the problem of two
incompatible command stacks.

Sometime soon I can see EMF/JET technology pushing code generation out as
far as the GEF EditParts with factories that supply the auto-generated
EMF.Edit commands.

Given this situation, which command stack would you favour, or are you
ignoring EMF.Edit in your new example and if so why?

Cheers, Steve.
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152838 is a reply to message #152830] Tue, 05 October 2004 17:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> If you use EMF.Edit and generate an editor automatically using the
supplied
> templates you end up with a fine, working, model editor for little or no
> effort.
>
> It would be tempting to use this as the base application on which to add
> some graphical views using GEF. You now have the problem of two
> incompatible command stacks.
>
> Sometime soon I can see EMF/JET technology pushing code generation out as
> far as the GEF EditParts with factories that supply the auto-generated
> EMF.Edit commands.
>
> Given this situation, which command stack would you favour, or are you
> ignoring EMF.Edit in your new example and if so why?

We are ignoring EMF.Edit. It works well if you are trying to display your
model as a tree, and every item in the tree corresponds to one item in your
model. It's a bridge between existing JFace viewers and an EMF model. It
creates a layer on top of your model which maps your model onto another
model (ItemProvider) which is used by the JFace providers in EMF.Edit.

In our example, we display classes in a class diagram. A displayed class
corresponds to a ClassView object, which points to an EClass. The ClassView
determines where the class is being viewed in the diagram, as well as
functions as the node for any references and inheritances being displayed.
The EClass determines of course the attributes and operations and class
name, etc. Similarly, there is a ReferenceView which points to one or two
References, and an InheritanceView, which points to nothing but it attached
to two ClassViews.

So, how do you think JET could help us build this example?
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152844 is a reply to message #152838] Tue, 05 October 2004 18:01 Go to previous messageGo to next message
Steve Jones is currently offline Steve JonesFriend
Messages: 95
Registered: July 2009
Member
Randy Hudson wrote:

> So, how do you think JET could help us build this example?

I've no idea.

I do know it would be nice to present a consistent approach to model
editing, be it via JFace viewers (EMF.Edit) or graphically using GEF.

The interface presented to the user will in many applications be a
combination of both graphical and JFace views.

I thought, mistakenly, when a "new example" was mentioned in the group that
this problem was being addressed. Clearly it is not.

Cheers, Steve.
Re: Some questions about using EMF in GEF and the draw2d control figures [message #152882 is a reply to message #152844] Tue, 05 October 2004 20:51 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

> Randy Hudson wrote:
>
> > So, how do you think JET could help us build this example?
>
> I've no idea.
>
> I do know it would be nice to present a consistent approach to model
> editing, be it via JFace viewers (EMF.Edit) or graphically using GEF.

Yes, and let's not forget toolbars. It would be nice if toolbars were
consistent with JFace/GEF too.

> The interface presented to the user will in many applications be a
> combination of both graphical and JFace views.
>
> I thought, mistakenly, when a "new example" was mentioned in the group
that
> this problem was being addressed. Clearly it is not.
>
> Cheers, Steve.
>
>
Previous Topic:javadoc API online??
Next Topic:Editor and View
Goto Forum:
  


Current Time: Wed Feb 05 19:04:00 GMT 2025

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

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

Back to the top