[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: How to contribute popupMenu programmatically?

It can't be done in a normal way, not to mention the fact that searching the IResource tree for a project to find files with 2 extensions can be an expensive operation, and you don't want the users to right click ... and wait while you scan the disk.

If it really is necessary, you could scan the IResource tree for the workspace in a Job, and add a persistent property to the IProjects that meet your criteria. Then your action (via org.eclipse.ui.popupMenu or org.eclipse.ui.menus) could check for the property.

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm