Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Deleting Tool Objects, Deleting Tool Connections
[Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #757355] Thu, 17 November 2011 21:45 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
Hello i got a Problem when using Eugenia.
I simply created a Model, which works really fine, when i dont use any modification in the ECore2GMF.eol File.

Later on i realized that i dont want these long list of objects and connections.
(Because some of them are only parent nodes and i modelled them because all nodes have the same attributes).
So i dont want the basic node called "Node" to appear in the list of objects.

So i added the following to the ECore2GMF.eol
var deletingAttribute = GmfTool!CreationTool.all.selectOne(r|r.title='Node');
delete deletingAttribute;


When i rerun the generating now, i got an error.
Could not load the GmfMap and GmfGen models.


And i can even see that the GmfMap was not created.
The same happens when i'm deleting Connections from the list, because i only want them to be modelled in the indirect way. (With the small boxes in the GUI)
Why that happens ?
Is there any way to hide object or connections from the tool palette ?

Or is there any chance to model three element like this.
I got one parent, let me call it "Dad".
Now i got two different childs let ma call them "Boy" and "Girl".
And i want to use one type of reference now, to link them to "Dad".
I dont want to use containings (Seems to be stupid in this example, but i want to be able to model Boys belonging to more than one Dad).
So how i do that ? Just to make it clear, the result should be one reference i can used for both connections.
I tryed to use super-classes...but this doesnt work either, because Boy and Girl have different attributes and containments themselves.


Thanks

[Updated on: Thu, 17 November 2011 22:08]

Report message to a moderator

Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #757476 is a reply to message #757355] Fri, 18 November 2011 15:13 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi,

Could you please zip the relevant projects and send us a copy at epsilon.devs gmail com so that I can have a look?

Cheers,
Dimitris
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #757515 is a reply to message #757355] Fri, 18 November 2011 17:41 Go to previous messageGo to next message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
Hi Dimitrius
I have the same need.
I know it's possible to hide manually any items in the pallete (just right click it , Customize option and the Hide option). But I would like to know if there is a way to do it programatically or even, if possible, in the emf file.

Any help will be useful!
I really thank you !
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758057 is a reply to message #757515] Mon, 21 November 2011 20:17 Go to previous messageGo to next message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
Dimitrius, where can I see this specifically syntax like SnakeByte hs shown
'var deletingAttribute = GmfTool!CreationTool.all.selectOne(r|r.title='Node');
delete deletingAttribute;'
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758062 is a reply to message #758057] Mon, 21 November 2011 20:28 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Paulo,

This is discussed alongside an example in http://eclipse.org/gmt/epsilon/doc/articles/eugenia-polishing/

The language used for the polishing transformations is EOL (http://eclipse.org/gmt/epsilon/doc/eol/)

Cheers,
Dimitris
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758074 is a reply to message #758057] Mon, 21 November 2011 20:37 Go to previous messageGo to next message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
Dimitrius,
I try to run this simple piece of code in .evl file and in .eol file.
var deletingAttribute = GmfTool!CreationTool.all.selectOne(r|r.title='Atributo');

Both of them return this message error.
Type 'GmfTool!CreationTool' not found

Do you think I'm missing some ''import'' ?

[Updated on: Mon, 21 November 2011 20:37]

Report message to a moderator

Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758079 is a reply to message #758074] Mon, 21 November 2011 20:43 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Paulo,

The .eol file needs to be named ECore2GMF.eol and be placed next to your Ecore metamodel so that Eugenia can pick it up and run it after the built-in transformation.

Cheers,
Dimitris
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758086 is a reply to message #758079] Mon, 21 November 2011 21:00 Go to previous messageGo to next message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
Thank you, Dimitrius!

My last doubt is what do you mean by "be placed next"? As far as I know, Eclipse sorts the files in a folder alphabetically , right ? So in some cases it could be impossible to ''place ECore2GMF.eol next to .ecore model''.

Thank you
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758088 is a reply to message #758086] Mon, 21 November 2011 21:02 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

By next I meant under the same folder.

Cheers,
Dimitris
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758095 is a reply to message #758088] Mon, 21 November 2011 21:14 Go to previous messageGo to next message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
Thank you.

I'm sorry to bother you but I've been trying for a week to hide a element in the Palette and until now, i Get no success. Sad

Consider this simple meta model

@namespace(uri="family", prefix="family")
package family;

@gmf.diagram(foo="bar")
class family
{
val Father[*] fathers;
val Mother[*] mothers;

}

@gmf.node(label="name")
class Father{
attr String name;
}

@gmf.node(label="name")
class Mother{
attr String name;
}

My Idea is hide the element ''Mother'' from the palette. The reason for that is I want to create ''Mother'' nodes by code. There is a reason for that too but it's not the main question right now.

Anyway, I appreciate all the time you took to answer me. I'm really thankful!!!!

Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758107 is a reply to message #758095] Mon, 21 November 2011 21:36 Go to previous messageGo to next message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2163
Registered: July 2009
Location: York, UK
Senior Member

Hi Paulo,

Could you perhaps be a bit more specific about what exactly you've tried and how is it not working (i.e. what error messages are you getting?)

Cheers,
Dimitris
Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #758851 is a reply to message #758107] Thu, 24 November 2011 17:54 Go to previous messageGo to next message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
Hi Dimitrius
sorry for the long time no talk...

Well, that's what I've tried.

I Created a meta model (in the previous post). After, a created a ECore2GMF.eol file containing the following code


var deletingAttribute = GmfTool!CreationTool.all.selectOne(r|r.title='Mother');
delete deletingAttribute;

My expectations was that the Node ''Mother'' in the palette was not present.

After that, using eugenia and epsilon, I created the ecore file and then the .genmodel file. So, I've tried to create the .gmfgraph, .gmftool and .gmfmap. The creation of .gmfgraph, .gmftool files were successful but for any reason the .gmfmap was not created. I know the ECore2GMF.eol is running well for two reasons: first, I wrote this simple code just to make sure it was being invoked "hello".println() and it was printed well; secondly, in the .gmftool, in the "Tool Group Objects" there was just the "Creation Tool father" (Creation Tool mother was not present).


So, Dimitrius, my initial desire is just hide an object from the Objects Palette. Until now, the way (using ECore2GMF.eol) was my only attempt.

Any help will be useful.

I really thank you for all the attention!

[Updated on: Thu, 24 November 2011 17:55]

Report message to a moderator

Re: [Eugenia] Deleting Tool Objects, Deleting Tool Connections [message #762830 is a reply to message #757355] Thu, 08 December 2011 17:13 Go to previous message
Paulo Alexandre is currently offline Paulo AlexandreFriend
Messages: 17
Registered: November 2011
Junior Member
HI Dimitrius

I've found the answer to this problem in this thread http://www.eclipse.org/forums/index.php/t/153595/

I really thank you for all support!!!
Previous Topic:[Eugenia] Create a second label in a Rectangle Figure
Next Topic:[Eugenia] Create Undefined ???
Goto Forum:
  


Current Time: Sat Apr 20 16:32:53 GMT 2024

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

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

Back to the top