Question

Have a long component name that is brushing up against the edges of the box and would like to add a line feed to fix the problem.

Tried adding a "\n" which did work except that the characters "\n" are visible in the name.

Was it helpful?

Solution

The simple way to achieve this is by adding spaces to the name where you want the line breaks.

EA (10) does not recognize control characters in element names and will stretch an element horizontally in order to accomodate the name. However, it appears that the component icon in the upper right corner is not taken into account, so the text pushes up against the boundary. If you try the same thing with a class (which does not have an icon) it works better. You can always resize the component manually, of course.

If you're working with UML profiles, you could create a stereotype with a shape script, which allows you to customize the appearance of stereotyped elements. Shape scripts don't have support for string manipulation, but there is a printwrapped() method that should work. But the simple solution for everyday use is to add spaces to the name.

OTHER TIPS

You can import the name field of the object with line feeds.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top