What you need to do to reverse engineer UML sequence diagram from Java code is to select the source folder first, and then pick-up an operation from the identified classes. Visual Paradigm will form a sequence diagram by analyzing the operation you selected. A frequently asked question about this process is “Why aren’t there any operations?” We are going to answer you why in this article.
To perform reverse engineering of sequence diagram, you first select Tools > Code > Instant Reverse Java to Sequence Diagram… from the toolbar. Then, you’ll see this window:
You add the source folder, select a .java file and then click Next.
Now, you see the screen below and you find no operations available for selection. For this reason, you cannot proceed with reverse engineering.
Cause of Problem and Solution
The problem is due to a wrong selection of source folder.
Source folder is the root folder in which the *.java files (or the packages) are stored. Source folder is NEITHER the projects directory nor the project folder (unless you store the source files directly under the project folder). Usually, when you work with a project, there should be a folder named like src or source for storing the source code. That folder is what you need to select. A wrong selection of source folder will make it impossible for Visual Paradigm to analyze the code content properly, thus making it unable to recognize the operations in the selected class, which lead to no operations being listed eventually.
So the solution is simple. Run again the reverse engineering process. In the source folder selection screen, add the right source folder. Select the desired class and click Next. Then, you will see the operations listed. Select the desired operation and continue. A sequence diagram will then be formed.