[kepler-dev] @author tags in duplicated code.

Christopher Brooks cxh at eecs.berkeley.edu
Thu Nov 4 11:26:47 PDT 2010


Hi Sven,

On 11/3/10 2:09 PM, Sven Koehler wrote:
 > I finally decided to create an extension point in Ptolemy instead of
 > using overrides. However most of the code for making the Drag and Drop
 > feature working are still located in Kepler modules. Now my question
 > is how would I contribute the changes to Ptolemy? I attached a patch
 > that would make the changes. Would someone like to review this changes
 > and add them to Ptolemy if they are Ok or is there another process?

Thanks, I folded in your changes to ptolemy.vergil.basic.
One thing I did was change the name of DTListener to EditorDropTargetListener
in part to match the EditorDropTarget class.  Also, DT is somewhat overloaded,
it means Discrete Time in Ptolemy.  It also means Delirium Tremens :-)

I cleaned up the code a bit, there were long standing style errors that
were not caused by you.  I added a copyright and a class comment.

> Also I used another override to make hidden, unconnected ports not be
> rendered on the canvas and therefore would not displace other ports on
> an actor. Would that be a change that could be added to Ptolemy
> without a conditional activation? Or should that also be done with an
> extension point? If an extension point should be necessary I don't see
> an elegant solution for that, so could you please suggest a way to
> make that change to the ActorController (diff attached)?

I think this change is ok, so I'm going to fold it in.

The change is to ptolemy.vergil.actor.ActorController._placePortFigures()

I used the following as the change log entry:
   Sven Koehler: Don't count ports that are hidden and not connected.
   "Make hidden, unconnected ports not be rendered on the canvas and therefore would not displace other ports on an actor.

Basically, it doesn't count unconnected or hidden ports.  I think I've
seen a bug that is caused by hidden ports taking up space.

Edward may have some input on this.  If we don't want this behaviour by
default, then we can set a preference or a parameter in the configuration
that enables it.  However, I think we will want this behaviour.

However, the code does not seem to work in Ptolemy.  If I open up
the attached model, then it appears that the second input takes up space?
I believe that your changes should cause the second input to not take up
space.

Could you take a look?

Thanks,

_Christopher


-- 
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 fax:510.642.2718	      (Office: 545Q Cory)
home: (F-Tu) 707.665.0131 cell: 707.332.0670
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hiddenPorts.xml
Type: text/xml
Size: 2338 bytes
Desc: not available
URL: <http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-dev/attachments/20101104/725774c2/attachment.xml>


More information about the Kepler-dev mailing list