A diagram consists of a number of types placed on a canvas.
You would not typically place a random selection of types onto a diagram. Insteady you place a selection of releated types onto a diagram, where the relationship may be, for example, "all types declared in com.myorg.util". To see a diagram of all of the types in a particular package, you could create a new diagram and drop all of the types onto it. However, the contents of the package could change and when you return to the diagram in the future, you would need to manually bring it back into alignment with the new population of types in the package. To avoid having to perform this tedious task, each diagram can be assigned a scope which constrains it to show the intended collection of types. Specifying the scope of a diagram is simply a matter of choosing an Element Set.
As the contents of a single package is the most common requirement for a scope, an action is provided to create this type of scoped diagram.

By right-clicking on a package node in the Eclipse Package Explorer tree you will find an option to create a diagram of the package you clicked on. The diagram which is created will be placed in the package along side the source code. Relocating a scoped diagram has no effect upon its scope.
There is an action to create a scoped diagram for a class and all of its subclasses.

By right-clicking on a type in the Eclipse Package Explorer you will find an option to create a scoped diagram of that type and all of its subtypes (recursively).
Diagrams do not automatically align themselves to their scope. Re-alignment can take a few seconds on larger projects, so it is left to you to say when to perform a re-alignment. To align a scoped diagram to its scope select AgileJ-Align to Scope - note that this option is only enabled for diagrams which have a scope.
Before performing the alignment, a dialog shows which types will be added and which types will be removed. Press OK if you still wish to proceed with the alignment.