[kepler-dev] DocViewer semantics

Christopher Brooks cxh at eecs.berkeley.edu
Wed Aug 15 20:12:38 PDT 2012


Sean,
I'm not sure what you mean by a DocViewer Actor
ptolemy/vergil/actor/DocViewer.java extends HTMLViewer which extends 
TableauFrame, so DocViewer is not an actor.

There is a "DocViewer" attribute in Kepler.  If I start Kepler and 
search for DocViewer and drag it in, then the xml is

<property name="DocViewer" class="ptolemy.kernel.util.SingletonAttribute">
<property name="KeplerDocumentation" 
class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
<property name="description" 
class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="author" 
class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Steve 
Neuendorffer and Edward A. Lee</configure></property>
<property name="version" 
class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
<property name="userLevelDocumentation" 
class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The 
DocViewer attribute renders a clickable documentation icon on the 
Workflow canvas. Clicking the icon opens the workflow documentation 
window.</configure></property>
</property>        <property name="entityId" 
class="org.kepler.moml.NamedObjId" 
value="urn:lsid:kepler-project.org:actor:467:1">
         </property>
         <property name="class" 
class="ptolemy.kernel.util.StringAttribute" 
value="ptolemy.kernel.util.SingletonAttribute">
             <property name="id" 
class="ptolemy.kernel.util.StringAttribute" 
value="urn:lsid:kepler-project.org:class:1184:1">
             </property>
         </property>
         <property name="semanticType00" 
class="org.kepler.sms.SemanticType" 
value="urn:lsid:localhost:onto:1:1#Parameter">
         </property>
         <property name="semanticType11" 
class="org.kepler.sms.SemanticType" 
value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
         </property>
         <property name="viewer" 
class="ptolemy.vergil.basic.DocViewerFactory">
         </property>
         <property name="_hideName" 
class="ptolemy.kernel.util.SingletonAttribute">
         </property>
         <property name="_editorFactory" 
class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
         </property>
         <property name="_location" class="ptolemy.kernel.util.Location" 
value="{170, 210}">
         </property>
     </property>


There is a DocViewerAttribute in Vergil:

1. If you run Vergil:
   cd kepler/build-area
   ant vergil
2. File->New ->GraphViewer
3. Utilities -> Drag a DocViewerAttribute into the graph pane
4. Double click on the yellow Documentation attribute, there will be a 
message
     "To create documentation, right click on the background and select 
'Documentation -> Customize Documentation'."

The xml for the Ptolemy II DocViewerAttribute in Vergil is:

<property name="DocViewerAttribute" 
class="ptolemy.kernel.util.SingletonAttribute">
         <property name="DocAttribute" 
class="ptolemy.vergil.basic.DocAttribute">
             <property name="description" 
class="ptolemy.kernel.util.StringAttribute" value="To edit the 
documentation that appears
when the user double clicks on this 
icon,
right click on the _background_ of the model and 
select
Documentation->Customize Documentation.
The 
description you are currently editing
will not appear when the user 
double clicks on the Documentation icon.">
             </property>
         </property>
         <property name="viewer" 
class="ptolemy.vergil.basic.DocViewerFactory">
         </property>
         <property name="_hideName" 
class="ptolemy.kernel.util.SingletonAttribute">
         </property>
         <property name="_iconDescription" 
class="ptolemy.kernel.util.SingletonConfigurableAttribute">
             <configure>
       <svg>
         <rect x="-50" y="-20" width="100" height="20" 
style="fill:yellow"></rect>
         <text x="-40" y="-5" style="font-size:12; 
font-family:SansSerif; fill:black">Documentation</text>
       </svg>
     </configure>
         </property>
         <property name="_location" class="ptolemy.kernel.util.Location" 
value="{115, 125}">
         </property>
     </property>

So, it would seem that the xml that defines the Kepler "DocViewer" is in 
kepler/actors/resources/kar/CoreActors/DocViewer.xml
The xml that defines DocViewerAttribute is in 
ptolemy/configs/basicUtilities.xml

My guess is that Kepler is ignoring the fact that DocViewerFactory is 
there and should be creating an editor.


BTW - The Sinewave actor oriented class definition has a 
DocViewerAttribute in it.
If you do
   cd kepler/build-area
   ant vergil -Dmodel=ptolemy/src/ptolemy/actor/lib/Sinewave.xml

If you double click on the yellow box that says "Documentation", then a 
viewer pops up that displays the custom documentation for the model.

To change that documentation, right click on the background and select 
'Documentation -> Customize Documentation'.

_Christopher




On 8/15/12 10:55 AM, Sean Riddle wrote:
> Hi all,
>
> I'm still looking at Kepler icon weirdness, and I was wondering if 
> anyone knew exactly what the DocViewer actor is supposed to do. I get 
> that it's a button to display documentation for the workflow, but even 
> after adding documentation to the workflow, I can't get it to do 
> anything but print "DocViewer is not a settable attribute" whenever I 
> double-click on it. Is this to be expected?
>
> - Sean
>
>
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at kepler-project.org
> http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-dev

-- 
Christopher Brooks, PMP                       University of California
CHESS Executive Director                      US Mail: 337 Cory Hall
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774
ph: 510.643.9841                                (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20120815/5019642b/attachment.html>


More information about the Kepler-dev mailing list