Skip to main content

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: 80
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 Jun 20 19:32:14 GMT 2018

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

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

Back to the top