google-code-export / umple

Automatically exported from code.google.com/p/umple
1 stars 0 forks source link

Naming conflicts between attributes, state machines and associations #354

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It is possible to create a state machine with the same name as an attribute. It 
is also possible to create an association that will generate variables that 
conflict with either.

For example

class X {
  a;
  * -- 0..1 A;
}

class A {}

Should generate  an error message that a role name is needed on the association 
due to a confluct with the name of the attribute.

class X {
  stuff;
  * -- 0..1 A stuff;
}

class A {}

Should generate an error that the role name stuff conflicts with an attribute

class X {
  a;
  a {
    s1 {
      e1 -> s2;
    }
    s2 {}
  }

}

Should generate an error that the state machine conflicts with the attribute. 
Of course any combination of other conflucts may also occur, such as state 
machine with association role name.

In all the above cases, bad code will be generated

Original issue reported on code.google.com by TimothyCLethbridge on 21 Nov 2012 at 8:00

GoogleCodeExporter commented 9 years ago
See also issue 272 which should be done together with this one

Original comment by TimothyCLethbridge on 31 Dec 2012 at 5:47

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 31 Dec 2012 at 5:49

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 30 Jan 2013 at 1:43

GoogleCodeExporter commented 9 years ago
I have dealt with the first 2 situations in the original post while I was 
fixing issue 272. All that remains is to deal with is when the state machine 
name conflicts with an attribute name or association role name.

Original comment by bjquebec...@gmail.com on 10 Feb 2013 at 5:26

GoogleCodeExporter commented 9 years ago

Original comment by TimothyCLethbridge on 18 Feb 2013 at 2:31