Project

General

Profile

Actions

Bug #2870

closed

Copy/Paste of composite actors

Added by Norbert Podhorszki over 17 years ago. Updated almost 17 years ago.

Status:
Resolved
Priority:
Normal
Category:
interface
Target version:
Start date:
06/07/2007
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
2870

Description

There is a composite actor A, in which a parameter P is referred to.
A Copy/Paste into another workflow (or some other subparts in the same workflow) where parameter P does not exists (we get an error message) puts
all elements of the composite into the same 0 coordinate.
This is very annoying and makes reuse of workflows/actors much harder than it should be.

I am used to drag the elements back into their place, but I am impatient to do that above 20 elements. Also I used to create parameters (if I am aware of them) before copying, but this is also cumbersome.
Just think about text-code programmming and copy-paste of complete loops, and then renaming the variables according to the context.

Actions #1

Updated by Christopher Brooks over 17 years ago

This is fixed in the Ptolemy II CVS tree.
Perhaps the Kepler specific copies of the Vergil classes need updates?
The code centers around ptolemy/moml/MoMLVariableChecker.java

Actions #2

Updated by Dan Higgins over 17 years ago

The statement that this has been fixed in Ptolemy II doesn't seem to be quite correct. It turns out that referring to a parameter in the containing object from an expression actor works OK inside a composite. You can cut and paste in both PT and Kepler. However, if there is a parameter inside the composite that references the external parameter, then cut/paste causes an error message and layout positions are lost in both PTII and Kepler.

Dan Higgins - Aug 7, 2007

Actions #3

Updated by Christopher Brooks almost 17 years ago

I think I have this fixed by making changes to moml/MoMLVariableChecker.java
I've added a test case:
ptII/ptolemy/moml/test/ComplexCompositeCopyAndPasteTest.xml

The Ptolemy test suite now tests this by copying a composite that contains an
Expression and a Scale that refer to upscope parameters.

Actions #4

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 2870

Actions

Also available in: Atom PDF