Try OpenEdge Now
skip to main content
Online Help
Introducing Tools for Business Logic : Tasks : Modeling components : Editing a component : Using existing data structures : Copying from source code
 
Copying from source code
To copy from source code, add components to a diagram from the source code that defines them, by dragging elements from the code outline to the Component Designer.
Note: If you want to copy a component defined in code to a diagram of the same component type (for example, copy a temp table to a new temp table or a ProDataSet to a new ProDataSet), you must complete the procedure below before adding any other elements to the new component.
1. To use this technique, you need to split the editing area so that it shows both the source file and the diagram. You do not need to view the source code in the Editor, but you need to put editing focus on the source file without blocking the diagram from view.
a. Open both files.
b. Point to the tab of the currently visible file, hold down the left mouse button, and drag toward the bottom of the editing area until a horizontal line appears bisecting the editing area. Then release the mouse button. You now see both editor instances.
c. You can click and drag the border between the two editing panes to increase the size of the Component Designer pane.
d. Put focus on the source file by clicking its tab. The structure of the code now appears in the Outline view.
2. In the Outline view, browse to locate the desired element.
3. Select the element, hold down the left mouse button, and drag to the area of the canvas where you want to place the item. Then release the mouse button.
Note: Depending on the component type, you must place it either inside a component rectangle (for example, when adding a column to a table) or on a blank area of the canvas (for example, when adding a temp table to a ProDataSet.) The cursor appears as an arrow when it is over a valid area to place the component.