Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Eclipse navigator extensions
Eclipse navigator extensions [message #1400512] Mon, 14 July 2014 09:56
Tommaso De Sica is currently offline Tommaso De Sica
Messages: 128
Registered: March 2012
Location: Italy
Senior Member

I've got a view that extends common Eclipse navigation explorer and use CNF apis.
I've used some custom MyTreeEntry: they have functions like source folder, package and so on...
MyTreeEntry has an IFolder that is the target of each actions (new, cut/paste...). I've used Adapter and AdapterFactory to map all actions done on MyTreeEntry to contained IFolder.

Now I want to show some popup menus like "Go Into" or "New...". I've tryed to use org.eclipse.ui.navigator.navigatorContent extension, but it doesn't work. Any suggestions?

<plugin>
	<extension
         point="org.eclipse.ui.navigator.navigatorContent">
      <navigatorContent
            activeByDefault="true"
            contentProvider="com.example.MyContentProvider"
            id="com.example.MyTreeEntryContentExtension"
            labelProvider="com.example.MyLabelProvider"
            name="Package Entry Content"
            priority="high">
         <triggerPoints>
         	<or>
	            <and>
	               <instanceof value="org.eclipse.core.resources.IResource"/>
	               <test
	                     forcePluginActivation="true"
	                     property="org.eclipse.core.resources.extension"
	                     value="properties"/>
	            </and>
				<instanceof value="com.example.MyTreeEntry"/>
    <adapt
          type="org.eclipse.core.resources.IResource">
       <test
             property="org.eclipse.core.resources.projectNature"
             value="com.example.MyProjectNature">
       </test>
    </adapt>
			</or>
         </triggerPoints>
         <possibleChildren>
            <or>
               <instanceof value="com.example.MyTreeEntry"/>
               <instanceof
                     value="org.eclipse.core.resources.IResource">
               </instanceof> 
            </or>
         </possibleChildren>
         <actionProvider
               class="org.eclipse.ui.navigator.resources.GoIntoActionProvider"
               id="com.example.GoIntoActions">
            <enablement>
               <or>
                  <adapt
                        type="org.eclipse.core.resources.IFolder">
                  </adapt>
                  <adapt
                        type="org.eclipse.ui.IWorkingSet">
                  </adapt>
                  <instanceof
                        value="com.example.MyTreeEntry">
                  </instanceof>
               </or>
            </enablement>
         </actionProvider>
      </navigatorContent>
   </extension>
</plugin>
Previous Topic:Cannot write artifacts to a composite repository.
Next Topic:How to enable CTRL+C KeyBinding for custom handler
Goto Forum:
  


Current Time: Mon Oct 20 21:20:50 GMT 2014

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

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