Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » No popup menu shown with empty TableViewer
No popup menu shown with empty TableViewer [message #555746] Sat, 28 August 2010 07:22
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 58
Registered: August 2010
I want to provide the user with a popup menu even when the table viewer is empty.

It is working if the table has an entry but it ain't working if the table is empty.

	viewer.addSelectionChangedListener(new ISelectionChangedListener() {

	    public void selectionChanged(SelectionChangedEvent event) {

		Object selection = ((IStructuredSelection) event.getSelection()).getFirstElement();
		if (event.getSelection() == null || selection == null) {
		else if (selection instanceof Address) {

    // init viewer context menu

This code worked fine with a TreeViewer class. Why doesn't it work with a TableViewer?

Thanx in advance

Previous Topic:RCP Product with several versions of a bundle
Next Topic:How to remove standard icons from Properties View?
Goto Forum:

Current Time: Wed Nov 25 10:24:26 GMT 2015

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

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