Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop
[EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop [message #518511] Thu, 04 March 2010 10:45 Go to next message
Ralf is currently offline RalfFriend
Messages: 25
Registered: March 2010
Junior Member
Q1: Is it possible to predefine the order of the tools in the tool palette through EuGENia. The order within the emf file is ignored and the tools are alphabetically ordered in the generated GMF editor. I was able the change the label of the tool grouping with an Ecore2GMF.eol:

var toolGroupObjects = GmfTool!ToolGroup.all.selectOne(r|r.title = 'Objects');
toolGroupObjects.title='Nodes';

Is this the supposed way ?

Q2: Can I add custom popup actions for specific nodes in the generated GMF diagram editor ? I need an action like replace node which will replace the node with an new node maintaining the incoming and outgoing links.

Q3: What is the supposed way to add a custom drag-and-drop handler to the GMF editor
Re: [EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop [message #518538 is a reply to message #518511] Thu, 04 March 2010 12:14 Go to previous messageGo to next message
Dimitrios Kolovos is currently offline Dimitrios KolovosFriend
Messages: 1776
Registered: July 2009
Senior Member
Hi Ralf,

Ralf Nagel wrote:
> Q1: Is it possible to predefine the order of the tools in the tool
> palette through EuGENia. The order within the emf file is ignored and
> the tools are alphabetically ordered in the generated GMF editor. I was
> able the change the label of the tool grouping with an Ecore2GMF.eol:
>
> var toolGroupObjects = GmfTool!ToolGroup.all.selectOne(r|r.title =
> 'Objects');
> toolGroupObjects.title='Nodes';
> Is this the supposed way ?

Yes. You can use EOL to re-order the tools (or even create new tool
groups) as you see fit. Please let me know if you need an example and
I'll try to put together one.

>
> Q2: Can I add custom popup actions for specific nodes in the generated
> GMF diagram editor ? I need an action like replace node which will
> replace the node with an new node maintaining the incoming and outgoing
> links.

Yes. This article will probably help a lot:
http://www.eclipse.org/articles/article.php?file=Article-act ion-contribution/index.html

>
> Q3: What is the supposed way to add a custom drag-and-drop handler to
> the GMF editor

Google returned this: http://www.jevon.org/wiki/GMF_Drag_Drop If this
is not what you're looking for I'd suggest asking in the GMF newsgroup.

Cheers,
Dimitris

--
Spread the word: http://www.eclipse.org/gmt/epsilon/spreadtheword
Follow Epsilon on Twitter: http://twitter.com/epsilonews
Re: [EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop [message #518739 is a reply to message #518538] Thu, 04 March 2010 20:45 Go to previous messageGo to next message
Ralf is currently offline RalfFriend
Messages: 25
Registered: March 2010
Junior Member
Dimitrios Kolovos wrote on Thu, 04 March 2010 07:14
Yes. You can use EOL to re-order the tools (or even create new tool
groups) as you see fit. Please let me know if you need an example and
I'll try to put together one.


That would be great! I'd like to make this quite independent from the actual set of Tools. I would prefer to just have the ability to make a selected tool the first or last or to move it before or after another.

Dimitrios Kolovos wrote on Thu, 04 March 2010 07:14
Yes. This article will probably help a lot:
http://www.eclipse.org/articles/article.php?file=Article-act ion-contribution/index.html

...

Google returned this: http://www.jevon.org/wiki/GMF_Drag_Drop If this
is not what you're looking for I'd suggest asking in the GMF newsgroup.


In other words adding a Popup Action or handling Drag-and-Drop is completely independent of EuGENia. That was my concern.

Cu - Ralf.
Re: [EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop [message #587064 is a reply to message #518538] Thu, 04 March 2010 20:45 Go to previous messageGo to next message
Ralf is currently offline RalfFriend
Messages: 25
Registered: March 2010
Junior Member
Dimitrios Kolovos wrote on Thu, 04 March 2010 07:14
> Yes. You can use EOL to re-order the tools (or even create new tool
> groups) as you see fit. Please let me know if you need an example and
> I'll try to put together one.


That would be great! I'd like to make this quite independent from the actual set of Tools. I would prefer to just have the ability to make a selected tool the first or last or to move it before or after another.

Dimitrios Kolovos wrote on Thu, 04 March 2010 07:14
> Yes. This article will probably help a lot:
> http://www.eclipse.org/articles/article.php?file=Article-act ion-contribution/index.html
>
> ...
>
> Google returned this: http://www.jevon.org/wiki/GMF_Drag_Drop If this
> is not what you're looking for I'd suggest asking in the GMF newsgroup.


In other words adding a Popup Action or handling Drag-and-Drop is completely independent of EuGENia. That was my concern.

Cu - Ralf.
Re: [EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop [message #750737 is a reply to message #518739] Tue, 25 October 2011 22:22 Go to previous messageGo to next message
Jessica is currently offline JessicaFriend
Messages: 2
Registered: October 2011
Junior Member
Hi Ralf, Dimitris,

Could you provide an example to re-order the tools or even create new tool groups?

Thanks in advance,

Jessica.
Re: [EuGENia] Ordering of Tools, Adding custom menus, Drag'n'Drop [message #755001 is a reply to message #750737] Sun, 06 November 2011 15:37 Go to previous message
aoyou2002 is currently offline aoyou2002Friend
Messages: 4
Registered: September 2011
Junior Member
Hi Jessica,

I'm not an expert in Eugenia but you can find useful examples on Epsilon repository.

dev.eclipse.org/viewsvn/viewvc.cgi/trunk/plugins/org.eclipse.epsilon.eugenia/transformations/ECore2GMF.eol?view=markup&root=Modeling_EPSILON&sortby=log

At line 14, you will see how to create a new tool group.

If you want to access to the palette, you may do this
var palette := GmfTool!Palette.all.first();


To get the current tool groups of the palette,
var currentTools = palette.tools


I hope it can help you,

aoyou
Previous Topic:References to other models
Next Topic:[Epsilon] Complete Beginner: Is this possible?
Goto Forum:
  


Current Time: Sat Apr 20 02:41:22 GMT 2024

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

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

Back to the top