Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Move action into Sapphire.Add group
Move action into Sapphire.Add group [message #834500] Sun, 01 April 2012 22:45 Go to next message
Greg Amerson is currently offline Greg Amerson
Messages: 116
Registered: March 2010
Senior Member
Is it possible to define an action that shows in the diagram editor context menu but have the action show up in the same group as the Sapphire.Add? (see screenshot)
Re: Move action into Sapphire.Add group [message #834929 is a reply to message #834500] Mon, 02 April 2012 11:10 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 935
Registered: July 2009
Senior Member
Sure. In the location section of your action definition, specify "Sapphire.AddDeleteGroup" for the group. You may also need to use the location hints in the same section to further tune the location of the action with before and after constraints.

- Konstantin
Re: Move action into Sapphire.Add group [message #836903 is a reply to message #834929] Wed, 04 April 2012 22:56 Go to previous messageGo to next message
Greg Amerson is currently offline Greg Amerson
Messages: 116
Registered: March 2010
Senior Member
Hey Konstantin,

Thanks for the tip. I tried a couple of different ways here but not quite getting the expected behavior. Here is a couple of code snippets of my action and then the screenshots.


Just added the AddDeleteGroup:
<action>
    <id>Kaleo.Diagram.Use.Node.Wizards</id>
    <label>use node wizards</label>
    <type>TOGGLE</type>
    <context>Sapphire.Diagram.Editor</context>
    <group>Sapphire.AddDeleteGroup</group>
</action>


Added the after: location hint.

<action>
    <id>Kaleo.Diagram.Use.Node.Wizards</id>
    <label>use node wizards</label>
    <type>TOGGLE</type>
    <context>Sapphire.Diagram.Editor</context>
    <group>Sapphire.AddDeleteGroup</group>
    <location>after:Sapphire.Add</location>
</action>
Re: Move action into Sapphire.Add group [message #837394 is a reply to message #836903] Thu, 05 April 2012 12:10 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 935
Registered: July 2009
Senior Member
Please open a bug report. It looks like other actions in that context menu do not specify any constraints on their location, so when you added a constraint, the solver arranged the menu in an unexpected way.

- Konstantin
Re: Move action into Sapphire.Add group [message #837684 is a reply to message #837394] Thu, 05 April 2012 21:01 Go to previous message
Greg Amerson is currently offline Greg Amerson
Messages: 116
Registered: March 2010
Senior Member
Konstantin Komissarchik wrote on Thu, 05 April 2012 12:10
Please open a bug report. It looks like other actions in that context menu do not specify any constraints on their location, so when you added a constraint, the solver arranged the menu in an unexpected way.

- Konstantin

Sure thing. https://bugs.eclipse.org/bugs/show_bug.cgi?id=376226
Previous Topic:@LongString property editor's action alignment
Next Topic:Vertical radio buttons with 2 columns
Goto Forum:
  


Current Time: Wed Jul 23 22:34:12 EDT 2014

Powered by FUDForum. Page generated in 0.01773 seconds