Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] Custom content provider for CDT executables

How did you try to provide content for the IBinary?
To make the triggerPoints _expression_ work for both IFile and IBinary, I suggest you use something like
 
                 <adapt type="org.eclipse.core.resources.IFile" >
                    <test property="
org.eclipse.core.resources.name" value="*.clx"/>
                 </adapt>
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Chris Genly
Sent: Friday, May 29, 2009 11:43 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Custom content provider for CDT executables

Here are the relevant sections from plugin.xml.  

There are three clx files in my project.  Only one is recognized as an executable.  (This is as it should be.   I'll spare you the details).  Two of the clx files show children, but the executable version of the clx file does not.   Given this I'm pretty sure the extensions are defined correctly.   The problem appears to be that CDT places an IBinary in the Project Explorer for my executable clx file, thus my extension is not triggered.  Attempting to provide content for IBinary does not work either. 

   <extension
         id="com.coherentlogix.debug.filesystem.ui.navigatorContent"
         name="HyperX navigator content"
         point="org.eclipse.ui.navigator.navigatorContent">
      <navigatorContent
            activeByDefault="true"
            contentProvider="com.coherentlogix.debug.filesystem.ui.ClxTreeContentProvider"
            id="com.coherentlogix.debug.filesystem.ui.navigatorContent.clx"
            labelProvider="com.coherentlogix.debug.filesystem.ui.ClxLabelProvider"
            name="HyperX project file content"
            priority="highest">
         <triggerPoints>
            <or>
                <and>
                       <instanceof value="org.eclipse.core.resources.IFile" />
                    <test property="org.eclipse.core.resources.name" value="*.clx"/>
                </and>
            </or>
        </triggerPoints>
      </navigatorContent>
   </extension>
   <extension
         id="com.coherentlogix.debug.filesystem.projects.add.on"
         point="org.eclipse.ui.navigator.viewer">
            <viewerContentBinding viewerId="org.eclipse.ui.navigator.ProjectExplorer">
                  <includes>
                        <contentExtension pattern="com.coherentlogix.debug.filesystem.ui.navigatorContent.clx" isRoot="false"/>            
                  </includes>
               </viewerContentBinding>
   </extension>


On Fri, May 29, 2009 at 12:02 AM, Leherbauer, Anton (Toni) <Anton.Leherbauer@xxxxxxxxxxxxx> wrote:
Using the extension point should work. Could you post your extension XML for a quick look?
The C Model elements are not meant to be extensible, so your only chance is the Common Navigator extension point.
 
Toni





Back to the top