1    /* 
     2     *  Copyright (c) 2009 Texas Instruments and others.
     3     *  All rights reserved. This program and the accompanying materials
     4     *  are made available under the terms of the Eclipse Public License v1.0
     5     *  which accompanies this distribution, and is available at
     6     *  http://www.eclipse.org/legal/epl-v10.html
     7     * 
     8     *  Contributors:
     9     *      Texas Instruments - initial implementation
    10     * 
    11     * */
    12    package xdc.tools.product;
    13    
    14    /*!
    15     *  ======== IProductView ========
    16     *  Define a product as a logical group of RTSC modules
    17     *
    18     *  This interface allows a product to define logical groups of RTSC
    19     *  modules delivered with it. Implementations of this interface are
    20     *  typically consumed within development environments like IDE's to
    21     *  render a graphical tree view of the product consisting of these
    22     *  groups.
    23     *
    24     *  This is an experimental interface and is subject to change.
    25     */ 
    26    metaonly interface IProductView
    27    {
    28        /*!
    29         *  ======== ProductElemDesc ======== 
    30         *  ProductElemDesc structure
    31         * 
    32         *  This structure is used to define the logical tree "view" of a
    33         *  product. This view is composed of elements that are either modules
    34         *  or groups: modules at the leaves of the tree and groups elsewhere.
    35         *
    36         *  @field(elemName)        Name of element. Elements can be either
    37         *                          groups or modules
    38         *  @field(moduleName)      In case of a leaf node this field will
    39         *                          contain the module name. For intermediate
    40         *                          tree nodes the module name will be set to 
    41         *                          `null`
    42         *  @field(iconFileName)    The name of the icon file that is associated
    43         *                          with this element.  In xdctools 3.23, this path
    44         *                          must be relative to the package containing the
    45         *                          `IProductView` implementation.
    46         *
    47         *                          In xdctools 3.24.01 (or above), this path may
    48         *                          be relative or absolute.  If it's relative,
    49         *                          it's first searched for in the package
    50         *                          containing the `IProductView` implementation
    51         *                          module and, if this fails, the relative path
    52         *                          is searched via `xdc.findFile()`.  If the icon
    53         *                          is still not found, a default icon will be
    54         *                          used.
    55         *  @field(elemArray)       Array used to define children of a node.
    56         */ 
    57        struct ProductElemDesc {
    58            String elemName;             /*! Name of group or module */
    59            String moduleName;           /*! Name of module */
    60            String iconFileName;         /*! Icon file name representing element */
    61            ProductElemDesc elemArray[]; /*! Array of `ProductElemDesc` */
    62        };
    63    
    64        /*!
    65         *  ======== homeModule ========
    66         *  Top-level module for this product
    67         *
    68         *  The `homeModule` is a distinguished "top-level" module that is used
    69         *  by GUI's as a starting point, or "home page", to navigate to the
    70         *  other content managed by this product.
    71         */
    72        config String homeModule;
    73    
    74        /*!
    75         *  ======== linksToArray ========
    76         *  Array of IDs of products accessable from this product's home module
    77         *
    78         *  This array of product IDs is used to determine a hierarchical
    79         *  relationship between products and if a product's modules can be
    80         *  reached from another product's home page. If product A "links to"
    81         *  product B, then product B's home page can be closed so long as
    82         *  product A's home page is open.
    83         */
    84        config String linksToArray[];
    85        
    86        /*!
    87         *  ======== getProductDescriptor ========
    88         *  Return this product's tree view
    89         *
    90         *  This method is typically invoked by development tools like IDE's 
    91         *  to get the product view tree structure.
    92         *
    93         *  @a(returns)
    94         *  Returns root node of tree of `{@link #ProductElemDesc}` structures
    95         */ 
    96        ProductElemDesc getProductDescriptor();
    97    }
    98    /*
    99     *  @(#) xdc.tools.product; 1, 0, 0,73; 8-27-2012 11:53:06; /db/ztree/library/trees/xdctools/xdctools-f15x/src/
   100     */
   101