Resource Explorer Content

From Texas Instruments Wiki
Jump to: navigation, search

Background

TI Resource Explorer is a feature within Code Composer Studio that enables user to browse example projects, documentation, and online content. It is tightly integrated with the project management and the debugger, such that only few clicks are required to import a project and start the debugger. Documentation such as Word documents and PDF files can be viewed within Resource Explorer.

Adding Content

The content shown in Resource Explorer is dynamic and thus can be extended.

Index File

Create an xml file named resource_explorer.xml. The preferred location for the file is in the root directory of the package being exposed in Resource Explorer, but it can be located elsewhere. i.e c:/TI/controlSUITE/resource_explorer.xml. Then populate the resource_explorer.xml file with content that describes what is to be displayed in Resource Explorer. An example is provided below. See the _resource_explorer.xsd_ schema file in the CCSv5 install directory under ccsv5/eclipse/plugins/com.ti.ccstudio.resource.explorer_5.1.0.buildID/schema directory for the complete specification.

<?xml version="1.0" encoding="UTF-8"?>
<resource.explorer version="1.0" name="ENG TEST" dir="" href="//e2e.ti.com/support/development_tools/default.aspx">
   <contents name="Sites">
      <content name="Texas Instruments" desc="Goto TI website" href="http://www.ti.com">
         <type>weblink</type>
         <filter id="ti" >
            <search.tags>
               <tag>website</tag>
               <tag>dsp</tag>
               <tag>omap</tag>
               <tag>chip maker</tag>
            </search.tags>
            <topics>
               <topic>Chip Maker</topic>
            </topics>
            <devices>
               <device>OMAP</device>
               <device>DSP</device>
               <device>ARM</device>
            </devices>
         </filter>
      </content>
 
      <content name="Google" desc="Goto Google website" href="http://www.google.ca">
         <type>weblink</type>
         <filter id="google" >
            <search.tags>
               <tag>website</tag>
               <tag>search engine</tag>
            </search.tags>
            <topics>
               <topic>Search Engine</topic>
            </topics>
            <devices>
               <device>Windows</device>
               <device>Linux</device>
            </devices>
         </filter>
      </content>
   </contents>
</resource.explorer>

Linking Content

Now that you have the resource_explorer.xml file ready, you will need to create a reference file to let CCS know where to look for this xml file.
Create a file with name _ProductName_1_0_0_qualifier_ and place it under user.home/ti/CCSExternalReferences directory. Edit the file and add these properties:

  1. product=resource_explorer
  2. path=fullpath to the directory that contains the _resourxe_explorer.xml_ file
  3. ccs.min.ver=5.1.0 [optional]
  4. ccs.max.ver=5.1.0 [optional]

The reference file has 4 parts, product name, major version, minor version, micro version, and a string qualifier.

Welcome Page

CCS welcome page works the same way as other extender to the Resource Explorer, it contributes content through an Eclipse plugin extension point (com.ti.ccstudio.resource.explorer.resourceContentProvider).

The welcome page also provides some extensibility to client, you can insert a link to the highlights section in the welcome page in two ways

Method #1

  1. Create a link file with 'product=highlights' in the user.home/ti/CCSExternalReferences directory and set the 'path' to the directory contains the xml file.
  2. Create the product_highlights.xml file with the follow content
<highlights>
    <highlight label="Google" desc="Google Search" href="http://www.google.ca" />
</highlights>

Method #2

Provides an Eclipse plugin and extend either one of these extension points: com.ti.ccstudio.branding.highlightsProvider and com.ti.ccstudio.branding.highlightsProvider2

TI Resource Explorer uses the default web browser on your system to display the content on the right hand pane. Hence, html pages should be validated on different browsers. i.e Internet Explorer, Firefox, Chrome. For local file reference, href should be prefix with file:// in the html page. Otherwise, Firefox or Chrome won't work.

Testing

There is a builtin command to validate href for the resource_explorer.xml file, it checks both local href and remote href, and generate a report for unreachable links. The validator will not follow links within html pages, there are other free tools that you can use to validate links within the html pages.
Execute this commands in the Scripting Console:
activeWB.openResourceExplorer(false).debugURL(PackageName, ReportOutputPath|NULL, HttpTimeOut[ms])