Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Generating Editor Code
Generating Editor Code [message #768265] Mon, 19 December 2011 20:22 Go to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
Hello,

I have been working on GMF for a couple of weeks now so i am still a newbie...I was wondering why do i always have to modify the code myself after generating the Editor Code, Model Code and Edit Code?

when the code is generated automatically i always get an error and i have to modify it manually and for sorry sometimes it doesn't work as expected.

Could you please help me out with that? if want the source code then please let me know it's just a simple application that's easy to be understood.

Thanks,
Mostafa.

Re: Generating Editor Code [message #768455 is a reply to message #768265] Tue, 20 December 2011 07:34 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33146
Registered: July 2009
Senior Member
Mostafa,

What specifically is wrong?


On 19/12/2011 9:22 PM, Mostafa Fouly wrote:
> Hello,
>
> I have been working on GMF for a couple of weeks now so i am still a
> newbie...I was wondering why do i always have to modify the code
> myself after generating the Editor Code, Model Code and Edit Code?
>
> when the code is generated automatically i always get an error and i
> have to modify it manually and for sorry sometimes it doesn't work as
> expected.
>
> Could you please help me out with that? if want the source code then
> please let me know it's just a simple application that's easy to be
> understood.
>
> Thanks,
> Mostafa.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generating Editor Code [message #769368 is a reply to message #768455] Wed, 21 December 2011 22:45 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
Hey,
the problem is the generated code is always a buggy one...which leads that i have to modify it manually and most probably in an incorrect way as it should be generated automatically.

So, the output model is not as expected.

I uploaded the source code if you wanna have a look over it.

Thanks for your concern.
Re: Generating Editor Code [message #769517 is a reply to message #769368] Thu, 22 December 2011 08:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33146
Registered: July 2009
Senior Member
Moustafa,

I don't want to paw through a large archive (of a workspace?) looking
for mystery problems. Please be more specific.


On 21/12/2011 11:45 PM, Mostafa Fouly wrote:
> Hey,
> the problem is the generated code is always a buggy one...which leads that i have to modify it manually and most probably in an incorrect way as it should be generated automatically.
>
> So, the output model is not as expected.
>
> I uploaded the source code if you wanna have a look over it.
>
> Thanks for your concern.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generating Editor Code [message #769558 is a reply to message #769517] Thu, 22 December 2011 10:28 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
Hi,

I built a diagram, and some of its components has relationships (e.g a Kitchen has 1 or more table and table can't be included in any other component)

So after that i generated the genmodel and generated the Model Code, Edit Code and Editor Code.

the problem is that i always find errors in the generated code...So do i have to fix manually (which might cause other problems) or something went wrong with building the diagram?

the workspace2 is just a small sample application it's a not the whole workspace...it just shows the errors that i got when generating the codes.
Re: Generating Editor Code [message #769581 is a reply to message #769558] Thu, 22 December 2011 11:15 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 22/12/2011 11:28, Mostafa Fouly wrote:
> i always find errors in the generated code.

As Ed insisted, please be more specific. The word "error" has no useful
meaning.
What is it? Compilation errors? Because of what? Missing class, bad
syntax...? or Runtime errors? Of which kind? Diagram cannot open, you
cannot create a node...?

So please provide more details - as a few lines in the content of the
mail, not as an attachment. Then you'll probably get more support ;)

Regards,
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: Generating Editor Code [message #769593 is a reply to message #769581] Thu, 22 December 2011 11:46 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
Hi Mickael,

ok, i will try to be more specific...

The imports at the generated code cannot be resolved...and even sometimes the methods are undefined and not implemented (compilation errors).

do i have to create the missing methods manually? and create the missing classes as well?

hope i am clear enough...if not please just tell me.

Thanks,
Mostafa.
Re: Generating Editor Code [message #769670 is a reply to message #769593] Thu, 22 December 2011 13:58 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Ok,

You should not have anything to change in the generated code. It should
work "as it". However, it is possible that you MANIFEST.MF is not
updated by the generation and is missing some dependencies.
Can you provide an example of unresolved import?
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: Generating Editor Code [message #769710 is a reply to message #769670] Thu, 22 December 2011 15:14 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
one of the uncorrect imports was "homedesign.homedesign.util.HomedesignAdapterFactory;" while it should be "import homedesign.util.HomedesignAdapterFactory;"

I solved these imports but the problem is when i embed diagrams by means of making relationships (e.g Kitchen should contain a Table inside it) i couldn't see the embedded graph...but i think it's added but not visible).

I attached a snapshot of the result, please check it out.

thanks for your quick response!
  • Attachment: Capture.JPG
    (Size: 79.38KB, Downloaded 165 times)
Re: Generating Editor Code [message #769743 is a reply to message #769710] Thu, 22 December 2011 16:07 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

On 22/12/2011 16:14, Mostafa Fouly wrote:
> one of the uncorrect imports was "homedesign.homedesign.util.HomedesignAdapterFactory;" while it should be "import homedesign.util.HomedesignAdapterFactory;"

This is probably a bug in the generator that does not take into account
changed package names.
Please check wether it is reported or fix. If you find it as Open in the
tracker, please add a comment and your use-case (the former zip would
help). If you find it mark as resolved, then ensure you use the latest
version (2.4) of GMF-Tooling. Finally, if you don't find anything
relevant, please open a bug with the precise steps and resources to
reproduce your bug.

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMF-Tooling

Regards,
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: Generating Editor Code [message #769765 is a reply to message #769743] Thu, 22 December 2011 16:40 Go to previous messageGo to next message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
thanks for your help...but other than the import thingy why do diagrams don't appear when they are embedded? only the parent diagram appear!
Re: Generating Editor Code [message #769778 is a reply to message #769765] Thu, 22 December 2011 16:50 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

This issue is not related to the original one.
Please create a new thread for it.
--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: Generating Editor Code [message #769783 is a reply to message #769778] Thu, 22 December 2011 16:59 Go to previous message
Mostafa Fouly is currently offline Mostafa FoulyFriend
Messages: 24
Registered: December 2011
Junior Member
Ok, i will, thanks a lot for your help!
Previous Topic:Color and Size of a Custom Figure
Next Topic:Embedded diagram doesn't appear
Goto Forum:
  


Current Time: Sat May 11 01:04:18 GMT 2024

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

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

Back to the top