Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » 'Visiblewhen' in eclipse menu. Want menu to only appear for particular file extensions
'Visiblewhen' in eclipse menu. Want menu to only appear for particular file extensions [message #1385416] Fri, 06 June 2014 09:53
joseph reddington is currently offline joseph reddingtonFriend
Messages: 16
Registered: January 2012
Junior Member
Hi all, I've a question that struggled on stackoverflow for a while, but didn't solve my problem. I come to you guys to plead for help.

I have an eclipse plugin with a menu. It looks like this:

I'd like that menu to only appear when viewing files of a particular file extension (let's say .txt for this example).

Using the help of a great guy on SO I got as far as the following plugin.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
               label="Hide Me"

   <with variable="selection">
         <adapt type="org.eclipse.core.resources.IResource">
              <test property="org.eclipse.core.resources.extension" value="txt" />


With this setup:

...but still NO luck - any ideas what I might be doing wrong?

Previous Topic:PDE Plugin Export failed
Next Topic:Finding the "PlugIn"-Directory
Goto Forum:

Current Time: Tue Dec 01 22:16:17 GMT 2015

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

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