score:1

Accepted answer

you will have to provide extension for "org.eclipse.ui.navigator.viewer" and "org.eclipse.ui.navigator.navigatorcontent". project explorer is based on common navigation framework which allows the user to extend the functionality.

an example

the "org.eclipse.ui.navigator.viewer" extension

 <extension
          id="navigator-viewbinding"
          point="org.eclipse.ui.navigator.viewer">
       <viewercontentbinding
             viewerid="org.eclipse.ui.navigator.projectexplorer">
          <includes>
             <contentextension
                   pattern="<plugin_name>.myresourcecontent">
             </contentextension>             
          </includes>
       </viewercontentbinding>      
    </extension>

and "org.eclipse.ui.navigator.navigatorcontent" extension

   <extension
         id="navigator-content"
         point="org.eclipse.ui.navigator.navigatorcontent">
      <navigatorcontent
            activebydefault="true"
            contentprovider="mynavigatorcontentprovider"
            icon="icon.gif"
            id="myresourcecontent"
            labelprovider="mynavigatorlabelprovider"
            name="some name"
            priority="normal">
         <triggerpoints>
            <or>
               <and>
                  <instanceof
                        value="org.eclipse.core.resources.ifile">
                  </instanceof>
                  <test
                        property="org.eclipse.core.resources.extension"
                        value="mpe">
                  </test>
               </and>
            </or>
         </triggerpoints>
         <possiblechildren>
            <or>
               <instanceof
                     value="<class name of possible children>">
               </instanceof>
            </or>
         </possiblechildren>      
   </extension>

the class "mynavigatorcontentprovider" is implements "icommoncontentprovider" where you will have to parse your file & get the children u want to display.. the class "mynavigatorlabelprovider" is to decorate your children in the viewer..

hopefully this link should help


Related Query

More Query from same tag