[kepler-dev] Documentation display in Kepler

Nandita Mangal nmangal at sdsc.edu
Fri May 5 14:10:19 PDT 2006


Hi All,
I haven't changed the way port name are displayed in documentation 
system in kepler in docViewer...Is there
any other place kepler port name settings might be set?
thanks,
nandita.


Edward A. Lee wrote:

>Hmm... Works for me... Perhaps Kepler changes the way port names
>are displayed?
>
>Edward
>
>At 12:25 AM 5/5/2006, Zhijie Guan wrote:
>  
>
>>Hi Edward,
>>
>>Thanks for adding setDisplayName() to NamedObj. I like this feature.
>>
>>I have tried this method in my code. But unfortunately the Display
>>Name cannot be displayed with the port, instead, the port's name is
>>still displayed.
>>
>>For example, in the Actor/CIPRes/Initializer actor, I used the
>>following code to set a different display name:
>>
>>      // construct the output port outputTrigger
>>        outputTrigger= new TypedIOPort(this, "outputTrigger", false,
>>true);
>>        outputTrigger.setDisplayName("Trigger");
>>
>>When I run this actor and configure the port "outputTrigger" to show
>>its name, the port name "outputTrigger" is shown instead of the
>>display name "Trigger".
>>
>>I guess it is because the code for displaying DisplayName is not
>>changed yet. Could you please guide me where I should look for these
>>code? I think since now we have DisplayName for all the NamedObj, we
>>need to change the displaying code in multiple places.
>>
>>Zhijie
>>
>>
>>
>>On May 4, 2006, at 11:20 AM, Edward A. Lee wrote:
>>
>>    
>>
>>>I have implemented setDisplayName() for ports...
>>>
>>>Actually, I promoted it to all NamedObj, which is essentially
>>>everything. So now, every object in Ptolemy II can have a different
>>>display name from its name in the hieararchy.
>>>
>>>Edward
>>>
>>>
>>>At 12:10 PM 4/25/2006, Edward A. Lee wrote:
>>>
>>>      
>>>
>>>>This is not implemented for ports...
>>>>It could be, though... It's a good idea...
>>>>I'll look into it...
>>>>
>>>>Edward
>>>>
>>>>At 05:46 PM 4/24/2006, Zhijie Guan wrote:
>>>>        
>>>>
>>>>>Hi Edward,
>>>>>
>>>>>Do we have a similar function to set the display name of a port,
>>>>>          
>>>>>
>>>>like
>>>>        
>>>>
>>>>>TypedIOPort?
>>>>>
>>>>>I finally figured out by reading the source code that the
>>>>>setDisplayName() function is implemented in
>>>>>          
>>>>>
>>>>AbstractSettableAttribute
>>>>        
>>>>
>>>>>class. But I did not see the function definition in the JavaDoc of
>>>>>that class. I use the JavaDoc of ptII5.0.1 at http://
>>>>>ptolemy.eecs.berkeley.edu/ptolemyII/ptII5.0/ptII5.0.1/doc/codeDoc/
>>>>>ptolemy/kernel/util/AbstractSettableAttribute.html
>>>>>
>>>>>Do we have a newer JavaDoc for ptII?
>>>>>
>>>>>Thanks!
>>>>>
>>>>>Zhijie
>>>>>
>>>>>
>>>>>On Mar 14, 2006, at 5:24 PM, Edward A. Lee wrote:
>>>>>
>>>>>          
>>>>>
>>>>>>Dan:
>>>>>>
>>>>>>The code you give isn't right...  The statement:
>>>>>>
>>>>>>    numYPixels = new StringParameter(this, "Number of Y pixels in
>>>>>>image");
>>>>>>
>>>>>>is not setting the display name to "Number of Y pixels in image",
>>>>>>but rather is creating a new parameter named "Number of Y pixels in
>>>>>>image".
>>>>>>The right way to set the display name is:
>>>>>>
>>>>>>    numYPixels = new StringParameter(this, "numYPixels");
>>>>>>    numYPixels.setDisplayName("Number of Y pixels in image");
>>>>>>
>>>>>>Note that the former code violates our coding standards, and as
>>>>>>a consequence, the actor will not clone correctly.  After the
>>>>>>            
>>>>>>
>>>>clone()
>>>>        
>>>>
>>>>>>operation, the numYPixels field of the new actor will actually be a
>>>>>>reference to the numYPixels parameter of the original actor.
>>>>>>            
>>>>>>
>>>>That is,
>>>>        
>>>>
>>>>>>both actors will refer to the same parameter.  If you insist on
>>>>>>            
>>>>>>
>>>>having
>>>>        
>>>>
>>>>>>a field name different from the parameter name, then you should
>>>>>>override
>>>>>>the clone(Workspace) method to correctly set the field of the
>>>>>>            
>>>>>>
>>>>clone.
>>>>        
>>>>
>>>>>>That said, I'm not sure whether the documentation infrastructure is
>>>>>>properly reflecting the possible distinction between the parameter
>>>>>>name and the display name. There may be an actual bug there...
>>>>>>
>>>>>>Edward
>>>>>>
>>>>>>
>>>>>>At 02:26 PM 3/14/2006, Dan Higgins wrote:
>>>>>>            
>>>>>>
>>>>>>>Hi All,
>>>>>>>
>>>>>>>    In adding documentation to the RExpression actor, I
>>>>>>>              
>>>>>>>
>>>>discoved a
>>>>        
>>>>
>>>>>>>problem with the documentation display in Kepler (and perhaps in
>>>>>>>Ptolemy, also).
>>>>>>>
>>>>>>>Consider one parameter defined in the RExpression actor -
>>>>>>>
>>>>>>>   /**
>>>>>>>    * The height of the output graphics bitmap in pixels
>>>>>>>    */
>>>>>>>    public StringParameter numYPixels;
>>>>>>>
>>>>>>>But later on, this parameter is created with the statement
>>>>>>>
>>>>>>>        numYPixels = new StringParameter(this, "Number of Y
>>>>>>>              
>>>>>>>
>>>>pixels in
>>>>        
>>>>
>>>>>>>image");
>>>>>>>
>>>>>>>Note that the display string "Number of Y pixels in image" is
>>>>>>>              
>>>>>>>
>>>>not the
>>>>        
>>>>
>>>>>>>same as the varible name 'numYPixels'
>>>>>>>
>>>>>>>The doclet generated xml file has the proper association
>>>>>>>              
>>>>>>>
>>>>between the
>>>>        
>>>>
>>>>>>>property and value; i.e.
>>>>>>>
>>>>>>><property name="numYPixels">The height of the output graphics
>>>>>>>bitmap in
>>>>>>>pixels</property>
>>>>>>>
>>>>>>>But when I display the doc xml in Kepler using 'Get Documentation'
>>>>>>>the
>>>>>>>result is
>>>>>>>
>>>>>>>"Number of Y pixels in image - No description"
>>>>>>>
>>>>>>>The code to display the xml file replaces the 'numYPixels' name
>>>>>>>with its
>>>>>>>display string 'Number of Y pixels in image' but it then loses the
>>>>>>>value! This seems to happen whenever the parameter name is
>>>>>>>              
>>>>>>>
>>>>different
>>>>        
>>>>
>>>>>>>than the display string; when they agree, the descriptions are
>>>>>>>              
>>>>>>>
>>>>shown
>>>>        
>>>>
>>>>>>>properly.
>>>>>>>
>>>>>>>Dan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>--
>>>>>>>****************************************************************** *
>>>>>>>Dan Higgins
>>>>>>>              
>>>>>>>
>>>>higgins at nceas.ucsb.edu
>>>>        
>>>>
>>>>>>>http://www.nceas.ucsb.edu/    Ph: 805-893-5127
>>>>>>>National Center for Ecological Analysis and Synthesis (NCEAS)
>>>>>>>              
>>>>>>>
>>>>Marine
>>>>        
>>>>
>>>>>>>Science Building - Room 3405
>>>>>>>Santa Barbara, CA 93195
>>>>>>>****************************************************************** *
>>>>>>>
>>>>>>>
>>>>>>>_______________________________________________
>>>>>>>Kepler-dev mailing list
>>>>>>>Kepler-dev at ecoinformatics.org
>>>>>>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/
>>>>>>>              
>>>>>>>
>>>>kepler-dev
>>>>        
>>>>
>>>>>>------------
>>>>>>Edward A. Lee
>>>>>>Professor, Chair of the EE Division, Associate Chair of EECS
>>>>>>231 Cory Hall, UC Berkeley, Berkeley, CA 94720
>>>>>>phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>>>>>>eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>>>>>>
>>>>>>_______________________________________________
>>>>>>Kepler-dev mailing list
>>>>>>Kepler-dev at ecoinformatics.org
>>>>>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/
>>>>>>            
>>>>>>
>>>>kepler-dev
>>>>
>>>>------------
>>>>Edward A. Lee
>>>>Professor, Chair of the EE Division, Associate Chair of EECS
>>>>231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
>>>>phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>>>>eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>>>>
>>>>_______________________________________________
>>>>Kepler-dev mailing list
>>>>Kepler-dev at ecoinformatics.org
>>>>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/ kepler-dev
>>>>        
>>>>
>>>------------
>>>Edward A. Lee
>>>Professor, Chair of the EE Division, Associate Chair of EECS
>>>231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
>>>phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>>>eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
>>>      
>>>
>
>------------
>Edward A. Lee
>Professor, Chair of the EE Division, Associate Chair of EECS
>231 Cory Hall, UC Berkeley, Berkeley, CA 94720-1770
>phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
>eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal  
>
>_______________________________________________
>Kepler-dev mailing list
>Kepler-dev at ecoinformatics.org
>http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
>  
>



More information about the Kepler-dev mailing list