Book a Demo

Author Topic: Diagram Refactorings (Extract)  (Read 4738 times)

fperedo

  • EA Novice
  • *
  • Posts: 10
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Diagram Refactorings (Extract)
« on: March 23, 2007, 08:30:20 am »
Hi!
Nowdays is very common to have refactoring functionality in the IDE, a refactoring I find particularly useful is "extract method", (http://www.refactoring.com/catalog/extractMethod.html)

I would love to have similar functionality in Activity Diagrams or State Diagrams, so that I could select a subset of the elements of the diagram, and click on "extract diagram", the EA would replace the elements of a the actitiy diagram with a composite element and automatically create a composite element with an internal activity diagram with all the elements that were previously in the main diagram. :)

Mmmm... it could also be used in Sequence & Communication diagrams!!! :o (And we could also have an "inline diagram" that could do the opposite thing... ::) )

Other refactorings that would be nice to have could be:
-Extract Superclass (for Class Diagram)
-Extract Interface (for Class Diagram)
- Pull Up Field (for Class Diagram)
- Pull Up Method (for Class Diagram)
- Extract Class (for Class Diagram)

In fact it would be great if EA could have "diagram equivalents" for all the refactorings in http://www.refactoring.com/catalog/index.html, that would eliminate a lot of "grunt work"... ;)

What do you think?  

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Diagram Refactorings (Extract)
« Reply #1 on: March 23, 2007, 02:35:42 pm »
Good idea, but I suspect not sometime soon...

I think there might be issues with EA's internal metamodel that would preclude some of these features, but...

Formally request a feature from Sparx.  You can use the [size=13]Request a Feature[/size] link via the Support link at the top of the page.
Place a reference back to this topic in the message.  That way, the Sparxians can see any ongoing discussion.
If you get a response, please add it to the topic.

Paolo

« Last Edit: March 23, 2007, 02:36:34 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

edcwhite

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Diagram Refactorings (Extract)
« Reply #2 on: September 05, 2007, 04:35:35 am »
What you said is EXACTLY what we need.   It frustrates me to no end that it is easier to refactor code than a design.  Short of what you ask how about just the ability to select a portion of a sequence diagram (including messages!) and then manually copy and paste it into a new diagram.  I would happily create the links!  The problem is you CANNOT copy messages in a sequence diagram so when I spot a portion of the diagram I would like to extract I am forced to recreate much of it.