This answer applies to EA.
You can import individual files or entire directories, recursively or not. Importing a catalog is by far the most common case; importing a single file does not automatically create a chart.
When importing the source directory, you have the option of creating diagrams for each UML package or no diagrams at all. You also decide whether to create packages for each source code directory, namespace (default), or file.
If your code consists of only 20 classes, most likely they are in the same directory and / or namespace, so play around with this option (Package Structure in the Import Source dialog box) to get the right number of diagrams.
In the same dialog box there is a button “New diagram parameters”, which opens another configuration dialog box, in which you can choose whether the diagrams should contain class attributes and / or operations. You can also make a decision based on visibility, for example, only for public participants.
This dialog only affects what is shown in the diagrams when they are created. Participants are still imported, just not displayed. This is similar to what you need.
You can change the display settings for any chart by double-clicking on its empty area or by right-clicking and selecting "Properties". It looks like you entered this dialogue and changed something, but I can’t say that. The situation you are describing is where you cannot display the screen the way it was, not the one I have ever encountered in EA.
You can also select display options for each class by right-clicking on a chart and selecting Feature Visibility. I do not recommend you use this in reverse design circuits, I just mentioned this for completeness.
The layout you are describing, with all the classes in a meaningless diagonal, tells me that the chart does not line up properly after being created. Creating a chart is a two-step process; first, all classes are discarded on it, then the layout is applied.
This is strange, since EA automatically creates the generated charts, and I could not find an option that allows you to deselect this behavior. If this fails, send a bug report to Sparx Systems. You can always lay out a chart by opening it and choosing Layout Scheme in the Top Level Chart menu.
If, finally, your classes are distributed between different packages of namespaces and for EA to generate several diagrams for them, you will have to combine them manually. Do this by opening both diagrams, selecting all (Ctrl-A) in one, copying (Ctrl-C) and pasting (Ctrl-V) in the other, then again ask EA about the layout scheme.
So:
- Right-click the empty package in the project browser, select "Code Engineering" - "Import Source Directory".
- In the dialog box, select the root directory and source type.
- Check "Create logic for each package" and select the package structure that best suits your original structure.
- Click New Chart Settings, and in the new dialog box, turn off Show Attributes, Show Operations, and Show Property Methods, if applicable.
- OK both dialogs.
- If multiple diagrams are created, copy all the classes into one diagram.
- If the layout does not look good, select Chart - Layout.
Hope this helps.