Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Selection of TreeItem is Null -> When the view is moved out of eclipse(Null value is returned as Selection from ExecutionEvent)
Selection of TreeItem is Null -> When the view is moved out of eclipse [message #1748883] Tue, 29 November 2016 17:29
Zakir Meer is currently offline Zakir MeerFriend
Messages: 50
Registered: February 2016
Hi Team,

I am encountering a strange situation w.r.t. fetching of "Selected element in TreeViewer"-> when I move my view outside of eclipse and click on action in Toolbar -> Selected element is returned as Null.

When the same view is stacked inside eclipse -> appropriate selection is obtained in the Handler class

Below code is used in the Handler class for fetching the Selection:
public Object execute(final ExecutionEvent event) throws ExecutionException {
final ISelection selection = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage().getSelection();

See below index.php/fa/27727/0/

Please let me know how to obtain the selected TreeItem in case when the view is moved outside of the eclipse.

Thanks in Advance !!

Previous Topic:how to solve label and button size when zooming character in View?
Next Topic:How to give excel table column and row flexibility to SWT Table
Goto Forum:

Current Time: Mon Apr 12 23:27:15 GMT 2021

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

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

Back to the top