Book a Demo

Author Topic: Suggest a refactor function  (Read 3822 times)

orientphoebus

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Suggest a refactor function
« on: December 01, 2005, 01:04:06 pm »
I have 2 classes drawed in class diagram. Class2 is associated to Class1 with it's field named m_Class1.

So the association line's "Target role" picks "m_Class1".

When I change the field's name in Class2's attribute dialog. Say, change to "mmm_Class1", the association line is not changing accordingly. And when I generate the code, it generate 2 fields for Class2: "m_Class1" & "mmm_Class1".

Can EA provide some automatic refactoring feature?

sachafournier

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • Using EA 5.0
    • View Profile
Re: Suggest a refactor function
« Reply #1 on: January 18, 2006, 07:43:27 am »
In fact, it's really a problem in the round trip of code generation/reverse eng. Everytime we want to change an attribute name from the model, we have to change it both place. If we forget to change the attribute name or the target role, code generation will duplicate attribute and molel will go crazy.

Is there a way to "NOT" attributea in class that have a coresponding Target Role ?

sachafournier

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • Using EA 5.0
    • View Profile
Re: Suggest a refactor function
« Reply #2 on: January 18, 2006, 07:46:06 am »
Sorry for the typo.

Is there a way to "NOT" display attributes in class that have a coresponding Target Role.

A better way could be to automate the process. When changing Target Role (or Attribute), the the attribute (or Target Role) automaticly change.