Introduction

If you are dragging and dropping identification, types and categories from the Types and Properties window to the Main window (Model tab) to create your selection criteria, by default, the Architecture Checker will use the basic All objects matching criterion. This will match all objects with any of the criteria you add in.

In addition, any sub-objects of the matched object(s) will also be assigned to the layer or set (as well as external objects). Sub objects are for example packages, classes and interfaces contained in a parent Java Package object.

Note that when sub-objects are included, these sub objects may not match the filter criteria due to the way in which these sub-objects are determined: the filter criteria are applied first and then the sub objects are calculated based on the objects "captured" by the filter criteria. As a result it is possible that the sub-objects do not match the filter criteria - this is the expected behavior.

Excluding sub-objects

If you prefer not to include sub-objects, you can do two things:

Modify existing criteria in a layer or set

  • Right click the pink criterion section in the layer or set
  • Choose Properties in the contextual menu
  • Untick the Include sub-objects option:

  • Click OK to complete the operation.

New empty layer or set

  • Right click the empty layer or set
  • Choose Add selection criteria in the contextual menu
  • Untick the Include sub-objects option as above
  • Click OK to complete the operation.

Results

Either operation above will result in a criterion that does not include sub-objects:

Colours

Depending on the combination of options you choose, the Layer or Set will change colour as follows (note the background colour and the yellow/grey circular icon in the top left of the criterion):

Include sub-objects ticked, Include external objects not ticked
Include sub-objects ticked, Include external objects ticked
Include sub-objects not ticked, Include external objects not ticked
Include sub-objects not ticked, Include external objects ticked