Sharing Packages: Special Considerations
When using the Team menu to share packages through the UML Explorer, UML Navigator
and the Diagram View, there are several points to consider:
- Package elements on diagrams represent the diagram for that package, not
the physical package directory. Therefore, the Team menu commands for these
elements represent actions for the package diagram only.
- Class and interface elements on diagrams represent the source file, so
you can use their Team menu to Add, Commit or Update.
- To commit your packages and source code, you can use the Team menu accessed
through the UML Explorer view. When you commit a package it will (recursively,
through subpackages) commit all the classes that are already part of the repository.
New classes need to be added separately by either right clicking on the Class
in the UML Explorer or on the element in the diagram. Committing your packages
through the UML Explorer will commit only the source and subpackages.
- The UML Navigator (by default) behaves similarly to the UML Explorer, but
you can enable the committing of diagrams as well. Do so using the Together
modeling preferences dialog. To open the preferences dialog, from the menubar,
select Window > Preferences. In the options list on the left, expand the
Modeling node, and select the Team/Compare
tab on the right. Check "Include diagram folders in Team/Compare actions."
With this option activated, the Team > Commit menu command will commit
any design diagrams and design elements (including the package diagram). We
do not recommend committing package diagrams. Together automatically generates
the package diagrams when they are opened.
- To find out how to prevent package diagrams being committed, please refer
to Sharing Projects and the last item
Recommendations and Tips.
- When adding numerous classes and interfaces, it is recommended that you
use Team > Synchronize with Repository.... Wait for the Synchronize view
to open. Click the outgoing and incoming buttons to see a list of outgoing
and incoming changes. With this view you can commit your packages and source.
If you commit a package with new resources, you are asked to confirm that
you want to add the new files.