Is there a way to set the default visibility for attributes and methods in the Dia-Editor? I find myself doing a lot of clicking to change the visibility of attributes to private. Setting the default visibility to private is also a more sane default as it forces you to adhere to the idea of encapsulation.
Asked
Active
Viewed 428 times
2 Answers
1
I have used dia for database mapping and when I was doing that I found having template objects that I copied instead of just creating a new object was the easiest way to get all the defaults the way I wanted on new objects.

user802599
- 787
- 2
- 12
- 35
-
So there is no other way to default everything to private? The problem is when creating new classes, that aren't like other ones. The amount of clicking when creating larger Class Diagrams is a PIA. – mmoraga Oct 01 '12 at 11:49
1
Download the source, edit the file objects/UML/umlattributes.c
, in function UMLAttribute * uml_attribute_new(void)
(around line 73), change the line
attr->visibility = UML_PUBLIC;
to
attr->visibility = UML_PRIVATE;
Optionally, play around with other files and modify to your liking.
Compile the modified source: How to compile Dia

sillyxone
- 34
- 2