Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » ScrollingGraphicalViewer Select and Unselect listener
ScrollingGraphicalViewer Select and Unselect listener [message #929434] Mon, 01 October 2012 13:05 Go to next message
mark tal is currently offline mark talFriend
Messages: 11
Registered: July 2012
Junior Member
I need to fire a method when a figure is selected in GEF diagram.
addSelectionChangedListener works well when I select a figure, but if i click on the same figure again ("unselect") the listener doesn't fire.

How can i fix it?

final GraphicalViewer viewer = new ScrollingGraphicalViewer();
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
     public void selectionChanged(SelectionChangedEvent event) {
	//Fired when figure is selected, but not when same figure is selected again
Re: ScrollingGraphicalViewer Select and Unselect listener [message #930382 is a reply to message #929434] Tue, 02 October 2012 09:06 Go to previous message
Igor Zapletnev is currently offline Igor ZapletnevFriend
Messages: 33
Registered: September 2012

For your cases you need to define custom SelectionManager.class and set it to the your own GraphicalViewer.

Previous Topic:GEF 3.8.1?
Next Topic:GEF with Eclipse RCP 4x
Goto Forum:

Current Time: Wed May 23 07:17:47 GMT 2018

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

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

Back to the top