Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to generate Class Diagram automatically by green UML in eclipse

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to automatically generate class diagrams in eclipse", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to automatically generate class diagrams in eclipse green UML" this article.

Green UML automatically generates Class Diagram in eclipse

Green UML and AmaterasUML

1. Installation method:

1. Install GEF first

Install GEF at eclipse- > install new software:

Http://download.eclipse.org/tools/gef/updates-pre-3_8/releases/

2. Download zip files, decompress them and put them in the plugins folder of eclipse.

Green:

My environment is adt-bundle-linux-x86_64-20140321 under linux. The eclipse version is not visible in the environment.

See Release version 4.3.0 in eclipse- > readme- > readme_eclipse.html, so on the official website

Http://green.sourceforge.net/builds.html downloaded the latest version of 3.5.1.

The latest version of http://jaist.dl.sourceforge.net/project/green/green/green%203.5.1/green-3.5.1.zip zip address

AmaterasUML:

Download the latest version of the official website directly.

Http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasUML

The latest version of http://jaist.dl.sourceforge.jp/amateras/56447/AmaterasUML_1.3.4.zip zip address

2. Usage:

Green:

Java file-> right-click-> Green UML- > add to new diagram

AmaterasUML:

File-- > new-- > other-- > AmaterasUML-- > Class diagram

After you create a new one, in the file

Right-- > Java-- > Import / Export Import / Export java File

Reference:

Reprint one

Automatically generate UML diagram in eclipse

There are many such plug-ins on the Internet, but they are messy and you can use a simple Green UML. UML diagrams can be generated automatically from existing code.

Installation method:

1. Find the GEF version and GreenUML version of your own Eclipse from http://green.sourceforge.net/builds.html

For example, if my eclipse is Indio 3.7, then GEF is 3.7 and Green UML is 3.5.1.

two。 Download the corresponding version of GEF from http://www.eclipse.org/gef/downloads.php. After downloading, I decompress it directly, and then copy everything in the plugins directory to the plugins directory under the Eclipse installation directory.

3. Download the corresponding version of GreenUML from http://sourceforge.net/projects/green/, and unzip it and still copy everything in the plugins directory to the plugins directory in the Eclipse installation directory.

Note that you must download the corresponding version, or there will be an error in Type is unsupported.

Restart Eclipse. In "Winodw-Preference", you can see the "Green" option in the left menu.

Select a Java file, there is "Green UML" in the right-click menu, and there are two suboptions "Add to New ClassDiagram" and "Add to last viewed ClassDiagram" below.

After choosing to add, you can see the .grn file in the src directory and open it as follows

Double-click a class, you can go to the source code section, right-click on the class diagram, you can add functions, class members, etc., and then double-click, you can see that these definitions have been added to the source code.

Right-click Save as, you can save as a picture.

1. Green UML plug-in 1. View the Eclipse version

Check the version of Eclipse (Help-About Eclipse Platform) currently installed on your computer, which is version 3.3.2.

2. View the corresponding plug-in version

Then go to the website http://green.sourceforge.net/builds.html to check the corresponding Green and GEF version:

Looks like Green3.0.0 and GEF3.3.

3. Install Green 3.0.0

Just click on the link of 3.0.0 directly in the above website. Extract the downloaded green-3.0.0.zip and put all the folders under the file green-3.0.0.zip\ green-3.0.0\ plugins in the directory: d:\ eclipse3.3.2\ eclipse\ plugins (your directory may be different from mine).

4. Install GEF3.3

Online installation and offline installation are supported.

(1) online installation: Help-Software Updates-Find and Install-Search for new features to install, select Graphical Editing Framework (GEF) Update Site, finish, and then select GEF 3.3 to install. I adopted this method.

(2) offline installation: go to the download directory http://archive.eclipse.org/tools/gef/downloads/drops/ and select the appropriate version to download and install

5. Restart Eclipse

After steps 3 and 4 are completed, restart Eclipse to use Green UML.

II. AmaterasUML plug-in

Based on the problems in the use of Green UML (for large projects, do not respond after clicking to generate class diagrams), I can only look for other plug-ins again. Unwittingly, I found AmaterasUML.

Official website: http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasUML

Scope of application: Eclipse version 3.3 or above

Other requirements: JDT, GEF

Installation method:

1. Install the AmaterasUML plug-in

Go directly to the official website and download the latest version of AmaterasUML_1.3.4.tar. Then extract it, copy and paste the three extracted files into the directory D:\ eclipse3.3.2\ eclipse\ plugins (your directory may be different from mine).

2. Install JDT and GEF

Install the above method of installing GEF online to install JDT and GEF. I won't repeat it here.

3. Restart Eclipse

After steps 1 and 2 are completed, restart Eclipse to use AmaterasUML. As for how to use it, please see the official website. Here is just a picture:

The above is all the contents of the article "how to automatically generate class diagrams in green UML in eclipse". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report