-
-
Notifications
You must be signed in to change notification settings - Fork 306
Common Problems
Your JVM (Java Virtual Machine) needs more memory to convert such a large diagram. The following line starts UMLet with 1GB memory which should be enough for every diagram: javaw -Xms1024m -Xmx1024m -jar umlet.jar
- The main features which are always active are:
- You can open uxf files directly within Eclipse tabs
- You can use the most important UMLet features via menu
-
File > New > Other > Other > Umlet diagram
can be used to create new diagrams
From v14.3 on, you can enable the extended Eclipse integration with Right click > configure > Enable Umlet Builder or by putting a property <com.umlet.nature.enabled>true</com.umlet.nature.enabled>
into your pom.xml (for maven projects). This enables the following additional features (see also #351).
- After saving an uxf file, Eclipse automatically exports a png file next to it.
- Renaming an uxf or png file will automatically rename the other file and every JavaDoc link
- Link UMLet diagrams in Javadoc using
<img src="path_to_diagram.png">
- There is content assist for it, if you press ctrl+space multiple times until "Link to diagram.png" shows up
- type part of the diagram name and content assist will only suggest diagrams with a name matching this partial string
- click on an existing diagram path in Javadoc press ctrl+space to switch to a path relative to {@docRoot}
- ctrl+click on an existing diagram path in Javadoc opens the diagram uxf in an Eclipse tab
- type a diagram name while within a JavaDoc block and press Ctrl+Space until "Create and link new Umlet diagram ..." shows up to automatically create a uxf file with the suggested name
- JavaDoc links are automatically updated when moving classes, packages, files and directories.
There is an open bug with Eclipse Plugin + OS X which is described in https://github.com/umlet/umlet/issues/399 We assume that the combination of the UMLet Eclipse Plugin and BetterTouchTool causes some problems. To get UMLet to work properly, in the preferences for BetterTouchTool, add an application-specific configuration for Eclipse and set it to completely disable BetterTouchTool for that application, and you should be able to work with it.
There are several ways to install the Umlet Eclipse Plugin:
- Drag the install button into Eclipse or in Eclipse use "Help > Eclipse Marketplace"
- In Eclipse use "Help > Install New Software > paste URL "http://www.umlet.com/umlet_latest/repository" and install "UMLet Eclipse Plugin"
- Via local p2 repository
- download repository from https://www.umlet.com/changes.htm and unzip it
- In Eclipse use "Help > Install New Software > Add > Local", locate the unzipped "repository" file and install "UMLet Eclipse Plugin"
- Version 14.2 and older don't provide p2 update sites, therefore you must do a manual installation by putting the downloaded file into your "Eclipse/dropins" directory
If you have built the artifacts on your own machine, the plugin output is in umlet-eclipse-plugin/target/com.umlet.plugin-<version>-SNAPSHOT.jar
and the p2 update site is in umlet-eclipse-p2/target/umlet-eclipse-p2-<version>-SNAPSHOT.zip
. These artifacts can be used to install the plugin as described above.
There are many different eclipse variants and problems are often caused by conflicts with other plugins which makes it hard to analyze.
For a simple test to exclude issues with other plugins, you could try to download the Eclipse IDE for Java Developers as zip file and follow steps 1-2 of the following list. If there are still issues, steps 3-5 can be used to analyze the issue with the plugin loading procedure:
- put
com.umlet.plugin-{version}.jar
into the eclipse/dropins folder (make sure you unzipped the downloaded file!) - start eclipse using
eclipse -clean
(to make sure it reloads all plugins) - after start check
Windows -> Show View -> Error Log
. Are there any UMLet related errors? - check the loaded plugins as described in http://stackoverflow.com/a/7777020:
- Go to console view
- from the dropdown select
Host OSGi Console
- enter
ss
and confirm
- it should show a list of plugins which have been loaded. Is
com.umlet.plugin
there? - if it shows up enter
diag <number of umlet plugin>
to get some info why it isn't loaded orbundle <number of umlet plugin>
to see detailed infos about it
- close eclipse and restart it with additional debug info for eclipse as described http://stackoverflow.com/a/12480978
How can I convert deprecated elements (red background and deprecation text when selected) to the non deprecated ones?
For simple and small diagrams I would suggest replacing the elements by hand (when replacing a specific element it's often useful to hold the Shift-key to disable sticking of relations temporarily).
For more complex or larger diagrams I suggest the following procedure:
The first step is to make sure the diagram which should be converted is at 100% zoom (otherwise Relations will not be on Grid after the conversion)
When you're looking at the UXF file, the main difference is that old elements have a class name as type and the new elements have a string as id.
OLD:
<element>
<type>com.umlet.element.Class</type>
<coordinates>
<x>160</x>
<y>208</y>
<w>128</w>
<h>56</h>
</coordinates>
<panel_attributes>text</panel_attributes>
<additional_attributes/>
</element>
NEW:
<element>
<id>UMLClass</id>
<coordinates>
<x>160</x>
<y>208</y>
<w>128</w>
<h>56</h>
</coordinates>
<panel_attributes>text</panel_attributes>
<additional_attributes/>
</element>
Therefore you can use the text-replace feature of any text editor to update old elements to new ones.
In the previous example this could be:
replace <type>com.umlet.element.Class</type>
with <id>UMLClass</id>
which will convert old class elements to the new class element
The easiest way to find the IDs of the new elements is to enable the developer mode (File -> Options -> Developer Mode). Now when selecting an element, you will see its ID on the lower right corner. The type of the deprecated type is not shown in v14.1 (you will have to look into the uxf to find it), but will be visible in v14.2+ to make migration easier
After the conversion of an UXF, I would suggest to open both diagrams and check if they look the same (as I said before some commands have changed such as setting text alignment)
The classic Custom Elements are very flexible elements (which exist since many UMLet versions) which work by compiling Java source code to a graphical representation of an element. Although the compiler based approach is very flexible and allows the user to use the full power of a programming language to design elements, it has certain downsides such as:
- Security: You should only open custom elements from trusted sources to avoid execution of malicious code (think of custom elements as opening executable files from other people)
- Not mixable with other elements: Custom Elements and regular elements are completely separated. It's not possible to mix them in any way
- Portability: because Custom Elements are compiled on the fly during program execution, they are limited to environments which can use such a compiler. E.g. UMLetino (the GWT based web version of UMLet) is using JavaScript and does not allow the use of a Java compiler during runtime
To fix these problems, a simpler version of custom elements has been created (available in v14+), which is presented in the Custom Drawings palette (make sure to read the description in the bottom element on how to use them). The customizations which are shown there are not based on a compiler, but instead use a simplified Java-like syntax to allow the user to draw different shapes into existing elements. For example, the database-object on the top right of the palette is simply an empty Text-element (the same as in the UML Common Elements palette) enhanced with custom drawings. This kind of customization can be applied to any regular element, is secure and portable. The only disadvantage is that the syntax is slightly limited in comparison to the classic Custom Element syntax (basically no loops and no if/else)
In general we strongly suggest to use the new way of customizing elements (as presented in the Custom Drawings palette) and only fall back to classic Custom Elements if really complex customizations are needed.