Enforcement of inconsistent formatting. (#338)

When editing an attribute in a class diagram, when you click away from the class to commit the edit the operation is formatted to include space either side of the colon.

When editing an operation in a class diagram, committing the same edit enforces no space either side of the colon.

Created
16 January 2014 12:15:49
Closed
19 January 2014 23:12:45
Requested by
Neutrino
State
Solved
Version
6.52.5056.736 (64 bit)
OperatingSystem
Win 7
Solved in
6.70

Neutrino 21 January 2014 14:48:45

It's now consistent across attributes and operations, but now there is space after the colon but no space before the colon. Shouldn't there be space either side?

Dusan Rodina - softwareideas.net 21 January 2014 17:17:39

UML specification uses spaces more often as

Name: Type

but on some pages and also in many UML tools the following notation is used

Name : Type

I think there is no strict definition about spaces (you can correct me if I'm wrong). But if you need to show it in way, you mentioned, I can add some kind of setting for it.

Neutrino 7 May 2014 11:08:30

Rather than adding an extra config setting why not just leave it configured the way the User entered it.

I notice that it also adds space between the function declarator and opening parenthesis whether you want it there or not.

Dusan Rodina - softwareideas.net 7 May 2014 17:53:49

The problem is that these extra spaces would be saved somehow. SIM parses line with an attribute (or an operation) and it saves only semantic parts - name, type, visibility, etc.

I could save also original spaces (from inline diagram editing) between parts, but it will be a lot of work with small added value.

I don't exclude the possibility of implementating this, but I think it should not have a high priority. I will also analyze different ways of implementation.

I would rather add a setting of a uniform user format of spaces for the whole project (which would ensure consistency), but I will think about it yet.

TrackedRequestComment
Your Name:
You can use these formatting tags: [b]bold[/b] [i]italic[/i] [u]underline[/u] [url]www.example.com[/url] [code]some code[/code] [quote]quoted text[/quote] [list]one list item per line[/list]