Is Partial Mouse selection possible in GEF? [message #1433839] |
Mon, 29 September 2014 10:00 |
Abhishek SA Messages: 7 Registered: September 2014 |
Junior Member |
|
|
I am attaching 2 images for explaining my situation. I have a diagram which I want to select using mouse. Image 1 shows the default behaviour, which selects both Category 1 & 2 along with its children(choice 1, choice 2, value 1, value 2 respectively). But, I want to select only the outline diagrams(namely, class, category 1 , category 2) using mouse selection.(As it looks in Image 2). From the code perspective, I want to fetch only the outline diagrams selected(As in Image 2)
I am using getSelection() method of ISelection org.eclipse.gef.ui.actions.SelectionAction.getSelection() to get access to selected elements from diagram. But, it returns all elements (namely category 1+choice1+choice2).
Is there any other method which can help me out?
-
Attachment: Image 1.jpg
(Size: 22.75KB, Downloaded 168 times) -
Attachment: Image 2.jpg
(Size: 20.19KB, Downloaded 176 times)
|
|
|
|
Re: Is Partial Mouse selection possible in GEF? [message #1434523 is a reply to message #1433839] |
Tue, 30 September 2014 07:42 |
|
Hi,
Le 29/09/2014 14:50, Abhishek SA a écrit :
> I am attaching 2 images for explaining my situation. I have a diagram which I want to select using mouse. Image 1 shows the default behaviour, which selects both Category 1 & 2 along with its children(choice 1, choice 2, value 1, value 2 respectively). But, I want to select only the outline diagrams(namely, class, category 1 , category 2) using mouse selection.(As it looks in Image 2). From the code perspective, I want to fetch only the outline diagrams selected(As in Image 2)
>
> I am using getSelection() method of ISelection org.eclipse.gef.ui.actions.SelectionAction.getSelection() to get access to selected elements from diagram. But, it returns all elements (namely category 1+choice1+choice2).
>
> Is there any other method which can help me out?
>
You can use
org.eclipse.gef.tools.ToolUtilities.getSelectionWithoutDependants(List)
Best regards,
--
Laurent Redor
Laurent Redor - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Powered by
FUDForum. Page generated in 0.03310 seconds